/* ==========================================================================
   Tokens
   White page, navy and blue for structure and outlines, orange for buttons.
   ========================================================================== */
:root {
  --paper: #ffffff;
  --panel: #f1f5fa;       /* light blue-grey wells behind images and lists */
  --ink: #14243b;         /* navy text */
  --ink-2: #4a586b;       /* secondary text */
  --rule: #d5deea;        /* hairlines */
  --navy: #26395c;        /* large background blocks */
  --sky: #b7cde4;         /* light blue graphic blocks */
  --sky-deep: #6f95c4;
  --signal: #2c56a0;      /* blue accent: results, outlines, markers, focus */
  --signal-soft: #e2ebf7;
  --orange: #f3ad09;      /* button orange, matched to the Wix site */
  --orange-hover: #dd9c05;
  --white: #ffffff;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --t-xs: 0.875rem;
  --t-s: 1rem;
  --t-m: 1.125rem;
  --t-l: 1.3125rem;
  --t-xl: 1.5rem;
  --t-2xl: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
  --t-3xl: clamp(2.125rem, 1.3rem + 3.2vw, 3rem);
  --t-4xl: clamp(2.5rem, 1.4rem + 4.4vw, 4.25rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 76rem;
  --measure: 66ch;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-m);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--signal); }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 700; }

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

.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--ink); color: var(--white); padding: 0.6rem 1rem; z-index: 60; }
.skip:focus { top: 0.75rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display { font-variation-settings: "wdth" 115; font-weight: 800; letter-spacing: -0.02em; }
.label { font-size: var(--t-xs); font-variation-settings: "wdth" 80; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }

/* Gentle fade-up on first scroll into view (only when JS and motion are allowed) */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease) var(--d, 0ms), transform 600ms var(--ease) var(--d, 0ms); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Header and footer
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.96);
  border-bottom: 2px solid var(--ink); transition: box-shadow 250ms ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(20, 36, 59, 0.1); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap;
  font-variation-settings: "wdth" 112; font-weight: 800; font-size: var(--t-l);
  text-decoration: none; letter-spacing: -0.01em;
}
.wordmark::before { content: ""; width: 0.85rem; height: 0.85rem; background: var(--signal); transition: transform 300ms var(--ease); }
.wordmark .short { display: none; }
@media (max-width: 480px) { .wordmark .full { display: none; } .wordmark .short { display: inline; } }
.wordmark:hover::before { transform: rotate(45deg); }
.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.6vw, 2rem); list-style: none; }
.nav a:not(.icon-link) { position: relative; text-decoration: none; font-weight: 500; font-size: var(--t-s); padding: 0.5rem 0; }
.nav a:not(.icon-link)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.15rem; height: 2px; background: var(--signal);
  transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease);
}
.nav a:not(.icon-link):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--signal); }

.site-footer { border-top: 1px solid var(--rule); margin-top: 5rem; padding: 2rem 0 3rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: var(--t-s); }

/* Square icon links (LinkedIn, email) */
.icons { display: flex; gap: 0.6rem; list-style: none; align-items: center; }
.icon-link {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  background: var(--signal); color: var(--white); border-radius: var(--radius);
  transition: background-color 150ms ease, transform 150ms ease;
}
.icon-link:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.icon-link svg { width: 1.45rem; height: 1.45rem; fill: currentColor; }
.icon-link.sm { width: 2.25rem; height: 2.25rem; }
.icon-link.sm svg { width: 1.2rem; height: 1.2rem; }

/* Orange button with white text, matching the Wix site */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--orange); color: var(--white); text-decoration: none;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(90, 55, 0, 0.35);
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(243, 173, 9, 0.35);
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.button:hover { background: var(--orange-hover); color: var(--white); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(243, 173, 9, 0.4); }

/* ==========================================================================
   Home: hero
   ========================================================================== */
