/* ==========================================================================
   Pastel Matte Design System (Warm, Gentle, Zero-Glow, Eye-Soothing)
   ========================================================================== */
:root {
  /* Warm Pastel Paper Light Palette */
  --bg: #f8f6f2;
  --bg-subtle: #edeae2;
  --sf: #ffffff;
  --sf-card: #ffffff;
  --sf-hover: #f3efe6;
  
  --ink: #232220;
  --ink-secondary: #57544d;
  --ink-tertiary: #7c786e;
  --ink-muted: #a39f94;
  
  --border: #dfdbd1;
  --border-subtle: #eae7de;
  --border-strong: #c8c3b6;

  /* Matte Pastel Tones (Never Glowing) */
  --pastel-sage: #476a59;
  --pastel-sage-bg: #e2ede6;
  --pastel-sage-border: #c8dbd0;

  --pastel-heather: #535c75;
  --pastel-heather-bg: #e6e8f2;
  --pastel-heather-border: #cbcfdf;

  --pastel-clay: #875546;
  --pastel-clay-bg: #f5e7e1;
  --pastel-clay-border: #dfc8c0;

  --pastel-sand: #7b6531;
  --pastel-sand-bg: #f5eedb;
  --pastel-sand-border: #decfb1;

  /* Primary Accent: Muted Pastel Sage */
  --roy: #476a59;
  --roy-hover: #375345;
  --roy-light: #e2ede6;
  --on-roy: #ffffff;

  --teal: #4b6b66;
  --teal-light: #e1ebe9;

  --gold: #7b6531;
  --gold-light: #f5eedb;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;

  /* Matte Paper Shadows (Zero Glow) */
  --shadow-xs: 0 1px 2px rgba(35, 34, 32, 0.04);
  --shadow-sm: 0 2px 6px rgba(35, 34, 32, 0.05), 0 1px 2px rgba(35, 34, 32, 0.03);
  --shadow-md: 0 6px 16px -2px rgba(35, 34, 32, 0.06), 0 2px 6px -1px rgba(35, 34, 32, 0.03);
  --shadow-lg: 0 12px 28px -4px rgba(35, 34, 32, 0.08);
  --shadow-card-hover: 0 10px 22px -3px rgba(35, 34, 32, 0.09);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Transitions */
  --trans-fast: 0.15s ease;
  --trans-normal: 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-theme: 0.3s ease;

  color-scheme: light;
}

/* Dark Theme (Warm Matte Charcoal & Muted Pastels, Zero Harshness) */
:root[data-theme="dark"],
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17181a;
    --bg-subtle: #202124;
    --sf: #222327;
    --sf-card: #24262b;
    --sf-hover: #2b2d33;

    --ink: #eeebe6;
    --ink-secondary: #a7a49c;
    --ink-tertiary: #7a7770;
    --ink-muted: #54524c;

    --border: #33363d;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-strong: #464a53;

    /* Dark Mode Muted Pastels */
    --pastel-sage: #88b79f;
    --pastel-sage-bg: #203128;
    --pastel-sage-border: #2f493c;

    --pastel-heather: #9ba6c5;
    --pastel-heather-bg: #272a38;
    --pastel-heather-border: #383c4f;

    --pastel-clay: #cf9a89;
    --pastel-clay-bg: #382823;
    --pastel-clay-border: #523a33;

    --pastel-sand: #cbaf6e;
    --pastel-sand-bg: #362e1c;
    --pastel-sand-border: #4d4228;

    --roy: #88b79f;
    --roy-hover: #a3cbb5;
    --roy-light: #203128;
    --on-roy: #17181a;

    --teal: #84b3ae;
    --teal-light: #1f302e;

    --gold: #cbaf6e;
    --gold-light: #362e1c;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
    --shadow-card-hover: 0 10px 24px rgba(0, 0, 0, 0.55);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #17181a;
  --bg-subtle: #202124;
  --sf: #222327;
  --sf-card: #24262b;
  --sf-hover: #2b2d33;

  --ink: #eeebe6;
  --ink-secondary: #a7a49c;
  --ink-tertiary: #7a7770;
  --ink-muted: #54524c;

  --border: #33363d;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: #464a53;

  --pastel-sage: #88b79f;
  --pastel-sage-bg: #203128;
  --pastel-sage-border: #2f493c;

  --pastel-heather: #9ba6c5;
  --pastel-heather-bg: #272a38;
  --pastel-heather-border: #383c4f;

  --pastel-clay: #cf9a89;
  --pastel-clay-bg: #382823;
  --pastel-clay-border: #523a33;

  --pastel-sand: #cbaf6e;
  --pastel-sand-bg: #362e1c;
  --pastel-sand-border: #4d4228;

  --roy: #88b79f;
  --roy-hover: #a3cbb5;
  --roy-light: #203128;
  --on-roy: #17181a;

  --teal: #84b3ae;
  --teal-light: #1f302e;

  --gold: #cbaf6e;
  --gold-light: #362e1c;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
  --shadow-card-hover: 0 10px 24px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--trans-theme), color var(--trans-theme);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration-skip-ink: auto;
  transition: color var(--trans-fast), border-color var(--trans-fast);
}

