:root {
  --ink: #07090f;
  --ink-2: #0c111a;
  --panel: rgba(14, 20, 32, 0.78);
  --panel-2: #141b2a;
  --line: rgba(148, 180, 255, 0.16);
  --line-strong: rgba(160, 196, 255, 0.38);
  --gold: #7aa2ff;
  --gold-2: #b7dcff;
  --ivory: #eef3fb;
  --muted: #9aa8c2;
  --dim: #73809a;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --header: 84px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

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

.project-card__media img {
  max-width: none;
}

.row > *,
.project-grid > *,
.project-grid--rest > *,
.tech-grid > *,
.skill-grid > *,
.point-grid > *,
.steps > *,
.ai-flow > * {
  min-width: 0;
}

body {
  position: relative;
  z-index: 0;
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ivory);
  background: #000000;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
}

::selection {
  background: #6f93ff;
  color: #07101c;
}

h1,
h2,
h3,
h4,
.display-serif {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.96;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--ivory);
  color: var(--ink);
}

.skip-link:focus {
  top: 0.8rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 80;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, transparent, var(--gold-2), var(--gold));
  pointer-events: none;
}

.cursor,
.cursor-dot,
.cursor-trail {
  display: none;
}

html.use-cursor,
html.use-cursor * {
  cursor: none !important;
}

html.use-cursor input,
html.use-cursor textarea {
  cursor: text !important;
}

html.use-cursor .cursor {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 1.5px solid rgba(74, 222, 128, 0.85);
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: normal;
  transform: translate(-50%, -50%);
  transition: width 0.22s ease, height 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, opacity 0.2s ease;
}

html.use-cursor .cursor.is-on {
  opacity: 1;
}

html.use-cursor .cursor.is-hot {
  width: 64px;
  height: 64px;
  margin: 0;
  border-color: rgb(74, 222, 128);
  background: rgba(74, 222, 128, 0.08);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.35);
}

html.use-cursor .cursor.is-down {
  width: 26px;
  height: 26px;
  background: rgba(74, 222, 128, 0.2);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(74, 222, 128);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgb(74, 222, 128);
}

html.use-cursor .cursor-dot {
  display: block;
}

html.use-cursor .cursor-dot.is-on {
  opacity: 1;
}

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9997;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(183, 220, 255, 0.75);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: cursor-trail 0.45s linear forwards;
}

html.use-cursor .cursor-trail {
  display: block;
}

@keyframes cursor-trail {
  0% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
}

@media (pointer: coarse) {
  .cursor-dot,
  .cursor-trail,
  html.use-cursor .cursor {
    display: none !important;
  }

  html.use-cursor,
  html.use-cursor * {
    cursor: auto !important;
  }
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--lx, 72%) var(--ly, 28%), rgba(110, 150, 255, 0.12), transparent 46%);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(7, 10, 16, 0.86);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand__photo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid rgba(74, 222, 128, 0.55);
  flex: 0 0 auto;
}

.brand span {
  color: var(--gold-2);
}

.nav-toggle {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  background: transparent;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ivory);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(40deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-40deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ivory);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-cta {
  border: 1px solid var(--line-strong);
  padding: 0.7rem 1rem;
  color: var(--ivory) !important;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  border-color: var(--gold);
  color: var(--gold-2) !important;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header) + 2.5rem) 1.25rem 4rem;
  overflow: hidden;
  background: transparent;
}

.hero[data-hero] {
  --bg: #000000;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #4ade80;
  --rain: 74, 222, 128;
  background: transparent;
  color: var(--text);
}

.fx-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero[data-hero]::before {
  display: none;
}

.code-rain-canvas,
.spark-canvas,
.hero-glow,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.code-rain-canvas {
  z-index: 0;
}

.hero-glow {
  position: fixed;
  z-index: 30;
  width: 420px;
  height: 420px;
  inset: auto;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.12) 0%, rgba(74, 222, 128, 0.05) 35%, transparent 70%);
  transition: opacity 0.35s ease;
}

