/* =========================================================
   ARVIN KARVE — brutalist personal site
   Palette: paper / ink / signal orange / blueprint blue
   ========================================================= */
:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --signal: #ff4f00;
  --blue: #1f3fff;
  --gray: #d9d9d9;
  --ink-soft: #3a3a3a;

  --display: "Archivo Black", Impact, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --rule: 3px solid var(--ink);
  --gutter: clamp(1rem, 4vw, 3rem);
  --shadow: 8px 8px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.55;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 0.95; margin: 0; text-transform: uppercase; }
p { margin: 0 0 1rem; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--signal); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: stretch; justify-content: space-between;
  background: var(--paper);
  border-bottom: var(--rule);
}
.brand {
  font-family: var(--display); font-size: 1.5rem; text-decoration: none;
  padding: .6rem var(--gutter); border-right: var(--rule);
  display: flex; align-items: center;
}
.nav { display: flex; }
.nav a {
  display: flex; align-items: center;
  padding: .6rem 1rem; border-left: var(--rule);
  text-decoration: none; font-weight: 600; font-size: .85rem; text-transform: uppercase;
}
.nav a:hover { background: var(--ink); color: var(--paper); }
.nav a[href="#art"] { background: var(--signal); }
.nav a[href="#art"]:hover { background: var(--ink); }
.nav-toggle {
  display: none;
  font: 600 .9rem var(--mono); background: var(--paper); color: var(--ink);
  border: 0; border-left: var(--rule); padding: 0 1.25rem; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  border-bottom: var(--rule);
  background-image:
    linear-gradient(var(--gray) 1px, transparent 1px),
    linear-gradient(90deg, var(--gray) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero__meta { font-size: .8rem; font-weight: 600; letter-spacing: .08em; }
.hero__name {
  font-size: clamp(4.5rem, 19vw, 16rem);
  letter-spacing: -0.04em;
  line-height: .82;
  margin: 1rem 0 2rem;
}
.hero__thesis {
  max-width: 34ch; font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  background: var(--paper); border: var(--rule); padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.hero__tags { list-style: none; padding: 0; margin: 2rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero__tags li { border: var(--rule); padding: .25rem .75rem; font-weight: 600; font-size: .85rem; background: var(--paper); }
.hero__tags .tag--hot { background: var(--signal); }
.hero__proof { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Buttons ---------- */
.block-link {
  display: inline-block; text-decoration: none;
  font-family: var(--display); font-size: 1.1rem;
  padding: .8rem 1.2rem; border: var(--rule); background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.block-link:hover { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }
.block-link--hot { background: var(--signal); }

/* ---------- Sections ---------- */
.section { padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem); border-bottom: var(--rule); }
.section__head {
  display: flex; align-items: baseline; gap: 1rem;
  margin: 0 calc(var(--gutter) * -1) 2.5rem;
  padding: 1.25rem var(--gutter);
  border-bottom: var(--rule);
}
.section__num { font-family: var(--display); font-size: 1rem; color: var(--blue); }
.section__head h2 { font-size: clamp(2.5rem, 8vw, 6rem); letter-spacing: -0.03em; }

/* ---------- Case studies ---------- */
.case {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 3fr;
  gap: 1.5rem 2rem;
  padding: 2rem 0;
  border-top: 1px dashed var(--ink);
}
.case:first-of-type { border-top: 0; padding-top: 0; }
.case > .ph, .case > [class^="grid"] { grid-column: 2; }
.case__org { font-weight: 600; background: var(--ink); color: var(--paper); display: inline-block; padding: .15rem .5rem; margin: 0 0 .4rem; }
.case__role { font-size: .85rem; color: var(--ink-soft); }
.case h3 { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: 1rem; }

.spec { display: grid; grid-template-columns: max-content 1fr; margin: 0; border: var(--rule); }
.spec dt, .spec dd { margin: 0; padding: .5rem .75rem; border-bottom: 1px solid var(--ink); }
.spec dt { font-weight: 600; text-transform: uppercase; font-size: .8rem; border-right: 1px solid var(--ink); background: var(--gray); }
.spec dt:last-of-type, .spec dd:last-of-type { border-bottom: 0; }

.stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0; border: var(--rule); width: fit-content; }
.stats li { padding: .75rem 1.25rem; border-right: var(--rule); display: flex; flex-direction: column; }
.stats li:last-child { border-right: 0; }
.stats b { font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1; }
.stats span { font-size: .8rem; }
.stats--big { margin-bottom: 2rem; }
.teach-link { margin-bottom: 2.5rem; }
.stats--big b { font-size: clamp(3rem, 9vw, 6rem); color: var(--blue); }

.mono-note { font-size: .85rem; color: var(--ink-soft); }

/* ---------- Grids ---------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.shot { margin: 0; }
.shot figcaption {
  margin-top: .4rem; font-size: .75rem; text-align: center;
  text-transform: uppercase; letter-spacing: .02em; color: var(--ink-soft);
}

/* ---------- Placeholders ---------- */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  aspect-ratio: 4 / 3; padding: 1rem;
  border: var(--rule);
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, var(--gray) 10px 11px),
    var(--paper);
  text-decoration: none;
}
.ph--wide { aspect-ratio: 16 / 7; }
.ph--video { aspect-ratio: 16 / 9; }
.ph--portrait { aspect-ratio: 3 / 4; }
.ph--screenshot { aspect-ratio: 1.9 / 1; }
.ph--photo { object-fit: cover; background: none; }
.ph--square { aspect-ratio: 1; object-position: center top; }
.ph--fig { aspect-ratio: auto; height: auto; }
.ph--contain { object-fit: contain; background: var(--paper); padding: .5rem; }
.ph--link:hover { background: var(--signal); }

/* ---------- Teaching cards ---------- */
.card {
  display: flex; flex-direction: column; gap: .6rem;
  min-height: 12rem; padding: 1.25rem;
  border: var(--rule); text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .08s, box-shadow .08s, background .08s;
}
a.card:hover { transform: translate(8px, 8px); box-shadow: 0 0 0 var(--ink); background: var(--blue); color: var(--paper); }
.card__kicker { font-size: .75rem; font-weight: 600; }
.card__note { font-size: .9rem; line-height: 1.4; margin-top: .4rem; }
.card__title { font-family: var(--display); font-size: 1.5rem; line-height: 1.05; }

/* ---------- ART (inverted, emphasized) ---------- */
.art {
  background: var(--ink); color: var(--paper);
  padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem);
  border-bottom: var(--rule);
}
.section__head--inv { border-bottom-color: var(--paper); }
.section__head--inv h2 { font-size: clamp(4rem, 16vw, 13rem); color: var(--signal); }
.section__head--inv .section__num { color: var(--paper); }

.marquee {
  display: flex; overflow: hidden; white-space: nowrap;
  margin: -2.5rem calc(var(--gutter) * -1) 3rem;
  background: var(--signal); color: var(--ink);
  border-bottom: 3px solid var(--paper);
  font-family: var(--display); font-size: clamp(1.25rem, 3vw, 2rem);
  padding: .5rem 0;
}
.marquee span { animation: slide 22s linear infinite; padding-right: 0; }
@keyframes slide { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee span { animation: none; } }

.kicker { font-weight: 600; font-size: .85rem; color: var(--signal); letter-spacing: .06em; }

.art .ph {
  border-color: var(--paper); color: var(--paper);
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, #2a2a2a 10px 11px),
    var(--ink);
}
.art .ph--feature { border-width: 6px; font-size: 1.1rem; box-shadow: 12px 12px 0 var(--signal); }
.art .ph--light {
  color: var(--ink); border-color: var(--ink);
  background:
    repeating-linear-gradient(-45deg, transparent 0 10px, var(--gray) 10px 11px),
    var(--paper);
}

.piano {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.6fr);
  gap: 2rem 3rem;
  padding-bottom: 4rem;
}
.piano__title { font-size: clamp(3rem, 7vw, 6rem); margin-bottom: 1.5rem; }
.piano__more, .awards { grid-column: 1 / -1; }
.piano__feature { align-self: start; }
.ph--embed { padding: 0; }
.ph--embed iframe { width: 100%; height: 100%; border: 0; }
.yt { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt__play {
  position: absolute; inset: 0; margin: auto; width: 3rem; height: 3rem;
  display: grid; place-items: center; padding-left: .15rem;
  border-radius: 50%; background: rgba(0,0,0,.45); color: #fff;
  font-size: 1rem; opacity: .8;
  transition: opacity .15s, background .15s;
}
.yt:hover .yt__play, .yt:focus-visible .yt__play { opacity: 1; background: rgba(0,0,0,.7); }
.art .shot figcaption { color: var(--paper); }

.repertoire { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 1px solid var(--paper); }
.repertoire li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--paper); font-size: .9rem; }

