/* ─── RESET & VARIABLES ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-bg-dark: #1a1a1a;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-text-on-dark: #e8e4df;
  --color-accent: #6b9ae8;
  --color-border: #d4daf0;
  --color-card-hover: rgba(107, 154, 232, 0.08);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-kr: 'Noto Sans KR', sans-serif;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

/* ─── NAV FADE SCRIM ─── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 88px;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.96) 0%,
    rgba(255,255,255,0.6) 55%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 99;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.about-photo-wrap {
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.about-photo-frame {
  position: absolute;
  inset: -16px;
  border-radius: 12px;
  background: linear-gradient(135deg,
    rgba(255, 252, 180, 0.6) 0%,
    rgba(200, 218, 255, 0.5) 55%,
    rgba(60, 200, 100, 0.22) 100%
  );
  filter: url(#frame-grain) blur(10px);
  z-index: 0;
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  height: 280px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  filter: sepia(8%) contrast(1.04);
}

.film-sublabel {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin: 2rem 0 0.75rem;
}

/* ─── BACKGROUND ─── */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-decoration svg {
  width: 100%;
  height: 100%;
}

/* ─── STAR FLOAT ANIMATIONS ─── */
@keyframes float1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(15px, -20px) rotate(2deg); }
  50% { transform: translate(-10px, -35px) rotate(-1deg); }
  75% { transform: translate(20px, -15px) rotate(1.5deg); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-20px, 15px) rotate(-1.5deg); }
  50% { transform: translate(15px, 25px) rotate(2deg); }
  75% { transform: translate(-25px, -10px) rotate(-1deg); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, 20px) rotate(1deg); }
  50% { transform: translate(-15px, 10px) rotate(-2deg); }
  75% { transform: translate(10px, -20px) rotate(1.5deg); }
}

.star-1 { animation: float1 20s ease-in-out infinite; will-change: transform; }
.star-2 { animation: float2 25s ease-in-out infinite; will-change: transform; }
.star-3 { animation: float3 18s ease-in-out infinite; will-change: transform; }

/* ─── REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  border-bottom: none;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
}

/* ─── PAGE CONTENT ─── */
.page-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: 6rem;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-family: var(--font-kr);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: var(--color-text-light);
  margin-bottom: 3rem;
}

.hero-meta {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-meta-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero-meta-value {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ─── ABOUT ─── */
.about {
  padding: 6rem 0;
}

/* ─── PORTFOLIO ─── */
.portfolio {
  padding: 2rem 0 6rem;
}

.portfolio h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 3rem;
}

/* Placeholder gradients for project hero backgrounds */
.card-gradient-1,
.card-gradient-2,
.card-gradient-3,
.card-gradient-4,
.card-gradient-5,
.card-gradient-6 { background: none; }

/* ─── CONTACT ─── */
.contact {
  padding: 8rem 0;
  text-align: center;
}

.contact h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.contact p {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.contact-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-card-hover);
}

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 1;
  padding: 2rem;
  text-align: center;
  border-top: none;
}

footer p {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

footer span {
  margin: 0 0.5rem;
  color: var(--color-border);
}


/* ─── PROJECT PAGE ─── */
.project-hero {
  position: relative;
  z-index: 1;
  min-height: 35vh;
  display: flex;
  align-items: flex-end;
  padding: 5rem 2rem 2rem;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
}

.project-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  transition: color 0.3s;
}

.project-back:hover { color: var(--color-accent); }

.project-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.project-subtitle {
  font-family: var(--font-kr);
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.project-meta-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.project-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.project-meta-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.project-meta-value {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

.project-body {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.project-body h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem;
}

.project-body p {
  font-family: var(--font-kr);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.project-yt-link {
  display: block;
  text-decoration: none;
  margin: 1.5rem 0;
}

.project-yt-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.project-yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  margin: 0 !important;
  border-radius: 0 !important;
}

.project-yt-link:hover .project-yt-thumb img {
  transform: scale(1.03);
}

.project-yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
}

.project-yt-link:hover .project-yt-play {
  background: rgba(0, 0, 0, 0.35);
}

.project-yt-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-top: 0.6rem !important;
}

.project-body img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1.5rem 0;
  display: block;
}

.project-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 10px;
  margin: 1.5rem 0;
  display: block;
}

.project-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-body font[size="1"] { font-size: 0.78em; }
.project-body font[size="3"] { font-size: 1em; }
.project-body font[size="5"] { font-size: 1.4em; color: var(--color-text); }
.project-body font[size="7"] { font-size: 1.9em; font-weight: 600; color: var(--color-text); line-height: 1.3; }

/* ─── BLOG PAGE ─── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 2rem;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  display: block;
}

.blog-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 32px rgba(107, 154, 232, 0.1);
}

.blog-card-date {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.blog-card-desc {
  font-family: var(--font-kr);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--color-text-light);
  line-height: 1.7;
}


/* ─── PROJECT PAGE MOBILE ─── */
@media (max-width: 768px) {
  .project-hero {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 2.5rem;
  }

  .project-body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .project-meta-row {
    gap: 0.75rem;
    padding-top: 1rem;
  }

  /* Subtler reveal animation on mobile */
  .reveal {
    transform: translateY(16px);
  }

  /* Tone down background decoration on small screens */
  .bg-decoration {
    opacity: 0.5;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.25rem 2rem 1.5rem;
    gap: 0.85rem;
    border: 1px solid rgba(107, 154, 232, 0.18);
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 8px 24px rgba(107, 154, 232, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links.open li a::before {
    content: '✦';
    font-size: 0.4rem;
    color: var(--color-accent);
    margin-right: 0.45rem;
    vertical-align: middle;
    opacity: 0.55;
  }

  .nav-menu-btn {
    display: flex;
  }

  .hero-meta {
    gap: 2rem;
  }
}
