/* Hyun Jung Ra portfolio — design tokens follow the original Squarespace site. */
:root {
  --text: #212121;        /* very dark gray: headings, nav, labels */
  --text-muted: #454545;  /* medium gray: body copy, captions */
  --bg: #ffffff;
  --placeholder: #f2f2f2;
  --content: 1100px;      /* main column width (home grid, project pages) */
  --narrow: 820px;        /* about page column */
  --gutter: 4vw;
  --gap: 24px;
  --font: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
strong { font-weight: 600; color: var(--text); }

.text-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--text-muted); }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 30px var(--gutter);
}
.logo { font-size: 20px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.nav { display: flex; gap: 24px; font-size: 14px; }
.nav a { padding-bottom: 2px; border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav a:hover { border-bottom-color: var(--text-muted); }
.nav a[aria-current="page"] { border-bottom-color: var(--text); }

/* ---------- layout ---------- */
main { width: min(var(--content), 100% - 2 * var(--gutter)); margin: 0 auto; }
.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.block { margin-top: 64px; }
.block:first-child { margin-top: 0; }

/* ---------- home ---------- */
.headline {
  max-width: 20em;
  margin: 56px 0 96px;
  font-size: clamp(28px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.32;
}
.work-grid { column-gap: 32px; row-gap: 40px; }
.card figure { overflow: hidden; background: var(--placeholder); aspect-ratio: 16 / 9; }
.card img { height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.card:hover img { transform: scale(1.02); opacity: .92; }
.card-title, .card-subtitle { font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.card-title { margin-top: 12px; }

/* ---------- project ---------- */
.project { padding-top: 24px; }
.back { display: block; width: max-content; margin-left: auto; font-size: 12px; }
.project-title {
  margin: 28px auto 40px;
  max-width: 18em;
  text-align: center;
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 400;
  line-height: 1.25;
}
.project-intro { color: var(--text-muted); }
.project-intro p + p { margin-top: 1em; }
.project-intro + .block { margin-top: 40px; }
.section-heading { margin-bottom: 24px; font-size: 14px; font-weight: 400; color: var(--text); }

.video { position: relative; height: 0; overflow: hidden; background: var(--placeholder); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video.loop { aspect-ratio: 16 / 9; object-fit: cover; background: var(--placeholder); }

.link-image { display: block; }
.link-image:hover img { opacity: .9; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap) 32px; align-items: start; }
.feature-text { font-size: 13px; color: var(--text-muted); }
.feature-text h2 { margin-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--text); }
.feature-text p + p { margin-top: 1em; }

.text { font-size: 13px; color: var(--text-muted); }
.series-heading { margin: 96px 0 32px; text-align: center; font-size: 22px; font-weight: 400; }
.series .grid + .grid { margin-top: 48px; }
.series-item { font-size: 13px; color: var(--text-muted); }
.series-item figure { margin-bottom: 20px; }
.series-item p + p { margin-top: 16px; }
.series-item .text-link { font-weight: 600; color: var(--text); }

/* ---------- about ---------- */
.about { width: min(var(--narrow), 100%); margin: 56px auto 0; font-size: 16px; line-height: 1.6; }
.about figure { margin-bottom: 36px; }
.about-heading { margin-bottom: 1em; font-size: 16px; font-weight: 600; }
.about p + p { margin-top: 1em; }

.notfound { padding-bottom: 80px; }

/* ---------- footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 120px 0 56px;
  font-size: 13px;
}
.site-footer a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.site-footer a:last-child { justify-self: end; }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  :root { --gutter: 20px; --gap: 16px; }
  .site-header { flex-wrap: wrap; padding: 20px var(--gutter); }
  .logo { font-size: 18px; }
  .nav { gap: 16px; font-size: 13px; }
  .cols-2, .cols-3, .feature { grid-template-columns: 1fr; }
  .headline { margin: 32px 0 48px; }
  .work-grid { row-gap: 32px; }
  .block { margin-top: 40px; }
  .project-title { margin: 20px auto 28px; }
  .series-heading { margin-top: 64px; }
  .about { margin-top: 24px; font-size: 15px; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; gap: 10px; padding: 80px 0 40px; }
  .site-footer a:last-child { justify-self: center; }
}
@media (max-width: 400px) {
  .nav { width: 100%; justify-content: space-between; }
}
