/* ================================================
   Mohamad Moheb — Portfolio
   Copper on graphite. Warm, precise, hand-built.
   ================================================ */

:root {
  /* Surfaces: warm graphite, one step at a time */
  --bg: oklch(15.5% 0.006 75);
  --bg-raised: oklch(18% 0.008 75);
  --surface: oklch(19.5% 0.009 75);
  --surface-hover: oklch(22.5% 0.01 75);

  /* Ink: warm ivory ramp — muted kept bright enough for AA on bg */
  --ink: oklch(93% 0.009 85);
  --ink-2: oklch(80% 0.012 85);
  --muted: oklch(72% 0.014 80);

  /* Hairlines */
  --line: oklch(93% 0.01 85 / 8%);
  --line-strong: oklch(93% 0.01 85 / 16%);

  /* Copper: the one accent. Traces, links, live details. */
  --copper: oklch(74% 0.105 55);
  --copper-bright: oklch(80% 0.11 60);
  --copper-soft: oklch(74% 0.105 55 / 14%);
  --copper-faint: oklch(74% 0.105 55 / 7%);

  --green: oklch(76% 0.13 155);

  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --nav-h: 68px;
  --max-w: 1080px;
  --radius: 10px;
  --radius-sm: 7px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* z scale: content < noise < nav < progress */
  --z-noise: 50;
  --z-nav: 100;
  --z-progress: 110;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}
html::-webkit-scrollbar { display: none; } /* Chrome, Safari, Opera */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--copper-soft); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 3px;
}
.section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ── Skip link ── */
.skip-link {
  position: fixed; top: 10px; left: 10px;
  z-index: calc(var(--z-progress) + 1);
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-sm);
  transform: translateY(-64px);
  transition: transform .25s var(--ease);
}
.skip-link:focus-visible { transform: none; outline-offset: 1px; }

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

body.menu-open { overflow: hidden; }

/* ── Film grain ── */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  z-index: var(--z-noise);
  pointer-events: none;
  opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section { padding: clamp(88px, 12vw, 128px) 0; border-top: 1px solid var(--line); }

/* ── Scroll progress ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: var(--z-progress);
  background: var(--copper);
  transform: scaleX(0); transform-origin: left;
  transition: transform .1s linear;
}

/* ── Navbar ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: oklch(15.5% 0.006 75 / 86%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
#navbar:has(.mobile-menu.open) {
  background: var(--bg);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  height: var(--nav-h); padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav-brand { justify-self: start; }
.brand-name {
  font-size: 14.5px; font-weight: 700;
  color: var(--ink); letter-spacing: -.01em;
  white-space: nowrap;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  justify-self: center;
}
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 6px 11px; border-radius: 6px;
  transition: color .2s ease, background .2s ease;
  position: relative;
}
.nav-link:hover { color: var(--ink); background: oklch(93% 0.01 85 / 4%); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--copper);
}
.nav-right {
  justify-self: end;
  display: flex; align-items: center; gap: 18px;
}
.nav-time {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.nav-cta {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 7px 16px; border-radius: var(--radius-sm);
  transition: background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--surface-hover);
  border-color: oklch(93% 0.01 85 / 26%);
}

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  background: none; border: none;
  width: 44px; height: 44px; padding: 12px;
  cursor: pointer;
  grid-column: 3; justify-self: end;
}
.hamburger span {
  width: 20px; height: 2px;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column;
  padding: 8px 32px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 16px; font-weight: 500; color: var(--muted);
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease;
}
.mobile-menu a:hover { color: var(--ink); }
.mobile-cta { color: var(--copper) !important; font-weight: 600; border-bottom: none !important; }

/* ── Hero ── */
#hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 48px) 32px 96px;
  position: relative; overflow: hidden;
}
.hero-art {
  position: absolute; top: 50%; right: 0;
  transform: translateY(-50%);
  height: min(88vh, 760px);
  color: var(--copper);
  pointer-events: none;
}
.hero-art svg { height: 100%; width: auto; }

