/* =============================================================
   AADITYA MUNSHI — PORTFOLIO · styles.css
   -------------------------------------------------------------
   Editorial / Swiss-inspired. Typography-led, hairline rules,
   one restrained accent, no glow, no drop-shadows.
   Re-theme from the :root variables below.
   ============================================================= */

/* ---------- Theme: light "paper" (default) ---------- */
:root {
  --paper: #f2eee4;          /* warm off-white */
  --paper-2: #ece7db;        /* recessed surface */
  --ink: #191712;            /* warm near-black */
  --ink-2: #57514644;        /* (unused placeholder) */
  --muted: #5f584c;          /* secondary text */
  --faint: #8a8375;          /* tertiary text */
  --line: #1917121f;         /* hairline (12%) */
  --line-strong: #19171245;  /* stronger rule */
  --accent: #a24a2b;         /* burnt sienna — used sparingly */

  --maxw: 1180px;
  --gutter: 40px;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Theme: dark "ink" ---------- */
:root[data-theme="dark"] {
  --paper: #14130f;
  --paper-2: #1b1a15;
  --ink: #efe9dc;
  --muted: #a49c8c;
  --faint: #746c5d;
  --line: #efe9dc1f;
  --line-strong: #efe9dc40;
  --accent: #cd7550;
}

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

html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
html:not(.has-js) { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.45s var(--ease), color 0.45s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; }

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

::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Small uppercase label used throughout (the editorial "voice") */
.section__eyebrow, .hero__meta, .nav__links a, .skills__label,
.note__cat, .portrait__cap, .footer__copy, .footer__colophon, .footer__top,
.hero__eyebrow, .project__year, .timeline__date, .hero__scroll span {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line-strong); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.nav__brand { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.nav__links { display: flex; gap: 30px; }
.nav__links a { display: inline-flex; align-items: baseline; gap: 7px; color: var(--muted); transition: color 0.22s var(--ease); }
.nav__num { color: var(--faint); font-size: 0.62rem; letter-spacing: 0.1em; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active .nav__num { color: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line-strong); border-radius: 3px;
  background: transparent; cursor: pointer;
  transition: border-color 0.22s var(--ease), color 0.22s, background 0.22s;
}
.icon-btn:hover { border-color: var(--ink); color: var(--accent); }
.menu-toggle { display: none; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 3px;
  font-family: var(--sans); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
  border: 1px solid var(--ink); will-change: transform;
  transition: background 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px var(--gutter) 96px; min-height: calc(100vh - 74px); display: flex; flex-direction: column; }
.hero__meta { display: flex; gap: 28px; flex-wrap: wrap; color: var(--faint); padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.hero__meta span { position: relative; }
.hero__meta span + span::before { content: ""; position: absolute; left: -15px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); transform: translateY(-50%); }

.hero__body { display: grid; grid-template-columns: 1.55fr 0.9fr; gap: 56px; align-items: end; flex: 1; padding-top: 60px; }
.hero__eyebrow { color: var(--accent); margin-bottom: 26px; display: inline-flex; align-items: center; gap: 10px; }
.hero__eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); display: inline-block; }
.hero__name {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(3.4rem, 9vw, 7.2rem);
  font-weight: 500; line-height: 0.94; letter-spacing: -0.03em;
  overflow: hidden; padding-bottom: 0.08em;
}
.hero__name .char { display: inline-block; will-change: transform; }
.hero__tagline {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem); line-height: 1.35;
  color: var(--muted); max-width: 26ch; margin-top: 28px;
}
.hero__cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.hero__side { display: flex; flex-direction: column; gap: 26px; }
.portrait { position: relative; }
.portrait__mark {
  aspect-ratio: 4 / 5; width: 100%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 500; font-size: clamp(3rem, 7vw, 5rem);
  letter-spacing: -0.02em; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-strong);
}
.portrait__img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border: 1px solid var(--line-strong); display: block; }
.portrait__cap { display: flex; justify-content: space-between; margin-top: 12px; color: var(--faint); }
.hero__links { list-style: none; display: flex; flex-direction: column; }
.hero__links a { display: flex; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; transition: color 0.22s var(--ease), padding-left 0.28s var(--ease); }
.hero__links li:last-child a { border-bottom: 1px solid var(--line); }
.hero__links a span { color: var(--faint); transition: transform 0.28s var(--ease), color 0.22s; }
.hero__links a:hover { color: var(--ink); padding-left: 10px; }
.hero__links a:hover span { color: var(--accent); transform: translate(3px, -3px); }

.hero__scroll { position: absolute; left: var(--gutter); bottom: 30px; display: inline-flex; align-items: center; gap: 12px; color: var(--faint); }
.hero__scroll svg { animation: nudge 1.9s var(--ease) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(4px); opacity: 1; } }

/* ---------- Section scaffolding ---------- */
.section { padding: 110px var(--gutter); }
.section__head { margin-bottom: 64px; padding-top: 26px; border-top: 1px solid var(--line-strong); }
.section__eyebrow { color: var(--accent); display: flex; align-items: baseline; gap: 10px; margin-bottom: 22px; }
.section__idx { color: var(--faint); }
.section__title { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.025em; line-height: 1.02; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; }
.about__text p { color: var(--muted); font-size: 1.12rem; line-height: 1.7; margin-bottom: 20px; max-width: 40ch; }
.about__text p:last-child { margin-bottom: 0; }
.about__facts { display: flex; flex-direction: column; }
.about__facts div { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); }
.about__facts div:last-child { border-bottom: 1px solid var(--line); }
.about__facts dt { color: var(--faint); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 600; }
.about__facts dd { font-family: var(--serif); font-size: 1.1rem; text-align: right; }

