/* ============================================
   TOKENS
   ============================================ */
@font-face {
  font-family: 'Sansation';
  src: url('fonts/Sansation-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sansation';
  src: url('fonts/Sansation-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #182C27;
  --ink-soft: #213934;
  --paper: #E6EAE3;
  --paper-warm: #D7DFD6;
  --text-dark: #17281F;
  --text-light: #EEF2EA;
  --muted-dark: #55665C;
  --muted-light: #A9BEB4;
  --accent: #7FC077;
  --accent-soft: #9BD791;
  --structure: #718F8B;
  --line-dark: rgba(238, 242, 234, 0.16);
  --line-light: rgba(23, 40, 31, 0.13);

  /* Newsreader headline / Jost body / Work Sans for the wordmark, nav,
     eyebrows, tags and labels */
  --font-display: 'Newsreader', serif;
  --font-display-weight: 500;
  --font-body: 'Jost', 'Sansation', sans-serif;
  --font-mono: 'Work Sans', sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* `background` matches the hero, as a fallback for browsers (notably
   Safari) that don't honor overscroll-behavior on the root scroller.
   Only overscroll-behavior-x is set (not overflow-x: hidden, and not
   the y-axis too) — those broke trackpad/wheel scrolling on Windows
   Chrome, a known issue with hiding overflow on the root element. */
html {
  scroll-behavior: smooth;
  background: var(--ink);
  overscroll-behavior-x: none;
}

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text-dark);
  overscroll-behavior-x: none;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ul { list-style: none; }

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================
   NAV
   ============================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 6vw;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  mix-blend-mode: difference;
}

#nav.scrolled {
  padding: 16px 6vw;
}

/* once you've scrolled past the hero, the difference-blend trick stops
   being useful — swap to a solid, readable strip instead */
#nav.solid {
  background: var(--paper);
  mix-blend-mode: normal;
  box-shadow: 0 1px 0 var(--line-light);
}

#nav.solid .nav-mark,
#nav.solid .nav-links a {
  color: var(--text-dark);
}

.nav-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  color: var(--text-light);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.25s ease;
}

.nav-links a:hover::after { width: 100%; }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding: 110px 6vw 120px;
}

.hero::before,
.project-hero::before,
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(228, 230, 218, 0.035) 0px,
    rgba(228, 230, 218, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, black, transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  /* Bounded, but wider than the old 1240px cap and matched to
     .section's own max-width (1500px) so the hero tracks closer to
     #nav's full-width edge on a wide screen without removing the cap
     entirely — an unbounded hero-content stretched the gap between
     the text and the photo way too far apart on very wide windows. */
  max-width: 1500px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 160px;
}

.hero-intro {
  flex: 1 1 480px;
  max-width: 560px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

/* the hero's greeting reads as an introduction, not a section label —
   nested in the h1, sized in em at 4/6 of the name's own font-size so
   it scales in lockstep at every width. At this size it wraps onto its
   own line above "Alexandra Palermo" rather than sitting inline with
   it, so margin-bottom (not margin-right) is what creates the gap. */
.hero-greeting {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.45em;
  font-weight: 300;
  letter-spacing: normal;
  text-transform: none;
  color: var(--accent);
  margin-right: 52px;
  margin-bottom: 20px;
}

.hero h1 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.4rem, 9.6vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin-bottom: 52px;
  font-optical-sizing: auto;
}

/* accent rule starting right after "Hi, I'm", stretching right to the end of "Palermo" */
.hero h1::after {
  content: '';
  position: absolute;
  left: 1.3em;
  top: 0.62em;
  width: 2.85em;
  height: 2px;
  background: var(--accent);
}

.hero-pitch {
  font-size: clamp(0.53rem, 1.5vw, 1.07rem);
  line-height: 1.4;
  color: var(--muted-light);
  max-width: 640px;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 14px 28px;
  border-radius: 2px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-dark);
  color: var(--text-light);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 6vw;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-light);
}

.scroll-cue span {
  width: 1px;
  height: 32px;
  background: var(--muted-light);
  position: relative;
  overflow: hidden;
}

.scroll-cue span::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollLine 2.2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  50% { top: 0; }
  100% { top: 100%; }
}

