/* ============================================
   Sandeep Shankar — Portfolio Design System
   Direction: Executive Briefing
   ============================================ */

:root {
  /* Color */
  --ink-deep: #0F1419;
  --ink-card: #1A1F26;
  --ink-card-hover: #20262F;
  --cream: #F7F5F0;
  --amber: #C2703D;
  --amber-bright: #D4854F;
  --sage: #8A9A8E;
  --muted: #6B6F76;
  --hairline: #232830;
  --hairline-light: #2A3038;

  /* Type */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1120px;
  --section-pad-y: 96px;
  --section-pad-y-mobile: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink-deep);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.scrolled {
  background: rgba(15, 20, 25, 0.97);
  border-bottom-color: var(--hairline-light);
  box-shadow: 0 1px 24px rgba(0,0,0,0.35);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.nav-logo .dot { color: var(--amber); }

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--sage);
  transition: color 0.15s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover { color: var(--cream); }

.nav-links a.active { color: var(--cream); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  color: var(--cream);
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  appearance: none;
  -webkit-appearance: none;
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(15, 20, 25, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-links a {
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--hairline);
    font-size: 16px;
    display: block;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: block; position: relative; z-index: 105; }
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  display: none;
}

/* ---------- Headings ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--cream);
  letter-spacing: -0.01em;
}

h1 {
  font-weight: 500;
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.12;
}

h1 em {
  font-style: italic;
  color: var(--amber);
  font-weight: 500;
}

h2 {
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.18;
  margin-bottom: 16px;
}

h3 {
  font-weight: 600;
  font-size: 19px;
  color: var(--cream);
}

p {
  color: #B8B5AD;
  font-size: 16px;
  line-height: 1.7;
}

.lede {
  font-size: 18px;
  line-height: 1.65;
  color: #C8C5BC;
  max-width: 560px;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-pad-y) 0;
  border-bottom: 1px solid var(--hairline);
}

.section:last-of-type { border-bottom: none; }

@media (max-width: 640px) {
  .section { padding: var(--section-pad-y-mobile) 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink-deep);
}
.btn-primary:hover { background: var(--amber-bright); }

.btn-secondary {
  background: transparent;
  border-color: var(--hairline-light);
  color: var(--cream);
}
.btn-secondary:hover { border-color: var(--sage); }

/* ---------- Cards ---------- */
.card {
  background: var(--ink-card);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 28px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--hairline-light);
  background: var(--ink-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* ---------- Stats ---------- */
.stat-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat .num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  color: var(--amber);
  line-height: 1;
}

.stat .label {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}

.stat-lead .num {
  font-size: 64px;
  line-height: 0.95;
}

.stat-lead .label {
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-top: 10px;
}

/* ---------- Pull quote ---------- */
.pull-quote {
  border-left: 2px solid var(--amber);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
}

.pull-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: #E8E5DC;
}

.pull-quote span {
  display: block;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left { display: flex; flex-direction: column; gap: 5px; }
.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--sage);
}
.site-footer p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--sage);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--cream); }
.footer-links a svg { width: 15px; height: 15px; flex-shrink: 0; }
@media (max-width: 600px) {
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Utility ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ============================================
   Enhancements
   ============================================ */

/* ---------- Reading progress bar ---------- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--amber-bright));
  z-index: 200;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ---------- Back to top button ---------- */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--ink-card);
  border: 1px solid var(--hairline-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.15s ease, color 0.15s ease;
  z-index: 90;
  color: var(--sage);
  font-size: 18px;
  font-family: var(--font-body);
  line-height: 1;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  border-color: var(--amber);
  color: var(--amber);
}
@media (max-width: 640px) {
  #back-to-top { bottom: 20px; right: 20px; }
}

/* ---------- Enhanced card hovers ---------- */
.achievement-card {
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.achievement-card:hover {
  border-color: var(--hairline-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.personal-card {
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.personal-card:hover {
  border-color: var(--hairline-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.podcast-card {
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.podcast-card:hover {
  border-color: var(--hairline-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* ---------- Scroll reveal ---------- */
/* Applied via JS so content is visible if JS doesn't load */
.will-animate {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.will-animate.animated {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .will-animate { opacity: 1 !important; transform: none !important; }
}

/* ---------- Section progress rail ---------- */
.section-rail {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 80;
  padding: 0;
  background: none;
  border: none;
}
.rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hairline-light);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.rail-dot:hover { background: var(--sage); transform: scale(1.3); }
.rail-dot.active { background: var(--amber); transform: scale(1.2); }
@media (max-width: 900px) { .section-rail { display: none; } }