:focus-visible {
  outline: 2px solid var(--roy);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--pastel-sage-bg);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Navbar & Clean Matte Loss Tracker
   ========================================================================== */
nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background-color: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--trans-theme), background-color var(--trans-theme);
}

nav .wrap {
  display: flex;
  gap: 20px;
  align-items: center;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  margin-right: auto;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--pastel-sage-bg);
  color: var(--pastel-sage);
  border: 1px solid var(--pastel-sage-border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

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

.nav-link {
  text-decoration: none;
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: color var(--trans-fast);
}

.nav-link:hover {
  color: var(--roy);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--sf);
  color: var(--ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  background: var(--sf-hover);
}

/* Clean Matte ML Loss Curve (No Glow) */
.loss {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 22px;
  pointer-events: none;
  overflow: visible;
}

.loss svg {
  display: block;
  width: 100%;
  height: 22px;
}

.loss path {
  fill: none;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.loss .tr {
  stroke: var(--border);
  opacity: 0.5;
}

.loss .ln {
  stroke: var(--roy);
}

.hd {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--roy);
  box-shadow: none; /* Zero glow */
}

.loss output {
  position: absolute;
  right: 18px;
  top: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--sf);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   Hero Section (Clean, Matte, Zero Glow)
   ========================================================================== */
.hero {
  padding: 76px 0 80px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 13px;
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pastel-sage);
}

h1 {
  font-weight: 800;
  font-size: clamp(44px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  color: var(--ink);
}

.hero p {
  max-width: 33em;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin: 0 0 30px;
}

.hero p strong {
  color: var(--ink);
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  background: var(--sf);
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
  cursor: pointer;
}

.btn:hover {
  background: var(--sf-hover);
  border-color: var(--ink-secondary);
}

.btn.p {
  background: var(--roy);
  color: var(--on-roy);
  border-color: var(--roy);
}

.btn.p:hover {
  opacity: 0.92;
}

/* Matte Role Cards */
.hero-roles {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.role-card {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--trans-fast), transform var(--trans-fast);
}

.role-card.web {
  border-left: 4px solid var(--pastel-sage);
}

.role-card.ai {
  border-left: 4px solid var(--pastel-heather);
}

.role-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.role-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.role-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.role-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.role-badge.teal {
  background: var(--pastel-sage-bg);
  color: var(--pastel-sage);
  border: 1px solid var(--pastel-sage-border);
}

.role-badge.roy {
  background: var(--pastel-heather-bg);
  color: var(--pastel-heather);
  border: 1px solid var(--pastel-heather-border);
}

/* Minimalist Code Mock */
.viz-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.code-mock {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
}

.mock-dots {
  display: flex;
  gap: 5px;
  margin-bottom: 6px;
}

.mock-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mock-lines u {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin-top: 5px;
  text-decoration: none;
}

.mock-lines u:first-child { width: 70%; }
.mock-lines u:nth-child(2) { width: 40%; }

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 11px;
  background: var(--pastel-sage);
  margin-left: 2px;
  animation: blink-cur 1s steps(1) infinite;
}

@keyframes blink-cur { 50% { opacity: 0; } }

/* Matte Neural Network SVG (Zero Glow) */
.net-viz {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
}

.net line {
  stroke: var(--border-strong);
  stroke-width: 1.1;
}

.net circle {
  fill: var(--pastel-heather);
  opacity: 0.85;
}

.role-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Section Headers & Common
   ========================================================================== */
section {
  padding: 72px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  margin-bottom: 32px;
}

h2 {
  font-weight: 800;
  font-size: clamp(26px, 3.8vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  color: var(--ink);
}

.sub {
  color: var(--ink-secondary);
  font-size: 15px;
  max-width: 44em;
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 44px;
  align-items: center;
}

.about-photo-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.about-photo {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--sf);
  transition: transform var(--trans-normal), box-shadow var(--trans-normal);
}

.about-photo:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-content p {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.about-content p strong {
  color: var(--ink);
}

.highlight-stat {
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   Projects Section (Pastel Accents & Clean Cards)
   ========================================================================== */
.bar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

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

.chip {
  border: 1px solid var(--border);
  background: var(--sf);
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  padding: 5px 15px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
}

.chip:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: var(--sf-hover);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.arrows {
  display: flex;
  gap: 8px;
}

.arrows button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--sf);
  color: var(--ink);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
}