.hero-band { padding-bottom: clamp(0.5rem, 2vw, 1.5rem); }
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
}
.hero-art { position: relative; aspect-ratio: 1 / 0.9; }
.hero-art::before { /* navy block with a faint engineering-paper dot grid */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 76%;
  background-color: var(--navy);
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.hero-art::after { /* thin blue outline offset from the photo square */
  content: ""; position: absolute; right: -1.1rem; top: calc(6% + 1.1rem); width: 68%; aspect-ratio: 1;
  border: 2px solid var(--signal);
}
.hero-art .sq {
  position: absolute; right: 0; top: 6%; width: 68%; aspect-ratio: 1; z-index: 1;
  background: var(--sky); display: grid; place-items: center;
  box-shadow: 0 14px 34px rgba(20, 36, 59, 0.22);
}
.hero-art img {
  width: 88%; aspect-ratio: 1; object-fit: cover; object-position: 50% 15%;
  border-radius: 50%; border: 6px solid var(--white);
}
.hero-text h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.75rem);
  font-variation-settings: "wdth" 112; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
.hero-text h1::after { content: ""; display: block; width: 5.5rem; height: 3px; background: var(--signal); margin: 1.25rem 0 1.25rem 0.2rem; }
.hero-text .school { font-size: var(--t-xl); font-weight: 500; margin: 0; }
.hero-text .school span { color: var(--sky-deep); padding: 0 0.15rem; }
.hero-text .grad { color: var(--ink-2); margin: 0.3rem 0 0; }
.hero-text .goal { margin: 1.25rem 0 0; max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 1.75rem; }


