/* style.css -- Main stylesheet for andrewgallagher.org */

/* ========================================================================
   Reset + Custom Properties
   ======================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  /* Colors */
  --bg: #09090b;
  --bg2: #0f0f12;
  --fg: #e8e6e1;
  --fg2: #8a8885;
  --fg3: #4a4845;
  --red: #ff3b3b;
  --green: #3bff7a;
  --blue: #3b8fff;
  --border: rgba(255, 255, 255, 0.07);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --nav-height: 80px;
  --section-padding: 120px 48px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

/* ========================================================================
   Base Styles
   ======================================================================== */

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-weight: 300;
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
}

a {
  color: var(--fg);
  text-decoration: none;
  transition: color var(--transition-fast);
}

::selection {
  background: var(--blue);
  color: var(--bg);
}

/* ========================================================================
   Noise Overlay (VISL-04)
   ======================================================================== */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
  will-change: transform;
}

/* ========================================================================
   Custom Cursor (HERO-07 visual setup)
   ======================================================================== */

#cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--fg);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s;
  display: none;
}

#cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(232, 230, 225, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease-out, width 0.3s, height 0.3s;
  display: none;
}

@media (pointer: fine) {
  html { cursor: none; }
}

/* ========================================================================
   Navigation (NAVG-01, NAVG-02)
   ======================================================================== */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 100;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(10px);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  margin: 5px 0;
  transition: all var(--transition-normal);
}

/* ========================================================================
   Mobile Navigation
   ======================================================================== */

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg2);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  transform: translateX(100%);
  transition: transform 300ms ease;
  pointer-events: none;
}

.mobile-nav.open {
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-link {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg2);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition-fast);
}

.mobile-link:hover {
  color: var(--fg);
}

/* ========================================================================
   Hero (HERO-01)
   ======================================================================== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#wave-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* Let vertical scrolling win over canvas touch interaction on mobile */
  touch-action: pan-y;
}

.hero-overlay {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  font-weight: 300;
  color: var(--fg2);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 16px;
}

/* ========================================================================
   Main Content Area
   ======================================================================== */

#app {
  position: relative;
  z-index: 0;
  min-height: 50vh;
}

/* Page transition animation */
#app.page-exit {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#app.page-enter {
  opacity: 0;
  transform: translateY(12px);
}

#app.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Blog hero title */
.blog-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 64px);
  color: var(--fg);
  margin-bottom: 48px;
  padding-top: calc(var(--nav-height) + 40px);
}

.section {
  padding: var(--section-padding);
  max-width: 1200px;
  margin: 0 auto;
}

/* ========================================================================
   Section Labels
   ======================================================================== */

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--fg3);
  margin-bottom: 48px;
}

/* ========================================================================
   Scroll-Triggered Fade-Up Animation (VISL-05)
   ======================================================================== */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered card slide-in */
.fade-up-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up-card.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ========================================================================
   About Section (CONT-01, CONT-02)
   ======================================================================== */

.about-photo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.about-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-bio {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg2);
}

.about-bio p {
  margin-bottom: 16px;
}

.about-bio strong {
  color: var(--fg);
}

.about-bio a {
  color: var(--blue);
  transition: color var(--transition-fast);
}

.about-bio a:hover {
  color: var(--fg);
}

.skill-category {
  margin-bottom: 24px;
}

.skill-category-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg3);
  margin-bottom: 12px;
  font-weight: 400;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg2);
  background: transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--fg3);
  color: var(--fg);
}

/* ========================================================================
   Projects Section (CONT-03, CONT-04, CONT-05)
   ======================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card.fade-up-card {
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-normal);
}

.project-card {
  position: relative;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    400px circle at var(--glow-x, -100px) var(--glow-y, -100px),
    rgba(59, 143, 255, 0.08),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  border-color: rgba(59, 143, 255, 0.2);
}

.project-number {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 300;
  color: var(--fg3);
  opacity: 0.3;
  line-height: 1;
  display: block;
  margin-bottom: 16px;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--fg);
  margin-bottom: 12px;
}

.project-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg2);
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-link {
  font-size: 20px;
  color: var(--fg3);
  transition: color var(--transition-fast);
  display: inline-block;
}

.project-link:hover {
  color: var(--blue);
}

/* ========================================================================
   Experience Timeline (CONT-07, CONT-08)
   ======================================================================== */

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border);
}

.timeline-entry {
  position: relative;
  padding-bottom: 48px;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--fg3);
  transition: border-color var(--transition-fast);
}

