/* Tannmay Kumarr Baid — portfolio styles (design 04A, "Refined"). */

:root {
  --bg: #fcfbf8;
  --ink: #1c1b19;
  --muted: #66625b;
  --link: #1f4fd1;
  --hair: rgba(28, 27, 25, .13);
  --soft: #f3f1ec;
  --head: rgba(252, 251, 248, .92);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #161514;
  --ink: #e9e6e0;
  --muted: #a39f97;
  --link: #93b2ff;
  --hair: rgba(233, 230, 224, .14);
  --soft: #201f1d;
  --head: rgba(22, 21, 20, .92);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Hedvig Letters Serif', Georgia, 'Times New Roman', serif;
  font-size: 20px;
  line-height: 1.62;
  transition: background-color .35s ease, color .35s ease;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 400; }
p { margin: 0; }

a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .25s ease;
}
a:hover { background-size: 100% 1px; }
a.plain { color: inherit; background-image: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 12px; z-index: 30; padding: 8px 12px; background: var(--bg); }

.sans { font-family: 'Hedvig Letters Sans', Arial, sans-serif; font-size: 14px; letter-spacing: .01em; }
.muted { color: var(--muted); }
.label {
  margin: 0;
  font-family: 'Hedvig Letters Sans', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.wrap { max-width: 1160px; margin: 0 auto; padding-left: clamp(16px, 4vw, 48px); padding-right: clamp(16px, 4vw, 48px); }

/* Header: always visible, so readers can click or scroll */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--head);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.site-header .wrap { display: flex; align-items: center; gap: 10px 22px; padding-top: 12px; padding-bottom: 12px; }
.site-name { font-size: 19px; white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.site-nav a { color: var(--ink); background-image: linear-gradient(var(--link), var(--link)); }
.btn {
  cursor: pointer;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: 'Hedvig Letters Sans', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .04em;
}
.btn:hover { border-color: var(--ink); }
.btn[hidden] { display: none; }
.tbd { color: var(--link); opacity: .6; cursor: default; background-image: none; }
.icon-btn { width: 40px; padding: 0; display: inline-grid; place-items: center; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }

/* Opening snapshot: who, the lead tool and highlights without scrolling */
.snapshot {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: start;
  padding: 36px 0 44px;
  scroll-margin-top: 72px;
}
.intro { display: flex; flex-direction: column; gap: 18px; }
/* Without the "Start here" column the intro runs alone at a readable width */
.snapshot:not(:has(.start)) { grid-template-columns: minmax(0, 1fr); }
.snapshot:not(:has(.start)) .intro { max-width: 720px; }
@media (min-width: 901px) { .snapshot:not(:has(.start)) .avatar { width: 96px; height: 96px; } }
.avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; filter: saturate(.85); }
.intro h1 { margin: 0; font-size: clamp(40px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -.012em; }
.lede { font-size: 23px; line-height: 1.5; text-wrap: pretty; }
.intro p { text-wrap: pretty; }
.counts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 6px !important; padding-top: 16px; border-top: 1px solid var(--hair); }
.start { display: flex; flex-direction: column; gap: 4px; }
.start .label { padding-bottom: 8px; }
.shot-link img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; object-position: top; border: 1px solid var(--hair); border-radius: 4px; }
.feature { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 8px 0 10px; }
.feature a { font-size: 22px; }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.highlights li { display: flex; flex-direction: column; gap: 3px; padding: 11px 0 12px; border-top: 1px solid var(--hair); }
.highlights li > .sans { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.highlights a { font-size: 18px; line-height: 1.3; }
.sub { display: block; margin-top: 3px; }

/* Sections: a label column and a reading column */
.row {
  display: grid;
  grid-template-columns: 160px minmax(0, 700px);
  gap: 48px;
  padding: 44px 0;
  border-top: 1px solid var(--hair);
  scroll-margin-top: 72px;
}
.row > .label { padding-top: 6px; }
.row p + p, .tool p { margin-top: 4px; }
.row .sans.muted { margin-top: 4px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack > div > p { margin-top: 4px; text-wrap: pretty; }
.stack.wide { gap: 30px; }
.callout { padding: 16px 18px; background: var(--soft); border-radius: 4px; text-wrap: pretty; }
.note { margin-top: 16px !important; font-style: italic; }

.tool { padding: 14px 0; border-bottom: 1px dashed var(--hair); }
.tool:first-child { padding-top: 0; }
.tool:last-of-type { border-bottom: 0; }
.tool p { text-wrap: pretty; }
.shot { display: none; width: 100%; margin-top: 12px; border: 1px solid var(--hair); border-radius: 3px; }
/* Preview only while the tool name itself is hovered or keyboard-focused */
.tool > a:hover ~ .shot, .tool > a:focus-visible ~ .shot { display: block; animation: rise .35s ease; }
@media (hover: none) { .shot { display: block; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.entries, .episodes, .shelf { margin: 0; padding: 0; }
.entries { list-style: none; }
.entries li { padding: 10px 0; }
.entries li .sans { margin-top: 2px; }
.episodes { list-style: none; }
.episodes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.episodes li > a { justify-self: start; }
.episodes .date { white-space: nowrap; padding-top: 4px; }
.episodes .by { grid-column: 1 / -1; font-size: 13px; }
.intro-line { margin-bottom: 8px !important; }
[data-collapsible].is-collapsed .extra { display: none; }
[data-collapsible] + .btn { margin-top: 14px; }

h3 { margin: 0 0 10px; font-size: 24px; line-height: 1.25; }
.rounded { border-radius: 3px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin-top: 16px; }
.kicker { margin-bottom: 4px !important; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.two .kicker:not(:first-child) { margin-top: 18px !important; }
.shelf { padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.scope { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.scope img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 18%; }
.scope h3 { margin-bottom: 6px; }
.icon-links { display: flex; flex-wrap: wrap; gap: 10px; }
.icon-links a { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--hair); border-radius: 999px; color: var(--ink); background-image: none; transition: border-color .2s ease, color .2s ease; }
.icon-links a:hover { border-color: var(--ink); color: var(--link); }
.icon-links svg { width: 18px; height: 18px; }
.icon-links .solid { fill: currentColor; }
.icon-links .line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.site-footer { padding-bottom: 70px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 26px; border-top: 1px solid var(--hair); }

@media (max-width: 900px) {
  .row, .two { grid-template-columns: 1fr; gap: 14px; }
  /* Phones and tablets: show the dashboard straight after the one-line introduction */
  .snapshot { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
  .intro { display: contents; }
  .avatar { order: 1; width: 64px; height: 64px; }
  .intro h1 { order: 2; }
  .lede { order: 3; }
  .start { order: 4; margin: 8px 0 12px; }
  .role { order: 5; }
  .aside { order: 6; }
  .counts { order: 7; }
}
@media (max-width: 600px) {
  .highlights { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .theme-toggle { order: 2; margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding: 0 28px 4px 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; }
  .snapshot, .row { scroll-margin-top: 104px; }
  .scope { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
  .lede { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