/* One orchestrated entrance on load */
@media (prefers-reduced-motion: no-preference) {
  .hero-art::before { animation: slide-in 800ms var(--ease) both; transform-origin: left; }
  .hero-art .sq { animation: rise 800ms var(--ease) 150ms both; }
  .hero-art::after { animation: fade 800ms ease 450ms both; }
  .hero-text > * { animation: rise 700ms var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: 80ms; }
  .hero-text > :nth-child(3) { animation-delay: 140ms; }
  .hero-text > :nth-child(4) { animation-delay: 200ms; }
  .hero-text > :nth-child(5) { animation-delay: 260ms; }
}
@keyframes slide-in { from { transform: scaleX(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Project grid
   ========================================================================== */
.section { padding-top: clamp(2.75rem, 6vw, 4.5rem); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.section-head h2 { font-size: var(--t-2xl); }
.section-head p { margin: 0; color: var(--ink-2); max-width: 52ch; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.5rem); list-style: none; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }
.card-link:focus-visible { outline: none; }
.card-media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--panel); transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.card-over {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.4rem;
  padding: 1.25rem; color: var(--white);
  background: linear-gradient(to top, rgba(20, 36, 59, 0.95) 0%, rgba(20, 36, 59, 0.74) 55%, rgba(20, 36, 59, 0.18) 100%);
  opacity: 0; transition: opacity 250ms ease;
}
.card-over > * { transform: translateY(10px); transition: transform 300ms var(--ease); }
.card-over strong { font-size: var(--t-l); line-height: 1.15; }
.card-over .r { font-size: var(--t-xs); font-weight: 600; color: var(--sky); }
.card-over .h { font-size: var(--t-s); line-height: 1.4; }
.card-over .more { margin-top: 0.4rem; align-self: flex-start; background: var(--orange); color: var(--white); font-size: var(--t-xs); font-weight: 700; padding: 0.35rem 0.75rem; border-radius: 3px; text-shadow: 0 1px 1px rgba(90, 55, 0, 0.35); }
.card-link:hover .card-media, .card-link:focus-visible .card-media { transform: scale(1.04); box-shadow: 0 18px 38px rgba(20, 36, 59, 0.28); }
.card-link:hover .card-media img, .card-link:focus-visible .card-media img { transform: scale(1.06); }
.card-link:hover .card-over, .card-link:focus-visible .card-over { opacity: 1; }
.card-link:hover .card-over > *, .card-link:focus-visible .card-over > * { transform: none; }
.card-link:focus-visible .card-media { outline: 3px solid var(--signal); outline-offset: 4px; }
.card-text { text-align: center; padding-top: 1.1rem; }
.card-text h3 { font-size: var(--t-m); font-weight: 600; letter-spacing: 0.01em; transition: color 200ms ease; }
.card-text p { margin: 0.3rem auto 0; color: var(--ink-2); font-size: var(--t-s); }
.card-link:hover .card-text h3 { color: var(--signal); }
.card-media.is-type { display: grid; place-items: center; background: var(--navy); color: var(--white); padding: 1.5rem; text-align: center; }
.card-media.is-type span { font-size: var(--t-2xl); font-variation-settings: "wdth" 112; font-weight: 800; line-height: 1.05; }
.badge { position: absolute; top: 0.9rem; left: 0.9rem; z-index: 1; background: var(--orange); color: var(--white); font-size: var(--t-xs); font-weight: 700; padding: 0.3rem 0.65rem; border-radius: 3px; text-shadow: 0 1px 1px rgba(90, 55, 0, 0.35); }

/* ==========================================================================
   Home: about, skills, coursework, call to action
   ========================================================================== */
.about-intro { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.about-photo { position: relative; padding: 0 1rem 1rem 0; max-width: 16rem; }
.about-photo::before { content: ""; position: absolute; right: 0; bottom: 0; width: 80%; height: 80%; background: var(--sky); }
.about-photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-copy > p { font-size: var(--t-m); }
.seeking { margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: var(--panel); border-left: 4px solid var(--orange); }
.seeking h3 { font-size: var(--t-m); margin-bottom: 0.4rem; }
.seeking p { font-size: var(--t-s); color: var(--ink-2); margin-bottom: 0.9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.chips li {
  font-size: 0.9375rem; padding: 0.4rem 0.85rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--rule);
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.chips li:hover { transform: translateY(-2px); border-color: var(--sky-deep); background: var(--signal-soft); }
.skill-card .chips li { background: var(--panel); border-color: transparent; }
.skill-card .chips li:hover { background: var(--signal-soft); border-color: var(--sky-deep); }

.sub-head { font-size: var(--t-xl); margin: clamp(2.5rem, 5vw, 3.5rem) 0 1.25rem; display: flex; align-items: center; gap: 0.75rem; }
.sub-head::before { content: ""; width: 1.5rem; height: 3px; background: var(--orange); }

.skill-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.skill-card {
  background: var(--white); border: 1px solid var(--rule); border-top: 5px solid var(--navy);
  border-radius: 10px; padding: 1.4rem 1.25rem 1.5rem;
  box-shadow: 0 6px 18px rgba(20, 36, 59, 0.06);
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.skill-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20, 36, 59, 0.12); }
.skill-card h4 { font-size: var(--t-m); margin-bottom: 1rem; color: var(--navy); }
.skill-card.c-blue { border-top-color: var(--signal); } .skill-card.c-blue h4 { color: var(--signal); }
.skill-card.c-orange { border-top-color: var(--orange); } .skill-card.c-orange h4 { color: #9a6a00; }
.skill-card.c-sky { border-top-color: var(--sky-deep); } .skill-card.c-sky h4 { color: #3e6496; }

.courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem 2rem; }
.course-group h4 { font-size: var(--t-s); color: var(--signal); padding-bottom: 0.5rem; margin-bottom: 0.25rem; border-bottom: 2px solid var(--signal); }
.course-group ul { list-style: none; }
.course-group li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; transition: padding-left 200ms var(--ease); }
.course-group li:hover { padding-left: 0.35rem; }
.course-group .code { color: var(--ink-2); font-size: var(--t-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }

.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
  background-color: var(--navy); color: var(--white); padding: clamp(1.75rem, 4vw, 2.75rem);
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.2px); background-size: 18px 18px;
}
.cta h2 { font-size: var(--t-2xl); margin-bottom: 0.4rem; }
.cta p { margin: 0; color: #d2dceb; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.cta .icon-link { background: var(--white); color: var(--navy); }
.cta .icon-link:hover { background: var(--sky); color: var(--navy); }
.cta :focus-visible { outline-color: var(--orange); }

/* ==========================================================================
   Page heads (Projects, Contact)
   ========================================================================== */
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 0.5rem; }
.page-head h1 { font-size: var(--t-4xl); font-variation-settings: "wdth" 112; font-weight: 800; letter-spacing: -0.02em; }
.page-head h1::after { content: ""; display: block; width: 5rem; height: 3px; background: var(--signal); margin-top: 1rem; }
.page-head p { margin-top: 1.25rem; font-size: var(--t-l); color: var(--ink-2); max-width: 56ch; }

.contact-panel { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--navy); color: var(--white); }
.contact-panel .main { padding: clamp(1.75rem, 5vw, 3.5rem); }
.contact-panel .side { background: var(--sky); color: var(--ink); padding: clamp(1.75rem, 5vw, 3.5rem); }
.contact-panel h2 { font-size: var(--t-xl); margin-bottom: 0.75rem; }
.contact-panel .email-big { display: inline-block; margin: 0.5rem 0 0.5rem; color: var(--white); font-size: clamp(1.25rem, 0.8rem + 2.2vw, 2.1rem); font-weight: 700; font-variation-settings: "wdth" 112; word-break: break-word; }
.contact-panel .email-big:hover { color: #ffd77a; }
.contact-panel :focus-visible { outline-color: var(--orange); }
.contact-list { list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 0.85rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(20, 36, 59, 0.15); }
.contact-list a:not(.icon-link) { font-weight: 600; }

/* ==========================================================================
   Project page: header and side timeline
   ========================================================================== */
.crumb { padding-top: 1.5rem; font-size: var(--t-s); }
.crumb a { color: var(--ink-2); }

.p-head { padding: clamp(1.5rem, 4vw, 2.75rem) 0 0.5rem; }
.p-head h1 { font-size: var(--t-4xl); max-width: 18ch; line-height: 1.02; }
.p-head .summary { font-size: var(--t-l); color: var(--ink-2); margin-top: 1.25rem; max-width: 56ch; }
.p-head.side { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.p-head.side h1 { font-size: var(--t-3xl); }
.p-head.side .p-hero { margin-top: 0; }
.p-head.side .p-hero .media { max-height: 34rem; width: auto; margin-inline: auto; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin: 2rem 0 0; border-top: 2px solid var(--ink); }
.facts div { padding: 0.9rem 1.25rem 0.9rem 0; border-bottom: 1px solid var(--rule); }
.facts div.wide { grid-column: 1 / -1; }
.facts dt { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); font-variation-settings: "wdth" 80; }
.facts dd { margin: 0.2rem 0 0; font-size: var(--t-s); font-weight: 500; }

.results { display: flex; flex-wrap: wrap; gap: 1rem clamp(1.5rem, 5vw, 3.5rem); margin: 1.75rem 0 0; list-style: none; }
.results li { display: flex; flex-direction: column; }
.results .v { font-size: var(--t-3xl); line-height: 1; color: var(--signal); font-variation-settings: "wdth" 115; font-weight: 800; letter-spacing: -0.02em; }
.results .l { margin-top: 0.4rem; font-size: var(--t-s); color: var(--ink-2); }

.p-hero { margin-top: 2.25rem; }
.p-hero .media { max-height: 62vh; object-fit: contain; }
.p-hero video.media { width: auto; max-width: 100%; background: none; }

/* Side timeline that fills as you scroll (wide screens only) */
.rail { display: none; }
@media (min-width: 1180px) {
  .has-rail { display: grid; grid-template-columns: 10rem minmax(0, 1fr); column-gap: 3rem; }
  .has-rail > :not(.rail) { grid-column: 2; }
  .rail {
    display: block; grid-column: 1; grid-row: 1 / span 50; align-self: start;
    position: sticky; top: 7rem; margin-top: 2rem; opacity: 0.35; transition: opacity 300ms ease;
  }
  .rail.is-visible { opacity: 1; }
  .rail-track { position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0.6rem; width: 2px; background: var(--rule); }
  .rail-fill { position: absolute; inset: 0; background: var(--signal); transform: scaleY(0); transform-origin: top; }
  .rail ol { list-style: none; position: relative; }
  .rail li + li { margin-top: 1.1rem; }
  .rail a { display: flex; align-items: center; gap: 0.75rem; font-size: var(--t-xs); font-weight: 500; color: var(--ink-2); text-decoration: none; transition: color 200ms ease; }
  .rail a:hover { color: var(--signal); }
  .rail .dot { width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--white); border: 2px solid var(--rule); flex: none; transition: background-color 250ms ease, border-color 250ms ease, transform 250ms var(--ease); }
  .rail a.is-done .dot { background: var(--signal); border-color: var(--signal); }
  .rail a.is-current { color: var(--ink); font-weight: 700; }
  .rail a.is-current .dot { background: var(--orange); border-color: var(--orange); transform: scale(1.25); }
}

/* ==========================================================================
   Figures and media
   ========================================================================== */
figure { margin: 0; }
figcaption { margin-top: 0.55rem; font-size: var(--t-xs); color: var(--ink-2); max-width: var(--measure); }
.media { width: 100%; border-radius: var(--radius); background: var(--panel); }
.zoom { display: block; padding: 0; border: 0; background: none; width: 100%; cursor: zoom-in; color: inherit; overflow: hidden; border-radius: var(--radius); }
.zoom img { width: 100%; transition: transform 500ms var(--ease); }
.zoom:hover img { transform: scale(1.03); }

.browser { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--white); box-shadow: 0 10px 30px rgba(20, 36, 59, 0.1); }
.browser-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; background: var(--panel); border-bottom: 1px solid var(--rule); font-size: var(--t-xs); color: var(--ink-2); }
.browser-bar .dots { display: flex; gap: 5px; }
.browser-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); display: block; }
.browser .zoom, .browser img { border-radius: 0; }
.p-hero .browser { max-width: 60rem; }

