/* ============================================================
   noga goldman — portfolio
   shared styles
   ============================================================ */

:root {
  /* surfaces */
  --bg: #2b2a28;
  --bg-elev: #323130;

  /* ink */
  --fg: #f1f0ee;                       /* bright (name, hovered title) */
  --fg-muted: rgba(241, 240, 238, 0.62); /* subtitles, list titles */
  --fg-dim: rgba(241, 240, 238, 0.40);   /* captions, meta */
  --fg-faint: rgba(241, 240, 238, 0.26);

  /* accent — desaturated mauve */
  --accent: #a98ba9;
  --accent-80: color-mix(in srgb, var(--accent) 80%, transparent);

  /* lines */
  --line: rgba(241, 240, 238, 0.10);
  --line-soft: rgba(241, 240, 238, 0.06);

  /* type */
  --font-sans: "Suisse Int'l", "Suisse Intl", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Fragment Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* metrics */
  --gutter: 15vw;
  --col: 760px;
  --pad: 56px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

::selection { background: var(--accent-80); color: #1d1c1b; }

a { color: inherit; text-decoration: none; }

/* ============================================================
   home
   ============================================================ */

.home {
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 142px) var(--pad) 112px;
}

.intro__name {
  margin: 0;
  color: var(--fg);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.intro__tagline {
  margin: 7px 0 0;
  color: var(--fg-muted);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: -0.005em;
}

.artifacts {
  margin-top: clamp(36px, 6vh, 68px);
}

.artifacts__label {
  margin: 0 0 6px;
  color: var(--fg);
  font-size: 18px;
  font-weight: 500;
}

/* contact ------------------------------------------------- */

.contact-links {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.contact-links .sep {
  color: var(--fg-faint);
  font-weight: 300;
  user-select: none;
}

.contact-links a {
  font-size: 18px;
  font-weight: 300;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
  transition: color .35s ease;
  width: max-content;
}

@media (hover: hover) {
  .contact-links a:hover { color: var(--fg); }
}

/* list ----------------------------------------------------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: baseline;
  gap: 20px;
  padding: 15px 4px 14px 0;
  position: relative;
}

.item::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: transparent;
  transition: background .35s ease;
  z-index: -1;
}

.item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--line);
  transition: background .4s ease;
}

.item__num {
  position: absolute;
  left: -2.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--accent-80);
  letter-spacing: 0.04em;
}

.item__title {
  font-size: 18px;
  font-weight: 300;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
  transition: color .4s ease;
}

.item__arrow {
  align-self: center;
  font-family: var(--font-mono);
  color: var(--accent-80);
  font-size: 19px;
  line-height: 1;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .42s ease, transform .42s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}

@media (hover: hover) {
  .item:hover::before { background: rgba(241, 240, 238, 0.03); }
  .item:hover .item__title { color: var(--fg); }
  .item:hover .item__arrow { opacity: 1; transform: translateX(0); }
}

/* show more / less ---------------------------------------- */

/* collapsible group — the inner is full-viewport-width (bled left
   by the gutter, content padded back) so its overflow:hidden clips
   only vertically during the height animation; the full-bleed
   dividers and item numbers sit inside it and are never clipped */
.extra-inner {
  overflow: hidden;
  max-height: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: max(var(--pad), calc(50vw - var(--col) / 2 + var(--pad)));
  padding-right: max(var(--pad), calc(50vw - var(--col) / 2 + var(--pad)));
  opacity: 0;
}
.list.is-expanded .extra-inner { max-height: 360px; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .extra-inner { transition: none; }
}

.list__toggle-row { list-style: none; }

.toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  background: none;
  border: 0;
  margin: 0;
  padding: 15px 4px 14px 0;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
}

.toggle__sign {
  font-size: 18px;
  font-weight: 300;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
  transition: color .4s ease;
}

.toggle__label {
  font-size: 18px;
  font-weight: 300;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
  transition: color .4s ease;
}

@media (hover: hover) {
  .toggle:hover .toggle__label,
  .toggle:hover .toggle__sign { color: var(--fg); }
}
.toggle:focus-visible { outline: none; }
.toggle:focus-visible .toggle__label,
.toggle:focus-visible .toggle__sign { color: var(--fg); }

/* keyboard focus mirrors hover */
.item:focus-visible {
  outline: none;
}
.item:focus-visible::after { background: var(--accent-80); }
.item:focus-visible .item__title { color: var(--fg); }
.item:focus-visible .item__arrow { opacity: 1; transform: translateX(0); }

/* ============================================================
   project page
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 28px var(--gutter);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar__home {
  color: var(--fg-muted);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: color .3s ease;
}
.topbar__home:hover { color: var(--fg); }

.topbar__home .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-80);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
}
.topbar__home:hover .dot { transform: translateX(-3px) scale(1.15); }

.project {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 104px) var(--gutter) 140px;
}

.project__head {
  max-width: 720px;
}

.project__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-80);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 22px;
}

.project__title {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.project__intro {
  margin: 28px 0 0;
  color: var(--fg-muted);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.project__intro a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-decoration-color: var(--accent-80);
  text-underline-offset: 3px;
  transition: color .3s ease;
}
.project__intro a:hover { color: var(--accent-80); }

/* video embed --------------------------------------------- */

.embed {
  grid-column: 1 / -1;
  margin: 0 0 clamp(8px, 1vw, 14px);
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
  overflow: hidden;
}
.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* gallery grid --------------------------------------------- */

.gallery {
  margin-top: clamp(48px, 8vh, 84px);
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(8px, 1vw, 14px);
}

.shot {
  grid-column: span 6;
  margin: 0;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-elev);
  background-image:
    repeating-linear-gradient(45deg,
      transparent, transparent 9px,
      rgba(241, 240, 238, 0.022) 9px,
      rgba(241, 240, 238, 0.022) 10px);
}

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shot:has(img)::after { display: none; }

.shot.natural {
  aspect-ratio: auto;
  background-image: none;
}
.shot.natural img {
  position: static;
  width: 100%;
  height: auto;
}

.shot::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  text-transform: lowercase;
}

