/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --bg: #050505;
  --surface: #101010;
  --surface-2: #1a1a1a;
  --border: #2e2e2e;
  --text: #f5f5f5;
  --text-muted: #9e9e9e;
  --text-subtle: #6f6f6f;
  --accent: #ffffff;
  --accent-dim: #a3a3a3;
  --accent-glow: rgba(255, 255, 255, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  --container: 1100px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: white; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--text); font-family: var(--font-display); }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-transform: uppercase; letter-spacing: 0.02em; }
h3 { font-size: 1.15rem; }
p { color: var(--text-muted); }
strong { color: var(--text); font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
.page-content { padding-top: 64px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px; display: flex; align-items: center; padding: 0 24px;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo-img { height: 32px; width: auto; display: block; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links li { list-style: none; }
.nav-links a {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  position: relative; transition: color var(--transition);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--accent); transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-muted); transition: all var(--transition); }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; font-size: 1rem; }
  .nav-links a::after { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 40px 24px; }
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 0.875rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--text-subtle); font-size: 0.8rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.05em;
  transition: all var(--transition); text-decoration: none;
  border: none; font-family: var(--font-display); white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #050505; }
.btn-primary:hover {
  background: #e0e0e0; color: #050505;
  transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ============================================================
   TAGS
   ============================================================ */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 3px 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; font-size: 0.75rem; color: var(--text-muted); font-weight: 500;
}
.tag-accent { background: var(--accent-glow); border-color: rgba(255, 255, 255, 0.4); color: var(--accent); }

/* ============================================================
   HERO (index page) — fullscreen Spline robot
   ============================================================ */
.hero {
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: var(--bg);
}
.hero-spline-viewer {
  position: absolute; inset: 0; z-index: 0;
  display: block; width: 100%; height: 100%;
  touch-action: pan-y;
  filter: grayscale(1);
}
.hero-spline-overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 64px;
  padding: 64px clamp(32px, 7vw, 110px) 0;
  pointer-events: none;
}
.hero-flank { flex: 0 1 420px; min-width: 0; }
.hero-flank-right { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 {
  margin-bottom: 0; letter-spacing: 0.01em;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
}
.hero h1 span {
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
}
.hero h1 {
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.85));
}
.hero-ctas { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.hero-ctas .btn { justify-content: center; }
.hero-spline-overlay .hero-ctas { pointer-events: auto; }
@media (max-width: 768px) {
  .hero-spline-overlay {
    flex-direction: column; justify-content: space-between; align-items: center;
    text-align: center; gap: 0;
    padding: calc(64px + 4vh) 24px 14vh;
  }
  .hero-flank { flex: 0 0 auto; }
  .hero-flank-right { align-items: center; }
}
.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 1; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-subtle); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header { margin-bottom: 48px; }
.section-eyebrow {
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}
.section-title { letter-spacing: -0.02em; margin-bottom: 12px; }
.section-desc { color: var(--text-muted); max-width: 600px; font-size: 1rem; }

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  transition: all var(--transition); text-decoration: none; color: inherit; cursor: pointer;
  overflow: hidden;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px var(--accent-glow); }
.project-card-img {
  margin: -24px -24px 0 -24px;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg) 100%);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
}
.project-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.04); }
.project-card-img--placeholder { font-size: 2.2rem; opacity: 0.25; }
.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-card-icon {
  width: 40px; height: 40px; background: var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.project-card-status {
  font-size: 0.68rem; font-weight: 600; padding: 3px 8px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em;
}
.status-active { background: rgba(255, 255, 255, 0.1); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.3); }
.status-completed { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); border: 1px solid var(--border); }
.project-card h3 { font-size: 1rem; color: var(--text); }
.project-card > p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.55; flex: 1; }
.project-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.project-card-date { font-size: 0.75rem; color: var(--text-subtle); }
.project-card-link { font-size: 0.8rem; font-weight: 600; color: var(--accent); }

/* ============================================================
   PROJECTS PAGE TABS
   ============================================================ */
