/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --navy-950: #050d1a;
  --navy-900: #0a1628;
  --navy-800: #0f2040;
  --navy-700: #163058;
  --navy-600: #1e4080;
  --navy-400: #3a6aad;
  --navy-200: #8aafd4;
  --navy-100: #c5d9ee;
  --navy-050: #eef4fb;

  --gold:     #c9a84c;
  --gold-lt:  #e8d5a3;

  --white:    #ffffff;
  --ink:      #111827;
  --ink-2:    #374151;
  --ink-3:    #6b7280;
  --rule:     rgba(255,255,255,0.08);
  --rule-lt:  #e5eaf2;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  --radius: 4px;
  --max-w:  1100px;
  --trans:  0.2s ease;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}
.nav-logo span { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-200);
  transition: color var(--trans);
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

/* ─── Page hero ───────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy-900);
  color: var(--white);
  padding: 5rem 2rem 4rem;
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  max-width: 760px;
  margin: 0 auto 1.4rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--navy-100);
  max-width: 560px;
  margin: 0 auto 2.4rem;
  line-height: 1.7;
}
.hero-rule {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto;
}

/* ─── Section wrapper ─────────────────────────────────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 1.6rem;
}
.divider {
  border: none;
  border-top: 1px solid var(--rule-lt);
  margin: 3rem 0;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--trans);
  border: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-900);
}
.btn-primary:hover { background: var(--gold-lt); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--navy-700);
  color: var(--navy-700);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ─── Tag pill ────────────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag-navy { background: var(--navy-050); color: var(--navy-700); }
.tag-gold { background: #fdf5e0; color: #7a5c10; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  background: var(--navy-950);
  color: var(--navy-200);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.82rem;
}
.footer a { color: var(--gold); }
.footer a:hover { text-decoration: underline; }

/* ─── Paper styles ────────────────────────────────────────────────────────── */
.paper-wrap { max-width: 780px; margin: 0 auto; }
.paper-wrap h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--navy-900);
  margin: 2.8rem 0 0.7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule-lt);
}
.paper-wrap h2.first { border-top: none; margin-top: 0; padding-top: 0; }
.paper-wrap h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-style: italic;
  color: var(--navy-700);
  margin: 1.8rem 0 0.5rem;
}
.paper-wrap p {
  font-size: 0.97rem;
  color: var(--ink-2);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.paper-wrap ul {
  margin: 0.5rem 0 1rem 1.6rem;
}
.paper-wrap ul li {
  font-size: 0.97rem;
  color: var(--ink-2);
  margin-bottom: 0.5rem;
  line-height: 1.75;
}
.risk-grade {
  display: inline-block;
  margin: 0.8rem 0 1.6rem;
  padding: 0.4rem 1.1rem;
  border-left: 3px solid var(--gold);
  background: var(--navy-050);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--navy-800);
  font-family: var(--font-mono);
}
.paper-meta {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: flex-start;
}
.paper-meta-item { display: flex; flex-direction: column; gap: 0.3rem; }
.paper-meta-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-200);
}
.paper-meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
}
.paper-meta-value.buy { color: #4ade80; }
.paper-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-3);
  border-top: 1px solid var(--rule-lt);
  padding-top: 1.5rem;
  margin-top: 2rem;
  line-height: 1.6;
}

/* ─── Home page ───────────────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.profile-aside {
  background: var(--navy-900);
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--white);
  position: sticky;
  top: 80px;
}
.profile-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.profile-title {
  font-size: 0.82rem;
  color: var(--navy-200);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.profile-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 1.2rem 0;
}
.profile-links { display: flex; flex-direction: column; gap: 0.7rem; }
.profile-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--navy-100);
  transition: color var(--trans);
}
.profile-link:hover { color: var(--gold); }
.profile-bio p {
  font-size: 0.97rem;
  color: var(--ink-2);
  margin-bottom: 1.1rem;
  line-height: 1.8;
}
.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.featured-strip {
  background: var(--navy-050);
  border-top: 1px solid var(--rule-lt);
  border-bottom: 1px solid var(--rule-lt);
  padding: 3rem 2rem;
}
.featured-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.featured-card {
  background: var(--navy-900);
  border-radius: var(--radius);
  padding: 2.2rem 2.4rem;
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.featured-card-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.featured-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}
.featured-card p {
  font-size: 0.88rem;
  color: var(--navy-100);
  line-height: 1.7;
  max-width: 500px;
}

/* ─── Project card ────────────────────────────────────────────────────────── */
.project-card {
  border: 1px solid var(--rule-lt);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--trans);
}
.project-card:hover {
  border-color: var(--navy-400);
  box-shadow: 0 4px 24px rgba(10,22,40,0.07);
}
.project-card-icon {
  width: 42px;
  height: 42px;
  background: var(--navy-050);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--navy-700);
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy-900);
  margin-bottom: 0.5rem;
  font-style: normal;
}
.project-card p {
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.4rem; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-aside { position: static; }
  .featured-card { grid-template-columns: 1fr; }
  .paper-meta { flex-direction: column; gap: 1rem; }
}
@media (max-width: 500px) {
  .nav-links a { font-size: 0.75rem; letter-spacing: 0.03em; }
  .nav-links { gap: 1.2rem; }
}
