/* ==========================================================================
   jieunoh — portfolio stylesheet
   Design tokens live in :root. Change colors/fonts there first.
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Orbit&display=swap');

:root {
  /* ---- color ---- */
  --paper: #ffffff;         /* page background */
  --paper-raised: #ffffff;  /* image-placeholder / mobile-nav surface */
  --ink: #000;           /* primary text */
  --ink-soft: #6e6e6e;   /* secondary / muted text — labels, dates, tags */
  --line: #2f9e44;          /* divider / border lines site-wide */
  --redline: #1a1a1a;       /* single accent — used sparingly, on hover/active only */

  /* ---- type ---- */
  /* Bebas Neue has no Hangul glyphs, so Korean text falls back to Orbit, then Pretendard. */
  --font-display: 'Bebas Neue', 'Orbit', 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --font-body: 'Bebas Neue', 'Orbit', 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --font-landing: 'Bebas Neue', var(--font-display);

  /* ---- layout ---- */
  --max-width: 2400px;
  --gutter: 10px;
  --gutter-sm: 6px;
}

/* ---------------------------------------------------------------------- */
/* Cross-document view transition — landing page text slides into the     */
/* sidebar position on navigation. Chromium 126+ only; other browsers     */
/* just navigate normally, no error.                                     */
/* ---------------------------------------------------------------------- */

@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 1s;
  animation-timing-function: cubic-bezier(0.77, 0, 0.175, 1);
}

.landing-name, .logo { view-transition-name: nav-wordmark; }

.landing-nav a[href="profile.html"], .nav-list a[href="profile.html"] { view-transition-name: nav-item-profile; }
.landing-nav a[href="bio.html"], .nav-list a[href="bio.html"] { view-transition-name: nav-item-bio; }
.landing-nav a[href="works.html"], .nav-list a[href="works.html"] { view-transition-name: nav-item-works; }
.landing-nav a[href="writing.html"], .nav-list a[href="writing.html"] { view-transition-name: nav-item-lines; }

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */

* { box-sizing: border-box; }

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

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

img { max-width: 100%; display: block; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--redline);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 640px) {
  .wrap { padding: 0 var(--gutter-sm); }
}

/* ---------------------------------------------------------------------- */
/* Sidebar / nav (interior pages) — mirrors the landing page's stack,     */
/* pinned to the left edge instead of centered.                          */
/* ---------------------------------------------------------------------- */

.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 200px;
  display: flex;
  align-items: flex-start;
  padding: 40px 24px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  z-index: 5;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.logo {
  font-family: var(--font-landing);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.3vw, 2.2rem);
  letter-spacing: 0.06em;
  line-height: 1;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.nav-list a {
  font-family: var(--font-landing);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.3vw, 2.2rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--redline);
}

.nav-toggle {
  display: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
}

.site-main { margin-left: 200px; padding-left: 28px; }

@media (max-width: 768px) {
  .site-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-stack {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 84px;
    padding: 0 var(--gutter-sm);
    gap: 0;
  }
  .logo { font-size: 1.1rem; }
  .nav-list {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--paper);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 14px var(--gutter-sm); width: 100%; font-size: 1.2rem; }
  .nav-toggle { display: block; }
  .site-main { margin-left: 0; padding-left: 0; }
}

/* ---------------------------------------------------------------------- */
/* Landing page (index.html)                                              */
/* ---------------------------------------------------------------------- */

.landing-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.landing-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.landing-name {
  font-family: var(--font-landing);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  letter-spacing: 0.08em;
  color: var(--ink);
}

.landing-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.landing-nav a {
  font-family: var(--font-landing);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  letter-spacing: 0.08em;
  color: var(--ink);
  transition: color 0.3s ease;
}

.landing-nav a:hover { color: var(--redline); }

/* ---------------------------------------------------------------------- */
/* Loading screen (landing page entry only)                               */
/* ---------------------------------------------------------------------- */

.loading-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loadingOut 1.6s ease forwards;
  animation-delay: 0.4s;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  position: relative;
  animation: loadingSpin 0.9s linear infinite;
}

.loading-spinner::before,
.loading-spinner::after {
  content: "";
  position: absolute;
  background: #fff;
}

.loading-spinner::before { top: 50%; left: 0; width: 100%; height: 2px; margin-top: -1px; }
.loading-spinner::after { top: 0; left: 50%; width: 2px; height: 100%; margin-left: -1px; }

@keyframes loadingSpin {
  to { transform: rotate(360deg); }
}

@keyframes loadingOut {
  0%, 55% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-screen { animation: none; opacity: 0; visibility: hidden; }
  .loading-spinner { animation: none; }
}

