/* ═══════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════ */
:root {
  --bg:        #f7f7f7;
  --surface:   #ffffff;
  --surface-2: #f0f0f0;
  --border:    #e4e4e4;
  --border-2:  #d0d0d0;
  --ink:       #111111;
  --ink-2:     #555555;
  --ink-3:     #999999;
  --accent:    #111111;
  --accent-fg: #ffffff;
  /* inverse card — light mode: dark bg, light text */
  --inv-bg:    #111111;
  --inv-text:  #f7f7f7;
  --inv-sub:   rgba(247,247,247,0.45);
}

[data-theme="dark"] {
  --bg:        #0f0f0f;
  --surface:   #1a1a1a;
  --surface-2: #222222;
  --border:    #2a2a2a;
  --border-2:  #3a3a3a;
  --ink:       #f0f0f0;
  --ink-2:     #aaaaaa;
  --ink-3:     #666666;
  --accent:    #f0f0f0;
  --accent-fg: #111111;
  /* inverse card — dark mode: light bg, dark text */
  --inv-bg:    #f0f0f0;
  --inv-text:  #111111;
  --inv-sub:   rgba(17,17,17,0.45);
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

/* ═══════════════════════════════════════════
   NAV
═══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
  width: 28px; height: 28px;
  background: var(--ink);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--surface);
  letter-spacing: -0.03em;
  flex-shrink: 0;
  margin-right: 28px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.nav-links { display: flex; gap: 4px; list-style: none; }

.nav-links a {
  font-size: 13.5px; font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 5px 12px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--surface-2);
  color: var(--ink);
}

.nav-links a.active { font-weight: 600; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.theme-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px;
  transition: background 0.2s; user-select: none;
}
.theme-btn:hover { background: var(--border); }

.nav-cv {
  font-size: 12.5px; font-weight: 600;
  color: var(--accent-fg); background: var(--accent);
  padding: 7px 16px; border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, background 0.3s, color 0.3s;
}
.nav-cv:hover { opacity: 0.78; }

/* ═══════════════════════════════════════════
   SHARED LAYOUT
═══════════════════════════════════════════ */
.page-wrap { padding-top: 56px; min-height: 100vh; }

.content-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 40px 80px;
}

.page-header { margin-bottom: 48px; }

.page-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}

.page-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700; letter-spacing: -0.03em;
  color: var(--ink); line-height: 1.1;
}
.page-title span { font-weight: 300; font-style: italic; color: var(--ink-3); }

.page-subtitle {
  font-size: 15px; font-weight: 400;
  color: var(--ink-2); line-height: 1.7;
  margin-top: 12px; max-width: 560px;
}

/* ═══════════════════════════════════════════
   SHARED COMPONENTS
═══════════════════════════════════════════ */

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.06); transform: translateY(-1px); }

.card-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}

/* Inverse stat card — uses dedicated tokens, not ink */
.stat-inv {
  background: var(--inv-bg);
  border-radius: 9px; padding: 14px 16px;
  transition: background 0.3s;
}
.stat-inv .stat-val { color: var(--inv-text); }
.stat-inv .stat-lbl { color: var(--inv-sub); }

/* Regular stat card */
.stat {
  background: var(--surface-2);
  border-radius: 9px; padding: 14px 16px;
  transition: background 0.3s;
}
.stat-val { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -0.03em; }
.stat-lbl { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 13px 5px 9px; border-radius: 100px;
  font-size: 11.5px; font-weight: 500; color: var(--ink-2);
  width: fit-content;
}
.badge-dot {
  width: 7px; height: 7px; background: #22c55e;
  border-radius: 50%; box-shadow: 0 0 0 3px rgba(34,197,94,0.18);
  animation: glow 2.2s ease-in-out infinite;
}
@keyframes glow {
  0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0.07); }
}

/* Buttons */
.btn-fill {
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--accent-fg); background: var(--accent);
  padding: 11px 24px; border-radius: 9px;
  text-decoration: none; border: none; cursor: pointer; display: inline-block;
  transition: opacity 0.2s, background 0.3s, color 0.3s;
}
.btn-fill:hover { opacity: 0.78; }

.btn-line {
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--ink); background: transparent;
  padding: 11px 24px; border-radius: 9px;
  text-decoration: none; border: 1px solid var(--border-2); cursor: pointer; display: inline-block;
  transition: background 0.2s, border-color 0.3s, color 0.3s;
}
.btn-line:hover { background: var(--surface-2); }

/* Divider */
.divider {
  width: 40px; height: 2px;
  background: var(--ink); border-radius: 2px;
  margin: 28px 0; transition: background 0.3s;
}

/* Tag pill */
.tag {
  font-size: 11px; font-weight: 500;
  background: var(--surface-2); color: var(--ink-2);
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

/* Skill bar */
.skill { margin-bottom: 13px; }
.skill:last-child { margin-bottom: 0; }
.skill-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.skill-pct { font-weight: 600; color: var(--ink); }
.skill-track { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--ink); border-radius: 2px; transform-origin: left; transform: scaleX(0); transition: background 0.3s; }
.skill-fill.animate { animation: grow 1s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes grow { to { transform: scaleX(1); } }

/* Quote card */
.quote-card { background: var(--inv-bg); border-radius: 12px; padding: 20px; transition: background 0.3s; }
.quote-text { font-size: 13.5px; font-style: italic; font-weight: 300; line-height: 1.65; color: var(--inv-text); transition: color 0.3s; }
.quote-attr { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--inv-sub); margin-top: 12px; }

/* Stagger animation */
.stagger > * { opacity: 0; animation: up 0.55s ease forwards; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.12s; }
.stagger > *:nth-child(3) { animation-delay: 0.19s; }
.stagger > *:nth-child(4) { animation-delay: 0.26s; }
.stagger > *:nth-child(5) { animation-delay: 0.33s; }
.stagger > *:nth-child(6) { animation-delay: 0.40s; }
.stagger > *:nth-child(7) { animation-delay: 0.47s; }
.stagger > *:nth-child(8) { animation-delay: 0.54s; }

@keyframes up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-cv { display: none; }
  .content-page { padding: 40px 24px 64px; }
}