.hero-inner {
  max-width: var(--max-w); margin: 0 auto; width: 100%;
  position: relative;
}
.hero-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 34px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 oklch(76% 0.13 155 / 45%);
  animation: pulse 2.5s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 oklch(76% 0.13 155 / 45%); }
  70% { box-shadow: 0 0 0 9px oklch(76% 0.13 155 / 0%); }
  100% { box-shadow: 0 0 0 0 oklch(76% 0.13 155 / 0%); }
}
.hero-name {
  font-size: clamp(52px, 9vw, 94px);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.028em;
  color: var(--ink);
  margin-bottom: 30px;
}
.hero-role {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 400;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.hero-role a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--copper-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.hero-role a:hover { color: var(--copper); text-decoration-color: var(--copper); }
.hero-desc {
  font-size: 16px;
  color: var(--muted);
  max-width: 470px;
  margin-bottom: 44px;
  line-height: 1.68;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero entrance choreography */
.hero-status, .hero-name, .hero-role, .hero-desc, .hero-actions {
  animation: rise .9s var(--ease) both;
}
.hero-name    { animation-delay: .08s; }
.hero-role    { animation-delay: .2s; }
.hero-desc    { animation-delay: .3s; }
.hero-actions { animation-delay: .4s; }
.hero-art     { animation: fadein 1.6s ease .5s both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Scroll cue */
.hero-scroll {
  position: absolute; bottom: 34px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted);
  transition: color .2s ease;
  animation: fadein 1s ease 1.1s both;
}
.hero-scroll:hover { color: var(--ink-2); }
.scroll-line {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, transparent, var(--muted));
  overflow: hidden;
  position: relative;
}
.scroll-line::after {
  content: '';
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--copper);
  animation: scrolldrip 2.2s var(--ease) infinite;
}
@keyframes scrolldrip {
  0% { top: -100%; }
  55%, 100% { top: 100%; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 600;
  padding: 13px 26px; border-radius: var(--radius-sm);
  transition: background .2s ease, color .2s ease, transform .2s var(--ease), box-shadow .25s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--copper); color: var(--bg);
}
.btn-primary:hover {
  background: var(--copper-bright);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--ink);
  border-color: oklch(93% 0.01 85 / 26%);
}

/* ── Section heads ── */
.section-head {
  display: flex; align-items: center; gap: 28px;
  margin-bottom: clamp(40px, 6vw, 56px);
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -.022em;
  color: var(--ink);
  line-height: 1.1;
  white-space: nowrap;
}
.head-rule {
  flex: 1; height: 1px;
  background: var(--line);
  position: relative;
}
.head-rule::after {
  content: '';
  position: absolute; right: 0; top: 50%;
  transform: translate(0, -50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--copper);
  opacity: .7;
}

/* ── Tags ── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tag {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px;
  background: oklch(93% 0.01 85 / 5%);
  color: var(--ink-2);
  transition: background .2s ease, color .2s ease;
}
.tag:hover { background: oklch(93% 0.01 85 / 9%); color: var(--ink); }
.tags-copper .tag {
  background: var(--copper-faint);
  color: var(--copper);
}
.tags-copper .tag:hover {
  background: var(--copper-soft);
  color: var(--copper-bright);
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: border-color .25s ease, transform .25s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.card-link {
  font-size: 13.5px; font-weight: 600; color: var(--copper);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s ease;
}
.card-link:hover { color: var(--copper-bright); }
.link-arrow { transition: transform .2s var(--ease); }
.card-link:hover .link-arrow { transform: translateX(3px); }

/* ── Selected work ── */
.work-list { display: flex; flex-direction: column; gap: 20px; }

