:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --text: #17201c;
  --muted: #62706b;
  --border: #d9e1de;
  --accent: #0f7b72;
  --accent-2: #c44f2d;
  --accent-soft: #dbeeea;
  --shadow: 0 14px 32px rgba(20, 34, 30, .08);
  --radius: 8px;
  --max: 1180px;
}

body[data-theme="dark"] {
  --bg: #111715;
  --surface: #18231f;
  --surface-2: #202d28;
  --text: #edf5f2;
  --muted: #adc0b9;
  --border: #30423c;
  --accent: #62d4c7;
  --accent-2: #ff9a76;
  --accent-soft: #203b37;
  --shadow: 0 16px 36px rgba(0, 0, 0, .26);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

img,
video,
iframe {
  max-width: 100%;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-right: auto;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand:hover,
.site-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.logo {
  width: 30px;
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .92rem;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.btn-icon,
.btn {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.btn-icon {
  padding: .45rem .7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .62rem .9rem;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn:hover,
.btn-icon:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.hero {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  margin: 0 0 .65rem;
  color: var(--accent-2);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 1.1rem;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.03;
}

h2 {
  margin-bottom: .7rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: .4rem;
}

.hero-summary,
.section-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions,
.quick-facts,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.hero-actions {
  margin: 1.4rem 0 1.6rem;
}

.quick-facts span,
.tag-list span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: .35rem .62rem;
  font-size: .83rem;
  font-weight: 700;
}

.tag-list.compact {
  margin-top: .9rem;
  gap: .4rem;
}

.tag-list.compact span {
  padding: .25rem .48rem;
  font-size: .74rem;
}

.profile-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.resume-stats {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 0;
}

.resume-stats div {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.resume-stats dt {
  color: var(--accent);
  font-weight: 800;
}

.resume-stats dd {
  margin: .25rem 0 0;
  color: var(--muted);
}

.posts,
.section {
  padding: 3rem 0;
}

.section-band {
  padding: 3rem 0;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(0, 1fr);
  gap: 2rem;
}

.skill-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.skill-columns div {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.skill-columns p,
.muted {
  color: var(--muted);
}

.posts-controls {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.posts-controls h2 {
  margin: 0;
}

.controls-right {
  display: flex;
  gap: .7rem;
}

.posts-controls select {
  min-width: 104px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: .55rem .75rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  display: flex;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.card.featured {
  grid-column: span 1;
}

.post-thumb {
  width: 210px;
  min-width: 210px;
  height: auto;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.15rem;
}

.meta {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.post-title {
  margin: .35rem 0 .5rem;
  font-size: 1.2rem;
}

.post-title a {
  color: var(--text);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--accent);
}

.excerpt {
  color: var(--muted);
  font-size: .93rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: auto;
  padding-top: .9rem;
}

.card-actions a {
  color: var(--accent);
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
}

.card-actions a:hover {
  text-decoration: underline;
}

.status-badge {
  position: absolute;
  top: .65rem;
  right: .65rem;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: .24rem .55rem;
}

.status-badge.completed {
  background: #238b57;
}

.status-badge.ongoing {
  background: #b95623;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 1rem 0;
  font-size: .9rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.not-found {
  min-height: calc(100vh - 129px);
  display: grid;
  align-items: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.not-found-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 2rem;
  align-items: center;
}

.not-found-copy h1 {
  max-width: 720px;
}

.not-found-panel {
  box-shadow: none;
}

.not-found-links {
  display: grid;
  gap: .7rem;
  margin-top: 1rem;
}

.not-found-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
  padding: .75rem .85rem;
  text-decoration: none;
}

.not-found-links a::after {
  content: ">";
  color: var(--accent);
}

.not-found-links a:hover {
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .hero-grid,
  .split-section,
  .not-found-grid,
  .skill-columns,
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }

  .card {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .hero {
    padding: 3rem 0 2rem;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: .7rem 0;
  }

  .posts-controls,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .controls-right {
    width: 100%;
  }

  .posts-controls select {
    width: 100%;
  }

  .card {
    flex-direction: column;
  }

  .post-thumb {
    width: 100%;
    min-width: 0;
    height: 210px;
  }
}
