/* ============================================================
   Alhamza Ibrahim · portfolio
   One hue, many grades: midnight to ultramarine to ice.
   One typeface; weight carries the initials and the headlines.
   ============================================================ */

:root {
  --ink-950: #070c26;
  --ink-900: #0b1238;
  --ink-800: #111a47;
  --ink-700: #1b2766;
  --blue-600: #2a45f5;
  --blue-500: #4d68ff;
  --blue-300: #9aadff;
  --ice-200: #c9d4ff;
  --ice-100: #e4e9ff;
  --ice-50: #f4f6ff;
  --muted: #98a4d6;
  --faint: #6672ac;
  --gold: #ffcf8a;
  --line: rgba(201, 212, 255, 0.12);
  --line-strong: rgba(201, 212, 255, 0.28);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1120px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 20px;
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);

  interpolate-size: allow-keywords;
}

/* ---------- reset / base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--ink-950);
  color: var(--ice-100);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--blue-600); color: var(--ice-50); }

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

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

ul { list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ic { width: 18px; height: 18px; flex: none; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-300);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled, .nav.menu-open {
  background: rgba(7, 12, 38, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-brand {
  display: inline-flex;
  align-items: baseline;
  color: var(--muted);
}

.nav-brand b { font-weight: 700; color: var(--ice-50); }

/* the name folds down to its initials and opens again */
.brand-rest {
  display: inline-block;
  overflow: hidden;
  max-width: 5em;
  animation: brand-fold 11s var(--ease) infinite;
}

@keyframes brand-fold {
  0%, 52% { max-width: 5em; opacity: 1; }
  62%, 86% { max-width: 0; opacity: 0; }
  96%, 100% { max-width: 5em; opacity: 1; }
}

.nav-links { display: flex; gap: 1.8rem; }

.nav-links a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--ice-50); }

.nav-right { display: flex; align-items: center; gap: 0.6rem; }

.nav-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ice-100);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.4em 1em;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-cta:hover { background: var(--ink-700); border-color: var(--blue-500); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -0.6rem;
  border-radius: 10px;
}

.nav-toggle .ic { width: 22px; height: 22px; }

.nav-toggle .ic-close { display: none; }

.nav-toggle.open .ic-menu { display: none; }

.nav-toggle.open .ic-close { display: block; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 7.5rem 0 5rem;
  min-height: 100svh;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: clip;
}

/* the blue field: one hue, graded from ultramarine down to midnight */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 88% 18%, rgba(42, 69, 245, 0.55), transparent 62%),
    radial-gradient(40rem 30rem at 4% 96%, rgba(27, 39, 102, 0.9), transparent 70%),
    linear-gradient(180deg, var(--ink-900), var(--ink-950));
}