.awards { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.awards li { border: 3px solid var(--signal); color: var(--signal); padding: .4rem .9rem; font-weight: 600; font-size: .85rem; }

/* piano key strip as a divider */
.piano::after {
  content: ""; grid-column: 1 / -1; height: 60px; margin-top: 1rem;
  border: 3px solid var(--paper);
  background:
    repeating-linear-gradient(90deg,
      transparent 0 26px, var(--ink) 26px 40px, transparent 40px 66px, var(--ink) 66px 80px,
      transparent 80px 120px, var(--ink) 120px 134px, transparent 134px 146px,
      var(--ink) 146px 160px, transparent 160px 172px, var(--ink) 172px 186px, transparent 186px 280px)
      0 0 / 280px 60% repeat-x,
    repeating-linear-gradient(90deg, var(--paper) 0 37px, var(--ink) 37px 40px);
}

.dance {
  background: var(--signal); color: var(--ink);
  border: 3px solid var(--paper);
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); gap: 2rem 3rem;
}
.dance .kicker { color: var(--ink); }
.dance__video { grid-column: 1 / -1; }
.dance__title { font-size: clamp(2.25rem, 4.2vw, 4rem); overflow-wrap: anywhere; margin-bottom: 1.5rem; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 2rem; align-items: start; }
.lede { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ---------- Contact ---------- */
.contact__links { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 1.25rem var(--gutter);
  background: var(--ink); color: var(--paper);
  font-size: .8rem; font-weight: 600;
}
.footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .case, .piano, .dance, .about { grid-template-columns: minmax(0,1fr); }
  .case > .ph, .case > [class^="grid"] { grid-column: 1; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--paper); border-bottom: var(--rule);
  }
  .nav.open { display: flex; }
  .nav a { border-left: 0; border-top: 1px solid var(--ink); padding: 1rem var(--gutter); }
  .grid-2 { grid-template-columns: 1fr; }
  .stats li { border-right: 0; border-bottom: var(--rule); width: 100%; }
  .stats li:last-child { border-bottom: 0; }
}
