/* ============================================
   Apurva Shah — Personal Site
   Fonts: Fraunces (display) + Outfit (body)
   Palette: Deep green, antique gold, parchment
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --green: #184233;
  --green-mid: #1e5440;
  --green-accent: #187654;
  --gold: #c4a24d;
  --gold-light: #d4b86e;
  --gold-muted: rgba(196, 162, 77, 0.12);
  --parchment: #faf8f4;
  --warm-white: #f3f1eb;
  --text: #2c2c2a;
  --text-light: #6b6b6b;
  --text-lighter: #9a9a96;
  --border: #e2ddd4;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  --max-width: 680px;
  --max-width-wide: 920px;
}

/* ---- Reset ---- */

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--parchment);
  line-height: 1.75;
}

::selection {
  background: var(--gold-muted);
  color: var(--green);
}

a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.25s, color 0.25s;
}

a:hover { border-color: var(--gold); }

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

/* ---- Typography ---- */

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

h1 { font-size: 2.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1.25rem; }

.lead {
  font-size: 1.08rem;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.8;
}

.small-caps {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  border: none;
  margin: 2.5rem 0;
}

/* ---- Layout ---- */

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: var(--max-width-wide);
}

main { flex: 1; }

/* ============================================
   Header
   ============================================ */

.site-header {
  background: var(--green);
  padding: 1rem 0;
}

.site-header .container {
  max-width: var(--max-width-wide);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--parchment);
  border: none;
}

.site-logo:hover {
  color: var(--gold-light);
  border: none;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(250, 248, 244, 0.5);
  border: none;
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.25s;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--parchment);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--parchment);
  margin: 4px 0;
  transition: 0.3s;
}

/* ============================================
   Homepage
   ============================================ */

.hero {
  padding: 5.5rem 0 2rem;
}

.hero-opening {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--green);
  line-height: 1.35;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-intro {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.9;
  max-width: 520px;
}

.hero-intro p {
  margin-bottom: 1rem;
}

.hero-intro a {
  border-color: var(--gold);
}

/* ---- Link grid ---- */

.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 3.5rem;
}

.link-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  transition: all 0.2s;
  color: var(--text);
}

.link-grid a:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(24, 66, 51, 0.05);
  transform: translateY(-1px);
}

.link-grid .link-info { flex: 1; }

.link-grid .link-name {
  font-weight: 500;
  font-size: 0.88rem;
}

.link-grid .link-desc {
  font-size: 0.74rem;
  font-weight: 300;
  color: var(--text-lighter);
  margin-top: 0.1rem;
}

.link-grid .arrow {
  font-size: 0.78rem;
  color: var(--text-lighter);
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.link-grid a:hover .arrow {
  color: var(--gold);
  transform: translateX(2px);
}

/* ---- Now teaser ---- */

.now-teaser {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-bottom: 1rem;
}

.now-teaser .small-caps {
  margin-bottom: 0.5rem;
  display: block;
}

.now-teaser h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.now-teaser p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-light);
  max-width: 520px;
  line-height: 1.8;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green-accent);
  border: none;
}

.read-more:hover { color: var(--gold); }

/* ============================================
   Page layouts
   ============================================ */

.page-header {
  padding: 4rem 0 2rem;
}

.page-header h1 {
  font-size: 2.1rem;
}

.page-header .lead {
  margin-top: 1rem;
  max-width: 520px;
}

.page-content {
  padding: 0 0 4rem;
}

.page-content h2 { margin-top: 2.5rem; }
.page-content h3 { margin-top: 2rem; color: var(--green); }

.page-content ul, .page-content ol {
  margin: 0 0 1.25rem 1.25rem;
}

.page-content li { margin-bottom: 0.4rem; }

/* ============================================
   Work / Portfolio page
   ============================================ */

.work-intro {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.85;
  max-width: 540px;
  color: var(--text);
  margin-bottom: 2rem;
}

.work-section {
  margin-bottom: 3rem;
}

.work-section h2 {
  margin-bottom: 0.5rem;
}

.work-section > p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.engagement {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.engagement:first-of-type {
  border-top: 1px solid var(--border);
}

.engagement-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.engagement-meta {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-lighter);
  margin-bottom: 0.5rem;
}

