/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════ */
:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --accent: #10b981;
  --accent-bg: #ecfdf5;
  --surface: #f1f5f9;
  --font-mono: 'Source Code Pro', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --nav-height: 56px;
}

[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-card: #111113;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --border: #1e293b;
  --border-hover: #334155;
  --accent: #34d399;
  --accent-bg: #052e1c;
  --surface: #151518;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; color: inherit; font: inherit; }

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════════════ */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
  line-height: 1.15;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  margin-top: 0.6rem;
}

.section-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 2.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.route-arrow {
  font-family: var(--font-mono);
  font-size: 1rem;
  transition: transform var(--transition);
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-monogram {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--text);
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.nav-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  background: var(--surface);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

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

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.nav-burger span {
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
  border-radius: 1px;
}

.nav-burger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  margin-top: var(--nav-height);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.hero-coords {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: 420px;
}

.hero-main {
  padding: 2rem 2rem 2rem 1rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-coords-inner {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.03em;
  margin: 0.25rem 0;
}

.hero-role {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 520px;
  line-height: 1.75;
}

.hero-sidebar {
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.route-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
}

.route-card:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}

.route-card:hover .route-arrow {
  transform: translateX(4px);
}

.route-card--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.route-card--primary:hover {
  opacity: 0.9;
  background: var(--text);
  border-color: var(--text);
}

.route-number {
  font-size: 0.6rem;
  color: var(--text-muted);
  min-width: 16px;
}

.route-card--primary .route-number { color: var(--text-muted); opacity: 0.5; }

.route-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.route-text { flex: 1; }
.route-icon { font-size: 1rem; }

.hero-footer {
  display: flex;
  border-top: 1px solid var(--border);
  overflow-x: auto;
}

.hero-stat {
  padding: 0.8rem 1.25rem;
  border-right: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-stat:last-child { border-right: none; }

/* ═══════════════════════════════════════════════════════
   TICKER
   ═══════════════════════════════════════════════════════ */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ticker-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticker-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.ticker-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition);
}

.ticker-link:hover { color: var(--accent); }
.ticker-link:hover .arrow { transform: translateX(3px); }
.ticker-link .arrow { transition: transform var(--transition); display: inline-block; }

/* ═══════════════════════════════════════════════════════
   SECTIONS (SHARED)
   ═══════════════════════════════════════════════════════ */
.section {
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* ═══════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.about-bio p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-bio em {
  color: var(--text);
  font-style: italic;
}

.about-interests-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.interest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.interest-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all var(--transition);
}

.interest-card:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.interest-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.6rem;
}

.interest-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 0.25rem;
}

.interest-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════════ */
.project-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.project-stat {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-stat:not(:last-child) {
  border-right: 1px solid var(--border);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.project-card-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: 200px;
}

.project-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-title {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.75;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.project-preview {
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.project-preview-placeholder {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.project-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
}

.project-id {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.contact-card:hover .route-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.contact-card-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface);
}

.contact-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.contact-card-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-card-value {
  font-size: 0.85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 6px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ═══════════════════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-sidebar { padding: 1.5rem 1rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .project-card-body { grid-template-columns: 1fr; }
  .project-preview { border-left: none; border-top: 1px solid var(--border); min-height: 120px; }
  .contact-grid { grid-template-columns: 1fr; }
  .project-stats { grid-template-columns: 1fr; }
  .project-stat:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }
  .hero-name { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .hero-footer { flex-wrap: wrap; }
  .hero-stat { flex: 1; min-width: 120px; text-align: center; }
  .section-inner { padding: 3rem 1.25rem; }
  .interest-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-left { flex-direction: column; }
}