.arrows button:hover {
  background: var(--sf-hover);
  border-color: var(--border-strong);
}

/* Carousel Rail */
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 2px 24px;
  margin: 0 -2px;
  scrollbar-width: none;
  cursor: grab;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail.drag {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

/* Matte Project Card */
.card {
  flex: 0 0 min(88%, 380px);
  scroll-snap-align: start;
  background: var(--sf-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 450px;
  user-select: none;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--trans-fast), transform var(--trans-fast), box-shadow var(--trans-fast);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card-band {
  height: 4px;
  width: 100%;
}

.card-inner {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sds {
  display: flex;
  gap: 6px;
}

.sd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.sd.w {
  background: var(--pastel-sage-bg);
  color: var(--pastel-sage);
  border: 1px solid var(--pastel-sage-border);
}

.sd.m {
  background: var(--pastel-heather-bg);
  color: var(--pastel-heather);
  border: 1px solid var(--pastel-heather-border);
}

.sd.x {
  background: var(--pastel-sand-bg);
  color: var(--pastel-sand);
  border: 1px solid var(--pastel-sand-border);
}

.when {
  font-family: var(--font-mono);
  color: var(--ink-muted);
  font-size: 12px;
}

.card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

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

.tags i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
}

.metric {
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}

.links {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  gap: 16px;
  font-size: 13px;
  font-weight: 600;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
}

.links a:hover {
  text-decoration: underline;
}

/* Carousel Footer Progress */
.carousel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.prog {
  flex: 1;
  height: 3px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.prog div {
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.15s ease-out;
}

.count {
  font-family: var(--font-mono);
  color: var(--ink-muted);
  font-size: 12px;
}

/* ==========================================================================
   Open Source Section
   ========================================================================== */
.led {
  border-top: 1px solid var(--border);
}

.led a {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 16px 24px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  align-items: baseline;
  transition: all var(--trans-fast);
  border-radius: var(--radius-sm);
}

.led a:hover {
  background: var(--sf);
  padding-left: 14px;
  border-bottom-color: var(--border);
}

.led h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.led p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.led .st {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--pastel-sand);
  background: var(--pastel-sand-bg);
  border: 1px solid var(--pastel-sand-border);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Leadership Section
   ========================================================================== */
.leadership-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  box-shadow: var(--shadow-xs);
}

.stat-badge b {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
}

.stat-badge span {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.pan {
  background: var(--sf);
  border-radius: var(--radius-lg);
  padding: 26px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--pastel-sage);
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
  display: flex;
  flex-direction: column;
}

.pan.m {
  border-top-color: var(--pastel-heather);
}

.pan.gold {
  border-top-color: var(--pastel-sand);
}

.pan:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.pan-header {
  margin-bottom: 10px;
}

.pan h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}

.pan small {
  font-family: var(--font-mono);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  display: block;
}

.pan p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.sk {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.sk-group {
  background: var(--sf);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.sk h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ink);
}

.sk-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sk span {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  transition: all var(--trans-fast);
}

.sk span:hover {
  border-color: var(--border-strong);
  background: var(--sf-hover);
}

/* ==========================================================================
   Achievements & Wins Section
   ========================================================================== */
.ach {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.ach li {
  display: flex;
  gap: 15px;
  background: var(--sf);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  align-items: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-fast);
}

.ach li:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.th {
  flex: 0 0 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.th svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink);
}

.ach b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}

.ach span {
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.45;
  display: block;
}

/* ==========================================================================
   Contact Section (Calm Pastel Card, No Glowing Elements)
   ========================================================================== */
.contact {
  background: var(--sf);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 56px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.contact h2 {
  color: var(--ink);
  margin-bottom: 8px;
}

.contact p {
  font-size: 16px;
  color: var(--ink-secondary);
  margin: 0 0 20px;
}

.contact a.big {
  display: inline-block;
  font-size: clamp(20px, 3.8vw, 32px);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  transition: color var(--trans-fast);
}

.contact a.big:hover {
  color: var(--roy);
}

.contact .row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact .row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--trans-fast);
}

.contact .row a:hover {
  background: var(--sf-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

footer {
  padding: 36px 0 52px;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: center;
}

/* ==========================================================================
   Responsive & Accessibility
   ========================================================================== */
@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .about-content p {
    text-align: left;
  }
  .led a {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .loss output {
    display: none;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 18px;
  }
  .hero {
    padding: 52px 0 44px;
  }
  .card {
    flex: 0 0 92%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