.scroll-cue p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 120px 6vw;
  max-width: 1500px;
  margin: 0 auto;
}

.section-dark {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--text-light);
  max-width: 100%;
  border-radius: 0;
}

.section-dark > * {
  position: relative;
  z-index: 2;
}

.section-dark .eyebrow { color: var(--accent); }

.section-head {
  margin-bottom: 64px;
}

/* on project detail pages specifically: tighten the gap between the
   title and the paragraph underneath it, then open up more room
   between that paragraph and the bullet list that follows it */
.project-detail-section .section-head {
  margin-bottom: 28px;
}

.project-detail-section .prose + .role-list {
  margin-top: 36px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.01em;
}

/* ============================================
   PROJECTS — terminal-unit cards
   ============================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card {
  background: #EDE7D8;
  border-radius: 22px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 28px rgba(20, 30, 24, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(20, 30, 24, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* cards that link to a detail page pop more on hover — a bigger lift,
   a slight scale, and an accent ring — so it reads as interactive at
   a glance rather than just a decorative hover state */
.project-card[data-href] { cursor: pointer; }

.project-card[data-href]:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 22px 44px rgba(20, 30, 24, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 2px var(--accent);
}

.project-card.featured { grid-column: 1 / -1; }

.project-card.placeholder { box-shadow: 0 6px 16px rgba(20, 30, 24, 0.08); }
.project-card.placeholder:hover { transform: none; }

/* the "screen" */
.project-screen {
  position: relative;
  overflow: hidden;
  background: #2A403B;
  border-radius: 14px;
  padding: 34px 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.project-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(140, 200, 195, 0.16) 1px, transparent 1px);
  background-size: 14px 14px;
}

.project-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(200, 230, 225, 0.04) 0px,
    rgba(200, 230, 225, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
}

.project-screen > * { position: relative; z-index: 1; }

.crt-knob {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4A5B6E, #101825 70%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.06);
  z-index: 2;
}

.project-screen.screen-off {
  background: #2B3438;
  box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.35);
}

.project-screen.screen-off::before { opacity: 0.15; }

.project-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: #D9F0EC;
  text-shadow: 0 0 14px rgba(157, 224, 213, 0.35);
  letter-spacing: 0.01em;
}

.project-card h3 a:hover { opacity: 0.75; }

.screen-off h3 { color: #A9B3B0; text-shadow: none; }

.wip-marker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.project-desc {
  color: #B9CDD6;
  max-width: 640px;
  font-size: 0.96rem;
}

.screen-off .project-desc { color: #8B9694; }

.placeholder-text {
  font-style: italic;
  opacity: 0.85;
}

.project-role {
  font-size: 0.88rem;
  color: #CFE4DE;
  max-width: 640px;
}

.project-role span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-links {
  display: flex;
  gap: 24px;
  margin-top: auto;
  padding-top: 4px;
}

.project-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #A9E8DD;
  border-bottom: 1px solid rgba(169, 232, 221, 0.5);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}

.project-links a:hover { opacity: 0.65; }

.link-disabled {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #7A8583;
}

/* the "keyboard deck" */
.project-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #335049;
  border-radius: 12px;
  padding: 14px 16px;
}

.keys-off { background: #22292C; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 7px;
  background: #A5B9A2;
  color: #17281F;
  box-shadow: 0 3px 0 #636F61;
}

.tag-wip {
  background: var(--structure);
  box-shadow: 0 3px 0 #4C6360;
}

.keys-off .tag {
  background: #3E4749;
  color: #B9C2C0;
  box-shadow: 0 3px 0 #2A3132;
}

/* ============================================
   PROJECT DETAIL PAGES
   ============================================ */
.project-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--text-light);
  padding: 160px 6vw 72px;
}

.project-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted-light);
  margin-bottom: 40px;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--accent); }

.project-hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.project-hero-desc {
  font-size: 1.15rem;
  color: var(--muted-light);
  max-width: 900px;
  margin-bottom: 32px;
}

.project-hero-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.project-detail-section + .project-detail-section {
  border-top: 1px solid var(--line-light);
}

.section-dark.project-detail-section + .project-detail-section {
  border-top: none;
}

.prose {
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 1.05rem;
}

.section-dark .prose { color: var(--muted-light); }