/* an attention map behind the portrait: one hue, graded cell by cell */
.hero-map {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: max(0px, calc((100% - var(--container)) / 2 - 4rem));
  width: min(52%, 560px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  pointer-events: none;
}

.hero-map i {
  border-radius: 20%;
  background: var(--blue-300);
  opacity: calc(var(--o) * 0.5);
}

.hero-map .lit { animation: cell-shift 6s ease-in-out infinite; animation-delay: var(--d); }

@keyframes cell-shift {
  50% { opacity: 0.7; }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(190px, 30vw, 360px);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  width: 100%;
}

.hero-name {
  margin-top: 1.1rem;
  font-weight: 300;
  font-size: clamp(2.7rem, 7.4vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: var(--blue-300);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.name-word { display: inline-flex; align-items: baseline; white-space: nowrap; }

/* A and I carry the weight; the rest of the name steps back */
.initial {
  font-weight: 700;
  color: var(--ice-50);
}

/* on landing the name reads "AI", then opens once to the full name */
.rest {
  display: block;
  overflow: hidden;
  max-width: 4.6em;
  transition: opacity 0.5s ease;
  animation: name-open 1.2s var(--ease) 0.8s backwards;
}

.name-word:first-child .rest { margin-right: 0.24em; animation-name: name-open-gap; }

@keyframes name-open {
  from { max-width: 0; opacity: 0; }
}

@keyframes name-open-gap {
  from { max-width: 0; opacity: 0; margin-right: 0; }
}

@media (hover: hover) {
  .hero-name:hover .rest { opacity: 0.3; }
}

.hero-note {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-note b { font-weight: 700; color: var(--ice-50); }

.hero-note::after {
  content: "";
  display: block;
  width: 2.6rem;
  height: 2px;
  margin-top: 1.4rem;
  border-radius: 2px;
  background: var(--blue-500);
}

/* the wheel */

.pitch { margin-top: 1.4rem; }

.pitch-lead {
  font-size: 1rem;
  color: var(--muted);
}

.wheel {
  --rh: 1.22em;
  position: relative;
  height: calc(var(--rh) * 3);
  margin-top: 0;
  font-weight: 500;
  letter-spacing: -0.035em;
  font-size: clamp(1.8rem, 6.8vw, 3rem);
  line-height: var(--rh);
  color: var(--ice-50);
  perspective: 520px;
  cursor: default;
}

/* the selection band, like the two hairlines of a picker */
.wheel::before, .wheel::after {
  content: "";
  position: absolute;
  left: 0;
  width: min(100%, 11em);
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.wheel::before { top: var(--rh); }

.wheel::after { top: calc(var(--rh) * 2); }

.wheel-item {
  position: absolute;
  left: 0;
  top: var(--rh);
  height: var(--rh);
  white-space: nowrap;
  transform-origin: left center;
  opacity: 0;
  will-change: transform, opacity;
}

.wheel-item:first-child { opacity: 1; }

.wheel.ready .wheel-item {
  transition: transform 0.75s var(--ease), opacity 0.75s var(--ease), color 0.75s var(--ease);
}

.wheel-item:not(.current) { color: var(--blue-300); }

.pitch-tail {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ice-50);
}

.pitch-tail span { color: var(--blue-300); }

.hero-bio {
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  max-width: 31rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.7em 1.3em;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-solid { background: var(--ice-50); color: var(--ink-900); }

.btn-solid:hover { background: #fff; }

.btn-ghost { border: 1px solid var(--line-strong); }

.btn-ghost:hover { border-color: var(--blue-300); background: rgba(154, 173, 255, 0.08); }

.socials { display: flex; gap: 0.2rem; }

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.socials a:hover { color: var(--ice-50); background: rgba(154, 173, 255, 0.12); }

.socials .ic { width: 20px; height: 20px; }

.hero-actions .socials { margin-left: 0.4rem; }

/* portrait: the white studio background melts into a pale ice panel */

.hero-photo { justify-self: end; width: 100%; }

.photo-frame {
  display: block;
  width: 100%;
  padding: 0;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 180px 180px var(--radius) var(--radius);
  overflow: hidden;
  background: linear-gradient(170deg, #fff 0%, var(--ice-100) 100%);
  box-shadow: 0 40px 80px -30px rgba(42, 69, 245, 0.6);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  mix-blend-mode: multiply;
}

/* contact card: opens from the portrait */

.card-dialog {
  margin: auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  max-width: calc(100vw - 2rem);
  overflow: visible;
}

.card-dialog::backdrop {
  background: rgba(4, 7, 22, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.contact-card {
  width: min(20rem, calc(100vw - 2rem));
  padding: 1.8rem 1.6rem 1.5rem;
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(22rem 16rem at 90% 0%, rgba(42, 69, 245, 0.75), transparent 70%),
    linear-gradient(180deg, var(--ink-800), var(--ink-950));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -30px rgba(42, 69, 245, 0.7);
}

.cc-photo {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 10%;
  background: #fff;
}

.cc-name {
  margin-top: 0.9rem;
  font-weight: 300;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--blue-300);
}

.cc-name b { font-weight: 700; color: var(--ice-50); }

.cc-title {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-300);
}

.cc-qr {
  width: 11rem;
  height: 11rem;
  margin: 1.3rem auto 0;
  border-radius: 16px;
  image-rendering: pixelated;
}

.cc-url {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--blue-300);
}

.cc-url b { font-weight: 500; color: var(--ice-50); }

.card-actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* ---------- sections ---------- */

.section { padding: clamp(2.2rem, 4.5vw, 3.5rem) 0; }

#work { padding-top: clamp(3rem, 6vw, 5rem); }

#contact { padding-bottom: clamp(3rem, 6vw, 5rem); }

.section-head { margin-bottom: clamp(1.3rem, 3vw, 2rem); }

.section-title {
  margin-top: 0.5rem;
  font-weight: 500;
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ice-50);
}

.points li {
  position: relative;
  padding-left: 1.3em;
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 62ch;
}

.points li + li { margin-top: 0.55rem; }

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.6em;
  height: 1px;
  background: var(--blue-300);
}

/* ---------- work: expandable rows ---------- */

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

.proj { border-bottom: 1px solid var(--line); }

.proj summary {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto 2.75rem;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
}

.proj summary::-webkit-details-marker { display: none; }

.proj-no {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  transition: color 0.3s ease;
}

.proj-main { display: grid; gap: 0.25rem; }

.proj-title {
  font-weight: 500;
  font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ice-100);
  transition: color 0.3s ease, transform 0.4s var(--ease);
}

.proj-sum { color: var(--muted); font-size: 0.95rem; max-width: 56ch; }

.proj-ctx {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--faint);
  text-align: right;
  white-space: nowrap;
}

.proj-toggle {
  position: relative;
  justify-self: end;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}

.proj-toggle::before, .proj-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--ice-100);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease);
}

.proj-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }

.proj[open] .proj-toggle { background: var(--blue-600); border-color: var(--blue-600); }

.proj[open] .proj-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }

.proj[open] .proj-title, .proj[open] .proj-no { color: var(--blue-300); }

