/* Digital Serotonin – site styles. Colours and fonts from the approved mock-up. */
:root {
  --bg: #0a0a0a;
  --text: #9a9a9a;
  --muted: #8a8a8a;
  --read: #c9c9c9;
  --read-strong: #e6e6e6;
  --title: #f2f2f2;
  --line: #262626;
  --line-soft: #1c1c1c;
  --placeholder: #161616;
  --pad: 40px;
  --max: 1360px;
  --sans: Manrope, "Noto Sans KR", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
html:lang(ko) { --sans: Manrope, "Noto Sans KR", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; }
html:lang(ko) body { word-break: keep-all; }
img { max-width: 100%; }
a { color: var(--text); text-decoration: none; }
a:hover, a:focus-visible { color: var(--title); }
:focus-visible { outline: 2px solid var(--title); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); width: 100%; }
.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* height: auto keeps the 16:9 shape even though the <img> tags carry width/height attributes (those are only for faster loading) */
.media { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--placeholder); }
.todo { color: #d9a441; }

/* Header */
.site-header {
  padding-top: 28px; padding-bottom: 28px;
  display: flex; flex-wrap: wrap; gap: 16px 40px;
  align-items: center; justify-content: space-between;
}
/* Wordmark logo (assets/img/logo.svg, 335.9 × 28.4) */
.logo { display: block; padding: 10px 0; }
.logo img { width: 240px; height: auto; display: block; }
.logo:hover img, .logo:focus-visible img { filter: brightness(1.35); }
.site-nav { display: flex; flex-wrap: wrap; gap: 32px; font-size: 15px; }
.site-nav a[aria-current="page"] { color: var(--title); }

/* Footer */
.site-footer {
  padding-top: 96px; padding-bottom: 48px;
  display: flex; flex-wrap: wrap; gap: 16px 40px;
  justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--title); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; align-items: baseline; }
.lang-switch button {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: var(--muted); cursor: pointer;
}
.lang-switch button:hover { color: var(--title); }
.lang-switch button[aria-pressed="true"] { color: var(--title); }