/* scannable skill/contribution list — bullet-led, keyword-first —
   2 columns so a 4-6 item list doesn't stretch so tall */
.role-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 40px;
  max-width: 980px;
  font-size: 1rem;
  margin-top: 8px;
}

@media (max-width: 800px) {
  .role-list { grid-template-columns: 1fr; }
}

.role-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted-dark);
}

.role-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.role-list strong {
  color: var(--text-dark);
  font-weight: 600;
}

.section-dark .role-list li { color: var(--muted-light); }
.section-dark .role-list strong { color: var(--text-light); }

.role-list code, .prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--paper-warm);
  padding: 2px 6px;
  border-radius: 4px;
}

.section-dark .role-list code, .section-dark .prose code {
  background: rgba(255, 255, 255, 0.08);
}

/* direct quotes pulled from source documents */
.quote-block {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  max-width: 900px;
  font-style: italic;
  color: var(--muted-dark);
}

.quote-block p {
  margin: 0 0 6px;
}

.quote-block cite {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-dark);
  opacity: 0.8;
}

.section-dark .quote-block { color: var(--muted-light); }
.section-dark .quote-block cite { color: var(--muted-light); }

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

.screenshot-placeholder {
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--line-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted-dark);
}

.section-dark .screenshot-placeholder {
  border-color: var(--line-dark);
  color: var(--muted-light);
}

/* real console transcript excerpt, styled like a terminal */
.terminal-block {
  background: var(--ink);
  color: var(--text-light);
  border-radius: 12px;
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
  max-width: 980px;
  border: 1px solid var(--line-dark);
}

.section-dark .terminal-block {
  background: rgba(0, 0, 0, 0.2);
  border-color: var(--line-dark);
}

/* wireframe-vs-final comparisons */
.compare-block {
  margin-bottom: 48px;
}

.compare-block:last-child {
  margin-bottom: 0;
}

.compare-heading {
  font-weight: 500;
  margin-bottom: 16px;
}

.compare-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-pair figure {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compare-pair figure:hover {
  z-index: 5;
}

.compare-pair img {
  border: 1px solid var(--line-light);
  border-radius: 12px;
  width: 100%;
}

/* RepQuest's wireframe scans and live-app screenshots have different
   native proportions — force both sides of a pair to the same frame
   so neither looks bigger than the other. Scoped to just that
   comparison (not SafeSmart's storyboards, which are much wider and
   would get cropped badly by a 4:3 frame). */
.wireframe-compare img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
}

.section-dark .compare-pair img {
  border-color: var(--line-dark);
}

/* RepQuest's Streak final shot is a tiny header snippet next to a
   full-height wireframe — center it in its box instead of letting it
   sit stuck to the top. */
.streak-compare figure {
  justify-content: center;
}

/* SafeSmart's two storyboard panel-pairs: each pair's own two sketches
   have close-but-not-identical native ratios, so match them to each
   other specifically (not to the 4:3 used for RepQuest above) */
.scenario1-compare img { aspect-ratio: 7 / 3; object-fit: cover; object-position: center; }
.scenario3-compare img { aspect-ratio: 15 / 8; object-fit: cover; object-position: center; }

.compare-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-dark);
}

.section-dark .compare-label {
  color: var(--muted-light);
}

.compare-caption {
  font-size: 0.9rem;
  color: var(--muted-dark);
  margin-top: 12px;
}

.section-dark .compare-caption {
  color: var(--muted-light);
}

@media (max-width: 760px) {
  .compare-pair { grid-template-columns: 1fr; }
}

/* icon/asset showcase — path nodes, trophies, brand marks */
.icon-showcase {
  margin-top: 40px;
  margin-bottom: 40px;
}

.icon-showcase:last-child {
  margin-bottom: 0;
}

.icon-showcase-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 16px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
}

.icon-card {
  position: relative;
  z-index: 1;
  background: var(--paper-warm);
  border-radius: 14px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: box-shadow 0.2s ease;
}

.icon-card:hover {
  z-index: 5;
  box-shadow: 0 10px 24px rgba(20, 30, 24, 0.25);
}

.icon-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.icon-card:hover img {
  transform: scale(1.8);
}

