/* ============================================================
   Naman Jain — portfolio styles
   Warm neutral / editorial. Newsreader + JetBrains Mono.
   ============================================================ */

:root {
  /* Palette — warm neutral */
  --bg:       oklch(0.972 0.012 78);     /* off-white, warm */
  --bg-alt:   oklch(0.942 0.014 75);     /* card / alt section */
  --paper:    oklch(0.985 0.008 80);     /* extra-light surface */
  --ink:      oklch(0.235 0.018 60);     /* warm near-black */
  --ink-soft: oklch(0.42 0.014 60);
  --ink-mute: oklch(0.58 0.010 65);
  --rule:     oklch(0.86 0.014 75);
  --rule-soft:oklch(0.91 0.012 75);
  --accent:   #A8552F;                    /* warm ochre / terracotta */
  --accent-soft: color-mix(in oklch, var(--accent) 12%, transparent);

  /* Type */
  --serif: "Newsreader", "Source Serif Pro", Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-py: clamp(72px, 9vw, 140px);
  --section-py-tight: clamp(56px, 7vw, 100px);
}

[data-density="compact"] {
  --section-py: clamp(32px, 4.2vw, 64px);
  --section-py-tight: clamp(24px, 3.2vw, 48px);
}
[data-density="airy"] {
  --section-py: clamp(96px, 12vw, 200px);
  --section-py-tight: clamp(72px, 9vw, 140px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: italic; }
strong { font-weight: 500; }

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

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 8px 12px; font-family: var(--mono); font-size: 12px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.topbar__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  height: 46px;
}
.mark {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--serif);
}
.mark__glyph {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.04em;
  transform: translateY(2px);
}
.mark__text { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }

.nav {
  display: flex; gap: 20px;
  justify-self: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a {
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: oklch(0.62 0.14 145);
  box-shadow: 0 0 0 3px color-mix(in oklch, oklch(0.62 0.14 145) 22%, transparent);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklch, oklch(0.62 0.14 145) 22%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklch, oklch(0.62 0.14 145) 8%, transparent); }
}

@media (max-width: 880px) {
  .topbar__row { grid-template-columns: auto auto; }
  .nav { display: none; }
  .status__label { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* subtle topographic suggestion via radial */
  content: "";
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 60% 40% at 75% 35%, color-mix(in oklch, var(--accent) 6%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 50% at 15% 90%, color-mix(in oklch, var(--accent) 4%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero__meta { margin-bottom: 18px; }

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 22ch;
  text-wrap: pretty;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero__title .amp {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-mute);
  font-weight: 300;
}

.hero__below {
  margin-top: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
}
.hero__lede {
  display: flex; flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
}
.hero__lede p {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  margin: 0;
  color: var(--ink-soft);
  max-width: 52ch;
}
.hero__lede strong { color: var(--ink); }

.hero__photo {
  margin: 0;
  position: relative;
}
.hero__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 1px solid var(--rule);
  display: block;
  filter: saturate(0.92) contrast(1.02);
}
.hero__photo figcaption {
  display: flex; gap: 14px;
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.4;
}
.hero__photo .caption__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-style: normal;
  white-space: nowrap;
  padding-top: 2px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 36px;
  margin: 0;
}
.facts > div { margin: 0; }
.facts dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.facts dd {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

@media (max-width: 760px) {
  .hero__below { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hero__photo { order: -1; }
}

/* ============================================================
   GENERIC SECTION
   ============================================================ */
.section {
  padding: var(--section-py) 0;
  border-bottom: 1px solid var(--rule);
}
.section--alt { background: var(--bg-alt); }
.section--split { padding: var(--section-py-tight) 0; }

.section__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 880px) {
  .section__grid { grid-template-columns: 1fr; }
}

.section__head { position: sticky; top: 56px; }
.section__head--row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; position: static;
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}
.section__head-left { display: flex; align-items: baseline; gap: 14px; }
.section__head-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  margin: 0;
  text-transform: uppercase;
}
.num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: inline-block;
}
.num--sm { color: var(--ink-mute); }
.section__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
}
.section__head--row .section__title { margin: 0; }

