/* NAM JEONG HYUN — site styles
   Colors and sizes live in :root so they can be changed in one place. */

:root {
  --ink: #111111;
  --muted: #6b6b6b;
  --line: #b5b5b5;
  --paper: #ffffff;
  --placeholder: #ecebe8;

  --font-body: "Work Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mark: "Archivo", "Work Sans", system-ui, sans-serif;

  --sidebar: 200px;   /* width of the left column on desktop */
  --gutter: 40px;     /* right-hand page margin on desktop */
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); padding: 8px 12px; z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Layout: sidebar + content ---------- */

.site {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 24px 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mark);
  font-weight: 800;
  font-size: 25px;
  line-height: 0.92;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--ink); }

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  letter-spacing: 0.03em;
  line-height: 1.5;
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

.content {
  padding: 24px var(--gutter) 0 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-footer {
  margin-top: auto;
  padding: 80px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .links { display: flex; gap: 24px; }

/* ---------- Work index (main page) ---------- */

.work-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  width: 600px;
  max-width: 100%;
}
.tile img { width: 100%; background: var(--placeholder); aspect-ratio: 5 / 6; object-fit: cover; transition: filter .35s ease, opacity .35s ease; }
.tile-title {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 15px; font-weight: 500; letter-spacing: 0.12em;
  color: var(--ink);
  opacity: 0;
  transition: opacity .35s ease;
}
.tile:hover img, .tile:focus-visible img { filter: blur(4px); opacity: 0.7; }
.tile:hover .tile-title, .tile:focus-visible .tile-title { opacity: 1; }
.tile-caption { display: none; }

/* ---------- Text pages (work detail, about) ---------- */

.intro {
  width: 560px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 2px;
}

.title-block { display: flex; flex-direction: column; gap: 4px; }
.page-title { margin: 0; font-size: 26px; line-height: 1.1; font-weight: 500; letter-spacing: 0.01em; }
.year { font-size: 14px; color: var(--muted); }

.body-text { margin: 0; font-size: 14px; line-height: 1.6; text-wrap: pretty; }

.specs {
  margin: 40px 0 0;
  padding: 0 0 0 40px;
  list-style: none;
  font-size: 13px;
  line-height: 1.6;
}

.text-link {
  align-self: flex-start;
  font-size: 13px;
  line-height: 1.6;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.specs + .text-link { margin: -8px 0 0 40px; }

/* Media column on a work page: each item keeps its own width */
.media {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.media figure { margin: 0; background: var(--placeholder); max-width: 100%; }
.media .w-video   { width: 675px; }
.media .w-small   { width: 500px; }
.media .w-medium  { width: 600px; }
.media video, .media img { width: 100%; }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .site { display: block; }

  .site-header {
    position: static;
    padding: 20px 20px 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .wordmark { font-size: 21px; }
  .site-nav { align-items: flex-end; gap: 0; }
  .site-nav a { padding: 2px 0; }

  .content { padding: 36px 20px 0; }

  .work-grid { gap: 20px; }
  .tile { width: 100%; }
  .tile-title { display: none; }
  .tile:hover img { filter: none; opacity: 1; }
  .tile-caption {
    display: block;
    margin-top: 10px;
    font-size: 13px; font-weight: 500; letter-spacing: 0.12em;
  }

  .page-title { font-size: 22px; }
  .year { font-size: 13px; }
  .intro { gap: 22px; }
  .specs { padding-left: 24px; }
  .specs + .text-link { margin-left: 24px; }

  .media { margin-top: 36px; gap: 16px; }
  .media .w-video, .media .w-small, .media .w-medium { width: 100%; }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    padding: 64px 0 28px;
  }
  .site-footer .links { flex-direction: column; gap: 6px; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .tile img, .tile-title { transition: none; }
}