.icon-card span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-dark);
  text-align: center;
  line-height: 1.3;
}

.section-dark .icon-card {
  background: var(--ink-soft);
}

.section-dark .icon-card span {
  color: var(--muted-light);
}

/* "Designing the visual language" layout: title + bullets on the left,
   icon showcases stacked on the right */
.visual-language-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.visual-language-section .role-list { grid-template-columns: 1fr; max-width: none; }
.visual-language-section .icon-showcase:first-child { margin-top: 0; }
@media (max-width: 900px) {
  .visual-language-section { grid-template-columns: 1fr; }
}

/* path icons: 2 rows x 4 columns */
.icon-grid-path { grid-template-columns: repeat(4, 1fr); }

/* achievements + brand marks sit side by side, both 2 rows tall */
.showcase-row {
  display: flex;
  gap: 24px;
  align-items: start;
}
.showcase-row .icon-showcase { margin-top: 0; margin-bottom: 0; }
.showcase-trophies { flex: 1 1 auto; }
.icon-grid-trophies { grid-template-columns: repeat(3, 1fr); }
.showcase-brand { flex: 0 0 140px; }
.icon-grid-brand { grid-template-columns: repeat(1, 1fr); }
@media (max-width: 600px) {
  .showcase-row { flex-direction: column; }
  .showcase-brand { flex-basis: auto; }
}

/* research chart / data callout grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.stat-card {
  background: var(--paper-warm);
  border-radius: 14px;
  padding: 16px;
}

.section-dark .stat-card {
  background: var(--ink-soft);
}

.stat-card img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.stat-card figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-dark);
  margin-top: 10px;
}

.section-dark .stat-card figcaption {
  color: var(--muted-light);
}

/* prototype screen tour — phone mockup showcase */
.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.screen-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.screen-card:hover {
  z-index: 5;
}

.screen-card img {
  width: 100%;
  max-width: 200px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* real phone-screen exports, slightly different native ratios —
     match them so the row reads as one consistent set */
  aspect-ratio: 0.52 / 1;
  object-fit: cover;
  object-position: top;
}

.screen-card:hover img {
  transform: scale(1.5);
  box-shadow: 0 10px 24px rgba(20, 30, 24, 0.25);
}

.screen-card span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-dark);
  text-align: center;
}

.section-dark .screen-card span {
  color: var(--muted-light);
}

/* single-frame storyboard panel */
.storyboard-frame {
  position: relative;
  margin: 0 0 32px;
  max-width: 720px;
}

.storyboard-frame:hover {
  z-index: 5;
}

.storyboard-frame img {
  width: 100%;
  border: 1px solid var(--line-light);
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-dark .storyboard-frame img {
  border-color: var(--line-dark);
}

.storyboard-frame:hover img {
  transform: scale(1.5);
  box-shadow: 0 10px 24px rgba(20, 30, 24, 0.25);
}

.storyboard-frame.no-zoom:hover img {
  transform: none;
  box-shadow: none;
}

.storyboard-frame figcaption {
  font-size: 0.9rem;
  color: var(--muted-dark);
  margin-top: 12px;
}

.section-dark .storyboard-frame figcaption {
  color: var(--muted-light);
}

@media (max-width: 860px) {
  .project-hero { padding: 140px 6vw 56px; }
  .screenshot-grid { grid-template-columns: 1fr; }
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-dark);
}

.skill-group li {
  position: relative;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  padding: 6px 0;
  color: var(--text-light);
  opacity: 0;
  transform: translateY(-28px);
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.4s ease, text-shadow 0.4s ease, letter-spacing 0.4s ease;
}

/* dropped out of the category header, landed with a slight overshoot */
.skill-group li.dropped {
  opacity: 1;
  transform: translateY(0);
}

/* mid-decode: pulled out of the number field, briefly larger, lit, and
   spaced out like the grid it came from — like a selected MDR cluster
   before it settles back down */
.skill-group li.decoding {
  color: #BFEFE7;
  text-shadow: 0 0 16px rgba(157, 224, 213, 0.6);
  letter-spacing: 0.22em;
}

/* ambient MDR number field — a slow, desynced sea of digits behind the
   skills grid, built by script.js */
.mdr-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: rgba(169, 232, 221, 0.1);
}