/* Prose */
.prose p { margin: 0 0 22px; max-width: 58ch; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose .lead {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 28px;
  max-width: 30ch;
  font-weight: 400;
}
.lead--tight { margin-bottom: 40px; }

/* ============================================================
   CASES
   ============================================================ */
.cases {
  display: grid;
  gap: clamp(56px, 7vw, 96px);
}
.case {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.case--reverse { grid-template-columns: 1fr 1.15fr; }
.case--reverse .case__cover { order: 2; }
.case--reverse .case__meta { order: 1; }

.case__cover {
  position: relative;
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease;
}
.case__cover:hover { transform: translateY(-2px); box-shadow: 0 24px 60px -28px color-mix(in oklch, var(--ink) 22%, transparent); }
.case__img {
  width: 100%; height: auto;
  object-fit: cover;
  display: block;
}
.case__img--ui {
  /* App-screenshot covers: image fills the box, no letterbox padding */
  background: var(--paper);
  padding: 0;
}
.case__chip {
  position: absolute; bottom: 16px; right: 16px;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  z-index: 2;
}
.case__cover image-slot { display: block; }

.case__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
}
.case__tags span {
  border: 1px solid var(--rule);
  padding: 4px 8px;
}
.case__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.case__title a { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 0 1px; background-position: 0 100%; transition: background-size .35s ease; }
.case__title a:hover { background-size: 100% 1px; }
.case__summary {
  font-size: 18px; line-height: 1.55;
  color: var(--ink-soft); margin: 0 0 28px;
  max-width: 42ch;
}
.link {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}
.link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.link--arrow::after { content: " →"; transition: transform .2s; display: inline-block; }
.link--arrow:hover::after { transform: translateX(3px); }

@media (max-width: 880px) {
  .case, .case--reverse { grid-template-columns: 1fr; }
  .case--reverse .case__cover { order: 0; }
  .case--reverse .case__meta { order: 1; }
}

/* More work */
.more-work {
  margin-top: clamp(64px, 8vw, 120px);
  padding-top: 36px;
  border-top: 1px solid var(--rule-soft);
}
.more-work__title {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 32px;
}
.more-work__title h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  margin: 0;
}
.mini-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-soft);
}
.mini {
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--rule-soft);
  border-right: 1px solid var(--rule-soft);
}
.mini:nth-child(4n) { border-right: none; }
.mini:last-child { border-right: none; }
.mini h4 {
  font-family: var(--serif); font-weight: 500;
  font-size: 19px;
  margin: 0 0 8px;
  letter-spacing: -0.012em;
}
.mini p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15px; line-height: 1.5;
  max-width: 32ch;
}
.mini__tag {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-mute);
}

@media (max-width: 760px) {
  .mini { padding: 24px 0; border-right: none; }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule-soft);
}
.service {
  padding: 36px 28px 36px 0;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.service:nth-child(odd) {
  padding-right: 36px;
  border-right: 1px solid var(--rule-soft);
}
.service:nth-child(even) {
  padding-left: 36px;
}
.service__num {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block; margin-bottom: 14px;
}
.service h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.service p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px; line-height: 1.55;
  max-width: 40ch;
}
@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(odd), .service:nth-child(even) {
    padding: 28px 0; border-right: none;
  }
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.timeline {
  list-style: none; padding: 0; margin: 0;
}
.role {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(28px, 4vw, 72px);
  padding: 36px 0;
  border-top: 1px solid var(--rule-soft);
}
.role:last-child { border-bottom: 1px solid var(--rule-soft); }
.role__when {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
  padding-top: 6px;
}
.role__years { color: var(--ink); }
.role__what h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.015em;
  margin: 0;
}
.role__org {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-soft);
  margin: 4px 0 18px;
}
.role__points {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.role__points li {
  padding-left: 20px;
  position: relative;
  color: var(--ink-soft);
  font-size: 16px; line-height: 1.55;
  max-width: 64ch;
}
.role__points li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--mono);
}
.role--edu .role__org { margin-bottom: 0; }

@media (max-width: 760px) {
  .role { grid-template-columns: 1fr; gap: 12px; }
}

/* ============================================================
   SPLIT (open source + talks)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
}
.split__col .section__head { margin-bottom: 28px; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

.repo-list, .talk-list { list-style: none; padding: 0; margin: 0; }
.repo {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.repo:first-child { border-top: 1px solid var(--rule-soft); }
.repo a {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 14px;
  color: var(--ink);
}
.repo a:hover { color: var(--accent); }
.repo__arrow { color: var(--ink-mute); transition: transform .2s; }
.repo a:hover .repo__arrow { transform: translate(2px, -2px); color: var(--accent); }
.repo p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 44ch;
}

.talk {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.talk:first-child { border-top: 1px solid var(--rule-soft); }
.talk__meta {
  display: flex; gap: 14px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.talk__year { color: var(--accent); }
.talk__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  line-height: 1.25;
  max-width: 38ch;
}
.talk--article .talk__year { color: var(--ink-mute); }

/* ============================================================
   SKILLS
   ============================================================ */