.hero-glow.is-on {
  opacity: 1;
}

@media (max-width: 767.98px) {
  .hero-glow.is-on {
    opacity: 0.55;
  }
}

.hero-overlay {
  z-index: 2;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.56) 35%, rgba(0, 0, 0, 0.22) 68%, rgba(0, 0, 0, 0) 100%);
}

.spark-canvas {
  position: fixed;
  z-index: 35;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(900px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-portrait {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 1.35rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 16%;
  border: 2px solid rgba(74, 222, 128, 0.75);
  box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.12), 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hero-tag {
  margin: 0 0 1rem;
  color: var(--accent, #4ade80);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-heading {
  margin: 0 auto;
  max-width: 16ch;
  min-height: 2.35em;
  color: var(--text, #f1f5f9);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.hero-role,
.hero-caret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-role {
  color: var(--accent, #4ade80);
}

.hero-caret {
  display: inline-block;
  width: 2px;
  height: 0.82em;
  margin-left: 3px;
  vertical-align: -0.06em;
  background: var(--accent, #4ade80);
  animation: blink 1s steps(1) infinite;
}

.hero-desc {
  max-width: 42rem;
  margin: 1.15rem auto 0;
  color: var(--muted, #94a3b8);
  font-size: clamp(0.98rem, 2.2vw, 1.08rem);
  font-weight: 300;
  line-height: 1.65;
}

.hero[data-hero] .hero-actions {
  justify-content: center;
}

.hero[data-hero] .btn-start {
  background: var(--accent, #4ade80);
  color: #000000;
  border-color: transparent;
  font-weight: 650;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.2);
}

.hero[data-hero] .btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(74, 222, 128, 0.28);
  color: #000000;
}

.hero[data-hero] .btn-start:focus-visible {
  outline: 2px solid var(--accent, #4ade80);
  outline-offset: 3px;
}

.hero[data-hero] .btn-lux--ghost {
  border-radius: 999px;
  border-color: rgba(74, 222, 128, 0.45);
  color: var(--text, #f1f5f9);
}

.hero__atmosphere,
.page-hero__atmosphere {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(86, 124, 255, 0.2), transparent 42%),
    radial-gradient(ellipse at 85% 10%, rgba(146, 112, 255, 0.12), transparent 36%),
    radial-gradient(ellipse at 70% 80%, rgba(70, 190, 230, 0.08), transparent 40%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero__ring {
  position: absolute;
  right: 8%;
  top: 18%;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(150, 190, 255, 0.22);
  border-radius: 50%;
  animation: spin 36s linear infinite;
  pointer-events: none;
}

.hero__ring::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid rgba(150, 190, 255, 0.12);
}

.hero .container,
.page-hero .container,
.hero-copy,
.portrait-wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
  color: var(--gold-2);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--gold);
}

.hero-title {
  margin: 0 0 1.4rem;
  max-width: 100%;
  font-size: clamp(2.5rem, 5.4vw, 5.6rem);
  color: var(--ivory);
}

.line {
  display: block;
  overflow: hidden;
}

.line > span {
  display: block;
  animation: lineIn 1s var(--ease) both;
}

.line:nth-child(2) > span {
  animation-delay: 0.12s;
}

.line:nth-child(3) > span {
  animation-delay: 0.24s;
}

.line:nth-child(4) > span {
  animation-delay: 0.36s;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(110deg, #8eb4ff 0%, #f4f8ff 40%, #9a8cff 68%, #b7e4ff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 8s linear infinite;
}

.hero-roles {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  min-height: 1.8rem;
  margin-bottom: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-roles__word {
  color: var(--ivory);
  display: inline-block;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), color 0.35s var(--ease);
}

.hero-roles__word.is-focus {
  color: var(--gold-2);
}

.hero-roles__word.is-out {
  opacity: 0;
  transform: translateY(8px);
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 300;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn-lux {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #6d8dff, #4ea4ff 58%, #7d7cf0);
  color: #f6f9ff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(70, 120, 255, 0.22);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.btn-lux::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.7) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
  z-index: -1;
}

.btn-lux:hover::before {
  transform: translateX(120%);
}

.btn-lux:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(90, 140, 255, 0.32);
}

.btn-lux--ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--line-strong);
}

.btn-lux--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-2);
}

.hero[data-hero] .btn-start {
  background: #4ade80;
  color: #000000;
  border-color: transparent;
  font-weight: 650;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.2);
}

.hero[data-hero] .btn-start:hover {
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(74, 222, 128, 0.28);
}

.hero[data-hero] .btn-start:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 3px;
}

.hero[data-hero] .btn-lux--ghost {
  border-radius: 999px;
  border-color: rgba(74, 222, 128, 0.45);
  color: #f1f5f9;
}

.hero[data-hero] .btn-lux--ghost:hover {
  border-color: #4ade80;
  color: #4ade80;
}

.btn-lux:focus-visible,
.site-nav a:focus-visible,
.text-link:focus-visible,
.brand:focus-visible,
.nav-toggle:focus-visible {
  outline: 1px solid var(--gold-2);
  outline-offset: 3px;
}

.portrait {
  margin: 0;
  position: relative;
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 15%;
  filter: saturate(0.86);
  animation: maskIn 1.2s var(--ease) 0.2s both;
}

.portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  color: var(--dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.portrait__chip {
  position: absolute;
  left: -1.2rem;
  bottom: 4.2rem;
  padding: 0.9rem 1rem;
  background: rgba(8, 12, 20, 0.82);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
  animation: floaty 6s ease-in-out 1.2s infinite;
}

.portrait__chip strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.portrait__chip span {
  color: var(--gold-2);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Ticker */
.ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0.95rem 0;
  background: rgba(0, 0, 0, 0.34);
}

.ticker__track {
  display: flex;
  width: max-content;
  gap: 2.4rem;
  animation: ticker 42s linear infinite;
}

.ticker.is-paused .ticker__track {
  animation-play-state: paused;
}

.ticker span {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.ticker span.is-focus {
  color: var(--gold-2);
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 6.5rem 0;
  background: rgba(0, 0, 0, 0.46);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.4rem;
}

.section-kicker {
  color: var(--gold-2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 0.7rem;
}

.section-title {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
}

.section-note {
  max-width: 22rem;
  color: var(--muted);
  font-weight: 300;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--gold-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.text-link i {
  display: inline-block;
  transition: transform 0.35s var(--ease);
}

.text-link:hover i {
  transform: translateX(6px);
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 1.1rem;
}

.project-grid--rest {
  margin-top: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: rgba(8, 12, 18, 0.78);
  border: 1px solid var(--line);
  overflow: hidden;
  backdrop-filter: blur(8px);
  transform-style: preserve-3d;
  transition: border-color 0.4s var(--ease);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(130, 170, 255, 0.16), transparent 42%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--line-strong);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: #100e0c;
}

.project-card--feature .project-card__media {
  aspect-ratio: 16 / 12;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.01);
  transition: transform 0.8s var(--ease);
}

.project-card:hover .project-card__media img {
  transform: scale(1.06);
}

.project-card__index {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 1;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ivory);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s var(--ease);
}

.project-card:hover .project-card__index {
  transform: translateY(-4px);
}

.project-cover {
  height: 100%;
  min-height: 240px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(160deg, rgba(130, 168, 255, 0.1), transparent 42%),
    repeating-linear-gradient(90deg, rgba(140, 176, 255, 0.05) 0 1px, transparent 1px 72px),
    #0d121c;
}

.project-cover strong {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.project-cover__kicker,
.project-cover__flow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--gold-2);
}

.project-cover__flow {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.flow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}

.project-card__body {
  position: relative;
  z-index: 1;
  padding: 1.15rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.project-card__cat {
  color: var(--gold-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.project-card h2,
.project-card h3 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  overflow-wrap: anywhere;
}

.project-card__desc {
  color: var(--muted);
  font-weight: 300;
  font-size: 0.96rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.2rem;
}

.chips li {
  border: 1px solid var(--line);
  padding: 0.25rem 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.project-card__go {
  margin-top: auto;
  padding-top: 0.7rem;
}

/* Process + AI flow */
.steps,
.ai-flow {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.8rem;
  position: relative;
}

.ai-flow {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1.6rem;
}

.steps li,
.ai-flow li {
  position: relative;
  padding: 1.2rem 0.9rem 1rem;
  border-top: 1px solid var(--line-strong);
  min-height: 140px;
}

.steps li span,
.ai-flow li span {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.8rem;
}

.steps li strong,
.ai-flow li strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.steps::before,
.ai-flow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left center;
}

html.js .steps.is-in::before,
html.js .ai-flow.is-in::before {
  animation: grow 1.6s var(--ease) both;
}

.band {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse at 0% 50%, rgba(74, 222, 128, 0.08), transparent 46%),
    rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.8rem, 5vw, 5rem);
  max-width: 14ch;
}

.band p {
  max-width: 36rem;
  color: var(--muted);
  font-weight: 300;
}

/* Page hero */
.page-hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--header) + 4.5rem) 0 2rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  max-width: min(16ch, 100%);
}

