/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  --color-bg: #090c10;
  --color-bg-rgb: 9, 12, 16;
  --color-bg-elevated: #10151c;
  --color-bg-inset: #0d1117;
  --color-border: #1c2530;
  --color-border-soft: #161d26;

  --color-cyan: #22d3ee;
  --color-cyan-dim: #22d3ee33;
  --color-violet: #a78bfa;
  --color-violet-dim: #a78bfa33;
  --color-gradient: linear-gradient(135deg, var(--color-cyan), var(--color-violet));

  --color-text: #e6edf3;
  --color-text-dim: #8b98a5;
  --color-text-faint: #727d8a;
  --color-heading: #f7fafc;

  --color-success: #4ade80;
  --color-error: #f87171;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.5rem;
  --fs-3xl: 3.5rem;
  --fs-4xl: clamp(2.75rem, 8vw, 5.5rem);

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  --content-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --nav-height: 64px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 600ms;
}

[data-theme="light"] {
  --color-bg: #f6f8fa;
  --color-bg-rgb: 246, 248, 250;
  --color-bg-elevated: #ffffff;
  --color-bg-inset: #eef1f5;
  --color-border: #d8dee5;
  --color-border-soft: #e4e9ee;

  --color-cyan: #0891b2;
  --color-cyan-dim: #0891b224;
  --color-violet: #7c3aed;
  --color-violet-dim: #7c3aed1f;

  --color-text: #1f2937;
  --color-text-dim: #57606f;
  --color-text-faint: #5f6b7a;
  --color-heading: #0c111a;

  --color-success: #16a34a;
  --color-error: #dc2626;

  color-scheme: light;
}

/* ==========================================================================
   BASE / RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Kills the mobile-browser blue/grey flash on tap for every element
     site-wide. Combined with the focus-visible ring below and explicit
     :active states, so removing this never removes feedback — it just
     removes the OS-level highlight rectangle. */
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}
[data-theme="light"] html { color-scheme: light; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--sp-4);
  background: var(--color-cyan);
  color: #05070a;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  z-index: 200;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  -webkit-touch-callout: default;
}

button, a, [role="button"], .nav-toggle, .theme-toggle {
  /* Removes the persistent tap/press highlight rectangle some mobile
     browsers draw on buttons and links; :active states below take
     over as the tactile feedback instead. */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

::selection {
  background: var(--color-violet-dim);
  color: var(--color-heading);
}

/* Focus ring — the ONLY outline the page shows, and only for
   keyboard/assistive-tech focus (:focus-visible), never for a mouse
   or touch tap. This is what replaces the removed tap-highlight as
   the accessible "you interacted with this" signal. */
:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) {
  outline: none;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-faint); }

@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;
  }
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

/* Anchor-jump offset: every in-page target the nav links (or a shared
   URL with a #hash) can land on needs this, or the fixed nav (64px)
   overlaps the top of the section's content -- confirmed to clip the
   eyebrow label on #about/#skills/#contact when jumped to directly.
   The extra 12px is breathing room so text doesn't sit flush against
   the nav's bottom edge either. */
#top, #about, #skills, #contact {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  /* `sticky` instead of `fixed`: a backdrop-filter blur on a `fixed`
     element forces the browser to recompute the blurred region against
     newly-revealed content on every single scroll frame, which is a
     well-documented cause of scroll stutter (especially on iOS Safari
     and lower-powered devices) -- confirmed independently by multiple
     real-world reports, including Vue.js's own docs site measuring
     close to a 30% framerate drop from this exact pattern. `sticky`
     keeps the same fixed-to-top visual behavior during normal page
     scroll while avoiding that per-frame recompute. will-change and
     the translateZ(0) hint below are extra, low-cost nudges asking
     the browser to keep this on its own compositor layer rather than
     re-flattening it into the page on every frame.
     Sticky also sidesteps a separate, unrelated issue: a non-`none`
     backdrop-filter makes its element the containing block for any
     `fixed`/`absolute` descendant -- which the mobile nav-link-list
     dropdown below is. Under `fixed` that only worked by coincidence
     (nav happened to sit exactly at the real viewport top already);
     under `sticky` that containing-block override doesn't trigger,
     so the dropdown's positioning is correct on its own terms too. */
  position: sticky;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 150;
  display: flex;
  align-items: center;
  background: rgba(var(--color-bg-rgb), 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border-soft);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
  will-change: backdrop-filter;
  transform: translateZ(0);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--color-heading);
  display: flex;
  align-items: center;
  gap: 2px;
  letter-spacing: -0.02em;
  border-radius: var(--radius-sm);
}
.nav-logo .bracket { color: var(--color-cyan); }
.nav-logo .dot { color: var(--color-violet); }