/* ==========================================================================
   Project page: blocks
   ========================================================================== */
.block { padding-top: clamp(2.75rem, 6vw, 4.25rem); }
.block > h2 { font-size: var(--t-2xl); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.block > h2::before { content: ""; width: 1.25rem; height: 3px; background: var(--orange); }
.block .intro-text { color: var(--ink-2); max-width: 60ch; }

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); }
.split.solo { grid-template-columns: minmax(0, 1fr); }
.split.solo p { max-width: 70ch; }

/* Compact row of requirement cards */
.specs { margin-top: 1.25rem; }
.specs h3 { font-size: var(--t-s); margin-bottom: 0.75rem; }
.specs ul { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.specs li {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem;
  background: var(--panel); border-top: 3px solid var(--signal); border-radius: 6px;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.specs li:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(20, 36, 59, 0.1); }
.specs .v { font-size: var(--t-xl); line-height: 1; color: var(--signal); font-variation-settings: "wdth" 112; font-weight: 800; }
.specs .l { font-size: var(--t-xs); color: var(--ink-2); line-height: 1.35; }
@media (max-width: 900px) { .specs ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split-list { background: var(--panel); padding: 1.5rem; border-radius: var(--radius); align-self: start; border-top: 3px solid var(--signal); }
.split-list h3 { font-size: var(--t-s); margin-bottom: 0.75rem; }
.check-list { list-style: none; }
.check-list li { position: relative; padding: 0.45rem 0 0.45rem 1.4rem; border-top: 1px solid var(--rule); font-size: var(--t-s); }
.check-list li:first-child { border-top: 0; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.95rem; width: 0.55rem; height: 0.55rem; border: 2px solid var(--signal); border-radius: 1px; }

.contrib { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); }
.contrib.solo { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.mine-list { list-style: none; }
.mine-list li { padding: 0.8rem 0 0.8rem 1.5rem; border-top: 1px solid var(--rule); position: relative; transition: padding-left 200ms var(--ease); }
.mine-list li:last-child { border-bottom: 1px solid var(--rule); }
.mine-list li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: 0.6rem; height: 2px; background: var(--orange); transition: width 200ms var(--ease); }
.mine-list li:hover { padding-left: 1.85rem; }
.mine-list li:hover::before { width: 1rem; }
/* Icon bullets */
.mine-list.iconic li { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0; }
.mine-list.iconic li::before { content: none; }
.mine-list.iconic li:hover { padding-left: 0.35rem; }
.mine-list .ci {
  flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px;
  background: var(--signal-soft); color: var(--signal); transition: background-color 200ms ease, color 200ms ease, transform 200ms var(--ease);
}
.mine-list .ci svg { width: 1.4rem; height: 1.4rem; }
.mine-list li:hover .ci { background: var(--orange); color: var(--white); transform: rotate(-6deg); }

.team-box { border: 1px solid var(--rule); padding: 1.5rem; border-radius: var(--radius); align-self: start; }
.team-box h3 { font-size: var(--t-s); margin-bottom: 0.5rem; }
.team-box ul { list-style: none; }
.team-box li { font-size: var(--t-s); color: var(--ink-2); padding: 0.35rem 0; }

/* Annotated figure with leader lines */
.annotated { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.anno-figure { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel); max-width: 30rem; }
.anno-figure img { width: 100%; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.leaders line { stroke: var(--white); stroke-width: 2.5; vector-effect: non-scaling-stroke; opacity: 0.9; }
.leaders circle { fill: var(--orange); stroke: var(--white); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.leaders line.is-active { stroke: var(--orange); opacity: 1; }
.pin {
  position: absolute; transform: translate(-50%, -50%); width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--white); background: var(--orange); color: var(--white);
  font: 700 var(--t-xs)/1 var(--font); cursor: pointer; text-shadow: 0 1px 1px rgba(90, 55, 0, 0.4);
  box-shadow: 0 2px 8px rgba(20, 36, 59, 0.35); display: grid; place-items: center; padding: 0;
  transition: transform 200ms var(--ease), background-color 200ms ease;
}
.pin:hover, .pin.is-active { background: var(--navy); text-shadow: none; transform: translate(-50%, -50%) scale(1.12); }
.anno-list { list-style: none; border-top: 2px solid var(--ink); }

/* View tabs above an annotated figure */
.view-tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; margin-bottom: 1.25rem; background: var(--panel); border-radius: 999px; }
.view-tab {
  font: 600 var(--t-s) var(--font); color: var(--ink-2); background: none; border: 0; cursor: pointer;
  padding: 0.5rem 1.15rem; border-radius: 999px; transition: background-color 200ms ease, color 200ms ease;
}
.view-tab:hover { color: var(--signal); }
.view-tab[aria-selected="true"] { background: var(--navy); color: var(--white); }
.views .annotated[hidden] { display: none; }
/* Tall photos: size the frame to the image so the dots stay aligned */
.views .anno-figure { display: inline-block; max-width: 100%; vertical-align: top; }
.views .anno-figure img { width: auto; max-width: 100%; max-height: 34rem; }
.views .annotated figure { text-align: center; }
.views .annotated:not([hidden]) { animation: fade 300ms ease both; }
.anno-list li { border-bottom: 1px solid var(--rule); }
.anno-item { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem; align-items: start; width: 100%; text-align: left; padding: 0.75rem 0.5rem 0.75rem 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; transition: background-color 200ms ease; }
.anno-item:hover { background: var(--panel); }
.anno-item .k { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--orange); color: #9a6a00; font-weight: 700; font-size: var(--t-xs); }
.anno-item strong { display: block; font-size: var(--t-s); }
.anno-item span.t { display: block; font-size: var(--t-s); color: var(--ink-2); margin-top: 0.15rem; }
.anno-item.is-active .k { background: var(--orange); color: var(--white); }
.anno-item.is-active strong { color: var(--signal); }

/* Build timeline (a real sequence, so it is numbered) */
.steps { list-style: none; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1rem clamp(1.5rem, 4vw, 3rem); padding: 1.6rem 0; border-top: 1px solid var(--rule); }
.step:first-child { border-top: 2px solid var(--ink); }
.step-text h3 { font-size: var(--t-l); display: flex; gap: 0.75rem; align-items: baseline; }
.step-text h3::before { content: counter(step); font-variation-settings: "wdth" 115; font-weight: 800; color: var(--signal); font-size: var(--t-xl); min-width: 1.5rem; }
.step-text .when { display: block; margin: 0.35rem 0 0.6rem 2.25rem; }
.step-text p { margin-left: 2.25rem; font-size: var(--t-s); }
.mine-tag { display: inline-block; margin: 0 0 0.6rem 2.25rem; padding: 0.2rem 0.55rem; background: var(--orange); color: var(--white); font-size: var(--t-xs); font-weight: 700; border-radius: 3px; text-shadow: 0 1px 1px rgba(90, 55, 0, 0.35); }
.step-media { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.step-media figure { flex: 0 1 auto; max-width: 100%; }
/* Prototypes within one design step */
.sub-steps { list-style: none; counter-reset: proto; margin: 0.25rem 0 0.75rem 2.25rem; }
.sub-steps li { counter-increment: proto; position: relative; padding: 0.45rem 0 0.45rem 2rem; font-size: var(--t-s); border-top: 1px solid var(--rule); }
.sub-steps li::before {
  content: "P" counter(proto); position: absolute; left: 0; top: 0.5rem;
  font-size: var(--t-xs); font-weight: 700; color: var(--white); background: var(--signal); border-radius: 4px; padding: 0.05rem 0.3rem;
}
.sub-steps strong { color: var(--ink); }
.lesson { margin-left: 2.25rem; padding: 0.6rem 0.8rem; background: var(--panel); border-left: 3px solid var(--orange); font-size: var(--t-s); color: var(--ink-2); }
@media (max-width: 600px) { .sub-steps, .lesson { margin-left: 0; } }

/* Keep step images and clips compact so the page stays scannable */
.step-media .zoom { width: auto; }
.step-media img.media { width: auto; max-width: 100%; max-height: 15rem; }
.step-media video.media { width: auto; max-width: 100%; max-height: 18rem; }
.step-media figcaption { max-width: 22rem; }

.matrix-wrap { grid-column: 2 / -1; overflow-x: auto; max-width: 38rem; }
table { border-collapse: collapse; width: 100%; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
caption { text-align: left; font-size: var(--t-xs); color: var(--ink-2); padding-bottom: 0.6rem; }
th, td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); text-align: right; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
thead th { font-weight: 600; border-bottom: 2px solid var(--ink); font-size: var(--t-xs); color: var(--ink-2); }
tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
.hl { background: var(--signal-soft); }
tfoot .hl { color: var(--signal); }

.decisions { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; list-style: none; }
.decisions li { padding: 1.25rem 1.25rem 1.4rem; border: 1px solid var(--rule); border-top: 4px solid var(--signal); border-radius: 8px; transition: transform 250ms var(--ease), box-shadow 250ms var(--ease); }
.decisions li:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(20, 36, 59, 0.1); }
.decisions h3 { font-size: var(--t-m); margin-bottom: 0.5rem; }
.decisions p { font-size: var(--t-s); color: var(--ink-2); margin: 0; }

.result { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.result-box { border-left: 4px solid var(--signal); padding: 0.25rem 0 0.25rem clamp(1rem, 3vw, 2rem); }
.result-box p { font-size: var(--t-l); }
.result-box p + p { font-size: var(--t-m); color: var(--ink-2); }
.result-media video.media { max-height: 28rem; width: auto; max-width: 100%; }

details.more { border-top: 1px solid var(--rule); }
details.more:last-child { border-bottom: 1px solid var(--rule); }
details.more summary { cursor: pointer; list-style: none; padding: 1.1rem 0; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 1rem; transition: color 150ms ease; }
details.more summary:hover { color: var(--signal); }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font-size: var(--t-xl); line-height: 1; color: var(--orange); font-weight: 400; transition: transform 250ms var(--ease); }
details.more[open] summary::after { transform: rotate(45deg); }
details.more .more-body { padding: 0 0 1.75rem; }
.spec-table th { text-align: left; font-weight: 600; width: 12rem; color: var(--ink-2); padding-left: 0; }
.spec-table td { text-align: left; }
.more-body figure { max-width: 30rem; }

/* Galleries: square grid, or masonry for mixed shapes */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.25rem; list-style: none; }
.gallery img { aspect-ratio: 1 / 1; object-fit: cover; }
.gallery.masonry { display: block; columns: 3 15rem; column-gap: 1.25rem; }
.gallery.masonry li { break-inside: avoid; margin-bottom: 1.25rem; }
.gallery.masonry img { aspect-ratio: auto; }
/* Two images shown at the same size, whatever their shape */
.gallery.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.pair .zoom { position: relative; aspect-ratio: 4 / 3; background: var(--panel); border: 1px solid var(--rule); }
.gallery.pair img { position: absolute; inset: 0.75rem; width: calc(100% - 1.5rem); height: calc(100% - 1.5rem); aspect-ratio: auto; object-fit: contain; background: none; }
@media (max-width: 600px) { .gallery.pair { grid-template-columns: 1fr; } }