.work-featured { padding: 38px; }
.work-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 52px;
  align-items: center;
}
.work-header { margin-bottom: 20px; }
.work-labels { display: flex; align-items: center; gap: 12px; }
.work-badge {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
  background: oklch(76% 0.13 155 / 8%);
  color: var(--green);
  border: 1px solid oklch(76% 0.13 155 / 22%);
  padding: 3px 9px; border-radius: 5px;
}
.badge-neutral {
  background: oklch(93% 0.01 85 / 5%);
  color: var(--muted);
  border-color: var(--line-strong);
}
.badge-open {
  background: var(--copper-faint);
  color: var(--copper);
  border-color: oklch(74% 0.105 55 / 28%);
}
.work-year {
  font-family: var(--mono);
  font-size: 12px; color: var(--muted);
  letter-spacing: .02em;
}
.work-info h3 { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
.work-desc {
  font-size: 14.5px; color: var(--ink-2); line-height: 1.7;
  margin-bottom: 22px;
  text-wrap: pretty;
}
.work-info .tags { margin-bottom: 26px; }
.work-cta { font-size: 14px; }

/* Browser preview mockup */
.preview-window {
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
  transition: transform .5s var(--ease);
}
.work-featured:hover .preview-window {
  transform: perspective(900px) rotateY(-1.5deg) rotateX(.5deg);
}
.preview-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px;
  background: oklch(17% 0.007 75);
  border-bottom: 1px solid var(--line);
}
.prev-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: oklch(93% 0.01 85 / 12%);
}
.prev-dot:nth-child(1) { background: oklch(65% 0.18 25 / 55%); }
.prev-dot:nth-child(2) { background: oklch(80% 0.15 85 / 55%); }
.prev-dot:nth-child(3) { background: oklch(75% 0.16 150 / 55%); }
.prev-url {
  font-family: var(--mono); font-size: 10px;
  color: oklch(93% 0.01 85 / 30%);
  margin-left: 10px; flex: 1; text-align: center;
}
.preview-body {
  padding: 26px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 172px;
}
.pv-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.pv-kicker {
  font-family: var(--mono);
  font-size: 8.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--copper);
  opacity: .85;
}
.pv-title {
  font-size: 19px; font-weight: 700;
  line-height: 1.12; letter-spacing: -.015em;
  color: var(--ink);
}
.pv-title em {
  font-style: normal;
  color: var(--copper);
}
.pv-line {
  width: 120px; height: 6px; border-radius: 3px;
  background: oklch(93% 0.01 85 / 8%);
  margin-top: 3px;
}
.pv-line.short { width: 84px; }
.pv-btn {
  width: 68px; height: 20px; border-radius: 5px;
  background: oklch(93% 0.01 85 / 14%);
  margin-top: 6px;
}
.pv-gpu { color: var(--ink); width: 168px; }
.pv-fan { animation: spin 14s linear infinite; }
.pv-fan-2 { animation-duration: 11s; }
@keyframes spin { to { transform: rotate(360deg); } }

.work-secondary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.work-card .work-labels,
.work-open .work-labels { margin-bottom: 18px; }
.work-card h3,
.work-open h3 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 10px; }
.work-card .work-desc,
.work-open .work-desc { margin-bottom: 18px; font-size: 14px; }
.work-card .tags { margin-bottom: 0; }

/* Open bench slot — invitation, not a fake case study */
.work-open {
  border-style: dashed;
  border-color: oklch(74% 0.105 55 / 28%);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      oklch(74% 0.105 55 / 4%) 8px,
      oklch(74% 0.105 55 / 4%) 16px
    );
}
.work-open:hover {
  border-color: oklch(74% 0.105 55 / 45%);
  border-style: dashed;
}