.nav-links { display: flex; align-items: center; gap: var(--sp-7); }
.nav-link-list { display: flex; gap: var(--sp-6); }
.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--color-text-dim);
  padding-block: var(--sp-2);
  transition: color var(--dur-fast) var(--ease-out);
  border-radius: var(--radius-sm);
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--color-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-link:hover { color: var(--color-text); }
.nav-link.is-active { color: var(--color-heading); }
.nav-link.is-active::before { transform: scaleX(1); }

.theme-toggle, .nav-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover { color: var(--color-cyan); border-color: var(--color-cyan-dim); }
.theme-toggle:active, .nav-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  width: 16px; height: 2px;
  background: var(--color-text);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 780px) {
  .nav-link-list {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-soft);
    max-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: max-height var(--dur-base) var(--ease-out);
  }
  /* min(): scales with the screen instead of a fixed px number, since
     the hero's first line (hello_world.init()) sits at a vertically-
     centered position that shifts a little with viewport height --
     this reaches close to it on most phones with a safety gap. */
  .nav-link-list.is-open { max-height: min(37vh, 315px); }
  .nav-link {
    padding: var(--sp-4) var(--sp-6);
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: var(--fs-sm);
    border-bottom: 1px solid var(--color-border-soft);
  }
  .nav-link::before { display: none; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--color-cyan);
  margin-bottom: var(--sp-3);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan);
  flex-shrink: 0;
}

.section { padding-top: var(--sp-8); padding-bottom: var(--sp-4); }
.section:first-of-type { padding-top: var(--sp-9); }
.section-head { max-width: 640px; margin-bottom: var(--sp-8); }
.section-title { font-size: var(--fs-2xl); }
.section-sub { color: var(--color-text-dim); margin-top: var(--sp-3); font-size: var(--fs-md); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--color-gradient); color: #05070a; font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px var(--color-cyan-dim); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { border: 1px solid var(--color-border); color: var(--color-text); background: var(--color-bg-elevated); }
.btn-ghost:hover { border-color: var(--color-cyan); color: var(--color-cyan); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); }
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
  background: var(--color-bg-inset);
  border: 1px solid var(--color-border);
  padding: 3px var(--sp-3);
  border-radius: 999px;
}

.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-cyan-dim);
  box-shadow: 0 20px 40px -24px rgba(34, 211, 238, 0.25);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }

.hero-name {
  font-size: var(--fs-4xl);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--color-heading) 60%, var(--color-text-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--sp-4);
}

.hero-role {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--color-cyan);
  min-height: 1.6em;
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
}
.hero-cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--color-violet);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-cursor { animation: none; } }

.hero-tagline {
  max-width: 560px;
  font-size: var(--fs-md);
  color: var(--color-text-dim);
  margin-bottom: var(--sp-7);
}

.hero-cta { display: flex; gap: var(--sp-4); flex-wrap: wrap; }

.hero-scroll-cue {
  position: absolute;
  bottom: var(--sp-7);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  z-index: 2;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--color-text-faint), transparent);
  animation: scrollcue 1.8s var(--ease-out) infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: scaleY(0.4); transform-origin: top; }
  40% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line { animation: none; opacity: 0.6; }
}

/* ---- Stats ---- */
.stats-section {
  border-top: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
  padding-block: var(--sp-8);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-6);
}
.stat-item { text-align: left; }
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, var(--fs-2xl));
  font-weight: 600;
  background: var(--color-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
  overflow-wrap: break-word;
}
.stat-suffix { font-size: 0.7em; }
.stat-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--color-text-dim);
  margin-top: var(--sp-2);
}

