/* Gunjan Bagai — minimal editorial */

:root {
  --bg:      #f4f0e6;
  --ink:     #181612;
  --muted:   #6b6558;
  --rule:    #d9d3c1;
  --rule-strong: #c8c0a8;
  --accent:  #b8523a;

  --serif: "Newsreader", "Iowan Old Style", Charter, "Cambria", Georgia, serif;

  --measure: 36rem;
  --max:     68rem;
  --gutter:  clamp(22px, 5vw, 48px);
  --label-col: 11rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "opsz" 18;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--bg); }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease;
}
a:hover { border-bottom-color: var(--accent); color: var(--accent); }

em, i {
  font-style: italic;
  font-variation-settings: "opsz" 18;
  color: var(--accent);
  font-weight: 400;
}

.skip {
  position: absolute; top: 8px; left: 8px;
  padding: 6px 10px;
  background: var(--ink); color: var(--bg);
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 160ms;
  z-index: 10;
}
.skip:focus { transform: translateY(0); }

/* ────── header ────── */
.header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 28px var(--gutter) 24px;
  max-width: 80rem;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  font-variation-settings: "opsz" 24;
  letter-spacing: -0.005em;
  border-bottom: none;
  position: relative;
  padding-left: 18px;
}
.wordmark::before {
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.wordmark:hover { color: var(--ink); }
.header nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 28px);
  font-size: 15px;
  color: var(--muted);
}
.header nav a { color: var(--muted); }
.header nav a:hover { color: var(--accent); }

/* ────── main / sections ────── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ────── hero ────── */
.hero {
  padding: clamp(56px, 11vw, 112px) 0 clamp(56px, 10vw, 96px);
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.portrait {
  width: clamp(96px, 10vw, 132px);
  height: clamp(96px, 10vw, 132px);
  border-radius: 50%;
  overflow: hidden;
  background: var(--rule);
  position: relative;
  margin-top: 6px;
  justify-self: end;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(24, 22, 18, 0.08);
  pointer-events: none;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.94) contrast(0.98);
}
.hero__text {
  display: flex;
  flex-direction: column;
}
.greeting {
  font-size: clamp(15px, 1.2vw, 17px);
  font-style: italic;
  color: var(--muted);
  font-variation-settings: "opsz" 18;
  margin-bottom: clamp(14px, 1.6vw, 22px);
}
.greeting::before {
  content: "— ";
  color: var(--accent);
  font-style: normal;
  margin-right: 2px;
}
.lede {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-weight: 400;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  max-width: 18ch;
  color: var(--ink);
  text-wrap: balance;
}
.lede em {
  font-variation-settings: "opsz" 72;
  white-space: nowrap;
}
.meta {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: clamp(16px, 2vw, 22px);
  border-top: 1px solid var(--rule-strong);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variation-settings: "opsz" 14;
  max-width: 30rem;
}

/* ────── content blocks (about, work, ai, path, contact) ────── */
.block {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(48px, 8vw, 88px) 0;
  border-top: 1px solid var(--rule);
}
.block h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.6em;
  position: relative;
}
.block h2::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  vertical-align: 4px;
  margin-right: 12px;
}

/* body content sits in column 2 of each block */
.block > p,
.block > .list,
.block > .tools,
.block > .edu {
  grid-column: 2;
}
.block > p {
  max-width: var(--measure);
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.55;
  font-variation-settings: "opsz" 24;
}
.block > p + p { margin-top: 1.1em; }

/* ────── list (work, path) ────── */
.list {
  display: flex;
  flex-direction: column;
  max-width: 38rem;
}
.list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.list > div:first-child { padding-top: 4px; }
.list > div:last-child { border-bottom: none; }
.list dt {
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 500;
  font-variation-settings: "opsz" 24;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.list dd {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: right;
  font-style: italic;
  font-variation-settings: "opsz" 18;
  white-space: nowrap;
}

.list--dates {
  max-width: 42rem;
}
.list--dates > div {
  grid-template-columns: 100px 1fr;
  align-items: baseline;
  padding: 16px 0;
  gap: 24px;
}
.list--dates dt {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-style: normal;
  font-variation-settings: "opsz" 14;
  white-space: nowrap;
}
.list--dates dd {
  text-align: left;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--ink);
  font-style: normal;
  font-variation-settings: "opsz" 24;
  white-space: normal;
}
.list--dates dd strong {
  font-weight: 500;
  color: var(--ink);
}

/* ────── education line ────── */
.edu {
  margin-top: clamp(24px, 3vw, 32px) !important;
  padding-top: clamp(18px, 2.5vw, 22px);
  border-top: 1px solid var(--rule);
  font-size: 14px !important;
  letter-spacing: 0.01em;
  color: var(--muted);
  max-width: 42rem;
  font-style: italic;
  font-variation-settings: "opsz" 18;
  line-height: 1.6;
}

/* ────── tools line ────── */
.tools {
  margin-top: 1.4em !important;
  padding-top: 1.4em;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 16px !important;
  max-width: var(--measure);
  font-style: italic;
  font-variation-settings: "opsz" 18;
}
.tools em {
  font-style: italic;
  color: var(--ink);
  font-variation-settings: "opsz" 18;
  font-weight: 400;
}

/* ────── contact ────── */
.contact > p { margin-top: 14px; max-width: none; }
.contact > p:first-of-type { margin-top: 0; }
.link {
  font-size: clamp(20px, 2vw, 26px);
  font-variation-settings: "opsz" 36;
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 6px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.link:hover { border-bottom-color: var(--accent); }
.link span {
  color: var(--accent);
  display: inline-block;
  transition: transform 200ms ease;
  font-weight: 400;
}
.link:hover span { transform: translateX(4px); }

/* ────── footer ────── */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}

/* ────── responsive ────── */
@media (max-width: 760px) {
  :root { --label-col: auto; }

  .hero,
  .block {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .meta { grid-column: 1; }
  .greeting,
  .lede { grid-column: 1; }
  .block > p,
  .block > .list,
  .block > .tools,
  .block > .edu { grid-column: 1; }

  .greeting { padding-top: 0; }
  .block h2 { padding-top: 0; padding-bottom: 6px; }

  .portrait {
    grid-column: 1;
    grid-row: auto;
    max-width: 96px;
    margin-bottom: 8px;
  }

  .list > div { grid-template-columns: 1fr; gap: 4px; }
  .list dd { text-align: left; }
  .list--dates > div { grid-template-columns: 1fr; gap: 4px; }
  .list--dates dt { letter-spacing: 0.06em; }
}

@media (max-width: 480px) {
  .header { grid-template-columns: 1fr; }
  .header nav { gap: 16px; }
  .lede { max-width: none; }
}

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