.page-hero .lede {
  margin-top: 1.2rem;
}

/* Expertise */
.capability {
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
}

.capability + .capability {
  margin-top: 3rem;
}

.capability h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.4rem, 4vw, 3.8rem);
}

.capability p {
  max-width: 46rem;
  color: var(--muted);
  font-weight: 300;
}

.point-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.point-grid li {
  padding: 1rem 1rem 0.95rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ivory);
  font-size: 0.95rem;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.point-grid li:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

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

.skill-card {
  padding: 1.4rem 1.3rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 220px;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.skill-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.skill-card--wide {
  grid-column: 1 / -1;
  background:
    linear-gradient(120deg, rgba(110, 150, 255, 0.12), transparent 40%),
    var(--panel);
}

.skill-card h3 {
  margin: 0 0 1rem;
  font-size: 2rem;
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-card li {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  color: var(--ivory);
  font-size: 0.88rem;
}

.skill-card--wide li {
    background: rgba(8, 12, 20, 0.35);
}

/* About */
.about-copy p + p {
  margin-top: 1rem;
}

.about-copy p {
  color: var(--muted);
  font-weight: 300;
  font-size: 1.08rem;
}

.discipline-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.discipline-list li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.04em;
}

.discipline-list span {
  color: var(--dim);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Contact */
.contact-panel {
  padding: 1.6rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

.form-label {
  color: var(--dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.form-control {
  background: #0c111a;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ivory);
  min-height: 52px;
  padding: 0.8rem 0.9rem;
  box-shadow: none;
}

.form-control:focus {
  background: #0c111a;
  color: var(--ivory);
  border-color: var(--gold);
  box-shadow: none;
}

textarea.form-control {
  min-height: 160px;
  resize: vertical;
}

.form-note {
  min-height: 1.4rem;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.form-note.is-ok {
  color: #d7e7c8;
}

.form-note.is-bad {
  color: #e7c2b4;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li + li {
  margin-top: 1.3rem;
}

.contact-list span {
  display: block;
  color: var(--dim);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-bottom: 0.25rem;
}

.contact-list a:hover {
  color: var(--gold-2);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 3.2rem 0 1.6rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
}

.footer-brand {
  font-family: var(--serif);
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.site-footer p {
  color: var(--muted);
  font-weight: 300;
  max-width: 28rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.3rem;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.footer-links a:hover {
  color: var(--gold-2);
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.82rem;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

body.is-leaving {
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

@keyframes lineIn {
  from {
    transform: translateY(110%);
  }
  to {
    transform: none;
  }
}

@keyframes maskIn {
  from {
    clip-path: inset(12% 0 0 0);
    opacity: 0;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@keyframes sheen {
  to {
    background-position: 220% center;
  }
}

@keyframes drift {
  to {
    transform: translate3d(0, -2%, 0) scale(1.04);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes floaty {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

@keyframes codeDrift {
  from {
    transform: translate3d(0, 18px, 0);
  }
  to {
    transform: translate3d(0, -28px, 0);
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero__grid,
.page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 176, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 176, 255, 0.055) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse at 50% 42%, #000 18%, transparent 74%);
}

.code-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 62%, transparent 94%);
}

.code-line {
  position: absolute;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: rgba(166, 196, 255, 0.2);
  white-space: nowrap;
  filter: blur(0.4px);
  animation: codeDrift var(--dur, 30s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

.code-field.is-paused .code-line {
  animation-play-state: paused;
}

.code-line:nth-child(1) { top: 14%; left: 3%; --dur: 28s; }
.code-line:nth-child(2) { top: 24%; left: 7%; --dur: 34s; --delay: -4s; color: rgba(176, 160, 255, 0.24); }
.code-line:nth-child(3) { top: 36%; left: 2%; --dur: 31s; --delay: -8s; }
.code-line:nth-child(4) { top: 48%; left: 8%; --dur: 36s; --delay: -2s; }
.code-line:nth-child(5) { top: 62%; left: 4%; --dur: 29s; --delay: -11s; color: rgba(140, 214, 230, 0.24); }
.code-line:nth-child(6) { top: 74%; left: 10%; --dur: 33s; --delay: -6s; }
.code-line:nth-child(7) { top: 16%; right: 4%; left: auto; --dur: 32s; --delay: -3s; }
.code-line:nth-child(8) { top: 28%; right: 8%; left: auto; --dur: 27s; --delay: -9s; color: rgba(176, 160, 255, 0.22); }
.code-line:nth-child(9) { top: 42%; right: 3%; left: auto; --dur: 35s; --delay: -1s; }
.code-line:nth-child(10) { top: 56%; right: 9%; left: auto; --dur: 30s; --delay: -7s; }
.code-line:nth-child(11) { top: 68%; right: 5%; left: auto; --dur: 38s; --delay: -12s; color: rgba(140, 214, 230, 0.22); }
.code-line:nth-child(12) { top: 80%; right: 12%; left: auto; --dur: 26s; --delay: -5s; }

.hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10% -8% -10% -14%;
  background: linear-gradient(100deg, rgba(7, 10, 16, 0.92) 0%, rgba(7, 10, 16, 0.78) 58%, rgba(7, 10, 16, 0.18) 100%);
  pointer-events: none;
}

.type-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  min-height: 1.8rem;
  margin: 0 0 1.15rem;
  color: var(--ivory);
  font-family: var(--mono);
  font-size: clamp(0.82rem, 2.4vw, 0.98rem);
  letter-spacing: 0.01em;
}

.type-caret {
  width: 1px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--gold-2);
  animation: caret 1s steps(1) infinite;
}

.stack-section {
  padding-top: 3.4rem;
  padding-bottom: 1rem;
}

.tech-board + .tech-board {
  margin-top: 1.6rem;
}

.tech-board h3 {
  margin: 0 0 0.85rem;
  font-size: 2rem;
}

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

.tech-grid--home {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tech-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 118px;
  padding: 0.95rem 0.95rem 0.85rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 32, 52, 0.58), rgba(10, 14, 24, 0.66));
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: rgba(150, 186, 255, 0.45);
  box-shadow: 0 14px 30px rgba(40, 70, 140, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tech-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.tech-card__name {
  margin-top: 0.35rem;
  color: var(--ivory);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 35;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(140, 176, 255, 0.28), rgba(120, 164, 255, 0.08) 38%, transparent 68%);
  mix-blend-mode: screen;
  will-change: transform;
}

.tech-card__cat {
  color: var(--dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.64rem;
}

@media (max-width: 1199.98px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    padding: calc(var(--header) + 1.5rem) 1.5rem 2rem;
    background: #07090f;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .site-nav a {
    font-size: 1.15rem;
    letter-spacing: 0.12em;
  }

  .nav-cta {
    width: min(100%, 280px);
    text-align: center;
  }

  .tech-grid--home,
  .tech-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-grid--rest,
  .point-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .ai-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portrait__chip {
    left: 0.75rem;
    bottom: 1rem;
  }
}

@media (max-width: 991.98px) {
  .hero__ring,
  .portrait__chip,
  .cursor-glow {
    display: none;
  }

  .line {
    overflow: visible;
  }

  .hero-actions,
  .cta-actions,
  .nav-cta {
    max-width: 100%;
  }

  .project-grid,
  .project-grid--rest,
  .point-grid,
  .skill-grid,
  .tech-grid,
  .tech-grid--home,
  .steps,
  .ai-flow {
    grid-template-columns: 1fr 1fr;
  }

  .code-line:nth-child(n + 9) {
    display: none;
  }

  .section-head,
  .footer-links,
  .footer-base {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header) + 1.6rem);
  }

  .hero-portrait {
    width: 104px;
    height: 104px;
  }

  .hero-title {
    font-size: clamp(2.7rem, 14vw, 3.6rem);
  }

  .section {
    padding: 4.2rem 0;
  }

  .project-grid,
  .project-grid--rest,
  .point-grid,
  .skill-grid,
  .tech-grid,
  .tech-grid--home,
  .steps,
  .ai-flow {
    grid-template-columns: 1fr;
  }

  .code-line:nth-child(n + 7) {
    display: none;
  }

  .code-line {
    font-size: 0.66rem;
    color: rgba(166, 196, 255, 0.13);
    filter: none;
  }

  .hero-copy::before {
    inset: -6% -6%;
    background: rgba(7, 10, 16, 0.84);
  }

  .type-line {
    max-width: 100%;
    font-size: 0.82rem;
    flex-wrap: wrap;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-lux,
  .nav-cta {
    width: 100%;
  }

  .page-hero h1,
  .section-title,
  .band h2 {
    max-width: 100%;
  }

  .contact-panel {
    padding: 1rem;
  }

  .portrait img {
    max-height: 460px;
  }

  .project-card__media,
  .project-card--feature .project-card__media {
    aspect-ratio: 16 / 10;
  }

  .steps li,
  .ai-flow li {
    min-height: 0;
  }

  .hero__atmosphere,
  .page-hero__atmosphere {
    animation: none;
  }
}

@media (max-width: 575.98px) {
  .eyebrow {
    letter-spacing: 0.1em;
    font-size: 0.64rem;
  }

  .hero-title,
  .page-hero h1,
  .section-title,
  .band h2,
  .capability h2 {
    font-size: clamp(2.05rem, 11vw, 2.7rem);
    max-width: 100%;
  }

  .lede,
  .section-note,
  .about-copy p {
    font-size: 0.98rem;
  }

  .project-card__body,
  .skill-card,
  .contact-panel,
  .point-grid li {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .discipline-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-base {
    flex-direction: column;
  }
}

@media (hover: none), (pointer: coarse) {
  .project-card:hover .project-card__media img,
  .project-card:hover,
  .tech-card:hover,
  .skill-card:hover,
  .point-grid li:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .line > span,
  html.js .reveal,
  .hero-title em {
    opacity: 1;
    transform: none;
    color: var(--gold-2);
    background: none;
  }

  .ticker {
    overflow: hidden;
  }

  .ticker__track {
    flex-wrap: nowrap;
    width: max-content;
  }

  .code-line,
  .type-caret {
    animation: none !important;
  }

  .cursor-trail {
    animation: cursor-trail 0.45s linear forwards !important;
  }
}
