/* ===========================================================
   Jayneel Shah — portfolio
   Direction: paper, ink, marginalia
   =========================================================== */

:root {
  --paper: #FAF9F5;
  --ink: #1E1D1A;
  --ink-2: #55534B;
  --pen: #2B4A9B;
  --rule-red: #C4453A;
  --hairline: rgba(30, 29, 26, 0.14);
  --hairline-strong: rgba(30, 29, 26, 0.26);

  --measure: 46rem;
  --rhythm: 5.5rem;

  --font-serif: 'Newsreader', Georgia, 'Iowan Old Style', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

:root[data-theme="dark"] {
  --paper: #171613;
  --ink: #E9E6DC;
  --ink-2: #A9A497;
  --pen: #8FA8EE;
  --rule-red: #D97367;
  --hairline: rgba(233, 230, 220, 0.14);
  --hairline-strong: rgba(233, 230, 220, 0.26);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171613;
    --ink: #E9E6DC;
    --ink-2: #A9A497;
    --pen: #8FA8EE;
    --rule-red: #D97367;
    --hairline: rgba(233, 230, 220, 0.14);
    --hairline-strong: rgba(233, 230, 220, 0.26);
  }
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pen); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; }
::selection { background: var(--pen); color: var(--paper); }

/* ===== TYPE ===== */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.mono { font-family: var(--font-mono); }
.subhead {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-2);
  font-weight: 400;
}

/* ===== LAYOUT ===== */
.col {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: var(--rhythm) 0; }
.section:first-of-type { padding-top: 3rem; }
.rule {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 0;
}
.rule-accent {
  border: none;
  border-top: 2px solid var(--rule-red);
  width: 2.5rem;
  margin: 0 0 1.75rem;
}

/* ===== NAV ===== */
.nav {
  padding: 1.5rem 0;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.nav-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav-links a, .nav-mark {
  color: var(--ink-2);
  text-decoration: none;
}
.nav-links a:hover { color: var(--pen); }
.nav-mark { color: var(--ink); font-weight: 500; }
.theme-toggle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  color: var(--ink-2);
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--pen); color: var(--pen); }

/* ===== HERO ===== */
.hero { padding-top: 2rem; padding-bottom: var(--rhythm); }
.hero-name {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.6rem;
}
.hero-thesis {
  font-size: 1.1rem;
  color: var(--ink-2);
  font-style: italic;
  margin-bottom: 1.4rem;
  max-width: 38rem;
}
.hero-intro p {
  margin-bottom: 1rem;
  max-width: 42rem;
}
.hero-photo {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.status-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rule-red);
  flex-shrink: 0;
}
.hero-links { margin-top: 1.5rem; display: flex; gap: 1.5rem; font-family: var(--font-mono); font-size: 0.85rem; }

/* ===== ABOUT ===== */
.about p { margin-bottom: 1.15rem; max-width: 42rem; }
.about strong { font-weight: 600; }

/* ===== NOW ===== */
.now-list { list-style: none; }
.now-list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--hairline);
}
.now-list li:last-child { border-bottom: none; }
.now-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rule-red);
  padding-top: 0.15rem;
}

/* ===== PROJECTS ===== */
.project { padding: 2.25rem 0; }
.project + .project { border-top: 1px solid var(--hairline); }
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.3rem;
}
.project-title { font-size: 1.3rem; font-weight: 600; }
.project-stack {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}
.project-desc { margin: 0.75rem 0 1rem; max-width: 42rem; }
.project-frame {
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 16 / 10;
  background: var(--hairline);
}
.project-frame img { width: 100%; height: 100%; object-fit: cover; }
.project-links { font-family: var(--font-mono); font-size: 0.8rem; display: flex; gap: 1.25rem; }
.projects-more { margin-top: 2rem; font-family: var(--font-mono); font-size: 0.85rem; }

/* ===== EXPERIENCE / EDUCATION ===== */
.record-list { list-style: none; }
.record {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.record:last-child { border-bottom: none; }
.record-org { font-weight: 600; }
.record-role { color: var(--ink-2); font-style: italic; }
.record-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  white-space: nowrap;
  align-self: start;
  padding-top: 0.2rem;
}
.record-line { grid-column: 1 / -1; margin-top: 0.3rem; color: var(--ink-2); font-size: 0.95rem; }

/* ===== RECOMMENDATION ===== */
.pull-quote {
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
  border-left: 2px solid var(--rule-red);
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  max-width: 40rem;
}
.pull-quote-attr { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-2); }

/* ===== CONTACT ===== */
.contact p { margin-bottom: 1rem; max-width: 40rem; }
.contact-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 1.25rem;
}
.contact-links a { display: inline-flex; align-items: center; gap: 0.4rem; }
.icon { width: 15px; height: 15px; flex-shrink: 0; }

/* ===== FOOTER / COLOPHON ===== */
.footer {
  padding: 3rem 0 4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  line-height: 1.8;
}

/* ===== MOTION ===== */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .record { grid-template-columns: 1fr; }
  .record-date { padding-top: 0; }
  .now-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .nav-links { gap: 0.85rem; }
}
