:root {
  --bg: oklch(0.14 0.012 250);
  --fg: oklch(0.97 0.005 250);
  --surface: oklch(0.18 0.014 250);
  --surface-2: oklch(0.22 0.016 250);
  --muted: oklch(0.68 0.02 250);
  --border: oklch(0.28 0.016 250 / 60%);
  --accent: oklch(0.78 0.16 78);
  --accent-2: oklch(0.72 0.18 50);
  --accent-fg: oklch(0.18 0.04 60);
  --radius: 28px;
  --wrap: 1280px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Instrument Serif", Georgia, ui-serif, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at 0% 30%, color-mix(in oklab, oklch(0.6 0.18 270) 18%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}

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

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand, .footer-inner > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  font: 500 17px/1 var(--display);
  letter-spacing: -0.02em;
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 15px;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-role {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.brand-role::before {
  content: "·";
  margin-inline: 2px 10px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  padding: 9px 14px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover {
  background: color-mix(in oklab, var(--fg) 8%, transparent);
  color: var(--fg);
}

.nav-resume, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-resume {
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  white-space: nowrap;
}

.nav-resume:hover, .button:hover {
  transform: translateY(-1px);
}

.hero {
  position: relative;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  opacity: .42;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 64px;
  padding-block: 80px 96px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  line-height: 1.3;
  padding: 8px 14px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.hero h1 {
  max-width: 780px;
  margin: 30px 0 0;
  font: 400 clamp(56px, 8vw, 102px)/.94 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero h1 span, .gradient-word {
  background: linear-gradient(135deg, oklch(0.82 0.16 78), oklch(0.72 0.18 50));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-style: italic;
}

.hero-lead {
  max-width: 620px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-list {
  display: grid;
  gap: 13px;
  max-width: 640px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.hero-list li {
  position: relative;
  padding-left: 32px;
  color: color-mix(in oklab, var(--fg) 88%, transparent);
  font-size: 15px;
}

.hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 16%, transparent);
}

.hero-list li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: .53em;
  width: 6px;
  height: 3px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.button {
  min-height: 48px;
  padding: 14px 22px;
}

.button-primary {
  background: var(--fg);
  color: var(--bg);
}

.button-secondary {
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  color: var(--fg);
  backdrop-filter: blur(10px);
}

.button-secondary:hover {
  background: color-mix(in oklab, var(--fg) 8%, transparent);
}

.button-accent {
  margin-top: 40px;
  background: var(--accent);
  color: var(--accent-fg);
}

.portrait-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: var(--surface-2);
  box-shadow: 0 30px 80px -30px color-mix(in oklab, var(--accent) 50%, transparent);
  animation: float-slow 8s ease-in-out infinite;
}

.portrait-card::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 22%, transparent), transparent 55%);
  filter: blur(28px);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.portrait-card::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(to top, color-mix(in oklab, var(--bg) 92%, transparent), transparent);
  pointer-events: none;
}

.portrait-status {
  position: absolute;
  inset-inline: 24px;
  bottom: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: color-mix(in oklab, var(--bg) 74%, transparent);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.portrait-status span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.portrait-status strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.status-arrow {
  display: grid !important;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg) !important;
  flex: 0 0 auto;
}

.section {
  padding-block: 96px;
}

.section-compact {
  padding-block: 64px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}

.section-head > div {
  max-width: 720px;
}

.section-head p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font: 500 12px/1.2 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.kicker span {
  width: 40px;
  height: 1px;
  background: var(--border);
}

h2 {
  margin: 0;
  font: 400 clamp(40px, 5vw, 66px)/1.02 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  margin: 0;
  font: 400 30px/1.12 var(--display);
  letter-spacing: -0.01em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--border);
  gap: 1px;
}

.stats-grid article,
.expertise-grid article,
.about-grid article,
.stack-grid article,
.articles-grid article,
.cases-grid article {
  background: var(--surface);
}

.stats-grid article {
  min-height: 230px;
  padding: 32px;
  transition: background 160ms ease;
}

.stats-grid article:hover {
  background: var(--surface-2);
}

.stats-grid strong {
  display: block;
  font: 400 clamp(44px, 5vw, 64px)/1 var(--display);
}