.timeline-entry:hover .timeline-dot {
  border-color: var(--blue);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg3);
  display: block;
  margin-bottom: 8px;
}

.timeline-role {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--fg);
  margin-bottom: 4px;
}

.timeline-org {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  display: block;
  margin-bottom: 12px;
}

.timeline-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg2);
}

/* ========================================================================
   Blog Preview (CONT-06)
   ======================================================================== */

.blog-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.blog-preview-card.fade-up-card {
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-normal);
}

.blog-preview-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  transition: border-color var(--transition-normal);
}

.blog-preview-card:hover {
  border-color: var(--fg3);
}

.blog-preview-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg3);
  display: block;
  margin-bottom: 12px;
}

.blog-preview-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 8px;
}

.blog-preview-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg2);
}

.blog-view-all {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg3);
  transition: color var(--transition-fast);
}

.blog-view-all:hover {
  color: var(--fg);
}

/* ========================================================================
   Blog Listing (BLOG-01)
   ======================================================================== */

.blog-listing {
  display: flex;
  flex-direction: column;
}

.blog-listing-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  margin-bottom: 20px;
  transition: border-color var(--transition-normal);
  cursor: pointer;
}

.blog-listing-card:hover {
  border-color: var(--fg3);
}

.blog-listing-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg3);
  display: block;
  margin-bottom: 8px;
}

.blog-listing-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--fg);
  margin-bottom: 8px;
}

.blog-listing-title a {
  color: var(--fg);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-listing-title a:hover {
  color: var(--blue);
}

.blog-listing-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg2);
  margin-bottom: 12px;
}

.blog-listing-meta {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.blog-listing-readtime {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg3);
}

.blog-listing-pills {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.blog-pill--category {
  color: var(--blue);
  border-color: rgba(59, 143, 255, 0.3);
}

.blog-pill--tag {
  color: var(--fg3);
  border-color: var(--border);
}

/* ========================================================================
   Blog Post (BLOG-02, BLOG-03)
   ======================================================================== */

.blog-post-back {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg3);
  display: block;
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.blog-post-back:hover {
  color: var(--fg);
}

.blog-post-header {
  margin-bottom: 48px;
}

.blog-post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: 16px;
}

.blog-post-meta {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.blog-post-content {
  max-width: 970px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg2);
}

.blog-post-content h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--fg);
  margin-top: 48px;
  margin-bottom: 16px;
}

.blog-post-content h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--fg);
  margin-top: 32px;
  margin-bottom: 12px;
}

.blog-post-content p {
  margin-bottom: 20px;
}

.blog-post-content a {
  color: var(--blue);
  transition: color var(--transition-fast);
}

.blog-post-content a:hover {
  color: var(--fg);
}

.blog-post-content strong {
  color: var(--fg);
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.blog-post-content li {
  margin-bottom: 8px;
}

.blog-post-content blockquote {
  border-left: 3px solid var(--blue);
  padding-left: 16px;
  color: var(--fg2);
  margin-bottom: 20px;
  font-style: italic;
}

.blog-post-content img {
  max-width: 100%;
  border-radius: 4px;
  margin: 24px auto;
  display: block;
}

.blog-post-content code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
  color: var(--fg);
}

.blog-post-content pre {
  background: #151518;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

/* ========================================================================
   Contact / Footer (CONT-09)
   ======================================================================== */

.contact-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--fg);
  margin-bottom: 48px;
  line-height: 1.2;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: border-color var(--transition-fast);
}

.social-link:hover {
  border-color: var(--fg3);
}

.social-platform {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg3);
  min-width: 80px;
}

.social-label {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg2);
  transition: color var(--transition-fast);
}

.social-link:hover .social-label {
  color: var(--fg);
}

/* ========================================================================
   Responsive Breakpoints (VISL-03)
   ======================================================================== */

@media (max-width: 768px) {
  nav {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: block;
  }

  .hero-name {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  :root {
    --section-padding: 80px 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .blog-preview-grid {
    grid-template-columns: 1fr;
  }

  .blog-post-content {
    font-size: 13px;
  }

  .blog-post-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .hero-tagline {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  :root {
    --section-padding: 60px 16px;
  }

  .project-card {
    padding: 24px;
  }

  .blog-listing-card {
    padding: 20px;
  }

  .blog-post-content pre {
    padding: 14px;
    font-size: 12px;
  }

  .contact-heading {
    font-size: 1.8rem;
  }
}

/* ========================================================================
   Scroll Progress Bar
   ======================================================================== */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 101;
  pointer-events: none;
  will-change: transform;
}

/* ========================================================================
   Hero — eyebrow, animated role, scroll cue, entrance
   ======================================================================== */

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(0.6rem, 1.2vw, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--fg3);
  margin-bottom: 20px;
}

#hero-role {
  display: inline-block;
  transition: opacity 0.3s ease;
}

