@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ── */
:root {
  --bg:      #0f0f0f;
  --surface: #171717;
  --border:  #262626;
  --text:    #ededed;
  --muted:   #737373;
  --accent:  #ededed;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(15,15,15,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a {
  font-size: 0.8125rem;
  color: var(--muted);
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.88; }
.btn-outline {
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-outline:hover { border-color: #404040; color: var(--text); }

/* ── Tags ── */
.tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
}

/* ── Fade-in ── */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.8125rem; color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8125rem; color: var(--muted); }

/* ════════════════════════════════════
   INDEX PAGE
   ════════════════════════════════════ */

.hero {
  padding: 8rem 0 5rem;
  border-bottom: 1px solid var(--border);
}
.hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-name {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hero-tagline {
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }

/* About */
.about { padding: 4rem 0; border-bottom: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: 200px 1fr; gap: 4rem; align-items: start; }
.about-label { font-size: 0.75rem; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.2rem; }
.about-body { font-size: 0.9375rem; color: #a3a3a3; line-height: 1.8; }
.about-body p + p { margin-top: 0.875rem; }

/* Stats row */
.stats { padding: 3rem 0; border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat-number { font-size: 1.5rem; font-weight: 300; letter-spacing: -0.02em; color: var(--text); margin-bottom: 0.25rem; }
.stat-label { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }

/* Project cards */
.projects-section { padding: 4rem 0; }
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.section-label { font-size: 0.75rem; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.project-card {
  background: var(--bg);
  padding: 1.75rem;
  transition: background 0.15s;
}
.project-card:hover { background: var(--surface); }
.project-card-year { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.625rem; }
.project-card-title { font-size: 0.9375rem; font-weight: 500; margin-bottom: 0.5rem; }
.project-card-desc { font-size: 0.8125rem; color: var(--muted); line-height: 1.65; margin-bottom: 1rem; }
.project-card-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 1rem; }
.project-card-link { font-size: 0.8rem; color: var(--muted); transition: color 0.15s; }
.project-card-link:hover { color: var(--text); }
.project-card-link::after { content: ' →'; }

/* ════════════════════════════════════
   PROJECTS PAGE
   ════════════════════════════════════ */

.page-hero {
  padding: 7rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.page-hero p { font-size: 0.9rem; color: var(--muted); max-width: 440px; }

.project-entry { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
.project-entry:last-child { border-bottom: none; }
.project-entry-inner { display: grid; grid-template-columns: 220px 1fr; gap: 4rem; align-items: start; }

.project-meta-title { font-size: 1.125rem; font-weight: 500; margin-bottom: 0.375rem; }
.project-meta-year { font-size: 0.75rem; color: var(--muted); margin-bottom: 1rem; }
.project-meta-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 1.25rem; }
.project-meta-links { display: flex; flex-direction: column; gap: 0.5rem; }
.project-meta-links a { font-size: 0.8rem; color: var(--muted); transition: color 0.15s; }
.project-meta-links a:hover { color: var(--text); }
.project-meta-links a::after { content: ' ↗'; }

.project-detail-body { font-size: 0.9rem; color: #a3a3a3; line-height: 1.8; }
.project-detail-body p + p { margin-top: 0.875rem; }
.project-image-placeholder {
  width: 100%; height: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1.75rem;
  font-size: 0.75rem; color: var(--border);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ════════════════════════════════════
   CV PAGE
   ════════════════════════════════════ */

.cv-layout { display: grid; grid-template-columns: 200px 1fr; gap: 5rem; padding: 4rem 0; }
.cv-sidebar { position: sticky; top: 5rem; height: fit-content; }
.sidebar-section { margin-bottom: 2.25rem; }
.sidebar-section h3 {
  font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.875rem;
}
.sidebar-item { font-size: 0.8125rem; color: #a3a3a3; padding: 0.2rem 0; }
.sidebar-item strong { display: block; color: var(--text); font-weight: 500; font-size: 0.8125rem; }
.sidebar-link { color: #a3a3a3; font-size: 0.8rem; }
.sidebar-link:hover { color: var(--text); }

.cv-section { margin-bottom: 3.5rem; }
.cv-section-title {
  font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.timeline-item {
  display: grid; grid-template-columns: 110px 1fr;
  gap: 1.5rem; padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-period { font-size: 0.75rem; color: var(--muted); padding-top: 0.1rem; line-height: 1.5; }
.timeline-role { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.125rem; }
.timeline-org { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.375rem; }
.timeline-desc { font-size: 0.8125rem; color: #737373; line-height: 1.7; }

.cert-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.cert-item:last-child { border-bottom: none; }
.cert-name { font-size: 0.875rem; font-weight: 500; }
.cert-issuer { font-size: 0.8rem; color: var(--muted); margin-top: 0.125rem; }
.cert-badge {
  font-size: 0.6875rem; font-weight: 500;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--muted); border-radius: 4px;
  white-space: nowrap;
}

/* ════════════════════════════════════
   PRINT
   ════════════════════════════════════ */
@media print {
  nav { display: none; }
  .page-hero { padding: 2rem 0 1rem; }
  .cv-sidebar { position: static; }
  body { background: #fff; color: #000; }
  :root { --text: #000; --muted: #555; --surface: #f5f5f5; --border: #ddd; --bg: #fff; }
}

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }
  .container { padding: 0 1.25rem; }
  .hero { padding: 6rem 0 3.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-entry-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .cv-layout { grid-template-columns: 1fr; gap: 2rem; }
  .cv-sidebar { position: static; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