/* Larger step image where detail matters */
.step-media figure.lg img.media { max-height: 30rem; }

/* Brand logo above a project title */
.p-logo { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; margin-bottom: 1.25rem; box-shadow: 0 6px 18px rgba(20, 36, 59, 0.18); }

/* Instagram */
.ig-card { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding: clamp(1.25rem, 3vw, 2rem); background: var(--panel); border-radius: 10px; }
.ig-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; color: var(--white); background: linear-gradient(135deg, #f9a43a, #d6247a 55%, #6b3fd4); margin-bottom: 1rem; }
.ig-icon svg { width: 1.6rem; height: 1.6rem; fill: currentColor; }
.ig-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; list-style: none; }
.ig-widget iframe { width: 100%; min-height: 32rem; border: 0; }
.ig-follow { margin-top: 1.5rem; }

.link-list { list-style: none; }
.link-list li { padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.next { margin-top: clamp(3rem, 7vw, 5rem); padding-top: 1.5rem; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.next a { text-decoration: none; font-weight: 700; font-size: var(--t-xl); font-variation-settings: "wdth" 112; transition: color 150ms ease; }

/* Lightbox */
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: min(94vw, 1400px); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(14, 20, 26, 0.88); }
dialog.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
dialog.lightbox p { color: #dfe5e8; text-align: center; margin: 0.75rem auto 0; font-size: var(--t-s); }
dialog.lightbox .close { position: fixed; top: 1rem; right: 1rem; background: var(--white); color: var(--ink); border: 0; border-radius: var(--radius); padding: 0.5rem 0.9rem; font: 600 var(--t-s) var(--font); cursor: pointer; }

/* Respect reduced motion everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
  .card-link:hover .card-media, .card-link:focus-visible .card-media,
  .card-link:hover .card-media img, .skill-card:hover, .decisions li:hover, .zoom:hover img { transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .skill-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero, .split, .contrib, .annotated, .about-intro, .contact-panel, .p-head.side, .result { grid-template-columns: 1fr; }
  .hero-art { max-width: 28rem; width: 100%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { grid-template-columns: 1fr; }
  .matrix-wrap { grid-column: 1 / -1; }
  .p-head.side .p-hero .media { max-height: 26rem; margin-inline: 0; }
}
@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .about-cols, .skill-cards, .ig-card { grid-template-columns: 1fr; }
  .cards { gap: 1.75rem 1rem; }
  .card-text h3 { font-size: var(--t-s); }
  .card-text p { font-size: var(--t-xs); }
  .site-header .nav-icon { display: none; }
  .wordmark { font-size: var(--t-s); gap: 0.45rem; }
  .wordmark::before { width: 0.65rem; height: 0.65rem; }
  .nav { gap: 0.75rem; }
  .nav a:not(.icon-link) { font-size: 0.875rem; }
  .hero-art { max-width: 21rem; }
  .hero-art::after { right: -0.6rem; top: calc(6% + 0.6rem); }
  .hero-text .school { font-size: var(--t-l); }
  .pin { width: 1.7rem; height: 1.7rem; }
  .step-text p, .step-text .when, .mine-tag { margin-left: 0; }
  .step-media img.media { max-height: 13rem; }
  .spec-table th { width: 7.5rem; }
  th, td { padding: 0.5rem 0.4rem; }
  table { font-size: var(--t-xs); }
}
