@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Text Pressure variable font */
@font-face {
  font-family: 'Compressa VF';
  src: url('https://res.cloudinary.com/dr6lvwubh/raw/upload/v1529908256/CompressaPRO-GX.woff2');
  font-style: normal;
}

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

:root {
  --bg: #F0ECE5;
  --bg-light: #E6E1D8;
  --bg-card: #FDFDFB;
  --fg: #1C1A19;
  --fg-dim: rgba(28, 26, 25, 0.65);
  --fg-muted: rgba(28, 26, 25, 0.40);
  --accent: #D97354;
  --accent-glow: rgba(217, 115, 84, 0.08);
  --accent-bright: #E68264;
  --accent-subtle: rgba(217, 115, 84, 0.15);
  --rule: rgba(28, 26, 25, 0.08);

  --shadow-xs: 0 1px 2px rgba(26, 23, 20, 0.04);
  --shadow-sm: 0 2px 6px rgba(26, 23, 20, 0.05), 0 1px 2px rgba(26, 23, 20, 0.03);
  --shadow-md: 0 4px 16px rgba(26, 23, 20, 0.06), 0 2px 4px rgba(26, 23, 20, 0.04);
  --shadow-lg: 0 8px 30px rgba(26, 23, 20, 0.09), 0 4px 8px rgba(26, 23, 20, 0.04);

  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Space Mono", monospace;
  --max-w: 100vw;
  --gutter: clamp(1.5rem, 5vw, 7rem);
  --radius: 0px;
  --radius-lg: 0px;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Strong grain texture for an old-school newspaper vibe */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--transition), border-color .25s var(--transition);
}

a:hover {
  color: var(--accent-bright) !important;
  border-bottom-color: var(--accent-bright);
}

::selection {
  background: rgba(184, 90, 48, 0.15);
  color: var(--fg);
}

/* ===== LAYOUT ===== */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
.header {
  height: 100vh;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 var(--gutter);
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  position: relative;
  margin-bottom: 2rem;
}

.hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.hero-top-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.text-pressure-container {
  position: relative;
  width: 100%;
  margin-bottom: 1.4rem;
  cursor: default;
}

.text-pressure-title {
  font-family: 'Compressa VF', var(--sans);
  text-transform: uppercase;
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
  user-select: none;
  white-space: nowrap;
  font-weight: 100;
  display: flex;
  justify-content: flex-start;
}

.text-pressure-title span {
  display: inline-block;
  will-change: font-variation-settings;
}

.mobile-only {
  display: none;
}

.hero-center .text-pressure-title {
  justify-content: center;
}

/* Hero Subtitle */
.hero-subtitle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.role-badge {
  background: var(--fg);
  color: var(--bg);
  padding: 0.35rem 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dept-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fg-dim);
}

/* Hero links row */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.hero-links a {
  color: var(--fg);
  text-decoration: none;
  padding: 0.4rem 1rem;
  border: 1px solid var(--rule);
  background: var(--bg-card);
  transition: all .25s var(--transition);
}

.hero-links a:hover {
  color: #fff !important;
  background: var(--accent);
  border-color: var(--accent);
  /* transform: translateY(-2px); */
}

/* Newspaper Background Reveal — confined to hero, full-bleed */
.newspaper-reveal {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  /* Flashlight mask — follows cursor via JS custom properties */
  mask-image: radial-gradient(circle 180px at var(--mx, 50%) var(--my, 50%),
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.4) 40%,
      rgba(0, 0, 0, 0.05) 70%,
      transparent 100%);
  -webkit-mask-image: radial-gradient(circle 180px at var(--mx, 50%) var(--my, 50%),
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.4) 40%,
      rgba(0, 0, 0, 0.05) 70%,
      transparent 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.newspaper-reveal.active {
  opacity: 1;
}

.newspaper-bg {
  width: 100%;
  height: 100%;
  column-count: 5;
  column-gap: 1.8rem;
  column-rule: 1px solid rgba(28, 26, 25, 0.06);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.7;
  text-align: justify;
  color: var(--fg-dim);
  opacity: 0.45;
  user-select: none;
  padding: 0;
  overflow: hidden;
}

.newspaper-bg .np-line {
  display: block;
  break-inside: avoid;
  margin-bottom: 0.3rem;
  hyphens: auto;
}