.engagement-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Stat bar on work page */

.work-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0 3rem;
  padding: 1.5rem;
  background: var(--warm-white);
  border-radius: 5px;
  border: 1px solid var(--border);
  text-align: center;
}

.work-stat .number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--green);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.work-stat .label {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.4;
}

/* ============================================
   Writing page
   ============================================ */

.writing-section {
  margin-bottom: 3rem;
}

.writing-section h2 {
  margin-bottom: 1.25rem;
}

.link-card {
  display: block;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0.6rem;
  transition: all 0.2s;
  background: white;
}

.link-card:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(24, 66, 51, 0.05);
  transform: translateY(-1px);
}

.link-card .card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.2rem;
}

.link-card .card-meta {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-lighter);
}

.link-card .card-desc {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-light);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.substack-feed .link-card .card-title {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
}

.feed-loading {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-lighter);
  font-style: italic;
  padding: 0.75rem 0;
}

.platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0;
}

.platform-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: white;
  transition: all 0.2s;
}

.platform-link:hover {
  border-color: var(--gold);
  background: var(--gold-muted);
  color: var(--green);
}

.platform-link .arrow {
  font-size: 0.72rem;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.platform-link:hover .arrow { opacity: 1; }

/* ============================================
   About page
   ============================================ */

.career-timeline {
  margin: 2rem 0;
  border-left: 2px solid var(--border);
  padding-left: 2rem;
}

.timeline-entry {
  margin-bottom: 1.75rem;
  position: relative;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-left: -3px;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green);
  line-height: 1.3;
}

.timeline-org {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

.timeline-dates {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-lighter);
}

/* ============================================
   Contact page
   ============================================ */

.contact-methods { margin-top: 1.5rem; }

.contact-method {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-method .method-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-lighter);
  min-width: 80px;
}

/* ============================================
   Now page
   ============================================ */

.now-updated {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-lighter);
  margin-bottom: 2rem;
  font-style: italic;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-lighter);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--text-lighter);
  border: none;
}

.footer-links a:hover { color: var(--gold); }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: 2rem; }
  .hero { padding: 3.5rem 0 1.5rem; }
  .hero-opening { font-size: 1.8rem; }
  .link-grid { grid-template-columns: 1fr; }
  .work-stats { grid-template-columns: repeat(2, 1fr); }

  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--green);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--gold);
    gap: 0.75rem;
    z-index: 100;
  }

  .nav-toggle { display: block; }
  .site-header .container { position: relative; }
  .footer-inner { flex-direction: column; text-align: center; }
  .contact-method { flex-direction: column; gap: 0.25rem; }
  .career-timeline { padding-left: 1.25rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .hero-opening { font-size: 1.6rem; }
  .platform-links { flex-direction: column; }
  .work-stats { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   Cookie consent banner
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--green);
  border-top: 2px solid var(--gold);
  padding: 1.25rem 1.5rem;
}

.cookie-banner-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(250, 248, 244, 0.8);
  line-height: 1.6;
  margin: 0;
  flex: 1;
  min-width: 280px;
}

.cookie-banner a {
  color: var(--gold-light);
  border-bottom: 1px solid rgba(212, 184, 110, 0.3);
}

.cookie-banner a:hover {
  border-color: var(--gold-light);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.cookie-btn--accept {
  background: var(--gold);
  color: var(--green);
}

.cookie-btn--accept:hover {
  background: var(--gold-light);
}

.cookie-btn--decline {
  background: transparent;
  color: rgba(250, 248, 244, 0.6);
  border: 1px solid rgba(250, 248, 244, 0.2);
}

.cookie-btn--decline:hover {
  color: var(--parchment);
  border-color: rgba(250, 248, 244, 0.4);
}

/* ---- Legal pages ---- */

.legal-content {
  padding: 0 0 4rem;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content li {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-light);
  line-height: 1.8;
}

.legal-content ul {
  margin: 0 0 1.25rem 1.25rem;
}

.legal-content li {
  margin-bottom: 0.35rem;
}

.legal-meta {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-lighter);
  font-style: italic;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; text-align: center; }
}
