:root {
  --bg: #000000;
  --text: #f5f5f5;
  --sub: #a3a3a3;
  --faint: #737373;
  --line: rgb(255 255 255 / 0.12);
  --accent: #7ef0c0;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

#aurora {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
}

@font-face {
  font-family: "Allura";
  src: url("fonts/script/allura-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* 헤더 탭 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 18px var(--gutter);
  transition: background-color 200ms ease;
}

.topbar.scrolled {
  background: rgb(0 0 0 / 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.tabs {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
}

.tabs a {
  color: var(--sub);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.tabs a:hover { color: var(--text); }

.tabs a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.panel[hidden] { display: none; }

/* products · contact: 헤더 아래에서 바로 시작 */
.page {
  min-height: 100svh;
  padding-top: clamp(96px, 16vh, 160px);
}

.page .block:first-child { border-top: 0; }

/* 탭 이름이 곧 제목이라 화면에는 다시 쓰지 않는다(읽기 도구용으로만 남김) */
.page .block {
  grid-template-columns: minmax(0, 760px);
  padding-top: 0;
}

.page .block h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 첫 화면: 이름 하나만 크게 */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 clamp(56px, 12vh, 120px);
}

.name {
  margin: 0;
  font-family: "Allura", cursive;
  font-size: clamp(56px, 10vw, 136px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
}

.lede {
  margin: clamp(20px, 3vw, 32px) 0 0;
  max-width: 30em;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.5;
  font-weight: 300;
  color: var(--text);
  text-wrap: balance;
}

/* 본문 블록: 왼쪽 제목, 오른쪽 내용 */
main {
  padding: 0 var(--gutter);
}

.panel { padding-bottom: clamp(80px, 14vh, 160px); }

.block {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 760px);
  gap: 24px clamp(24px, 6vw, 96px);
  padding: clamp(40px, 7vw, 72px) 0;
  border-top: 1px solid var(--line);
}

.block h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--sub);
}

.body { min-width: 0; }

.nw { white-space: nowrap; }

.prose {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.75;
  text-wrap: pretty;
}

/* 경력 · 활동 */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.timeline li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
}

.when {
  color: var(--faint);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
}

.what,
.detail { margin: 0; }

.what { font-weight: 400; }

.detail {
  color: var(--sub);
  font-size: 15px;
  text-wrap: pretty;
}

/* 프로젝트: 줄 목록 */
.projects {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project + .project { border-top: 1px solid var(--line); }

.project a,
.project .static {
  display: grid;
  gap: 4px;
  padding: 20px 0;
  color: inherit;
  text-decoration: none;
}

.project:first-child a,
.project:first-child .static { padding-top: 0; }

.p-name {
  font-size: clamp(19px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.45;
}

.arrow {
  display: inline-block;
  margin-left: 0.3em;
  color: var(--faint);
  font-weight: 300;
  transition: transform 160ms ease, color 160ms ease;
}

.p-desc {
  color: var(--sub);
  text-wrap: pretty;
}

.p-meta {
  color: var(--faint);
  font-size: 14px;
  font-weight: 400;
}

.project a:hover .arrow,
.project a:focus-visible .arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.project a:hover .p-name,
.project a:focus-visible .p-name { color: #ffffff; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* 연락 */
.mail {
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 300;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 160ms ease;
}

.mail:hover { text-decoration-color: var(--accent); }

@media (max-width: 720px) {
  body { font-size: 16px; }

  .block {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .hero { padding-bottom: 72px; }

  .topbar { padding-top: 14px; padding-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .arrow, .mail, .tabs a, .topbar { transition: none; }
}
