/* ============================================================
   YOUNGSOO KIM — Portfolio Website
   Web-styled hero + PDF reader + web-styled footer
   ============================================================ */

:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.65);
  --ink-faint: rgba(255, 255, 255, 0.4);
  --ink-very-faint: rgba(255, 255, 255, 0.2);
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.06);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Akatab', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

::selection { background: rgba(255, 255, 255, 0.2); color: var(--ink); }

/* ============================================================
   NAV (sticky, top)
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px clamp(20px, 3vw, 40px);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
  transition: opacity 400ms var(--ease-soft), transform 400ms var(--ease-soft);
}

.nav.is-hidden {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
  justify-self: start;
}

.nav__mark {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.nav__links {
  display: flex;
  gap: clamp(20px, 4vw, 48px);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
}

.nav__links a {
  position: relative;
  padding: 6px 0;
  opacity: 0.75;
  transition: opacity 200ms var(--ease-soft);
}

.nav__links a:hover { opacity: 1; }

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 350ms var(--ease);
}

.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__counter {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.22em;
  opacity: 0;
  font-size: 11px;
  justify-self: end;
  transition: opacity 350ms var(--ease-soft);
}

.nav__counter.is-visible { opacity: 0.55; }

@media (max-width: 720px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__counter { display: none; }
  .nav__links { gap: 18px; font-size: 10px; }
  .nav__brand .nav__name { display: none; }
}

/* ============================================================
   PROGRESS BAR — top edge
   ============================================================ */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 99;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.7);
  transition: width 120ms linear;
}

/* ============================================================
   HERO — centered display, reference style
   ============================================================ */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(80px, 12vh, 140px) clamp(28px, 6vw, 100px);
  overflow: hidden;
  text-align: center;
}

/* Background video */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1400ms var(--ease-soft);
}

.hero__video.is-playing {
  opacity: 0.78; /* color visible while title remains legible */
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  /* Lighter vignette — lets video color through more */
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}

/* Hero content above video */
.hero__main { position: relative; z-index: 1; }
.hero__top { z-index: 1; }
.hero__bottom { z-index: 1; }
.hero__scroll-btn { z-index: 1; }

/* ============================================================
   Top corner stamps
   ============================================================ */
.hero__top {
  position: absolute;
  top: clamp(105px, 12vh, 140px);  /* below the nav */
  font-family: 'General Sans', var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__top--left { left: clamp(28px, 6vw, 60px); }
.hero__top--right { right: clamp(28px, 6vw, 60px); }

.hero__dot {
  opacity: 0.5;
}

#hero-time {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Main centered title
   ============================================================ */
.hero__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1400px;
}

.hero__title {
  font-family: 'General Sans', var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 4.4vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-bottom: clamp(36px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.hero__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* smooth transition for hover — quicker than pulse */
  transition: letter-spacing 350ms cubic-bezier(0.2, 0.7, 0.2, 1),
              text-shadow 350ms cubic-bezier(0.2, 0.7, 0.2, 1),
              opacity 350ms cubic-bezier(0.2, 0.7, 0.2, 1);
  /* gentle pulse — runs continuously */
  animation: heroGroupPulse 5.5s ease-in-out infinite;
}

.hero__group--name {
  /* main name — slightly heavier visual weight than role */
  animation-delay: 0s;
}

.hero__group--role {
  margin-top: clamp(20px, 2.4vw, 36px);
  font-weight: 300; /* Light — visual hierarchy */
  opacity: 0.88;
  animation-delay: 1.4s; /* offset so the two groups breathe out of phase */
}

/* Hover: letter-spacing breath + subtle glow lift, pauses pulse */
.hero__group:hover {
  letter-spacing: 0.1em;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.18), 0 2px 24px rgba(0, 0, 0, 0.4);
  animation-play-state: paused;
}

/* Continuous gentle pulse — letter-spacing + opacity */
@keyframes heroGroupPulse {
  0%, 100% {
    letter-spacing: -0.015em;
    opacity: 1;
  }
  50% {
    letter-spacing: 0.015em;
    opacity: 0.92;
  }
}

/* Role group has its own opacity baseline — softer pulse */
.hero__group--role {
  animation-name: heroGroupPulseRole;
}

@keyframes heroGroupPulseRole {
  0%, 100% {
    letter-spacing: -0.015em;
    opacity: 0.88;
  }
  50% {
    letter-spacing: 0.015em;
    opacity: 0.78;
  }
}

