/* ------------------------------------------------------------------
   Netta Ofer — site styles
   Layout mirrors the original Cargo site: project content on the left,
   a fixed bio sidebar on the right.
   Colors and fonts live in :root so they're easy to tweak in one place.
   ------------------------------------------------------------------ */

:root {
  --bg: #ffffff;
  --ink: rgba(0, 0, 0, 0.85);
  --ink-soft: rgba(0, 0, 0, 0.75);
  --ink-faint: rgba(0, 0, 0, 0.45);
  --rule: rgba(0, 0, 0, 0.15);
  --link-blue: #0033ff;
  --highlight: rgba(188, 7, 208, 0.92);

  --font-sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --sidebar-width: 30%;
  --content-width: 68%;
  --pad: 2rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.33;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:active { opacity: 0.7; }

::selection { background: rgba(0, 0, 0, 0.12); }

/* ---------- Sidebar (name, bio, links, artist statement) ---------- */

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  padding: 1.6rem;
  background: var(--bg);
  box-shadow: 0.4rem 0.4rem 1rem 0 rgba(0, 0, 0, 0.25);
}

.site-name {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 2.2rem;
  line-height: 1.1;
  color: var(--ink);
}

.sidebar p { margin: 0 0 1.33em; }
.sidebar .highlight { color: var(--highlight); }

.site-nav {
  margin: 0 0 1.33em;
  padding: 0;
  list-style: none;
}
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration-thickness: 2px; }

.sidebar h2 {
  margin: 0;
  font: inherit;
  color: inherit;
}

/* ---------- Main column ---------- */

main {
  width: var(--content-width);
  padding: var(--pad) var(--pad) 6rem;
}

/* ---------- Home: project thumbnails ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1rem;
  align-items: start;
  padding-top: calc(var(--pad) + 2.4rem);
}

/* Alternate small/large tiles, like the Cargo grid */
.project-tile:nth-child(4n + 2),
.project-tile:nth-child(4n + 3) { grid-column: span 2; }

.project-tile { display: block; text-decoration: none; }
.project-tile img { width: 100%; transition: opacity 0.2s ease; }
.project-tile:hover img { opacity: 0.88; }

.tile-caption {
  margin-top: 0.5em;
  font-size: 1rem;
  font-weight: 500;
  color: var(--link-blue);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- Generic content pages ---------- */

.page h1 {
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 1.5rem;
}

.page h2 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 3.5rem 0 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.page p { margin: 0 0 1.33em; }

.lede { font-size: 1.35rem; line-height: 1.33; }

/* Dated list used for CV-style sections */
.entries { list-style: none; margin: 0; padding: 0; }
.entries li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0 1.5rem;
  padding: 0.55rem 0;
}
.entries .when {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-faint);
  padding-top: 0.2rem;
}
.entries .detail { color: var(--ink-faint); display: block; font-size: 1rem; }

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 0.2rem 0; }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.pubs li:last-child { border-bottom: 0; }
.pubs .pub-title { display: block; font-size: 1.2rem; line-height: 1.35; color: var(--ink); }
.pubs .pub-meta { display: block; font-size: 1rem; margin-top: 0.25rem; }
.pubs .me { color: var(--ink); font-weight: 600; }
.pubs .award {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- Project pages ---------- */

/* Title is a small "‹ Title" link back to the home page */
.project-head h1 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
}
.project-head h1 a { text-decoration: none; }
.project-head h1 a::before { content: "\2039"; margin-right: 0.45em; }
.project-head h1 a:hover { text-decoration: underline; }

.project-meta {
  font-size: 0.95rem;
  color: var(--ink-faint);
  margin: -0.6rem 0 1rem;
}

.hero { margin: 0 0 1.5rem; }
.hero img, .hero .embed { width: 100%; }

figure { margin: 0; }
figcaption {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.5em;
}

.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.05);
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed.audio { aspect-ratio: auto; height: 166px; }

.gallery {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  align-items: start;
}
.gallery.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }
.gallery.wide { grid-template-columns: 1fr; }

/* ---------- Narrow screens: stack bio above content ---------- */

@media (max-width: 900px) {
  :root { --pad: 16px; }
  body { font-size: 1.05rem; }
  .sidebar {
    position: static;
    width: auto;
    padding: var(--pad);
    box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.15);
  }
  main { width: auto; }
  .projects { grid-template-columns: 1fr; padding-top: var(--pad); }
  .project-tile:nth-child(n) { grid-column: auto; }
  .entries li { grid-template-columns: 1fr; }
  .entries .when { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