/* ---------------------------------------------------------------------- */
/* Custom cursor — crosshair that rotates 45deg over clickable elements   */
/* ---------------------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  html.custom-cursor-ready,
  html.custom-cursor-ready a,
  html.custom-cursor-ready button {
    cursor: none;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.custom-cursor.is-visible { opacity: 1; }

.custom-cursor-mark {
  position: absolute;
  top: -11px;
  left: -11px;
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.custom-cursor-mark::before,
.custom-cursor-mark::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.custom-cursor-mark::before { top: 50%; left: 0; width: 100%; height: 2.5px; margin-top: -1.25px; }
.custom-cursor-mark::after { top: 0; left: 50%; width: 2.5px; height: 100%; margin-left: -1.25px; }

.custom-cursor.is-active .custom-cursor-mark { transform: rotate(45deg); }

/* ---------------------------------------------------------------------- */
/* Hero (interior page headers)                                           */
/* ---------------------------------------------------------------------- */

.hero { padding: 96px 0 72px; }

.hero h1 {
  font-size: clamp(3rem, 9vw, 7.5rem);
  letter-spacing: -0.03em;
  max-width: 16ch;
}

@media (max-width: 640px) {
  .hero { padding: 56px 0 40px; }
}

/* ---------------------------------------------------------------------- */
/* Section shell                                                          */
/* ---------------------------------------------------------------------- */

.section { padding: 40px 0 72px; }

@media (max-width: 640px) {
  .section { padding: 40px 0 48px; }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
}

.section-head h2 { font-size: 1.4rem; }

.section-head .see-all {
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.section-head .see-all:hover { color: var(--redline); }

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

.work-title { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; transition: color 0.15s ease; }

.work-list-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.work-list .work-list-item:first-child { border-top: 1px solid var(--line); }

.work-year-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.work-list-item:hover .work-title { color: var(--redline); }

@media (max-width: 640px) {
  .work-list-item { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------------------------------------------------------------- */
/* Lines list (writing.html)                                              */
/* ---------------------------------------------------------------------- */

.writing-list { display: block; }

.writing-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.writing-list .writing-item:first-child { border-top: 1px solid var(--line); }

.writing-date-label { font-family: var(--font-display); font-weight: 400; font-size: 1rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.writing-title { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; transition: color 0.15s ease; }
.writing-item:hover .writing-title { color: var(--redline); }

@media (max-width: 640px) {
  .writing-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------------------------------------------------------------------- */
/* Profile page                                                           */
/* ---------------------------------------------------------------------- */

.profile-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
}

.profile-photo {
  aspect-ratio: 3 / 4;
  background: var(--paper-raised);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-align: center;
  padding: 16px;
}

.profile-bio p { max-width: 58ch; color: var(--ink-soft); }
.profile-bio p:first-child { color: var(--ink); font-size: 1.05rem; }

.cv-block { margin-top: 36px; }
.cv-block h3 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.cv-block > p {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cv-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}

.cv-block .cv-row:last-child { border-bottom: 1px solid var(--line); }

.cv-row .cv-when { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.cv-row-3col { grid-template-columns: 120px 1fr auto; }
.cv-result { color: var(--ink-soft); white-space: nowrap; }

@media (max-width: 768px) {
  .profile-grid { grid-template-columns: 1fr; gap: 32px; }
  .profile-photo { max-width: 220px; }
}

/* ---------------------------------------------------------------------- */
/* Bio page                                                                */
/* ---------------------------------------------------------------------- */

.statement-body {
  max-width: 92ch;
  font-size: 1.05rem;
  column-count: 2;
  column-gap: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.statement-body p { margin-bottom: 1.3em; break-inside: avoid; }

@media (max-width: 768px) {
  .statement-body { column-count: 1; }
}

/* ---------------------------------------------------------------------- */
/* Detail pages (single work / single article)                            */
/* ---------------------------------------------------------------------- */

.detail-hero { padding: 40px 0 40px; }

.detail-back {
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: inline-block;
  margin-bottom: 28px;
  transition: color 0.15s ease;
}

.detail-back:hover { color: var(--redline); }

.detail-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 20ch; }

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin-top: 14px;
}

.detail-meta-row div { font-size: 0.85rem; }
.detail-meta-row .meta-label { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; margin-bottom: 4px; }

.detail-figure {
  aspect-ratio: 16 / 10;
  background: var(--paper-raised);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
  margin: 8px 0 28px;
}

.detail-body { max-width: 62ch; font-size: 1.02rem; line-height: 1.35; }
.detail-body p { margin-bottom: 0.85em; }

.detail-nav {
  display: flex;
  justify-content: space-between;
  padding: 40px 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.detail-nav a { transition: color 0.15s ease; }
.detail-nav a:hover { color: var(--redline); }

/* ---------------------------------------------------------------------- */
/* Contact                                                                 */
/* ---------------------------------------------------------------------- */

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 0.95rem;
}

.contact-list a { transition: color 0.15s ease; }
.contact-list a:hover { color: var(--redline); }