.projects-tabs { display: flex; margin-bottom: 36px; border-bottom: 1px solid var(--border); }
.projects-tab {
  padding: 12px 24px; font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--transition); font-family: var(--font);
}
.projects-tab:hover { color: var(--text); }
.projects-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   PAGE HERO (interior pages)
   ============================================================ */
.page-hero { padding: 100px 0 56px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.page-hero-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 680px; line-height: 1.7; }
.page-hero-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.project-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

/* ============================================================
   PROJECT DETAIL LAYOUT
   ============================================================ */
.project-content { padding: 60px 0; }
.project-layout { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
@media (max-width: 768px) { .project-layout { grid-template-columns: 1fr; } }
.project-body h2 { font-size: 1.2rem; color: var(--text); margin: 36px 0 14px; }
.project-body h2:first-child { margin-top: 0; }
.project-body p { margin-bottom: 14px; line-height: 1.75; text-align: justify; }
.project-body ul, .project-body ol { list-style: disc; padding-left: 24px; color: var(--text-muted); margin-bottom: 14px; }
.project-body li { margin-bottom: 6px; line-height: 1.6; }
.project-sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.sidebar-card h4 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-subtle); margin-bottom: 12px; }
.sidebar-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sidebar-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-item-label { font-size: 0.72rem; color: var(--text-subtle); }
.sidebar-item-value { font-size: 0.875rem; color: var(--text); font-weight: 500; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-subtle); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero { padding: 100px 0 56px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-text h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 6px; }
.about-text h1 span { color: var(--accent); }
.about-role { font-size: 1rem; color: var(--accent); font-weight: 600; margin-bottom: 24px; letter-spacing: 0.01em; }
.about-text p { margin-bottom: 14px; line-height: 1.75; text-align: justify; hyphens: auto; }
.about-image-placeholder {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px; color: var(--text-subtle); font-size: 0.875rem;
}
.about-image {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg);
}

/* ============================================================
   SKILL ITEMS
   ============================================================ */
.skill-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; color: var(--text-muted); transition: all var(--transition);
}
.skill-item:hover { border-color: var(--accent); color: var(--text); }
.skill-dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   BLOG PAGE
   ============================================================ */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.blog-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  transition: all var(--transition); text-decoration: none; color: inherit;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px var(--accent-glow); }
.blog-card-meta { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-subtle); }
.blog-card-ext { margin-left: auto; font-weight: 600; color: var(--accent); }
.blog-card h3 { font-size: 1.05rem; color: var(--text); line-height: 1.4; }
.blog-card > p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.blog-empty { grid-column: 1 / -1; text-align: center; padding: 80px 0; }
.blog-empty h3 { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 10px; }

/* ============================================================
   RESUME PAGE
   ============================================================ */