/* ── Experience ── */
.xp-list {
  list-style: none;
  border-top: 1px solid var(--line);
}
.xp-list:empty { border-top: none; }
.xp-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.xp-period {
  font-family: var(--mono);
  font-size: 12.5px; font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  padding-top: 6px;
}
.xp-body h3 {
  font-size: 20px; font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: 10px;
}
.xp-body p {
  font-size: 15px; color: var(--ink-2); line-height: 1.7;
  max-width: 62ch;
  margin-bottom: 14px;
  text-wrap: pretty;
}
.xp-meta {
  font-family: var(--mono);
  font-size: 12px !important;
  color: var(--muted) !important;
  letter-spacing: .01em;
  max-width: none !important;
  white-space: nowrap;
}
.xp-body .card-link { margin-top: 2px; }

.edu-school {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--ink);
  transition: color .2s ease;
}
.edu-school:hover { color: var(--copper); }
.edu-school .link-arrow {
  font-size: 0.78em;
  color: var(--copper);
  transition: transform .2s var(--ease), color .2s ease;
}
.edu-school:hover .link-arrow {
  color: var(--copper-bright);
  transform: translate(2px, -2px);
}
.xp-body p:has(.edu-school) {
  margin-bottom: 8px;
  max-width: none;
}

/* ── Certifications ── */
.cert-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}
.cert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 38%);
  gap: 28px;
  align-items: center;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .28s ease, transform .28s var(--ease);
}
.cert-card:hover,
.cert-card:focus-visible {
  border-color: oklch(74% 0.105 55 / 42%);
  transform: translateY(-2px);
  outline: none;
}
.cert-card:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

.cert-thumb {
  width: 100%;
  max-width: 320px;
  justify-self: end;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px oklch(0% 0 0 / 6%);
}
.cert-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 791;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}

.cert-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cert-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cert-platform {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--copper);
  background: var(--copper-faint);
  border: 1px solid oklch(74% 0.105 55 / 28%);
  padding: 3px 9px; border-radius: 5px;
}
.cert-date {
  font-family: var(--mono);
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  letter-spacing: .02em;
}
.cert-body h3 {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}
.cert-issuer {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
  margin-bottom: 12px;
  text-wrap: pretty;
}
.cert-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--copper);
  transition: color .2s ease;
}
.cert-card:hover .cert-cta,
.cert-card:focus-visible .cert-cta { color: var(--copper-bright); }
.cert-cta .link-arrow {
  transition: transform .25s var(--ease);
  display: inline-block;
}
.cert-card:hover .cert-cta .link-arrow,
.cert-card:focus-visible .cert-cta .link-arrow {
  transform: translate(3px, -2px);
}

