/* ===== COLORS AND FONT =====
   Change these to restyle the whole site. Each medium has its own color,
   used for its dots, labels and filter button. */
:root {
  --background: #eceef1;
  --surface: #ffffff;
  --text: #1b1a2a;
  --muted: #5d6070;
  --line: #d3d7de;

  --visual: #2b4acb;      /* cobalt */
  --music: #c98f0a;       /* ochre */
  --multimedia: #b5367a;  /* magenta */

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --page: 1180px;
}

/* ===== BASICS ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--visual); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.1; margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 600; }

.site-header, main > section, .site-footer {
  max-width: var(--page);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

main > section { padding-top: 96px; padding-bottom: 96px; }
main > #work { padding-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== MEDIUM COLORS (dots and labels) ===== */
.visual { --c: var(--visual); }
.music { --c: var(--music); }
.multimedia { --c: var(--multimedia); }

.mediums li::before, .work-meta::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--c);
  margin-right: 0.5em;
  vertical-align: 0.05em;
}

/* ===== HEADER ===== */
.site-header {
  display: flex;
  justify-content: flex-end;
  padding-top: 24px;
  padding-bottom: 24px;
}
.logo { font-weight: 800; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--text); }

/* ===== INTRO ===== */
main > .intro { padding-top: 40px; padding-bottom: 48px; }
.name {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.mediums {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  font-size: 1.15rem;
  color: var(--muted);
}

/* ===== WORK ===== */
.section-head {
  display: flex;
  margin-bottom: 32px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: inherit;
  font-size: 0.95rem;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.filters button:hover { border-color: var(--c, var(--text)); }
.filters button[aria-pressed="true"] {
  background: var(--c, var(--text));
  border-color: var(--c, var(--text));
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 48px 32px;
}
.work[hidden] { display: none; }

.work-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.work-open img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.25s ease;
}
.work-open:hover img { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .work-open img { transition: none; } }

.work-title { display: block; font-weight: 600; font-size: 1.1rem; margin-top: 14px; }
.work-meta { display: block; color: var(--muted); font-size: 0.95rem; }

/* ===== POP-UP VIEWER ===== */
.viewer {
  width: min(900px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  border: 0;
  border-radius: 8px;
  padding: 48px 40px 40px;
  background: var(--surface);
  color: var(--text);
}
.viewer::backdrop { background: rgba(27, 26, 42, 0.75); }
.viewer-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.viewer-body img { width: 100%; max-height: 70vh; object-fit: contain; margin-bottom: 24px; }
.viewer-body h3 { font-size: 1.8rem; font-weight: 800; }
.viewer-body .work-meta { margin: 6px 0 20px; }
.viewer-body p { max-width: 65ch; }
.viewer-body iframe { width: 100%; border: 0; margin-bottom: 16px; }

.embed-placeholder {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  margin-bottom: 16px;
  border: 2px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}
.embed-placeholder.wide { aspect-ratio: 16 / 9; }

/* ===== ABOUT ===== */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 56px;
  align-items: center;
}
.about img { border-radius: 4px; }
.about p { max-width: 60ch; }
.about h2 { margin-bottom: 16px; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; } }

/* ===== CONTACT ===== */
.contact h2 { margin-bottom: 32px; }
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px 32px;
  margin: 0;
}
.contact-list dt { color: var(--muted); font-size: 0.95rem; }
.contact-list dd { margin: 4px 0 0; font-size: 1.1rem; }

/* ===== FOOTER ===== */
.site-footer { padding-top: 32px; padding-bottom: 48px; color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--line); }