.resume-header { padding: 100px 0 56px; border-bottom: 1px solid var(--border); }
.resume-layout { padding: 60px 0; }
.resume-tech-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .resume-tech-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .resume-tech-grid { grid-template-columns: 1fr; } }
.resume-section { margin-bottom: 28px; interpolate-size: allow-keywords; }
.resume-section-title {
  font-size: 1.15rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent);
  padding-bottom: 10px; border-bottom: 2px solid var(--accent);
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.resume-section-title::-webkit-details-marker { display: none; }
.resume-section-title:hover { color: var(--text); }
.resume-section-title::after {
  content: '';
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-bottom: 2px;
}
.resume-section[open] > .resume-section-title::after { transform: rotate(45deg); }
.resume-section::details-content {
  transition: height 0.3s ease, content-visibility 0.3s allow-discrete;
  height: 0;
  overflow: clip;
}
.resume-section[open]::details-content { height: auto; }
.resume-section-body { padding-top: 20px; }
.resume-entry { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--surface-2); }
.resume-entry:last-child { border-bottom: none; padding-bottom: 0; }
.resume-entry-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.resume-entry-title { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.resume-entry-date { font-size: 0.78rem; color: var(--text-subtle); white-space: nowrap; }
.resume-entry-org { font-size: 0.85rem; color: var(--accent); margin-bottom: 8px; }
.resume-entry-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.resume-entry-desc ul { list-style: disc; padding-left: 18px; margin-top: 6px; }
.resume-entry-desc li { margin-bottom: 4px; text-align: justify; hyphens: auto; }
.resume-section-body > p { line-height: 1.75; text-align: justify; hyphens: auto; }
.resume-sidebar-section { margin-bottom: 28px; }
.resume-sidebar-title { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-subtle); margin-bottom: 10px; }
.resume-skill-list { display: flex; flex-direction: column; gap: 6px; }
.resume-skill-list li { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.resume-skill-list li::before { content: ''; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   CAREER PROGRESSION GROUP (resume page)
   ============================================================ */
.career-group-body {
  padding: 0;
  position: relative;
}
.career-group-body::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 20px;
  bottom: 24px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0%, rgba(255, 255, 255, 0.12) 100%);
}
.career-group-body .resume-entry {
  position: relative;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.career-group-body .resume-entry::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
}
.career-group-body .resume-entry:first-child::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  width: 12px;
  height: 12px;
  left: -20px;
  top: 9px;
}
.career-group-body .resume-entry:last-child { padding-bottom: 0; }

/* ============================================================
   EXPERIENCE TIMELINE (resume page)
   ============================================================ */
.timeline { position: relative; margin-left: 150px; padding-left: 36px; }
.timeline-track {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--surface-2);
  border-radius: 1px;
}
.timeline-track-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--accent), var(--accent-dim));
  transform-origin: top;
  transform: scaleY(1); /* fully drawn by default (no-JS / reduced-motion) */
}
.timeline-js .timeline-track-fill { transform: scaleY(0); will-change: transform; }

