/* ==========================================================================
   Sagar Shende — Data Analyst Portfolio
   Design tokens
   ========================================================================== */

:root {
  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Dark theme (default) */
  --bg: #0B1220;
  --bg-elevated: #101A2E;
  --surface: #15213A;
  --surface-hover: #1A2842;
  --border: #24314C;
  --text: #EDEFF4;
  --text-muted: #96A2B8;
  --text-faint: #667289;
  --accent: #F2B705;
  --accent-soft: rgba(242, 183, 5, 0.12);
  --accent-2: #22C7B5;
  --accent-2-soft: rgba(34, 199, 181, 0.12);
  --accent-contrast: #0B1220;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
  --focus-ring: 0 0 0 3px rgba(242, 183, 5, 0.45);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1180px;
  --nav-height: 72px;
}

[data-theme="light"] {
  --bg: #F7F6F2;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #F0EEE7;
  --border: #E1DED4;
  --text: #14202E;
  --text-muted: #4D5A6B;
  --text-faint: #7C8795;
  --accent: #A8730A;
  --accent-soft: rgba(168, 115, 10, 0.10);
  --accent-2: #0E8F80;
  --accent-2-soft: rgba(14, 143, 128, 0.10);
  --accent-contrast: #FFFFFF;
  --shadow: 0 20px 50px -25px rgba(20, 32, 46, 0.25);
  --focus-ring: 0 0 0 3px rgba(168, 115, 10, 0.35);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 12px);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.15; }
p { margin: 0; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

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

/* ==========================================================================
   Utility
   ========================================================================== */

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

.section {
  padding: 112px 0;
  border-bottom: 1px solid var(--border);
}

.section--tight { padding: 88px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-2);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 56ch;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover { background: var(--accent); filter: brightness(1.08); }

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

.btn--sm { padding: 9px 16px; font-size: 13px; }

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   Scroll progress bar
   ========================================================================== */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  z-index: 1100;
  transition: width 0.1s linear;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.is-active { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 20px;
    gap: 2px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 12px 10px; font-size: 15px; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: calc(var(--nav-height) + 72px);
  padding-bottom: 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3DDC84;
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18);
}

.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 15ch;
}
.hero h1 .accent { color: var(--accent); }

.hero-role {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--text-muted);
}
.hero-role .cursor {
  display: inline-block;
  width: 9px; height: 18px;
  background: var(--accent-2);
  margin-left: 3px;
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero p.hero-desc {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 52ch;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-meta {
  margin-top: 44px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-meta div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text);
}
.hero-meta div span {
  font-size: 13px;
  color: var(--text-faint);
}

/* Console signature element */
.console {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.console-bar span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.console-bar .console-label {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
}
.console-body {
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  min-height: 230px;
}
.console-body .ln { color: var(--text-faint); display: inline-block; width: 18px; }
.console-kw { color: var(--accent-2); }
.console-str { color: var(--accent); }
.console-fn { color: #8FB2FF; }
.console-comment { color: var(--text-faint); }
#consoleTyped { white-space: pre-wrap; }
.console-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.console-result.is-visible { opacity: 1; }
.console-result .kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.console-result .kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--accent);
}
.console-result .kpi span {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .console { order: -1; }
}

/* Hero profile photo */
.hero-photo-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  margin-bottom: 26px;
}
.hero-photo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  animation: hero-ring-spin 7s linear infinite;
}
.hero-photo-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
}
@keyframes hero-ring-spin { to { transform: rotate(360deg); } }
.hero-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  box-shadow: var(--shadow);
}
.hero-photo-status {
  position: absolute;
  z-index: 2;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3DDC84;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18);
}
.hero-photo-status::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #3DDC84;
  animation: hero-status-pulse 2.4s ease-out infinite;
}
@keyframes hero-status-pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.about-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, var(--accent-soft), var(--accent-2-soft));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.about-avatar span {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 600;
  color: var(--text);
}
.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.about-facts { display: flex; flex-direction: column; gap: 14px; }
.about-facts .fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.about-facts .fact:last-child { border-bottom: none; padding-bottom: 0; }
.about-facts .fact-label { color: var(--text-faint); font-family: var(--font-mono); font-size: 12.5px; }
.about-facts .fact-value { color: var(--text); font-weight: 500; text-align: right; }