.stats-grid span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.stats-grid p {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.about-grid, .expertise-grid, .cases-grid, .articles-grid {
  display: grid;
  gap: 24px;
}

.about-grid {
  grid-template-columns: repeat(3, 1fr);
}

.about-grid article {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
}

.about-grid small {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-family: var(--mono);
}

.about-grid p {
  margin: 0;
  color: color-mix(in oklab, var(--fg) 88%, transparent);
  line-height: 1.75;
}

.split-section {
  padding-block: 40px 96px;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  padding: 40px;
}

.card-glow {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  filter: blur(40px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.feature-card:hover .card-glow {
  opacity: 1;
}

.card-content {
  position: relative;
}

.card-num {
  color: var(--muted);
  font: 500 12px/1.2 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.feature-card h2 {
  margin-top: 18px;
  font-size: clamp(34px, 4vw, 46px);
}

.card-lead {
  margin: 10px 0 0;
  color: var(--muted);
}

.feature-card dl {
  margin: 32px 0 0;
}

.feature-card dt {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.feature-card dd {
  margin: 8px 0 22px;
  color: color-mix(in oklab, var(--fg) 84%, transparent);
  font-size: 14px;
  line-height: 1.7;
}

.expertise-grid {
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--border);
  gap: 1px;
}

.expertise-grid article {
  min-height: 260px;
  padding: 32px;
  transition: background 160ms ease;
}

.expertise-grid article:hover {
  background: var(--surface-2);
}

.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--accent);
  font: 500 12px/1 var(--mono);
}

.expertise-grid h3 {
  margin-top: 28px;
  font-size: 28px;
}

.expertise-grid p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.cases-grid {
  grid-template-columns: repeat(3, 1fr);
}

.cases-grid article {
  display: flex;
  min-height: 380px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.cases-grid article:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--border));
  transform: translateY(-4px);
}

.case-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cases-grid h3 {
  margin-top: 28px;
}

.cases-grid a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--accent);
  font-size: 14px;
}

.cases-grid p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 34px;
}

.tags span, .stack-grid span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 42%, transparent);
  color: color-mix(in oklab, var(--fg) 86%, transparent);
  font-size: 12px;
  padding: 7px 11px;
}

.source-link {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.source-link a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cert-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
}

.cert-list div {
  display: grid;
  grid-template-columns: 100px 1fr 280px;
  align-items: center;
  gap: 24px;
  padding: 24px 30px;
}

.cert-list div + div {
  border-top: 1px solid var(--border);
}

.cert-list span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
}

.cert-list strong {
  font: 400 24px/1.2 var(--display);
}

.cert-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  text-align: right;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.stack-grid article {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
}

.stack-grid h3 {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.stack-grid div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.articles-grid {
  grid-template-columns: repeat(3, 1fr);
}

.articles-grid article {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  transition: border-color 160ms ease;
}

.articles-grid article:hover {
  border-color: color-mix(in oklab, var(--accent) 48%, var(--border));
}

.articles-grid small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.articles-grid h3 {
  margin-top: 18px;
  font-size: 28px;
}

.articles-grid span {
  margin-top: auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: var(--surface);
  padding: 48px;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: -130px;
  right: -130px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  filter: blur(46px);
}

.contact-panel > * {
  position: relative;
}

.contact-lead {
  max-width: 540px;
  margin: 0;
  color: color-mix(in oklab, var(--fg) 90%, transparent);
  font-size: 18px;
  line-height: 1.75;
}

.contact-note {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.contact-grid a {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in oklab, var(--bg) 42%, transparent);
  padding: 18px;
  transition: background 160ms ease, border-color 160ms ease;
}

.contact-grid a:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--border));
  background: color-mix(in oklab, var(--bg) 62%, transparent);
}

.contact-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.contact-grid strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner > div:last-child {
  display: flex;
  gap: 24px;
}

.footer a:hover {
  color: var(--fg);
}

.sticky-resume {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 20px 60px -25px oklch(0 0 0 / 70%);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.sticky-resume.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 1060px) {
  .nav-links { display: none; }
  .hero-grid, .split-grid, .contact-panel {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    padding-top: 56px;
  }
  .portrait-card {
    max-width: 520px;
    margin-inline: auto;
  }
  .stats-grid, .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid, .expertise-grid, .cases-grid, .articles-grid {
    grid-template-columns: 1fr;
  }
  .cert-list div {
    grid-template-columns: 80px 1fr;
  }
  .cert-list em {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 700px) {
  .wrap {
    width: min(100% - 32px, var(--wrap));
  }
  .brand-role, .nav-resume span {
    display: none;
  }
  .site-header {
    position: sticky;
  }
  .hero-grid {
    gap: 42px;
    padding-block: 42px 64px;
  }
  .pill {
    align-items: flex-start;
    border-radius: 18px;
    font-size: 10px;
    letter-spacing: .1em;
    overflow-wrap: anywhere;
  }
  .pill span {
    margin-top: 4px;
  }
  .hero h1 {
    font-size: clamp(44px, 15vw, 60px);
    line-height: .96;
    overflow-wrap: anywhere;
  }
  .hero-lead {
    font-size: 16px;
  }
  .hero-actions, .button {
    width: 100%;
  }
  .portrait-status {
    inset-inline: 14px;
    bottom: 14px;
    border-radius: 16px;
    padding: 12px;
  }
  .portrait-status strong {
    font-size: 12px;
  }
  .status-arrow {
    width: 36px;
    height: 36px;
  }
  .section {
    padding-block: 64px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 34px;
  }
  h2 {
    font-size: clamp(36px, 12vw, 48px);
  }
  .stats-grid, .stack-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid article {
    min-height: 190px;
  }
  .feature-card, .contact-panel {
    padding: 26px;
    border-radius: 24px;
  }
  .cert-list div {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px;
  }
  .cert-list em {
    grid-column: auto;
  }
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-inner > div:last-child {
    flex-direction: column;
    gap: 8px;
  }
  .sticky-resume {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