.section-dark > .mdr-field { z-index: 0; }

.mdr-field span {
  position: absolute;
  animation: mdrDrift ease-in-out infinite;
}

/* each span gets its own --dx/--dy (set inline by script.js) so the
   field drifts in small, individually-timed orbits instead of one
   uniform up-down bob */
@keyframes mdrDrift {
  0%, 100% { transform: translate(0, 0); opacity: 0.6; }
  25% { transform: translate(calc(var(--dx) * 0.5), calc(var(--dy) * -0.8)); opacity: 0.9; }
  50% { transform: translate(var(--dx), var(--dy)); opacity: 1; }
  75% { transform: translate(calc(var(--dx) * -0.3), calc(var(--dy) * 0.4)); opacity: 0.8; }
}

/* ============================================
   HERO — VISUAL (photo slot, as a side column)
   ============================================ */
.hero-visual {
  flex: 1 1 420px;
  max-width: 560px;
  display: flex;
  padding-top: 40px;
  padding-left: 80px;
  border-left: 1px solid var(--line-dark);
}

@media (max-width: 860px) {
  .hero-visual {
    padding-left: 0;
    padding-top: 32px;
    border-left: none;
    border-top: 1px solid var(--line-dark);
  }
}

/* hero portrait — an offset accent outline peeking out behind the
   photo for depth, and the photo itself fading into the dark
   background at the bottom instead of ending in a hard edge */
.hero-photo {
  position: relative;
  width: 300px;
  margin: 0 auto;
}

/* .hero-intro and .hero-visual's combined flex-basis (480+420) plus
   gap (160) force a wrap around ~1253-1256px, well above the 860px
   cutoff above — so there's a wide range where the photo already
   sits on its own row but is still positioned like it's in the
   two-column layout (flush to that row's left edge, since a lone
   wrapped flex item defaults to flex-start, not center). Margin-only
   fix, deliberately NOT touching padding/border here — changing
   .hero-visual's box model at this breakpoint would shrink the space
   it needs and shift the real wrap point out from under this rule. */
@media (max-width: 1250px) {
  .hero-visual {
    margin: 0 auto;
  }
}

.hero-photo::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  z-index: 0;
}

.hero-photo img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-section { padding-bottom: 80px; }

.contact-lede {
  font-size: 1.2rem;
  color: var(--muted-light);
  max-width: 560px;
  margin-bottom: 56px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.contact-link {
  background: var(--ink);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.25s ease;
}

.contact-link:hover { background: var(--ink-soft); }

.contact-link-static:hover { background: var(--ink); }

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
}

.contact-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text-light);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 32px 6vw;
  background: var(--paper);
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
  border-top: 1px solid var(--line-light);
}

/* used only where the page's last section is already light (RepQuest's
   Reflection) — a light footer there would break the alternation instead
   of completing it */
.site-footer.site-footer-dark {
  background: var(--ink);
  color: var(--text-light);
  border-top-color: var(--line-dark);
}

/* ============================================
   FOCUS STATES
   ============================================ */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 0.68rem; }

  .project-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; }

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

  .contact-links { grid-template-columns: 1fr; }

  .section { padding: 80px 6vw; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   TEXT + SCREENS SIDE BY SIDE (e.g. SafeSmart's "Iterating on
   Feedback") — text on the left, screenshots stacked on the right,
   instead of screenshots stacking full-width below the text
   ============================================ */
.text-screens-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
.text-screens-row .screen-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 0;
}
@media (max-width: 800px) {
  .text-screens-row { grid-template-columns: 1fr; }
}

/* ============================================
   REFLECTION sub-groups (Strengths / Challenges / Future Work) —
   a clear label per group instead of a plain sentence, so the
   bullets underneath read as obviously belonging to that group
   ============================================ */
.subsection-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-top: 44px;
  margin-bottom: 4px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
}
.subsection-label:first-of-type {
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}

/* ============================================
   ABOUT — text + a small photo carousel
   ============================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

.about-carousel {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-light);
  margin: 0 auto;
}

.about-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s ease;
}

.about-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
}

.about-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  background: rgba(230, 234, 227, 0.85);
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-btn:hover {
  background: var(--accent);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(230, 234, 227, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