.about-copy p { color: var(--text-muted); font-size: 16.5px; margin-bottom: 18px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy strong { color: var(--text); font-weight: 600; }

.about-interests {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

/* ==========================================================================
   Tech stack
   ========================================================================== */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.stack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stack-card:hover { border-color: var(--accent-2); transform: translateY(-3px); }
.stack-card .stack-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-2-soft);
  color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.stack-card .stack-icon svg { width: 20px; height: 20px; }
.stack-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.stack-card ul { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-card li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 5px 9px;
  border-radius: 100px;
}

/* ==========================================================================
   Timeline (experience)
   ========================================================================== */

.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-2);
}
.timeline-item.is-current::before { background: var(--accent-2); }
.timeline-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.timeline-item h3 {
  font-size: 19px;
  margin-top: 8px;
  font-weight: 600;
}
.timeline-item .timeline-org {
  font-size: 14px;
  color: var(--text-faint);
  margin-top: 4px;
}
.timeline-item ul { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.timeline-item li {
  color: var(--text-muted);
  font-size: 15px;
  padding-left: 18px;
  position: relative;
}
.timeline-item li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
}

/* Education cards */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 56px;
}
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.edu-card .timeline-date { display: block; margin-bottom: 10px; }
.edu-card h3 { font-size: 17px; font-weight: 600; }
.edu-card p { color: var(--text-muted); font-size: 14.5px; margin-top: 6px; }

/* ==========================================================================
   Certifications
   ========================================================================== */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.cert-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.9;
}
.cert-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cert-badge {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.cert-badge svg { width: 22px; height: 22px; }
.cert-card h3 { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.cert-card p { font-size: 13.5px; color: var(--text-faint); }
.cert-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.cert-meta div { display: flex; justify-content: space-between; gap: 12px; }
.cert-meta dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.cert-meta dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
}
.cert-verify {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Projects
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--accent-2); color: var(--text); }
.filter-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover { border-color: var(--accent-2); }
.project-card--featured { grid-column: span 1; }

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.project-card h3 { font-size: 19px; font-weight: 600; }
.project-card .project-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 16px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.project-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.project-kpis div {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.project-kpis strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--accent);
}
.project-kpis span {
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-case {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.project-case summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-case summary::-webkit-details-marker { display: none; }
.project-case summary::before {
  content: '+';
  font-size: 16px;
  line-height: 1;
}
.project-case[open] summary::before { content: '−'; }
.case-body { padding-top: 16px; font-size: 14.5px; color: var(--text-muted); }
.case-body dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-top: 14px;
}
.case-body dt:first-child { margin-top: 0; }
.case-body dd { margin: 6px 0 0; }

.project-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.more-projects {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.more-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.more-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.more-card p { font-size: 13.5px; color: var(--text-faint); margin-bottom: 14px; }

/* ==========================================================================
   GitHub stats
   ========================================================================== */

.github-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.github-panel img { border-radius: var(--radius-md); width: 100%; height: auto; }
@media (max-width: 760px) { .github-panel { grid-template-columns: 1fr; } }

.counter-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.counter-item {
  text-align: center;
  padding: 20px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.counter-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--accent);
}
.counter-item span { font-size: 12.5px; color: var(--text-faint); }
@media (max-width: 700px) { .counter-strip { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Resume
   ========================================================================== */

.resume-panel {
  background: linear-gradient(135deg, var(--surface), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.resume-panel h2 { font-size: 26px; margin-bottom: 10px; }
.resume-panel p { color: var(--text-muted); max-width: 46ch; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}
.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.contact-item:first-child { padding-top: 0; }
.contact-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-2-soft);
  color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 19px; height: 19px; }
.contact-item .contact-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-item .contact-value { font-size: 15.5px; font-weight: 500; margin-top: 2px; }
.contact-item a.contact-value:hover { color: var(--accent-2); }

.social-row { display: flex; gap: 12px; margin-top: 24px; }
.social-btn {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.social-btn svg { width: 19px; height: 19px; }

/* Form */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-group label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent-2); }
.form-error {
  font-size: 12.5px;
  color: #FF7A7A;
  min-height: 16px;
}
.form-note {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 14px;
}
.form-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--accent-2);
}
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer p { color: var(--text-faint); font-size: 13.5px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-faint); font-size: 13.5px; }
.footer-links a:hover { color: var(--accent-2); }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 900;
  border: none;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .resume-panel { padding: 32px; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .hero { padding-top: calc(var(--nav-height) + 44px); }
  .hero-meta { gap: 24px; }
  .project-kpis { grid-template-columns: repeat(3, 1fr); }
  .counter-strip { grid-template-columns: repeat(2, 1fr); }
  .back-to-top { right: 16px; bottom: 16px; }
}