/* Card grids */
.grid-main { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 56px 32px; }
.grid-small { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.card { display: flex; flex-direction: column; gap: 14px; color: inherit; }
.card:hover .card-title { color: #fff; }
.card:hover .media { opacity: 0.9; }
.card-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.card-title { color: var(--title); font-size: 17px; font-weight: 500; }
.card-year { font-family: var(--mono); font-size: 13px; color: var(--muted); flex-shrink: 0; }
.card-medium { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: -10px; }
.card.small { gap: 10px; }
.card.small .card-title { color: #e0e0e0; font-size: 14px; font-weight: 400; }
.card.small .card-year { font-size: 12px; }

/* Home */
.showreel { padding-top: 8px; }
.showreel-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.showreel-frame img, .showreel-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.showreel-link {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 120px 32px 28px;
  background: linear-gradient(to top, rgba(10,10,10,0.85), rgba(10,10,10,0));
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; justify-content: space-between;
  color: var(--title);
}
.showreel-link:hover { color: #fff; }
.showreel-title { font-size: 30px; font-weight: 500; }
.showreel-caption { font-size: 14px; color: #d6d6d6; }
.section { padding-top: 96px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 32px; }
.section-head h2 { margin: 0; color: var(--title); font-size: 22px; font-weight: 500; }
.section-head a { font-size: 14px; }
.event-list .label { margin-bottom: 16px; }
.event {
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--line); color: inherit;
}
.event:last-child { border-bottom: 1px solid var(--line); }
.event-title { color: var(--title); font-size: 18px; }
.event-where { font-size: 15px; }

/* Works page */
.page-top { padding-top: 32px; }
.works-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.works-head h1, .about-statement h1 { margin: 0; color: var(--title); font-size: 28px; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.filters button {
  background: transparent; color: #b5b5b5; border: 1px solid #3a3a3a; border-radius: 999px;
  padding: 10px 18px; min-height: 44px; font: inherit; cursor: pointer;
}
.filters button:hover { border-color: #6a6a6a; color: var(--title); }
.filters button[aria-pressed="true"] { background: var(--title); color: var(--bg); border-color: var(--title); }
.empty-note { color: var(--muted); font-size: 15px; }
.more-works { margin-top: 120px; border-top: 1px solid var(--line); padding-top: 32px; }

/* Works filter: cards fade up one after another; "More works" folds away when a category is chosen */
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card-in { animation: card-in 0.5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.more-wrap { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 0.5s ease, opacity 0.35s ease; }
.more-inner { overflow: hidden; min-height: 0; }
.more-wrap.is-hidden { grid-template-rows: 0fr; opacity: 0; pointer-events: none; }
.filters button { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }

/* Gentle fade-in of page content and images */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
main > * { animation: page-in 0.45s ease both; }

/* ---------- Light motion (opacity/transform only, so it stays cheap) ---------- */
:root { --ease-out: cubic-bezier(.2, .7, .2, 1); }

/* Images fade in once loaded (only when JS is on, so nothing stays hidden without it) */
.js img.media, .js .work-hero img, .js .about-photo, .js .showreel-frame img { opacity: 0; transition: opacity 0.7s ease; }
.js img.is-loaded { opacity: 1; }
.js .video-frame img.is-loaded { opacity: 0.7; }

/* Showreel / home hero: a slow settle on first load */
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }
.showreel-frame img, .showreel-frame video { animation: settle 2.4s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.showreel-link { animation: rise 0.9s var(--ease-out) 0.35s both; }
.showreel-link > span { transition: opacity 0.22s ease, transform 0.22s ease; }
.showreel-link.is-switching > span { opacity: 0; transform: translateY(4px); }

/* Sections reveal softly as they scroll into view */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Links: thin underline that grows from the left */
.site-nav a, .footer-links a, .section-head a, .back, .pager a {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: color 0.2s ease, background-size 0.35s var(--ease-out); padding-bottom: 2px;
}
.site-nav a:hover, .footer-links a:hover, .section-head a:hover, .back:hover, .pager a:hover,
.site-nav a[aria-current="page"] { background-size: 100% 1px; }

/* Play button: a small lift */
.play { transition: transform 0.3s var(--ease-out), background-color 0.2s ease, border-color 0.2s ease; }
.play:hover { transform: translate(-50%, -50%) scale(1.06); }
.card .media { transition: opacity 0.3s ease; }
.more-works .label { font-size: 13px; margin-bottom: 24px; }

/* Work page */
.back { font-size: 14px; }
.work-hero { margin: 20px 0 0; }
.work-intro { padding-top: 56px; display: flex; flex-wrap: wrap; gap: 48px 96px; }
.work-meta { flex: 1 1 320px; display: flex; flex-direction: column; gap: 28px; }
.work-meta h1 { margin: 0; color: var(--title); font-size: clamp(32px, 5vw, 44px); font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.facts { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px 16px; font-size: 14px; line-height: 1.5; }
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; text-transform: uppercase; }
.facts dd { margin: 0; color: #d6d6d6; }
.facts dd div + div { margin-top: 6px; }
.prose { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 22px; font-size: 18px; line-height: 1.65; color: var(--read); }
.prose p { margin: 0; }
.prose a { color: var(--title); text-decoration: underline; text-underline-offset: 3px; }
.work-video { padding-top: 88px; }
.work-video + .work-video { padding-top: 56px; }
.work-links { padding-top: 40px; display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 15px; }
.work-links a { color: var(--title); text-decoration: underline; text-underline-offset: 3px; }
.work-links + .work-links { padding-top: 12px; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.7; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 88px; height: 88px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6); background: rgba(10,10,10,0.55); color: var(--title);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.play:hover { background: rgba(10,10,10,0.8); border-color: #fff; }
.video-caption { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.work-images { padding-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; }
.work-images figure { margin: 0; }
.work-images figcaption, .work-hero figcaption { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
figcaption .cap { font-size: 13px; color: var(--text); }
figcaption .credit { font-size: 11px; color: var(--muted); }
.work-images.odd > figure:first-child { grid-column: 1 / -1; }
.pager { padding-top: 96px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; font-size: 14px; }

/* About page */
.about-photo { width: 100%; height: auto; aspect-ratio: 21 / 9; object-fit: cover; display: block; background: var(--placeholder); }
.about-cols { padding-top: 72px; display: flex; flex-wrap: wrap; gap: 64px 96px; }
.about-main { flex: 999 1 560px; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 64px; }
.about-statement { display: flex; flex-direction: column; gap: 22px; }
.about-statement h1 { margin-bottom: 8px; }
.about-statement p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--read); }
.about-statement p.lead { font-size: 22px; line-height: 1.55; color: var(--read-strong); }
.about-main .label { margin-bottom: 18px; }
.member-ig { font-size: 14px; color: var(--muted); justify-self: end; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.member-ig:hover { color: var(--title); }
.member { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px; }
.member:last-child { border-bottom: 1px solid var(--line); }
.member-name { color: var(--title); }
.ex-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ex-year { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.ex-year > span { font-family: var(--mono); font-size: 14px; color: var(--title); }
.ex-items { display: flex; flex-direction: column; gap: 8px; }
.ex-item { font-size: 14px; line-height: 1.5; color: #b5b5b5; }
.ex-item .w { color: var(--read-strong); }
.ex-item a.w:hover { color: #fff; }
.contact { flex: 1 1 300px; display: flex; flex-direction: column; gap: 28px; }
.contact-email { color: var(--title); font-size: 20px; overflow-wrap: anywhere; }
.contact-insta { font-size: 15px; }
.btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px; background: var(--title); color: var(--bg);
  border-radius: 999px; font-size: 14px; font-weight: 500;
}
.btn:hover { background: #fff; color: var(--bg); }
.btn[aria-disabled="true"] { background: #3a3a3a; color: #9a9a9a; cursor: default; }
.contact-note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }

.load-error { padding: 48px 0; color: var(--read); font-size: 16px; line-height: 1.6; max-width: 640px; }

/* Responsive */
@media (max-width: 1100px) { .grid-small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px)  { .grid-small { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  :root { --pad: 20px; }
  .site-header { padding-top: 20px; padding-bottom: 20px; }
  .logo img { width: 170px; }
  .member { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 4px; }
  .member-ig { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .site-header { flex-wrap: nowrap; gap: 16px; }
  .site-nav { gap: 20px; flex-shrink: 0; }
  .showreel-link { padding: 64px 16px 14px; }
  .showreel-title { font-size: 20px; }
  .showreel-caption { font-size: 13px; }
  .section { padding-top: 64px; }
  .grid-small { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: 90px minmax(0, 1fr); }
  .prose { font-size: 16px; }
  .work-video { padding-top: 56px; }
  .about-photo { aspect-ratio: 16 / 9; }
  .about-statement p.lead { font-size: 19px; }
  .about-statement p { font-size: 16px; }
  .ex-year { grid-template-columns: 56px minmax(0, 1fr); }
  .site-footer { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