.newspaper-bg .np-heading {
  display: block;
  break-inside: avoid;
  color: var(--fg);
  font-weight: 700;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.7rem 0 0.2rem;
  border-bottom: 1px solid rgba(28, 26, 25, 0.06);
  padding-bottom: 0.15rem;
}

.newspaper-bg .np-heading:first-child {
  margin-top: 0;
}

.newspaper-bg .np-divider {
  display: block;
  break-inside: avoid;
  text-align: center;
  color: var(--accent);
  opacity: 0.3;
  font-size: 0.5rem;
  letter-spacing: 0.5em;
  margin: 0.4rem 0;
}

@media (max-width: 768px) {
  .newspaper-bg {
    column-count: 3;
    font-size: 0.5rem;
    padding: 0;
    column-gap: 1rem;
  }

  .newspaper-reveal {
    mask-image: radial-gradient(circle 120px at var(--mx, 50%) var(--my, 50%),
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        transparent 100%);
    -webkit-mask-image: radial-gradient(circle 120px at var(--mx, 50%) var(--my, 50%),
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        transparent 100%);
  }
}

@media (min-width: 1400px) {
  .newspaper-bg {
    column-count: 7;
  }
}

/* Desktop Left Alignment */
@media (min-width: 768px) {
  .hero-center {
    align-items: flex-start;
    text-align: left;
  }

  .hero-center .text-pressure-title {
    justify-content: flex-start;
  }

  .hero-subtitle {
    flex-direction: row;
    align-items: center;
    gap: 1.2rem;
  }

  .hero-links {
    justify-content: flex-start;
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3.5rem;
  right: 0.5rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--fg-dim);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 767px) {
  .scroll-indicator {
    right: 50%;
    transform: translateX(50%);
    width: max-content;
    bottom: 3.5rem;
  }
}

/* Marquee pinned to bottom of hero */
.header .marquee-wrap {
  margin-top: auto;
  width: 100vw;
  margin-left: calc(-1 * var(--gutter));
}

/* ===== MARQUEE ===== */
.marquee-wrap {
  overflow: hidden;
  padding: 0.75rem 0;
  background-color: var(--fg);
  color: var(--bg);
  user-select: none;
  position: relative;
  z-index: 1;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.marquee-content span {
  padding: 0 1.4rem;
}

.marquee-content .sep {
  color: var(--accent-bright);
  opacity: 0.7;
  font-size: 0.8rem;
}

@keyframes marquee {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

/* ===== SECTIONS — Base ===== */
section {
  padding: 4rem 0 3.5rem;
}

/* Editorial section label — mono uppercase with extending rule line */
.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--rule), transparent);
}

/* ===== ABOUT ===== */
#about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.about-text {
  font-size: 1.05rem;
  color: var(--fg);
  line-height: 1.85;
  margin-bottom: 0.5rem;
  text-align: justify;
  /* max-width: 72ch; */
}

.about-text+.about-text {
  margin-bottom: 2rem;
}

.about-text strong {
  color: var(--accent);
  font-weight: 600;
}

/* Stats Grid — elevated micro-cards */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.6rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  /* box-shadow: var(--shadow-sm); */
  border: 1px solid var(--rule);
  transition: all .3s var(--transition);
}

.stat-item:hover {
  /* box-shadow: var(--shadow-md); */
  transform: translateY(-2px);
}

.stat-num {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.stat-num .plus {
  color: var(--accent);
  font-size: 1.8rem;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ===== PUBLICATIONS — Refined cards with soft shadows ===== */
.pub-group-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.5rem 0 1.2rem;
}

.pub-group-label:first-child {
  margin-top: 0
}

.pub-entry {
  display: flex;
  margin-bottom: 0.55rem;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  transition: all .3s var(--transition);
  position: relative;
  overflow: hidden;
  align-items: stretch;
  border: 1px solid var(--rule);
}

.pub-entry:hover {
  transform: translateX(3px);
  border-color: var(--accent);
}

.pub-year {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.35rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  flex-shrink: 0;
  text-align: center;
  position: relative;
  z-index: 1;
  min-width: 2rem;
}

.pub-body {
  padding: 1rem 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.pub-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.55;
}

.pub-venue {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--fg-dim);
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* Linked publication titles */
.pub-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.25s var(--transition);
}

.pub-title a::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
}

