/* ============================================================
   Kishan Singh — Portfolio
   Design system: warm, light-first personal portfolio with
   glassmorphism, animated gradient accents, and rich but tasteful
   motion (tilt cards, magnetic buttons, animated counters).
   Dark mode available via toggle (persisted), light is default.
   ============================================================ */

:root {
  --bg: #FBFBFE;
  --bg-soft: #F3F3FA;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --ink: #14161A;
  --ink-muted: #63677A;
  --outline: rgba(20, 22, 26, 0.09);
  --outline-soft: rgba(20, 22, 26, 0.06);

  --accent-1: #6D5DF6;   /* indigo */
  --accent-2: #22D3EE;   /* cyan */
  --accent-3: #EC4899;   /* pink, sparing use */
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --shadow-color: 235 60% 45%;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max-w: 1120px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
}

:root[data-theme="dark"] {
  --bg: #0C0D12;
  --bg-soft: #121319;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-solid: #16171F;
  --ink: #F1F2F6;
  --ink-muted: #9AA0AE;
  --outline: rgba(255, 255, 255, 0.1);
  --outline-soft: rgba(255, 255, 255, 0.06);
  --accent-1: #8C7CFF;
  --accent-2: #3FE3FF;
  --accent-3: #FF6FB3;
  --shadow-color: 240 70% 3%;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 400ms ease, color 400ms ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-1);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

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

/* ---------------- Ambient gradient background ---------------- */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  will-change: transform;
}
:root[data-theme="dark"] .blob { opacity: 0.28; }
.blob-1 {
  width: 520px; height: 520px;
  background: var(--accent-1);
  top: -160px; left: -120px;
  animation: drift1 26s ease-in-out infinite alternate;
}
.blob-2 {
  width: 480px; height: 480px;
  background: var(--accent-2);
  top: 20%; right: -180px;
  animation: drift2 30s ease-in-out infinite alternate;
}
.blob-3 {
  width: 420px; height: 420px;
  background: var(--accent-3);
  bottom: -180px; left: 30%;
  opacity: 0.22;
  animation: drift3 34s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to { transform: translate(80px, 60px) scale(1.1); }
}
@keyframes drift2 {
  to { transform: translate(-70px, 80px) scale(0.95); }
}
@keyframes drift3 {
  to { transform: translate(60px, -50px) scale(1.08); }
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.prose {
  color: var(--ink-muted);
  max-width: 68ch;
  margin: 16px 0 0;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 12px;
  display: inline-block;
}

.grad-text {
  background: var(--gradient);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: grad-shift 6s ease-in-out infinite;
}
@keyframes grad-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ---------------- Glassmorphism ---------------- */
.glass {
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--outline);
  box-shadow: 0 20px 50px hsl(var(--shadow-color) / 0.1), 0 2px 8px hsl(var(--shadow-color) / 0.05);
}

.tilt { transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease; will-change: transform; }
.tilt:hover {
  box-shadow: 0 30px 60px hsl(var(--shadow-color) / 0.16), 0 2px 8px hsl(var(--shadow-color) / 0.06);
}

