/* ============================================
   Mukund Kunapareddy — wireframe editorial
   System grotesque · uniform scale · hairline grid
   Independent per-column scroll · inline category focus
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --fg: #000;
  --muted: rgba(0, 0, 0, 0.42);
  --line: rgba(0, 0, 0, 0.15);
  --bg: #fff;
  --sans: -apple-system, system-ui, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --fs: 14.5px;
  --lh: 1.62;
  --pad: clamp(18px, 2vw, 34px);
}

html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs);
  line-height: var(--lh);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
i, em { font-style: italic; }
::selection { background: #000; color: #fff; }

/* hide scrollbars — columns still scroll */
.col::-webkit-scrollbar { width: 0; height: 0; }
.col { scrollbar-width: none; }

/* ============================================
   Back bar (only shown in focus mode)
   ============================================ */

.backbar {
  display: none;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 20px;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
}
body.is-focus .backbar { display: flex; }
.backbar .back {
  text-transform: uppercase;
  transition: color 0.15s ease;
}
.backbar .back:hover { color: var(--muted); }
.backbar .here { text-transform: uppercase; color: var(--muted); }

/* ============================================
   Grid — three columns, full-height hairline rules
   ============================================ */

.grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(0, 1.55fr) minmax(200px, 1fr);
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

.col {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 18px var(--pad) 96px;
}
.col + .col { border-left: 1px solid var(--line); }

.col-head {
  font-size: var(--fs);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--fg);
  padding-bottom: 74px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

/* ============================================
   About column
   ============================================ */

.about-name { margin-bottom: 1.5em; }
.about-bio { margin-bottom: 1.6em; max-width: 32ch; }
.about-bio p + p { margin-top: 1em; }
.about-bio em { font-style: italic; }

.about-sub { text-decoration: underline; text-underline-offset: 2px; margin-bottom: 1em; }

.linklist a {
  display: block;
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: rgba(0,0,0,0.3);
  width: fit-content;
  transition: text-decoration-color 0.15s ease;
}
.linklist a:hover { text-decoration-color: #000; }

.about-influences { margin-top: 2em; }
.about-influences .il-head { text-decoration: underline; text-underline-offset: 2px; margin-bottom: 0.6em; }
.about-influences ul { list-style: none; }
.about-influences li { margin-bottom: 0.35em; }
.about-influences .by { color: var(--muted); font-style: italic; }
.about-influences a:hover { color: var(--muted); }

/* ============================================
   Select Work — categories
   ============================================ */

.cat { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 34px; }
.cat:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.cat-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  cursor: pointer; margin-bottom: 30px;
  font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.cat-head .label { position: relative; }
.cat-head .label::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.cat-head:hover .label::after { transform: scaleX(1); }
.cat-head .arw { color: var(--muted); transition: transform 0.2s ease; }
.cat-head:hover .arw { transform: translateX(4px); color: var(--fg); }

.cat-items { display: flex; flex-direction: column; gap: 40px; }

.item { }
.item .shot {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  border: 1px solid var(--line); overflow: hidden; margin-bottom: 16px; background: #f2f2f2;
}
.item .shot img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.item .shot:hover img { transform: scale(1.02); }

.it-title { font-weight: 500; margin-bottom: 3px; }
.it-meta { color: var(--muted); margin-bottom: 8px; }
.it-desc { max-width: 52ch; margin-bottom: 10px; }

.more {
  display: inline-block; text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: rgba(0,0,0,0.3); transition: text-decoration-color 0.15s ease;
}
.more:hover { text-decoration-color: #000; }
.more .arw { display: inline-block; transition: transform 0.2s ease; }
.more:hover .arw { transform: translateX(3px); }
.more.static { text-decoration: none; color: var(--muted); cursor: default; }

/* ============================================
   Résumé column
   ============================================ */

.res { display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.res:first-of-type { padding-top: 0; }
.res:last-child { border-bottom: none; }
.res-label { color: var(--fg); }
.entry + .entry { margin-top: 1.4em; }
.entry .org { font-weight: 600; }
.entry .role { font-style: italic; }
.entry .date { color: var(--muted); }
.entry .note { margin-top: 0.35em; }
.entry a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(0,0,0,0.3); }
.entry a:hover { text-decoration-color: #000; }

/* ============================================
   Focus mode — one category, everything else hidden
   ============================================ */

body.is-focus .col-about,
body.is-focus .col-resume { display: none; }
body.is-focus .grid { grid-template-columns: 1fr; }
body.is-focus .col-work .col-head { display: none; }

/* hide the non-focused categories */
body[data-focus="projects"] .cat:not([data-cat="projects"]),
body[data-focus="orgs"]     .cat:not([data-cat="orgs"]),
body[data-focus="writing"]  .cat:not([data-cat="writing"]) { display: none; }

/* the focused category expands into a gallery */
body.is-focus .cat { border-top: none; padding-top: 0; margin-top: 0; }
body.is-focus .cat-head { cursor: default; pointer-events: none; margin-bottom: 40px; }
body.is-focus .cat-head .arw { display: none; }
body.is-focus .cat-head { font-size: 1.6rem; font-weight: 600; }
body.is-focus .cat-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 52px 40px;
  align-items: start;
}
body.is-focus .col-work { padding-bottom: 120px; }

/* ============================================
   Clock — fixed bottom-left
   ============================================ */

.clock {
  position: fixed; bottom: 12px; left: var(--pad);
  color: var(--muted); font-variant-numeric: tabular-nums; z-index: 30; pointer-events: none;
}
body.is-focus .clock { display: none; }

/* ============================================
   Responsive — stack + normal page scroll on mobile
   ============================================ */

@media (max-width: 900px) {
  body { height: auto; overflow: visible; display: block; }
  .grid { display: block; overflow: visible; }
  .col { height: auto; overflow: visible; padding: 18px var(--pad) 40px; }
  .col + .col { border-left: none; border-top: 1px solid var(--line); }
  .col-head { padding-bottom: 40px; margin-bottom: 24px; }
  .clock { position: static; display: block; padding: 0 var(--pad) 30px; }
  body.is-focus .clock { display: none; }
  body.is-focus .cat-items { grid-template-columns: 1fr; gap: 40px; }
}
