/* =========================================================
   Dhruv Kumar — Personal Website Stylesheet
   Based on PhantomGrad design system
   ========================================================= */

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

/* ---------- Design Tokens ---------- */
:root {
  --bg:           #F5F0E8;
  --surface:      #EDE8DC;
  --surface-2:    #E5DFD1;
  --border:       #D4CCBA;
  --text:         #1A1A1A;
  --text-muted:   #5C5750;
  --accent:       #2D2D2D;
  --nav-height:   60px;
  --max-w:        920px;
  --radius:       6px;
  --gap:          1.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--accent);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
h4 { font-size: 0.95rem; font-weight: 500; }

p { margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

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

.nav-logo {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--surface);
}

.nav-substack {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.nav-substack:hover { color: var(--accent); background: var(--surface); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  color: var(--accent);
}
.nav-toggle svg { display: block; }

/* Page offset for fixed nav */
.page-body { padding-top: var(--nav-height); }

/* ---------- Hero with photo ---------- */
.hero-layout {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  justify-content: space-between;
}
.hero-text { flex: 1; min-width: 0; }
.hero-photo-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding-top: 0.5rem;
}
.hero-director-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

/* ---------- Director links (social buttons) ---------- */
.director-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.director-links a {
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  transition: all 0.15s;
}
.director-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Stats Strip ---------- */
.stats-strip {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Theme / Link Cards ---------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.theme-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.theme-card h3 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.theme-card p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* Clickable link card variant */
.link-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, background 0.15s;
}
.link-card:hover { border-color: var(--accent); background: var(--surface-2); }
.link-card h3 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--accent);
}
.link-card p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ---------- Inline tag list ---------- */
.inline-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.inline-list li {
  font-size: 0.82rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.2rem 0.6rem;
  color: var(--text-muted);
}

/* ---------- Timeline ---------- */
.timeline-list { display: flex; flex-direction: column; }

.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.5rem 1.2rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:first-child { border-top: 1px solid var(--border); }

.timeline-period {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent);
}

.timeline-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ---------- Connect / Contact ---------- */
.connect-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.connect-box h3 { margin-bottom: 0.75rem; }

.email-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
}
.email-row:first-child { margin-top: 0; }

.email-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  min-width: 60px;
  padding-top: 0.15rem;
}

.email-addr {
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-left {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 1rem;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }

/* ---------- Responsive: Tablet ---------- */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    gap: 0.1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.5rem 0.3rem; }
  .nav-toggle { display: flex; }
  .nav-substack { display: none; }

  .stats-strip { gap: 1.5rem; justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  .timeline-item { grid-template-columns: 100px 1fr; }
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 600px) {
  .hero-layout {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .hero-photo-col {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    text-align: left;
  }
  .hero-director-photo { width: 80px; height: 80px; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .theme-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.2rem; }
  .timeline-period { font-size: 0.72rem; }
}