/* spans */
.shot.s-full { grid-column: span 6; }
.shot.s-half { grid-column: span 3; }
.shot.s-third { grid-column: span 2; }
.shot.s-two-third { grid-column: span 4; }

/* aspect helpers */
.shot.r-wide   { aspect-ratio: 16 / 9; }
.shot.r-cinema { aspect-ratio: 21 / 9; }
.shot.r-photo  { aspect-ratio: 4 / 3; }
.shot.r-square { aspect-ratio: 1 / 1; }
.shot.r-tall   { aspect-ratio: 3 / 4; }

.caption {
  grid-column: 1 / -1;
  margin-top: -6px;
  color: var(--fg-dim);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  max-width: 560px;
}

/* next artifact ------------------------------------------- */

.project__foot {
  margin-top: clamp(72px, 12vh, 130px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.next-link {
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
}

.next-link__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-80);
}

.next-link__title {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--fg-muted);
  transition: color .4s ease;
}

.next-link__arrow {
  display: inline-block;
  margin-left: 4px;
  font-family: var(--font-mono);
  color: var(--accent-80);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .42s ease, transform .42s cubic-bezier(.22, .61, .36, 1);
}

@media (hover: hover) {
  .next-link:hover .next-link__title { color: var(--fg); }
  .next-link:hover .next-link__arrow { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   fades (barely-there)
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: reveal .8s cubic-bezier(.22, .61, .36, 1) forwards;
  }
  @keyframes reveal {
    to { opacity: 1; transform: none; }
  }
}

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 720px) {
  :root { --gutter: 24px; --pad: 24px; }
  .item { grid-template-columns: 2.2rem auto auto; justify-content: start; padding: 16px 2px; }
  .item__num { position: static; transform: none; align-self: center; }
  .toggle { padding-left: calc(2.2rem + 22px); }
  .shot.s-half, .shot.s-third, .shot.s-two-third { grid-column: span 6; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
}