.pub-title a:hover {
  color: var(--accent-bright) !important;
  border-bottom: none;
}

.pub-title a::after {
  content: ' ↗';
  font-size: 0.7em;
  opacity: 0.35;
  transition: opacity 0.25s var(--transition);
  position: relative;
  z-index: 11;
}

.pub-title a:hover::after {
  opacity: 0.8;
}

/* Make entire pub-entry clickable feel */
.pub-entry:has(.pub-title a) {
  cursor: pointer;
}

.pub-entry:has(.pub-title a):hover {
  border-color: var(--accent-bright);
}

.pub-if {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--accent);
  padding: 0.1rem 0.45rem;
  margin-left: 0.3rem;
  border-radius: 3px;
}

.pub-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-subtle);
  padding: 0.12rem 0.5rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  border-radius: 3px;
}

/* ===== PROJECTS — Elevated cards with accent corner ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  position: relative;
  transition: all .35s var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* box-shadow: var(--shadow-xs); */
}

/* Accent corner */
.proj-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: var(--bg-light);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  transition: all .3s var(--transition);
}

.proj-card:hover {
  border-color: var(--accent-subtle);
  /* box-shadow: var(--shadow-md); */
  transform: translateY(-3px);
}

.proj-card:hover::before {
  background: var(--accent);
}

.proj-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  opacity: 0.55;
}

.proj-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.proj-desc {
  font-size: 0.82rem;
  color: var(--fg-dim);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  flex-grow: 1;
}