/* ---------- Approach ---------- */
.approach { list-style: none; }
.approach__row {
  display: grid; grid-template-columns: 90px 220px 1fr; gap: 32px; align-items: baseline;
  padding: 30px 0; border-top: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease);
}
.approach__row:last-child { border-bottom: 1px solid var(--line); }
.approach__row:hover { padding-left: 12px; }
.approach__num { font-family: var(--serif); font-size: 1.05rem; color: var(--accent); }
.approach__title { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.approach__desc { color: var(--muted); font-size: 1.02rem; max-width: 48ch; }

/* ---------- Projects (editorial index) ---------- */
.projects { list-style: none; }
.project {
  display: grid; grid-template-columns: 1.1fr 1.4fr auto; gap: 40px; align-items: start;
  padding: 38px 0; border-top: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.projects .project:last-child { border-bottom: 1px solid var(--line); }
.project:hover { padding-left: 14px; }
.project__lead { display: flex; gap: 16px; align-items: baseline; }
.project__idx { color: var(--faint); font-family: var(--serif); font-size: 0.95rem; }
.project__title { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 400; letter-spacing: -0.02em; transition: color 0.25s var(--ease); }
.project:hover .project__title { color: var(--accent); }
.project__desc { color: var(--muted); font-size: 1.02rem; line-height: 1.6; max-width: 44ch; }
.project__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.project__tags li { font-size: 0.74rem; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 11px; }
.project__links { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.project__year { color: var(--faint); }
.project__links a { color: var(--ink); font-size: 0.92rem; font-weight: 500; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; transition: border-color 0.22s, color 0.22s; }
.project__links a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.skills__label { color: var(--faint); padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line-strong); }
.skills__list { list-style: none; }
.skills__list li { font-family: var(--serif); font-size: 1.18rem; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }

/* ---------- Background: education + notes ---------- */
.background { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.timeline { list-style: none; }
.timeline__item { padding: 26px 0; border-top: 1px solid var(--line); }
.timeline__item:last-child { border-bottom: 1px solid var(--line); }
.timeline__date { color: var(--accent); display: block; margin-bottom: 10px; }
.timeline__body h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 8px; }
.timeline__body p { color: var(--muted); font-size: 1rem; max-width: 42ch; }
.notes { list-style: none; }
.note { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); align-items: baseline; }
.note:last-child { border-bottom: 1px solid var(--line); }
.note__cat { color: var(--faint); }
.note__body h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; margin-bottom: 6px; }
.note__body p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Contact ---------- */
.contact .section__head { margin-bottom: 40px; }
.contact__inner { display: flex; flex-direction: column; }
.contact__title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 8vw, 6rem); line-height: 0.98; letter-spacing: -0.03em; }
.contact__email {
  font-family: var(--serif); font-size: clamp(1.3rem, 3.6vw, 2.6rem); font-weight: 400;
  margin-top: 44px; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 8px;
  transition: color 0.25s var(--ease), border-color 0.25s;
}
.contact__email span { color: var(--accent); font-size: 0.7em; transition: transform 0.3s var(--ease); }
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__email:hover span { transform: translate(4px, -4px); }
.contact__socials { list-style: none; display: flex; gap: 30px; margin-top: 56px; }
.contact__socials a { color: var(--muted); font-weight: 500; padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color 0.22s, border-color 0.22s; }
.contact__socials a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 34px var(--gutter); border-top: 1px solid var(--line-strong); color: var(--faint); }
.footer__top { color: var(--muted); transition: color 0.22s; }
.footer__top:hover { color: var(--accent); }

/* ---------- Reveal base states (JS only; no-JS stays visible) ---------- */
.has-js [data-reveal] { opacity: 0; transform: translateY(24px); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .has-js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__scroll svg { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  :root { --gutter: 28px; }
  .hero__body { grid-template-columns: 1fr; gap: 44px; align-items: start; }
  .hero__side { flex-direction: row; align-items: flex-start; gap: 24px; }
  .portrait { flex: 0 0 200px; }
  .hero__links { flex: 1; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .background { grid-template-columns: 1fr; gap: 44px; }
  .approach__row { grid-template-columns: 60px 1fr; gap: 8px 24px; }
  .approach__desc { grid-column: 2; }
  .project { grid-template-columns: 1fr; gap: 16px; }
  .project__links { flex-direction: row; align-items: baseline; gap: 20px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 76px var(--gutter); }
  .hero__side { flex-direction: column; }
  .portrait { flex: none; width: 62%; }
  .skills { grid-template-columns: 1fr; gap: 30px; }
  .note { grid-template-columns: 1fr; gap: 6px; }
  .nav__links {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line-strong);
    padding: 8px 28px 20px; transform: translateY(-130%);
    transition: transform 0.34s var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 15px 0; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: grid; }
}
