/* ==========================================================================
   Priya Venkat — personal site
   Design tokens
   ========================================================================== */

:root {
  --ink: #14181C;
  --ink-soft: #3A4147;
  --paper: #F6F4EF;
  --paper-raised: #FFFFFF;
  --ledger: #2F6F5E;
  --ledger-deep: #204F42;
  --brass: #A9824C;
  --line: #DAD5C9;
  --muted: #6B7280;

  --display: "Fraunces", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --max-w: 780px;
  --edge: clamp(24px, 6vw, 64px);
}

@media (prefers-color-scheme: dark) {
  /* Intentionally not auto-switching to dark mode — the ledger-on-paper
     concept depends on the warm paper ground. Kept light across devices. */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ledger-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--brass); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ledger);
  outline-offset: 3px;
}

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

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

/* ---------- Nav ---------- */

.site-nav {
  padding: 28px var(--edge) 0;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-nav .mark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
}
.site-nav .mark strong { color: var(--ink); font-weight: 600; }

.site-nav .links {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 13px;
}
.site-nav .links a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav .links a:hover {
  color: var(--ledger-deep);
  border-bottom-color: var(--ledger);
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 40px;
}

.hero .eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ledger-deep);
  letter-spacing: 0.04em;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero .eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.hero .role {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 28px;
}

.hero .portrait {
  float: right;
  width: 148px;
  height: 148px;
  border-radius: 4px;
  object-fit: cover;
  margin: 4px 0 20px 24px;
  border: 1px solid var(--line);
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  clear: both;
}

.btn {
  font-family: var(--mono);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn.primary {
  background: var(--ledger);
  border-color: var(--ledger);
  color: #fff;
}
.btn.primary:hover {
  background: var(--ledger-deep);
  border-color: var(--ledger-deep);
  color: #fff;
}

/* ---------- Section scaffolding ---------- */

section.block {
  padding: 52px 0;
  border-top: 1px solid var(--line);
}

.block h2 {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 28px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.block h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.bio p { margin: 0 0 18px; color: var(--ink-soft); max-width: 68ch; }
.bio p:last-child { margin-bottom: 0; }

/* ---------- Ledger timeline (experience) ---------- */

.ledger {
  position: relative;
  padding-left: 0;
}

.entry {
  position: relative;
  padding: 0 0 34px 0;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  margin-left: 4px;
}
.entry:last-child { padding-bottom: 0; }

.entry::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 5px;
  width: 8px;
  height: 8px;
  background: var(--paper);
  border: 1.5px solid var(--ledger);
  border-radius: 50%;
}

.entry .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.entry .date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--brass);
  white-space: nowrap;
}

.entry h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2px 0 2px;
}

.entry .org {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 10px;
}

.entry ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}
.entry li { margin-bottom: 8px; }
.entry li:last-child { margin-bottom: 0; }

.entry .impact {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ledger-deep);
  background: rgba(47, 111, 94, 0.08);
  border: 1px solid rgba(47, 111, 94, 0.25);
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ---------- Skills ---------- */

.skill-groups {
  display: grid;
  gap: 18px;
}

.skill-group .label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-soft);
  background: var(--paper-raised);
}

/* ---------- Education ---------- */

.edu-entry {
  margin-bottom: 18px;
}
.edu-entry:last-child { margin-bottom: 0; }
.edu-entry .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.edu-entry h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  margin: 0 0 3px;
  font-weight: 600;
}
.edu-entry .org { color: var(--muted); font-size: 0.95rem; margin: 0; }
.edu-entry .date { font-family: var(--mono); font-size: 12.5px; color: var(--brass); }

/* ---------- Writing teaser ---------- */

.writing-list a.post-link {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.writing-list a.post-link:first-child { padding-top: 0; }
.writing-list a.post-link:last-child { border-bottom: none; }

.post-link .p-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass);
}
.post-link h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 4px 0 4px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.post-link:hover h3 { color: var(--ledger-deep); }
.post-link p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

footer {
  padding: 44px 0 60px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
footer .foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
footer .links {
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 13px;
}
footer .links a { text-decoration: none; color: var(--ink-soft); }
footer .links a:hover { color: var(--ledger-deep); }
footer .copy {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Blog index ---------- */

.blog-hero {
  padding: 56px 0 20px;
}
.blog-hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 12px;
  font-weight: 600;
}
.blog-hero p { color: var(--muted); max-width: 60ch; }

.post-list { padding: 20px 0 60px; }

/* ---------- Blog post ---------- */

.post-header {
  padding: 56px 0 8px;
}
.post-header .p-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--brass);
}
.post-header h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: 12px 0 8px;
  font-weight: 600;
}
.post-header .dek {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 60ch;
}

.post-body {
  padding: 20px 0 60px;
  max-width: var(--max-w);
}
.post-body p { margin: 0 0 20px; color: var(--ink-soft); }
.post-body h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  margin: 36px 0 14px;
  font-weight: 600;
  color: var(--ink);
}
.post-body ul { color: var(--ink-soft); padding-left: 22px; }
.post-body li { margin-bottom: 10px; }
.post-body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--ledger);
  color: var(--ink-soft);
  font-style: italic;
}

.back-link {
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .hero .portrait {
    float: none;
    width: 108px;
    height: 108px;
    margin: 0 0 20px;
  }
  .entry .row { flex-direction: column; align-items: flex-start; }
  .edu-entry .row { flex-direction: column; }
}