/* ---------------- App bar ---------------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 400ms ease;
}
.appbar.is-elevated {
  border-bottom-color: var(--outline);
  box-shadow: 0 2px 18px hsl(var(--shadow-color) / 0.08);
}
.appbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand-avatar-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 2px;
  background: var(--gradient);
  flex: none;
  display: block;
}
.brand-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--bg);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}
.nav {
  position: relative;
  display: flex;
  gap: 26px;
  padding-bottom: 4px;
}
.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 150ms ease;
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.65, 0, 0.35, 1), width 320ms cubic-bezier(0.65, 0, 0.35, 1), opacity 200ms ease;
  pointer-events: none;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--outline);
  background: var(--surface-solid);
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
  flex: none;
}
.theme-toggle:hover { color: var(--accent-1); border-color: var(--accent-1); transform: rotate(12deg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 4px 28px 18px;
  gap: 2px;
}
.mobile-nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 12px 4px;
  border-top: 1px solid var(--outline);
  font-size: 15px;
}
.appbar.nav-open .mobile-nav { display: flex; }

/* ---------------- Ripple ---------------- */
.btn, .work-pill {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.22;
  transform: scale(0);
  animation: ripple-out 550ms ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-out { to { transform: scale(1); opacity: 0; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 26px hsl(var(--shadow-color) / 0.28);
}
.btn-primary:hover { box-shadow: 0 14px 32px hsl(var(--shadow-color) / 0.36); }
.btn-outline {
  background: var(--surface-solid);
  color: var(--ink);
  border-color: var(--outline);
}
.btn-outline:hover { border-color: var(--accent-1); color: var(--accent-1); }
.btn-small { padding: 9px 16px; font-size: 13.5px; }

/* ---------------- Hero ---------------- */
.hero { padding: 76px 0 96px; }
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 36px;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.hero-photo-wrap {
  position: relative;
  opacity: 0;
  animation: hero-in 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo-wrap { animation: none; opacity: 1; }
}
.hero-photo-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 5px;
  background: var(--gradient);
  background-size: 200% auto;
  animation: grad-shift 6s ease-in-out infinite, float-bob 5s ease-in-out infinite;
}
.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  display: block;
}
@keyframes float-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-photo-badge {
  position: absolute;
  bottom: 6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px hsl(var(--shadow-color) / 0.15);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-copy { max-width: 760px; }
.hero-copy > * {
  opacity: 0;
  animation: hero-in 640ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 80ms; }
.hero-copy > *:nth-child(2) { animation-delay: 160ms; }
.hero-copy > *:nth-child(3) { animation-delay: 240ms; }
.hero-copy > *:nth-child(4) { animation-delay: 320ms; }
.hero-copy > *:nth-child(5) { animation-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { animation: none; opacity: 1; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(2rem, 3.2vw + 1rem, 3.2rem);
  line-height: 1.15;
  font-weight: 700;
}
.hero-lede {
  color: var(--ink-muted);
  font-size: 17px;
  max-width: 62ch;
  margin: 22px auto 0;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin: 32px 0 0;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stats {
  list-style: none;
  display: flex;
  gap: 40px;
  padding: 0;
  margin: 44px 0 0;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats .num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stats .label {
  display: block;
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ---------------- Sections ---------------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); transition: background-color 400ms ease; }
.section h2 {
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2.3rem);
  max-width: 26ch;
}

/* ---------------- Timeline ---------------- */
.timeline { list-style: none; margin: 48px 0 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 28px 1fr; gap: 20px; }
.tl-item + .tl-item { margin-top: 8px; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before {
  content: "";
  position: absolute;
  top: 6px; bottom: -8px;
  width: 2px;
  background: var(--outline);
}
.tl-rail::after {
  content: "";
  position: absolute;
  top: 6px; bottom: -8px;
  width: 2px;
  background: var(--gradient);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 800ms cubic-bezier(0.65, 0, 0.35, 1);
}
.tl-item:last-child .tl-rail::before, .tl-item:last-child .tl-rail::after { display: none; }
.tl-item.tl-lit .tl-rail::after { transform: scaleY(1); }
.tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-1);
  margin-top: 6px;
  z-index: 1;
  transition: background 400ms ease, box-shadow 400ms ease;
}
.tl-item.tl-lit .tl-dot {
  background: var(--gradient);
  box-shadow: 0 0 0 4px hsl(var(--shadow-color) / 0.14);
}
.tl-card { border-radius: var(--radius-md); padding: 28px 30px; margin-bottom: 28px; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; }
.tl-head h3 { font-size: 19px; }
.tl-org { color: var(--ink-muted); font-size: 14px; margin: 3px 0 0; }
.tl-date { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); margin: 0; white-space: nowrap; }
.tl-dur { color: var(--accent-1); }

.subprojects { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.subproject {
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  padding: 4px 18px;
}
.subproject summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0; font-weight: 600;
}
.subproject summary::-webkit-details-marker { display: none; }
.subproject summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent-1);
  font-size: 18px;
  transition: transform 200ms ease;
  flex: none;
}
.subproject[open] summary::after { transform: rotate(45deg); }
.sp-name { font-size: 15px; }
.sp-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-muted); }
.subproject .prose { padding-bottom: 4px; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 18px; margin: 0; }
.tag-list li {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  border: 1px solid var(--outline);
  border-radius: 6px;
  padding: 4px 9px;
}

