/* ─── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --bg:      #f3efe6;
  --fg:      #17150f;
  --muted:   #6c655a;
  --line:    #d9d1c3;
  --card:    #ece5d7;
  --accent:  #e8551f;
  --accent2: #2f5bd6;
  --radius-card: 10px;
  --transition:  0.3s ease;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:    'Space Mono', monospace;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

section {
  scroll-margin-top: 90px;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 34px;
  padding-right: 34px;
}

.section {
  padding-top: 110px;
  padding-bottom: 110px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 14px;
}

.accent { color: var(--accent); }

.is-hidden { display: none !important; }

/* ─── Accessibility ─────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 0;
}

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

/* ─── Scroll Progress Bar ───────────────────────────────────────────────────── */
#scrollProgress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 120;
  will-change: width;
}

/* ─── Custom Cursor ─────────────────────────────────────────────────────────── */
#cursorDot,
#cursorRing {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  z-index: 200;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
}
#cursorDot {
  width: 8px; height: 8px;
  background: var(--accent);
}
#cursorRing {
  width: 38px; height: 38px;
  border: 1.5px solid var(--fg);
  mix-blend-mode: difference;
  transition: width 0.25s, height 0.25s, background 0.25s, border-color 0.25s;
}
#cursorRing.is-hovering {
  width: 58px; height: 58px;
  background: var(--accent);
  border-color: var(--accent);
}

@media (pointer: fine) {
  body.has-cursor { cursor: none; }
  body.has-cursor a,
  body.has-cursor button { cursor: none; }
  body.has-cursor #cursorDot,
  body.has-cursor #cursorRing { display: block; }
}

/* ─── Header ────────────────────────────────────────────────────────────────── */
#siteHeader {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 34px;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s;
}
#siteHeader.is-scrolled {
  background: rgba(243, 239, 230, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.wordmark-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-links a:hover {
  color: var(--accent);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3aa55d;
  animation: blink 2s infinite;
}
.status-pill.is-away .status-dot {
  background: var(--muted);
  animation: none;
}
.header-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  min-width: 64px;
  text-align: right;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger {
  width: 24px;
  height: 2px;
  background: var(--fg);
  transition: transform var(--transition), opacity var(--transition);
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
}

.eyebrow-line {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(58px, 12.5vw, 196px);
  line-height: 0.84;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.hero-line-stroke {
  -webkit-text-stroke: 2px var(--fg);
  color: transparent;
}
.hero-period {
  color: var(--accent);
  -webkit-text-stroke: 0;
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 14px;
}

.polaroid-card {
  position: relative;
  transform: rotate(2.5deg);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s;
  background: var(--card);
  padding: 14px 14px 0;
  border: 1px solid var(--line);
  box-shadow: 0 2px 0 var(--line), 0 24px 42px -22px rgba(0, 0, 0, 0.5);
}
.polaroid-card:hover {
  transform: rotate(0deg) scale(1.015);
  box-shadow: 0 2px 0 var(--line), 0 34px 58px -22px rgba(0, 0, 0, 0.6);
}
.polaroid-badge {
  position: absolute;
  top: -13px; left: -13px;
  z-index: 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 12px -3px rgba(0, 0, 0, 0.45);
}
.polaroid-photo {
  width: 228px;
  height: 286px;
  object-fit: cover;
  border-radius: 2px;
}
.polaroid-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 2px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.hero-bio {
  max-width: 280px;
  text-align: right;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}
.hero-bio em {
  color: var(--fg);
  font-style: italic;
}

.hero-meta-row {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 46px;
}
.hero-badges {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.btn-pill {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 40px;
  padding: 11px 22px;
  text-decoration: none;
  display: inline-block;
  transition: background var(--transition), color var(--transition);
}
.btn-outline {
  color: var(--fg);
  border: 1.5px solid var(--fg);
  margin-left: auto;
}
.btn-outline:hover {
  background: var(--fg);
  color: var(--bg);
}
.btn-solid {
  color: var(--bg);
  background: var(--fg);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 14px 26px;
}
.btn-solid:hover {
  background: var(--accent);
  color: #fff;
}
.btn-disabled {
  color: var(--muted);
  background: transparent;
  border: 1.5px dashed var(--line);
  padding: 14px 26px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: not-allowed;
}

/* ─── Marquee ───────────────────────────────────────────────────────────────── */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  margin-top: 40px;
}
.marquee-track {
  display: inline-flex;
  animation: marq 26s linear infinite;
  will-change: transform;
}
.marquee-item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  padding: 0 30px;
}
.marquee-sep {
  color: var(--accent);
  font-size: 30px;
}

/* ─── About ─────────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.about-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.about-p1 {
  font-size: 19px;
  line-height: 1.65;
  margin-bottom: 22px;
}
.about-p2 {
  font-size: 19px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 34px;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}

/* ─── Projects ──────────────────────────────────────────────────────────────── */
.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 2px solid var(--fg);
  padding-bottom: 22px;
}
.projects-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-toggle button,
.filter-chips button {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  border-radius: 30px;
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.view-toggle button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.filter-chips button.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.projects-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 26px 0 8px;
}
.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Index view */
.index-head,
.index-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1.4fr) 78px minmax(0, 1.3fr) 130px 30px;
  gap: 18px;
  align-items: center;
}
.index-head {
  padding: 0 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.index-row {
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--fg);
  transition: background 0.3s, padding 0.3s;
}
a.index-row:hover {
  background: rgba(232, 85, 31, 0.09);
  padding-left: 16px;
  padding-right: 16px;
}
.index-no,
.index-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.index-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.01em;
}
.index-stack {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.type-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 5px 11px;
  justify-self: start;
  white-space: nowrap;
}
.index-arrow {
  font-family: var(--font-display);
  font-size: 22px;
  justify-self: end;
  color: var(--accent);
}
.index-row .coming-soon {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  justify-self: end;
  white-space: nowrap;
}