.proj-stack {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.proj-stack-tag {
  background: var(--accent-glow);
  border: 1px solid var(--accent-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  transition: all .2s var(--transition);
}

.proj-card:hover .proj-stack-tag {
  background: var(--accent-subtle);
}

/* ===== EXPERIENCE — Expanding Accordion ===== */
.exp-accordion {
  display: flex;
  width: 100%;
  height: clamp(300px, 45vh, 450px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* box-shadow: var(--shadow-md); */
  border: 1px solid var(--rule);
}

.exp-panel {
  flex: 1;
  background: var(--bg-card);
  border-right: 1px solid var(--rule);
  position: relative;
  transition: flex-grow 0.5s var(--transition), background 0.4s var(--transition);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
}



.exp-panel:last-child {
  border-right: none;
}

/* Active panel and hovered panels */
.exp-panel.active,
.exp-panel:hover {
  flex: 5;
  background: var(--bg-light);
  border: none;
}

/* Collapse active when another is hovered */
.exp-accordion:hover .exp-panel.active:not(:hover) {
  flex: 1;
  background: var(--bg-card);
  border-right: 1px solid var(--rule);
}

.panel-year-side {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.panel-content {
  opacity: 0;
  padding: 2rem;
  width: max-content;
  flex-shrink: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--transition);
}

/* Show content for active and hovered panels */
.exp-panel.active .panel-content,
.exp-panel:hover .panel-content {
  opacity: 1;
}

/* Hide content of active panel if another is hovered */
.exp-accordion:hover .exp-panel.active:not(:hover) .panel-content {
  opacity: 0;
}

.panel-icon {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.panel-role {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.panel-org {
  font-size: 0.95rem;
  color: var(--fg-dim);
  line-height: 1.5;
}

.panel-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.2rem 0.6rem;
  font-size: 0.65rem;
  font-family: var(--mono);
  font-weight: 600;
  margin-top: 1rem;
  letter-spacing: 0.05em;
  border-radius: 3px;
}

/* ===== EDUCATION — Watermark cards ===== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.edu-card {
  position: relative;
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .35s var(--transition);
  display: flex;
  flex-direction: column;
  /* box-shadow: var(--shadow-xs); */
}

.edu-card::before {
  content: attr(data-year);
  position: absolute;
  bottom: 0.1em;
  right: 0.3em;
  font-family: var(--mono);
  font-size: 3.5rem;
  line-height: 0.8;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.05;
  transition: opacity .4s var(--transition), transform .4s var(--transition);
  pointer-events: none;
}

.edu-card:hover {
  /* box-shadow: var(--shadow-md); */
  transform: translateY(-3px);
  border-color: var(--accent-subtle);
}

.edu-card:hover::before {
  opacity: 0.14;
}

.edu-degree {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.edu-inst {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.edu-note {
  font-size: 0.82rem;
  color: var(--fg-dim);
  font-style: italic;
  line-height: 1.5;
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

/* ===== HONORS — Soft tag badges ===== */
.honors-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.honor-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
  transition: all .25s var(--transition);
  /* box-shadow: var(--shadow-xs); */
}

.honor-badge:hover {
  background: var(--bg-light);
  border-color: var(--accent-subtle);
  /* box-shadow: var(--shadow-sm); */
  transform: translateY(-1px);
}

.honor-icon {
  color: var(--accent);
  font-size: 0.75rem;
  line-height: 1;
}

/* ===== TEACHING — Clean card grid ===== */
.teach-group {
  /* margin-bottom: 1rem; */
}

.teach-group:last-child {
  margin-bottom: 0;
}

.teach-org {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  margin-top: 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 600px) {
  .teach-org {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

.teach-org-name {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--fg);
}

.teach-org-duration {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  background: var(--accent-glow);
  border: 1px solid var(--accent-subtle);
  padding: 0.2rem 0.7rem;
  border-radius: 3px;
}

.teach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
}

.teach-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all .3s var(--transition);
  /* box-shadow: var(--shadow-xs); */
}

.teach-card:hover {
  border-color: var(--accent-subtle);
  /* box-shadow: var(--shadow-sm); */
  transform: translateY(-2px);
}

.teach-course {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.teach-level {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
}

/* ===== VIEW ALL LINK ===== */
.view-all {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  background-color: transparent;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  margin-top: 1.4rem;
  transition: all .25s var(--transition);
}

.view-all:hover {
  color: #fff !important;
  border-color: var(--accent);
  background: var(--accent);
}

/* ===== SUB-PAGE HEADER — Compact, not 100vh ===== */
.page-header {
  padding: 3rem 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ===== BACK LINK (sub-pages) ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.5rem;
  transition: all .2s var(--transition);
}

.back-link:hover {
  color: #fff !important;
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== PAGE TITLE (sub-pages) ===== */
.page-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 0.4rem;
  line-height: 1.1;
}

.page-subtitle {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  margin-bottom: 0;
}

/* ===== PROJECT ENTRY ROWS (sub-page listing) ===== */
.proj-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.proj-entry {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  transition: all .2s var(--transition);
}

.proj-entry:first-child {
  border-top: 1px solid var(--rule);
}

.proj-entry:hover {
  padding-left: 0.5rem;
}

.proj-entry-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  width: 1.6rem;
}

.proj-entry-body {
  flex-grow: 1;
  min-width: 0;
}

.proj-entry-body .proj-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.15rem;
}

.proj-entry-body .proj-desc {
  font-size: 0.82rem;
  color: var(--fg-dim);
  line-height: 1.5;
  margin-bottom: 0;
}

.proj-entry-stack {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== SUB-PAGE FOOTER ===== */
.site-footer--sub {
  margin-top: 3rem;
  padding-top: 0;
  border-top: none;
}

/* ===== FOOTER SEPARATOR (sub-page footers) ===== */
.footer-sep {
  color: var(--fg-muted);
  font-size: 0.75rem;
  user-select: none;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 2rem;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.footer-title {
  font-family: var(--sans);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.footer-contact {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: var(--fg-dim);
  text-decoration: none !important;
  border-bottom: 1px solid var(--rule);
  transition: all .25s var(--transition);
}

.footer-contact a:hover {
  color: var(--accent) !important;
  border-bottom-color: var(--accent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  transition: all .25s var(--transition);
}

.footer-links a:hover {
  color: var(--bg) !important;
  background: var(--fg);
}

.footer-bottom {
  background: var(--fg);
  padding: 0.9rem 0;
  text-align: center;
  width: 100%;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--bg);
  letter-spacing: 0.06em;

  /* display: flex;
  align-items: center;
  justify-content: flex-end; */
  padding-right: 1rem;
  gap: 1rem;
}

/* ===== AURORA EASTER EGG ===== */
.aurora-active {
  position: relative
}

.aurora-active::before {
  content: '' !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background:
    radial-gradient(ellipse 120% 60% at 20% 0%, rgba(184, 90, 48, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 100% 50% at 80% 0%, rgba(212, 112, 62, 0.05) 0%, transparent 70%) !important;
  animation: aurora-dance 6s ease-in-out infinite alternate !important;
}

@keyframes aurora-dance {
  0% {
    background:
      radial-gradient(ellipse 120% 60% at 20% 0%, rgba(184, 90, 48, 0.08) 0%, transparent 70%),
      radial-gradient(ellipse 100% 50% at 80% 0%, rgba(212, 112, 62, 0.05) 0%, transparent 70%) !important;
  }

  100% {
    background:
      radial-gradient(ellipse 120% 60% at 60% -20%, rgba(184, 90, 48, 0.12) 0%, transparent 70%),
      radial-gradient(ellipse 100% 50% at 20% 10%, rgba(212, 112, 62, 0.07) 0%, transparent 70%) !important;
  }
}

.easter-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #fff;
  background: var(--accent);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  z-index: 10000;
  transition: transform 0.5s var(--transition);
  white-space: nowrap;
  /* box-shadow: var(--shadow-lg); */
}

.easter-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Removed Stagger animations per user request */

/* ===== RESPONSIVE ===== */
@media(max-width:768px) {
  .section-label {
    font-size: 0.62rem;
    margin-bottom: 1.2rem;
  }

  .pub-body {
    padding: 0.85rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .exp-accordion {
    flex-direction: column;
    height: 60vh;
    border-radius: var(--radius);
  }

  .panel-year-side {
    top: 1rem;
    left: 1rem;
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 0.72rem;
  }

  .panel-content {
    padding: 1.2rem;
    width: 100%;
    white-space: normal;
  }

  .edu-card::before {
    font-size: 3rem;
    right: 0.5rem;
    bottom: 0.5rem;
  }

  .exp-panel {
    border-bottom: 1px solid var(--rule);
    border-right: none !important;
  }

  .teach-row {
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
  }

  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none !important;
  }

  .text-pressure-title {
    font-size: clamp(3rem, 15vw, 5.5rem);
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: center;
    line-height: 0.9;
    margin-bottom: 0.2rem;
  }

  .stats-grid {
    gap: 0.6rem;
  }

  .stat-item {
    padding: 0.8rem 1.2rem;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  /* Sub-page responsive */
  .page-header {
    padding: 2rem 0 0.5rem;
  }

  .proj-entry {
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
  }

  .proj-entry-num {
    width: auto;
  }

  .proj-entry-stack {
    white-space: normal;
    margin-top: 0.2rem;
  }
}

/* ===== HERO SEARCH BUTTON ===== */
.hero-search-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  color: var(--fg-dim);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--transition);
}

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

.hero-search-btn svg {
  pointer-events: none;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(28, 26, 25, 0.6);
  /* backdrop-filter: blur(12px); */
  /* -webkit-backdrop-filter: blur(12px); */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  width: min(600px, 90vw);
  background: var(--bg);
  border: 1px solid var(--rule);
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.3s var(--transition);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.search-overlay.open .search-overlay-inner {
  transform: translateY(0) scale(1);
}

.search-header {
  padding: 0;
  border-bottom: 1px solid var(--rule);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
}

.search-input-icon {
  color: var(--fg-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--fg);
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.search-input::placeholder {
  color: var(--fg-muted);
  font-size: 0.88rem;
}

.search-close-btn {
  color: var(--fg-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border-radius: var(--radius);
  transition: all 0.2s var(--transition);
}

.search-close-btn:hover {
  color: var(--fg);
  background: var(--rule);
}

.search-results {
  overflow-y: auto;
  max-height: calc(70vh - 60px);
}

.search-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid var(--rule);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
  background: var(--bg-light);
}

.search-result-badge {
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.search-result-text {
  font-size: 0.88rem;
  color: var(--fg);
  line-height: 1.5;
}

.search-result-text mark {
  background: rgba(217, 115, 84, 0.2);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 0.1rem;
}

.search-no-results {
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
}

/* ===== SEARCH HIGHLIGHT ON TARGET ELEMENT ===== */
.search-highlight {
  animation: searchPulse 2s ease-out;
  position: relative;
}

.search-highlight::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  opacity: 0;
  animation: searchBorderPulse 2s ease-out;
  pointer-events: none;
}

@keyframes searchPulse {
  0% {
    background-color: rgba(217, 115, 84, 0.2);
  }

  100% {
    background-color: transparent;
  }
}

@keyframes searchBorderPulse {
  0% {
    opacity: 1;
  }

  70% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
  }
}