@media (hover: hover) {
  .proj summary:hover .proj-title { color: var(--ice-50); transform: translateX(6px); }
  .proj summary:hover .proj-toggle { border-color: var(--blue-300); }
}

.proj-body {
  padding: 0 2.75rem 2rem 4rem;
}

.proj::details-content {
  height: 0;
  overflow: clip;
  opacity: 0;
  transition: height 0.45s var(--ease), opacity 0.45s ease, content-visibility 0.45s allow-discrete;
}

.proj[open]::details-content { height: auto; opacity: 1; }

.award {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  border: 1px solid rgba(255, 207, 138, 0.35);
  border-radius: 999px;
  padding: 0.3em 0.9em;
}

.stack {
  margin-top: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--faint);
  line-height: 1.8;
}

/* ---------- side projects ---------- */

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

.side-card {
  display: flex;
  flex-direction: column;
  padding: 1.3rem 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  transition: background 0.35s ease, border-color 0.35s ease;
}

.side-kind {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.side-name {
  margin-top: 0.5rem;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ice-50);
}

.side-desc {
  margin-top: 0.4rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.side-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue-300);
}

.side-link .ic { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }

@media (hover: hover) {
  .side-card:hover { background: var(--ink-800); border-color: var(--line-strong); }
  .side-card:hover .side-link .ic { transform: translate(3px, -3px); }
}

/* ---------- about + skills: label on the left, content on the right ---------- */

.group + .group { margin-top: 2.2rem; }

.group-head {
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ice-50);
  padding-bottom: 0.7rem;
}

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

.now {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-left: 0.5em;
  vertical-align: 0.15em;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice-50);
  background: var(--blue-600);
  border-radius: 999px;
  padding: 0.25em 0.75em;
}

.now::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: #fff;
  animation: now-pulse 2.4s ease-in-out infinite;
}

@keyframes now-pulse {
  50% { opacity: 0.35; }
}

.row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.row-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue-300);
}

.row-body { max-width: 64ch; }

.row-title {
  display: block;
  margin-bottom: 0.2rem;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ice-50);
}

.row-text { color: var(--muted); }

/* compact rows: title and detail share one line */
.group-inline .row { padding: 0.85rem 0; }

.group-inline .row-title { display: inline; margin: 0; font-size: 1.05rem; }

.group-inline .row-text::before { content: "·"; margin: 0 0.5em; color: var(--faint); }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.chip {
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--ice-100);
  background: var(--ink-800);
  border-radius: 999px;
  padding: 0.38em 0.95em;
  white-space: nowrap;
}

/* ---------- contact ---------- */

.contact-panel {
  padding: clamp(2.2rem, 7vw, 5rem);
  border-radius: clamp(20px, 4vw, 36px);
  background:
    radial-gradient(40rem 26rem at 100% 0%, var(--blue-500), transparent 65%),
    var(--blue-600);
}

.contact-panel .kicker { color: var(--ice-200); }

.contact-title {
  margin-top: 0.6rem;
  font-weight: 600;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #fff;
}

.contact-line {
  margin-top: 1.3rem;
  max-width: 36rem;
  color: var(--ice-100);
}

.contact-email {
  display: inline-block;
  margin-top: 2rem;
  font-size: clamp(1.05rem, 3.6vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
  overflow-wrap: anywhere;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  transition: border-color 0.2s ease;
}

.contact-email:hover { border-color: #fff; }

.contact-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ice-100);
}

.contact-foot .socials a { color: var(--ice-100); }

.contact-foot .socials a:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }

/* ---------- footer ---------- */

.footer { padding: 0 0 2.5rem; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--faint);
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { padding: 6.5rem 0 4rem; min-height: 0; }

  .proj summary { grid-template-columns: 2.2rem minmax(0, 1fr) 2.75rem; align-items: start; }

  .proj-no { padding-top: 0.45rem; }

  .proj-ctx { display: none; }

  .proj-body { padding: 0 0 1.8rem 3.2rem; }

  .row { grid-template-columns: 150px minmax(0, 1fr); gap: 0.4rem 1.2rem; }
}

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

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 12, 38, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 0 0.9rem;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

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

  .nav-links a { font-size: 1rem; padding: 0.8rem var(--gutter); }

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

@media (max-width: 620px) {
  .hero-map { top: 4.2rem; right: -2.5rem; width: 68%; transform: none; gap: 3px; }

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

  .hero-photo { order: -1; justify-self: start; max-width: 132px; }

  .photo-frame { border-radius: 66px 66px 14px 14px; box-shadow: none; }

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

@media (max-width: 480px) {
  .proj summary { gap: 0.6rem; }

  .proj-body { padding-left: 0; }

  .hero-actions .socials { margin-left: -0.6rem; flex-basis: 100%; }
}

/* ---------- reduced motion ---------- */

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal { opacity: 1; transform: none; }

  .brand-rest { animation: none; }
}