.hero__line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: heroLineUp 1.1s var(--ease) forwards;
}

.hero__group--name .hero__line:nth-child(1) { animation-delay: 0.1s; }
.hero__group--role .hero__line:nth-child(1) { animation-delay: 0.28s; }
.hero__group--role .hero__line:nth-child(2) { animation-delay: 0.36s; }

@keyframes heroLineUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero__sub {
  font-family: 'General Sans', var(--font-body);
  font-weight: 400;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.55;
  letter-spacing: 0.005em;
  opacity: 0;
  max-width: 520px;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  animation: heroLineUp 1s var(--ease) 0.55s forwards;
}

/* ============================================================
   Centered scroll button (circular, white)
   ============================================================ */
.hero__scroll-btn {
  position: absolute;
  bottom: clamp(110px, 16vh, 170px);
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  animation: heroBtnIn 0.7s var(--ease) 0.85s forwards;
  transition: transform 280ms var(--ease-soft), background 280ms var(--ease-soft);
  z-index: 2;
}

.hero__scroll-btn:hover {
  transform: translateX(-50%) scale(1.08);
  background: rgba(255,255,255,0.9);
}

.hero__scroll-btn:hover .hero__scroll-arrow {
  transform: translateY(3px);
}

.hero__scroll-arrow {
  display: inline-block;
  /* visual centering — arrow glyph has uneven left/right bearing */
  margin-left: -1px;
  transition: transform 350ms var(--ease);
  line-height: 1;
}

@keyframes heroBtnIn {
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* ============================================================
   Bottom corner texts
   ============================================================ */
.hero__bottom {
  position: absolute;
  bottom: clamp(40px, 5vh, 70px);
  font-family: 'General Sans', var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
}

.hero__bottom--left {
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  white-space: nowrap;
  animation: heroBottomCenterIn 1s var(--ease) 1s forwards;
}

.hero__bottom--left a {
  display: block;
}

@keyframes heroBottomCenterIn {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.hero__bottom a {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 200ms var(--ease-soft);
}

.hero__bottom a:hover { opacity: 1; }

.hero__bottom span {
  opacity: 0.55;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .hero__top, .hero__bottom { font-size: 9px; letter-spacing: 0.1em; }
  .hero__bottom--left a { font-size: 9px; }
  .hero__scroll-btn {
    bottom: clamp(80px, 12vh, 130px);
    width: 48px; height: 48px;
    font-size: 16px;
  }
}


/* ============================================================
   READER — PDF pages
   ============================================================ */
.reader {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: var(--bg);
}

.page {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: var(--bg);
  overflow: hidden;
  opacity: 0.001;
  transition: opacity 600ms var(--ease-soft);
}

.page.is-loaded { opacity: 1; }

.page__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.page + .page {
  border-top: 1px solid var(--border-soft);
}

@media (min-width: 2400px) {
  .reader { max-width: 2400px; margin: 0 auto; }
}

/* ============================================================
   FOOTER (web-style)
   ============================================================ */
.footer {
  background: var(--bg);
  padding: clamp(100px, 14vw, 200px) clamp(28px, 6vw, 100px) clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer__eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  opacity: 0.5;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.footer__headline {
  font-family: 'General Sans', var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.footer__email {
  display: inline-block;
  font-family: 'General Sans', var(--font-display);
  font-weight: 400;
  font-size: clamp(16px, 1.8vw, 22px);
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: clamp(60px, 8vw, 100px);
  transition: border-color 250ms var(--ease-soft);
}

.footer__email:hover { border-bottom-color: var(--ink); }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 5vw, 80px);
  padding-bottom: clamp(60px, 8vw, 100px);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.footer__label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 18px;
}

.footer__link {
  display: block;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: var(--ink);
  transition: opacity 200ms var(--ease-soft);
  opacity: 0.85;
}

a.footer__link:hover { opacity: 1; }

.footer__link--static {
  pointer-events: none;
  opacity: 0.55;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copyright {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.4;
}

.footer__back {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 200ms var(--ease-soft);
}

.footer__back:hover { opacity: 1; }

@media (max-width: 720px) {
  .footer__cols { grid-template-columns: 1fr; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero__line, .hero__sub, .hero__cta, .hero__scroll-hint {
    opacity: 1;
    transform: none;
  }
  .hero__group {
    animation: none !important;
  }
}