/* Grid view */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 26px;
}
.grid-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  text-decoration: none;
  color: var(--fg);
  min-height: 230px;
  transition: transform 0.3s, box-shadow 0.3s;
}
a.grid-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.4);
}
.grid-card-bar {
  height: 6px;
  width: 46px;
  background: var(--accent);
  border-radius: 4px;
  margin-bottom: 20px;
}
.grid-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.grid-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
}
.grid-card-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.grid-card-blurb {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 12px 0 auto;
}
.grid-card-stack {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}

/* Floating hover preview (desktop only) */
.project-preview {
  position: fixed;
  top: 0; left: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.25s;
  will-change: transform, opacity;
  width: 280px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.5);
}
.project-preview.is-visible { opacity: 1; }
.preview-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.8;
}
.preview-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  margin: 8px 0 10px;
}
.preview-blurb {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
  opacity: 0.92;
}
.preview-stack {
  font-family: var(--font-mono);
  font-size: 11.5px;
  opacity: 0.8;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 10px;
}

/* ─── Gallery ───────────────────────────────────────────────────────────────── */
.gallery-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}
.gallery-list {
  display: flex;
  flex-direction: column;
  gap: 62px;
}
.gallery-block-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 26px;
}
.gallery-block-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.01em;
}
.gallery-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.gallery-status .status-dot {
  background: var(--accent);
}
.gallery-status.is-done { color: #3aa55d; }
.gallery-status.is-done .status-dot {
  background: #3aa55d;
  animation: none;
}
.gallery-stack {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.gallery-repo-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.gallery-repo-link:hover { color: var(--accent); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.browser-window {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 14px 34px -24px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s, box-shadow 0.35s;
}
.browser-window:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 52px -26px rgba(0, 0, 0, 0.55);
}
.browser-titlebar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.browser-dots {
  display: flex;
  gap: 6px;
}
.browser-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--line);
}
.browser-dots span:first-child {
  background: var(--accent);
}
.browser-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.browser-chrome {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.browser-screen {
  width: 100%;
  height: 258px;
  object-fit: cover;
  object-position: top;
}
.screen-placeholder {
  height: 258px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background:
    repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.025) 10px, rgba(0, 0, 0, 0.025) 20px);
}
.screen-placeholder::before {
  content: '⧉';
  font-size: 30px;
  opacity: 0.5;
}

/* ─── Résumé ────────────────────────────────────────────────────────────────── */
.resume-band {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.resume-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 50px;
}
.resume-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.resume-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.timeline-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
}
.timeline-company {
  font-size: 15px;
  color: var(--accent);
  margin: 4px 0 8px;
}
.timeline-note {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.side-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 18px;
}
.side-label-gap {
  margin-top: 34px;
  margin-bottom: 14px;
}
.tools-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.tool-pill {
  font-family: var(--font-mono);
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 14px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.tool-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}
.lang-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.lang-level {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ─── Contact ───────────────────────────────────────────────────────────────── */
#contact {
  padding-top: 130px;
  padding-bottom: 130px;
}
#contact .eyebrow {
  margin-bottom: 22px;
}
.contact-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(46px, 9.5vw, 150px);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 46px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.6vw, 48px);
  color: var(--fg);
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 8px;
  overflow-wrap: anywhere;
}
.contact-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 54px;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.contact-links a {
  color: var(--fg);
  text-decoration: none;
}
.contact-links a:hover {
  color: var(--accent);
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  padding-top: 34px;
  padding-bottom: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ─── Skeleton Loaders ──────────────────────────────────────────────────────── */
.skeleton,
.skel {
  background: linear-gradient(90deg, var(--card) 25%, var(--line) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  color: transparent;
}
.skel { height: 14px; margin-bottom: 10px; }
.skel-title { height: 26px; width: 55%; }
.skel-tag   { width: 35%; }
.skel-text  { width: 90%; }
.skel-text.short { width: 60%; }
.skeleton-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  min-height: 180px;
}

/* ─── Scroll Reveal ─────────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Animations ────────────────────────────────────────────────────────────── */
@keyframes marq {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.15; }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ─── Reduced Motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hero-side {
    align-items: flex-start;
  }
  .hero-bio {
    text-align: left;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .resume-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .header-meta .status-pill { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 60px;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--line);
    border-right: none;
    padding: 22px 34px;
    gap: 18px;
    transform: translateX(110%);
    transition: transform var(--transition);
  }
  .nav-links.open { transform: translateX(0); }
  .header-clock { display: none; }

  /* Index view: drop STACK column */
  .index-head,
  .index-row {
    grid-template-columns: 40px minmax(0, 1.6fr) 60px 110px 26px;
  }
  .index-stack,
  .index-head .head-stack { display: none; }
}

@media (max-width: 480px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  #siteHeader { padding: 14px 20px; }
  .section {
    padding-top: 80px;
    padding-bottom: 80px;
  }
  .projects-grid { grid-template-columns: 1fr; }

  /* Index view: also drop TYPE — keep NO. / PROJECT / YEAR / arrow */
  .index-head,
  .index-row {
    grid-template-columns: 34px minmax(0, 1fr) 52px 26px;
    gap: 12px;
  }
  .type-pill,
  .index-head .head-type { display: none; }

  .polaroid-photo {
    width: 180px;
    height: 226px;
  }
}