/* ---------------- Work catalog ---------------- */
.work-filters { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.work-pill {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface-solid);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}
.work-pill:hover { border-color: var(--accent-1); color: var(--ink); transform: translateY(-1px); }
.work-pill.is-active { background: var(--gradient); border-color: transparent; color: #fff; }
.work-pill-count { font-family: var(--font-mono); font-size: 11px; opacity: 0.75; }

.work-catalog {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  transition: opacity 160ms ease;
}
.work-catalog.is-switching { opacity: 0; }
.work-tile {
  display: flex; gap: 14px; text-align: left;
  background: var(--surface-solid);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 250ms ease, border-color 150ms ease;
}
a.work-tile:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: var(--accent-1);
  box-shadow: 0 16px 32px hsl(var(--shadow-color) / 0.14);
}
.work-tile.is-hidden { display: none; }
.work-tile-icon { flex: none; }
.work-tile-icon img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; border: 1px solid var(--outline); }
.work-tile-mono {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--tile) 16%, var(--surface-solid));
  color: var(--tile);
  font-family: var(--font-mono);
  font-weight: 600; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--tile) 35%, transparent);
}
.work-tile-body { min-width: 0; }
.work-tile-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.work-tile-head h3 { font-size: 14.5px; font-family: var(--font-display); }
.work-tile-badge {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-muted);
  border: 1px solid var(--outline);
  border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}
.work-tile-badge-live { color: #10B981; border-color: #10B981; }
.work-tile-body p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; }

/* ---------------- Certificates ---------------- */
.cert-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.cert-card {
  position: relative;
  display: flex;
  gap: 18px;
  border-radius: var(--radius-md);
  padding: 26px 26px;
  overflow: hidden;
}
.cert-card::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, hsl(0 0% 100% / 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 700ms ease;
  pointer-events: none;
}
.cert-card:hover::after { left: 130%; }
.cert-seal {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff;
}
.cert-body h3 { font-size: 16px; }
.cert-meta { color: var(--ink-muted); font-size: 13px; margin: 6px 0 0; }
.cert-id { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-muted); margin: 4px 0 0; }
.cert-skills { display: flex; gap: 8px; margin-top: 12px; }
.chip-sm { font-size: 11.5px; padding: 5px 10px; }
.cert-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-1);
  text-decoration: none;
}
.cert-link:hover { text-decoration: underline; }

/* ---------------- Skills chips ---------------- */
.skills-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px 40px;
}
.skill-group h3 {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 0; }
.chip {
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface-solid);
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.chip:hover { border-color: var(--accent-1); color: var(--accent-1); transform: translateY(-1px); }

/* ---------------- Repo cards ---------------- */
.repo-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.repo-card {
  display: block;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  text-decoration: none;
  color: var(--ink);
}
.repo-card:hover { transform: translateY(-4px); }
.repo-head { display: flex; align-items: center; gap: 10px; }
.repo-icon { font-size: 16px; color: var(--accent-1); }
.repo-head h3 { font-size: 15.5px; }
.contrib-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  border: 1px solid var(--outline);
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.repo-card .prose { font-size: 13.5px; margin-top: 8px; }
.repo-meta { display: flex; gap: 16px; margin-top: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.lang-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lang, var(--accent-1)); margin-right: 5px; }

/* ---------------- Education ---------------- */
.edu-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.edu-card { border-radius: var(--radius-md); padding: 22px 24px; }
.edu-card h3 { font-size: 15.5px; }
.lang-note { margin-top: 22px; font-family: var(--font-mono); font-size: 13px; }

/* ---------------- Contact ---------------- */
.section-contact { text-align: center; }
.contact-inner { display: flex; justify-content: center; }
.contact-card {
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  max-width: 640px;
}
.section-contact .kicker { }
.section-contact h2 { max-width: none; }
.section-contact .prose { margin-left: auto; margin-right: auto; }
.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.social-row { display: flex; gap: 28px; margin-top: 36px; justify-content: center; }
.social-row a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.social-row a:hover { color: var(--accent-1); border-color: var(--accent-1); }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--outline); }
.footer-inner {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.footer-inner p { margin: 0; }

/* ---------------- Scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero-photo-ring { width: 168px; height: 168px; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .appbar-inner { padding: 10px 20px; }
  .section-inner { padding: 0 20px; }
  .hero-inner { padding: 0 20px; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 64px 0; }
  .hero-stats { gap: 26px; row-gap: 18px; }
  .tl-item { grid-template-columns: 20px 1fr; gap: 12px; }
  .tl-card { padding: 22px 18px; }
  .tl-head { flex-direction: column; }
  .contact-card { padding: 40px 26px; }
  .blob { filter: blur(50px); }
}

@media (max-width: 480px) {
  .btn-outline.btn-small { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
  .cert-card { flex-direction: column; }
}