.skills {
  margin: 0;
  display: grid;
  border-top: 1px solid var(--rule-soft);
}
.skills__row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.skills__row dt {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute);
}
.skills__row dd {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.005em;
}

@media (max-width: 760px) {
  .skills__row { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact { background: var(--ink); color: var(--bg); border-bottom: none; }
.section--contact .section__title { color: var(--bg); }
.section--contact .num { color: var(--accent); }
.contact { margin-top: 20px; max-width: 920px; }
.contact__lede {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bg);
  margin: 0 0 28px;
  max-width: 22ch;
}
.contact__links {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid color-mix(in oklch, var(--bg) 18%, transparent);
}
.contact__links li {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in oklch, var(--bg) 18%, transparent);
  gap: 24px;
}
.contact__label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: color-mix(in oklch, var(--bg) 60%, transparent);
}
.contact__links a, .contact__links span {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--bg);
  letter-spacing: -0.01em;
}
.contact__links a { transition: color .2s; }
.contact__links a:hover { color: var(--accent); }
.contact__links .arrow { color: color-mix(in oklch, var(--bg) 50%, transparent); }

@media (max-width: 600px) {
  .contact__links li { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: color-mix(in oklch, var(--bg) 60%, transparent);
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer__row {
  display: flex; justify-content: space-between; gap: 24px;
}

/* ============================================================
   PERSONAL STRIP (about section)
   ============================================================ */
.personal-strip {
  max-width: var(--maxw);
  margin: clamp(56px, 7vw, 96px) auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1.9fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
}
.personal { margin: 0; }
.personal img {
  width: 100%; height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border: 1px solid var(--rule);
  filter: saturate(0.92) contrast(1.02);
  transition: transform .5s ease;
}
.personal--wide img { aspect-ratio: 16 / 10; }
.personal:hover img { transform: scale(1.015); }
.personal figcaption {
  display: flex; gap: 12px;
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.4;
}
.personal .caption__num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-style: normal;
  white-space: nowrap;
  padding-top: 2px;
}
@media (max-width: 880px) {
  .personal-strip { grid-template-columns: repeat(2, 1fr); }
}

/* shared caption number style (used in hero + case-study figures) */
.caption__num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-style: normal;
  white-space: nowrap;
}

/* ============================================================
   REVEAL ANIMATION (subtle)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-in {
  opacity: 1; transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status__dot { animation: none; }
}

/* image-slot styling override — keep editorial */
image-slot {
  --slot-bg: oklch(0.93 0.014 75);
  --slot-border: var(--rule);
  --slot-color: var(--ink-mute);
}

/* ============================================================
   ADJUSTMENTS — appended
   ============================================================ */

/* About: text-left, photo-right layout inside section__body */
.about__layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about__layout .prose { min-width: 0; }
.about__photo { margin: 0; }
.about__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border: 1px solid var(--rule);
  filter: saturate(0.92) contrast(1.02);
}
@media (max-width: 760px) {
  .about__layout { grid-template-columns: 1fr; }
}

/* Split (OSS + Talks): if one column is hidden, the other spans full */
.split:has([data-tweak-oss][style*="none"]) [data-tweak-talks],
.split:has([data-tweak-talks][style*="none"]) [data-tweak-oss] {
  grid-column: 1 / -1;
}
/* Make the talk list two-column when given full width */
.split:has([data-tweak-oss][style*="none"]) [data-tweak-talks] .talk-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(40px, 5vw, 72px);
}
@media (max-width: 760px) {
  .split:has([data-tweak-oss][style*="none"]) [data-tweak-talks] .talk-list {
    grid-template-columns: 1fr;
  }
}

/* Contact: LinkedIn / GitHub rows where the label itself is the link */
.contact__links li:has(> .contact__label--link) {
  grid-template-columns: 1fr;
}
.contact__links li.contact__row--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  align-items: baseline;
}
.contact__links a.contact__label--link {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.01em;
  color: var(--bg);
  text-transform: none;
  font-weight: 400;
}
.contact__links a.contact__label--link:hover { color: var(--accent); }

/* About section heading sits above the two-column layout */
#about .section__head--row { margin-bottom: clamp(20px, 2.5vw, 32px); padding-bottom: 16px; }

/* Case-title external arrow */
.case__title-arrow {
  font-family: var(--mono);
  font-size: 0.42em;
  vertical-align: 0.45em;
  letter-spacing: 0;
  color: var(--ink-mute);
  margin-left: 0.15em;
}
.case__title a:hover .case__title-arrow { color: var(--accent); }