/* ---- Focus grid ---- */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.focus-card h3 { font-size: var(--fs-md); margin-block: var(--sp-3) var(--sp-2); }
.focus-card p { color: var(--color-text-dim); font-size: var(--fs-sm); }
.focus-icon { color: var(--color-cyan); font-size: var(--fs-lg); }

@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: var(--sp-6); }
  .focus-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PAGE HEADER (used for About / Skills / Contact sections)
   ========================================================================== */
.page-header {
  padding-top: calc(var(--sp-8) + var(--sp-4));
  padding-bottom: var(--sp-6);
}
.page-title { font-size: var(--fs-3xl); margin-bottom: var(--sp-3); }
.page-sub { color: var(--color-text-dim); max-width: 620px; font-size: var(--fs-md); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.bio-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-8);
  align-items: start;
}

.bio-photo-frame {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 6px;
  background: linear-gradient(135deg, var(--color-cyan-dim), var(--color-violet-dim));
  overflow: hidden;
}
.bio-photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-lg) - 6px);
  background: var(--color-bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--color-text-faint);
  letter-spacing: -0.02em;
  user-select: none;
}

.bio-paragraph {
  font-size: var(--fs-md);
  color: var(--color-text);
  max-width: 640px;
  margin-bottom: var(--sp-6);
}

.bio-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.bio-actions-note {
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  width: 100%;
  margin-top: var(--sp-1);
}

.timeline {
  position: relative;
  padding-left: var(--sp-6);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-7);
}
.timeline-item { position: relative; }
.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--sp-6) - 5px);
  top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-cyan);
  box-shadow: 0 0 0 4px var(--color-bg);
}
.timeline-date { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--color-cyan); }
.timeline-title { font-size: var(--fs-md); margin-block: var(--sp-1) var(--sp-2); }
.timeline-desc { color: var(--color-text-dim); font-size: var(--fs-sm); max-width: 560px; }

@media (max-width: 720px) {
  .bio-layout { grid-template-columns: 1fr; }
  .bio-photo-frame { max-width: 200px; }
}

/* ==========================================================================
   SKILLS (tag-list form — no proficiency bars)
   ========================================================================== */
.skills-group { margin-bottom: var(--sp-7); }
.skills-group:last-child { margin-bottom: 0; }
.skills-group-title {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--color-text-dim);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.skills-group-title .glyph { color: var(--color-violet); }
.skills-taglist { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.skills-taglist .tag {
  font-size: var(--fs-sm);
  padding: var(--sp-2) var(--sp-4);
  color: var(--color-text);
}
.dsa-platforms { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); }

/* ==========================================================================
   CONTACT / GET IN TOUCH (link cards, no form)
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-5);
}
.contact-link-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
}
.contact-link-card svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-text-dim); transition: color var(--dur-fast) var(--ease-out); }
.contact-link-card:hover svg { color: var(--color-cyan); }
.contact-link-title { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--color-heading); margin-bottom: 2px; }
.contact-link-sub { font-size: var(--fs-xs); color: var(--color-text-faint); }
a.card.contact-link-card[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
a.card.contact-link-card[aria-disabled="true"]:hover {
  transform: none;
  border-color: var(--color-border);
  box-shadow: none;
}

@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--color-border-soft); padding-top: var(--sp-8); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
}
.footer-logo { margin-bottom: var(--sp-3); }
.footer-tagline { color: var(--color-text-dim); font-size: var(--fs-sm); max-width: 320px; }
.footer-social { display: flex; gap: var(--sp-4); }
.footer-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.footer-icon svg { width: 17px; height: 17px; }
.footer-icon:hover { color: var(--color-cyan); border-color: var(--color-cyan-dim); }
.footer-icon[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.footer-bottom {
  border-top: 1px solid var(--color-border-soft);
  padding-block: var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.back-to-top {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out);
}
.back-to-top:hover { color: var(--color-cyan); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; }
}