.timeline-entry { position: relative; margin-bottom: 44px; }
.timeline-entry:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -41px; /* centers 12px dot on the 2px track (padding-left 36px) */
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent-dim);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.timeline-entry.active .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.timeline-date {
  position: absolute;
  left: -186px; /* gutter: 150px margin + 36px padding */
  top: 5px;
  width: 130px;
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

.timeline-company { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.timeline-company-name { font-size: 1rem; font-weight: 700; color: var(--text); font-family: var(--font-display); }
.timeline-company-meta { font-size: 0.85rem; color: var(--accent); }

/* entries inside the timeline drop their old list borders */
.timeline .timeline-content > .resume-entry { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
/* inner promotion track gets breathing room from the main line */
.timeline .career-group-body { margin-left: 24px; }

/* gutter date replaces inline date on wide screens (individual entries only;
   per-role dates inside the career group stay visible) */
@media (min-width: 901px) {
  .timeline-content > .resume-entry > .resume-entry-header > .resume-entry-date { display: none; }
}

/* scroll-reveal states (only when JS is active) */
.timeline-js .timeline-entry {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-js .timeline-entry .timeline-dot { transform: scale(0); }
.timeline-js .timeline-entry.visible { opacity: 1; transform: none; }
.timeline-js .timeline-entry.visible .timeline-dot { transform: scale(1); }

@media (max-width: 900px) {
  .timeline { margin-left: 4px; padding-left: 26px; }
  .timeline-date { display: none; }
  .timeline-dot { left: -31px; } /* re-center for 26px padding */
  .timeline .career-group-body { margin-left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-js .timeline-entry,
  .timeline-js .timeline-entry .timeline-dot {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .timeline-js .timeline-track-fill { transform: scaleY(1); }
  .resume-section::details-content { transition: none; }
  .resume-section-title::after { transition: none; }
}

/* ============================================================
   STAT CARDS (home page)
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ============================================================
   INTEREST CARDS
   ============================================================ */
.interest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.interest-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; transition: all var(--transition);
}
.interest-card:hover { border-color: var(--accent); }
.interest-card-icon { font-size: 2rem; margin-bottom: 10px; }
.interest-card-title { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.interest-card-desc { font-size: 0.78rem; color: var(--text-subtle); }

/* ============================================================
   TWO-COL LAYOUT HELPERS
   ============================================================ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.two-col-skewed { display: grid; grid-template-columns: 3fr 2fr; gap: 60px; align-items: center; }
@media (max-width: 768px) {
  .two-col, .two-col-skewed { grid-template-columns: 1fr; gap: 40px; }
}
.skills-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 768px) { .skills-columns { grid-template-columns: 1fr; } }
.skills-col-title { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.skill-list { display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   FEATURED SECTION (home)
   ============================================================ */
.featured-section {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   FADE-IN ANIMATIONS
   ============================================================ */
.fade-in { opacity: 0; transform: translateY(18px); animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
.fade-in-1 { animation-delay: 0.08s; }
.fade-in-2 { animation-delay: 0.16s; }
.fade-in-3 { animation-delay: 0.24s; }
.fade-in-4 { animation-delay: 0.34s; }
.fade-in-5 { animation-delay: 0.44s; }

/* ============================================================
   RESPONSIVE — TABLET  (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  /* Skills: 2 cols on tablet instead of jumping straight to 1 */
  .skills-columns { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Tighter section padding */
  section { padding: 52px 0; }
  .featured-section { padding: 52px 0; }

  /* Page heroes */
  .page-hero { padding: 72px 0 40px; }
  .about-hero { padding: 72px 0 40px; }
  .resume-header { padding: 72px 0 40px; }
  .project-content { padding: 40px 0; }

  /* Section headers */
  .section-header { margin-bottom: 32px; }

  /* Hero: overlay already centered at all widths */

  /* Cards: force single column so they never overflow the viewport */
  .projects-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }

  /* About image: cap height when stacked so it doesn't dominate the screen */
  .about-image-placeholder { aspect-ratio: unset; height: 260px; }

  /* Skills: single column on mobile */
  .skills-columns { grid-template-columns: 1fr; gap: 16px; }

  /* Resume: allow date to wrap on narrow screens */
  .resume-entry-date { white-space: normal; }
  /* Resume sidebar renders below main content on mobile — add spacing */
  .resume-layout > aside { border-top: 1px solid var(--border); padding-top: 40px; }

  /* Project detail sidebar moves below body on mobile */
  .project-sidebar { position: static; }

  /* Tabs: smaller padding so they fit on one line */
  .projects-tab { padding: 10px 16px; font-size: 0.85rem; }

  /* Reduce timeline left offset slightly */
  .timeline { padding-left: 20px; }
}

/* ============================================================
   RESPONSIVE — SMALL PHONES  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  /* Tighter container on very small screens */
  .container { padding: 0 16px; }

  /* Section padding */
  section { padding: 44px 0; }
  .featured-section { padding: 44px 0; }

  /* Page hero */
  .page-hero { padding: 64px 0 36px; }
  .about-hero { padding: 64px 0 36px; }
  .resume-header { padding: 64px 0 36px; }

  /* Hero: remove scroll hint on very short screens */
  .hero-scroll { display: none; }

  /* Buttons: allow wrapping if needed */
  .btn { white-space: normal; text-align: center; }

  /* Stat grid: 2 cols still works fine — but tighten padding */
  .stat-card { padding: 18px; }
  .stat-number { font-size: 1.6rem; }

  /* Project card inner padding */
  .project-card { padding: 18px; }
  .project-card-img { margin: -18px -18px 0 -18px; }

  /* Resume entry header: stack title and date */
  .resume-entry-header { flex-direction: column; gap: 2px; }

  /* Interest grid: 2 cols */
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
  .interest-card { padding: 18px 12px; }
}

/* ============================================================
   PRINT — force all resume sections open, hide chrome
   ============================================================ */
@media print {
  .resume-section::details-content {
    height: auto;
    content-visibility: visible;
    display: block;
  }
  .resume-section-title { cursor: default; }
  .resume-section-title::after { display: none; }
}