/* Staggered hero entrance on first paint */
.hero-eyebrow,
.hero-name,
.hero-tagline {
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-eyebrow { animation-delay: 0.1s; }
.hero-name    { animation-delay: 0.25s; }
.hero-tagline { animation-delay: 0.45s; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: heroIn 0.9s ease 0.9s forwards;
}

.hero-scroll-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--fg3);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--fg3), transparent);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--blue), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%   { transform: translateY(0); }
  100% { transform: translateY(80px); }
}

.hero-scroll-cue:hover .hero-scroll-label { color: var(--fg); }

/* ========================================================================
   Active Nav State
   ======================================================================== */

.nav-links a.is-active {
  color: var(--fg);
}

.nav-links a {
  position: relative;
}

.nav-links a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--blue);
}

/* ========================================================================
   Stats Band
   ======================================================================== */

.stats-band {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 48px 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  padding: 36px 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  position: relative;
}

.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: var(--border);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--fg);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg3);
}

/* ========================================================================
   Project Card — featured treatment + actions
   ======================================================================== */

.project-card--featured {
  grid-column: 1 / -1;
  border-color: rgba(59, 143, 255, 0.25);
}

.project-card--featured .project-title {
  font-size: 28px;
}

.project-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--blue);
  border: 1px solid rgba(59, 143, 255, 0.3);
  border-radius: 3px;
  padding: 4px 10px;
}

.project-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.project-action {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg3);
  transition: color var(--transition-fast);
}

.project-action:hover {
  color: var(--blue);
}

@media (max-width: 768px) {
  .stats-band { padding: 48px 24px 0; }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }
  .stat:not(:last-child)::after { display: none; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ========================================================================
   Résumé Page
   ======================================================================== */

.resume-page {
  max-width: 860px;
  padding-top: calc(var(--nav-height) + 48px);
}

.resume-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.resume-toolbar .blog-post-back { margin-bottom: 0; }

.resume-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.resume-print-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.resume-print-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.resume-print-btn--primary {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
}

.resume-print-btn--primary:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--bg);
}

.resume-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
  margin-bottom: 36px;
}

.resume-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--fg);
  line-height: 1.1;
}

.resume-title {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg2);
  margin-top: 10px;
}

.resume-contact {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg2);
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.resume-contact a { color: var(--blue); }
.resume-contact a:hover { color: var(--fg); }
.resume-sep { color: var(--fg3); }

.resume-block { margin-bottom: 36px; }

.resume-block-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--fg3);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.resume-summary {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg2);
}

.resume-entry { margin-bottom: 24px; }
.resume-entry:last-child { margin-bottom: 0; }

.resume-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.resume-entry-role {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--fg);
}

.resume-entry-period {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg3);
  white-space: nowrap;
}

.resume-entry-org {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  display: block;
  margin: 4px 0 8px;
}

.resume-entry-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg2);
}

.resume-skill-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.resume-skill-row:last-child { border-bottom: none; }

.resume-skill-cat {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg3);
}

.resume-skill-items {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg2);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .resume-skill-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- Print: strip chrome, ink-friendly ---------------------------------- */
@media print {
  nav, .mobile-nav, #scroll-progress, #cursor, #cursor-ring,
  .hero, #wave-canvas, body::after, .resume-toolbar {
    display: none !important;
  }
  html, body {
    background: #fff !important;
    color: #111 !important;
  }
  html { cursor: auto !important; }
  .resume-page {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .resume-name, .resume-entry-role, .resume-stat-value { color: #111 !important; }
  .resume-title, .resume-summary, .resume-entry-desc, .resume-skill-items,
  .resume-contact { color: #333 !important; }
  .resume-entry-org, .resume-contact a { color: #1a4fa0 !important; }
  .resume-block-title, .resume-entry-period, .resume-skill-cat { color: #666 !important; }
  .resume-header, .resume-block-title, .resume-skill-row { border-color: #ccc !important; }
  .resume-block { page-break-inside: avoid; }
  a { text-decoration: none !important; }
}