@media (prefers-reduced-motion: reduce) {
  .cert-card,
  .cert-cta .link-arrow { transition: none; }
  .cert-card:hover,
  .cert-card:focus-visible { transform: none; }
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-cta h2 {
  font-size: clamp(34px, 4.8vw, 52px);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -.025em;
  color: var(--ink);
  margin-bottom: 18px;
}
.contact-lead {
  font-size: 15.5px; color: var(--muted);
  line-height: 1.68; margin-bottom: 28px;
  max-width: 42ch;
  text-wrap: pretty;
}

/* Contact form */
.contact-form {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 440px;
}
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.form-row { display: flex; flex-direction: column; gap: 7px; }
.form-label {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
}
.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  padding: 12px 14px;
  transition: border-color .2s ease, background .2s ease;
  outline: none;
}
.form-input::placeholder { color: oklch(72% 0.014 80 / 55%); }
.form-input:hover { border-color: var(--line-strong); }
.form-input:focus {
  border-color: oklch(74% 0.105 55 / 55%);
  background: var(--surface-hover);
}
.form-input:user-invalid:not(:placeholder-shown):not(:focus) {
  border-color: oklch(65% 0.16 25 / 55%);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 280px;
}
.form-submit {
  align-self: flex-start;
  margin-top: 4px;
  border: none;
  cursor: pointer;
}
.form-submit:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}
.form-status {
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 1.3em;
  color: var(--ink-2);
}
.form-status.is-success { color: var(--green); }
.form-status.is-error { color: oklch(72% 0.14 25); }
.contact-details {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.contact-row {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: var(--surface-hover); }
.contact-label {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .09em; color: var(--muted);
  text-transform: uppercase;
  flex-shrink: 0; width: 76px;
}
.contact-value {
  font-size: 14.5px; color: var(--ink-2); flex: 1;
  transition: color .2s ease;
  overflow-wrap: anywhere;
}
a.contact-value:hover { color: var(--copper); }
.contact-value.muted { color: var(--muted); }

/* Copy button */
.copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 5px;
  border-radius: 5px; flex-shrink: 0;
  transition: color .2s ease, background .2s ease;
  display: flex; align-items: center;
}
.copy-btn:hover { color: var(--ink); background: oklch(93% 0.01 85 / 6%); }
.copy-btn.copied { color: var(--green); }
.check-icon { display: none; }
.copy-btn.copied .copy-icon { display: none; }
.copy-btn.copied .check-icon { display: block; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.footer-inner {
  display: flex; align-items: center; gap: 24px;
}
.footer-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.footer-copy { font-size: 13px; color: var(--muted); margin-left: auto; }
.back-top {
  font-size: 13px; color: var(--muted);
  transition: color .2s ease;
}
.back-top:hover { color: var(--copper); }

/* ── Reveal on scroll ──
   Content is visible by default; JS hides only elements
   confirmed below the fold, then reveals them on intersect. */
.reveal {
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal-pending {
  opacity: 0;
  transform: translateY(22px);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-pending { opacity: 1; transform: none; transition: none; }
  .status-dot { animation: none; }
  .scroll-progress { transition: none; }
  .hero-status, .hero-name, .hero-role, .hero-desc, .hero-actions, .hero-art, .hero-scroll {
    animation: none;
  }
  .scroll-line::after { animation: none; top: 0; }
  .trace-pulse { display: none; }
  .pv-fan, .pv-fan-2 { animation: none; }
  .preview-window { transform: none; transition: none; }
  .work-featured:hover .preview-window { transform: none; }
  .card:hover, .btn-primary:hover { transform: none; }
}

/* ── Responsive ── */
@media (max-width: 1000px) {
  .hero-art {
    opacity: .42;
    height: min(72vh, 620px);
    right: -4%;
  }
}
@media (max-width: 900px) {
  .hero-art {
    opacity: .28;
    height: min(58vh, 480px);
    right: -12%;
    mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  }
  .contact-grid { grid-template-columns: 1fr; gap: 52px; }
  .work-layout { grid-template-columns: 1fr; gap: 34px; }
  .preview-window { transform: none; }
  .work-featured:hover .preview-window { transform: none; }
  .xp-row { grid-template-columns: 1fr; gap: 10px; padding: 32px 0; }
  .xp-period { padding-top: 0; }
  .xp-meta { overflow-x: auto; }
}
@media (max-width: 720px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }
  .nav-links, .nav-right { display: none; }
  .hamburger { display: flex; grid-column: 2; justify-self: end; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .cert-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .cert-thumb {
    max-width: none;
    order: -1;
  }
  #hero { padding-left: 20px; padding-right: 20px; padding-bottom: 88px; }
  .hero-art {
    opacity: .2;
    height: min(48vh, 360px);
    right: -18%;
    top: 58%;
  }
  .work-featured { padding: 26px; }
  .work-secondary { grid-template-columns: 1fr; }
  .preview-body { grid-template-columns: 1fr; justify-items: start; }
  .pv-gpu { width: 140px; }
  .hero-name { letter-spacing: -.022em; }
  .hero-scroll {
    bottom: 22px;
    gap: 8px;
  }
  .scroll-line { height: 26px; }
  .section-head { gap: 18px; }
  .fact { grid-template-columns: 96px 1fr; gap: 12px; }
  .footer-inner { flex-wrap: wrap; gap: 12px 20px; }
  .footer-copy { margin-left: 0; width: 100%; order: 3; }
}
