:root {
  --bg-dark: #0f1012;
  --bg-card: #17181b;
  --bg-soft: rgba(255, 255, 255, 0.03);
  --text-primary: #f5f5f5;
  --text-secondary: rgba(255, 255, 255, 0.76);
  --text-muted: rgba(255, 255, 255, 0.46);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent-color: #ffffff;

  --font-xl: clamp(42px, 7vw, 76px);
  --font-lg: clamp(28px, 4vw, 44px);
  --font-md: 18px;
  --font-sm: 14px;
  --font-xs: 12px;

  --space-xl: 72px;
  --space-lg: 48px;
  --space-md: 32px;
  --space-sm: 20px;
  --space-xs: 12px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --container: min(1180px, calc(100% - 40px));
  --container-narrow: min(1000px, calc(100% - 40px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 28%),
    var(--bg-dark);
  color: var(--text-primary);
  font-family: "Pretendard", sans-serif;
  line-height: 1.6;
  padding: 32px 0 48px;
}

main,
header,
footer {
  width: var(--container);
  margin: 0 auto;
}

a,
button,
.card,
.card img,
.card-overlay,
.nav-link,
.btn,
.project-navigation a,
.project-nav a,
.contact-list .value {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

a {
  color: var(--text-primary);
  text-decoration: none;
}

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

section + section {
  margin-top: var(--space-xl);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* =========================
   공통 타이포
========================= */
.page-title {
  font-size: var(--font-lg);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  font-weight: 700;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  max-width: 760px;
}

.section-eyebrow,
.project-eyebrow,
.hero-eyebrow,
.stats-label {
  display: inline-block;
  margin-bottom: 14px;
  font-size: var(--font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* =========================
   SCROLL REVEAL
========================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =========================
   상단 네비
========================= */
.top-nav {
  width: var(--container);
  margin: 0 auto 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-primary);
  opacity: 0.72;
  border: 1px solid transparent;
  background: transparent;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color);
}

.nav-link.active {
  font-weight: 600;
}

.nav-link img {
  width: 18px;
  height: 18px;
}

.nav-link span {
  font-size: 13px;
}

/* =========================
   메인 헤더
========================= */
.header {
  padding: 56px 0 28px;
}

.header h1 {
  font-size: var(--font-xl);
  line-height: 0.98;
  letter-spacing: -0.05em;
  margin-bottom: 16px;
}

.header .hero-title-sub {
  display: block;
  margin-top: 10px;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
  font-weight: 500;
}

.header p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-meta span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
}

/* =========================
   CTA 버튼
========================= */
.cta {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--accent-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn:hover {
  background: var(--accent-color);
  color: var(--bg-dark);
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--accent-color);
  color: var(--bg-dark);
}

.btn.primary:hover {
  opacity: 0.86;
}

/* =========================
   Showreel
========================= */
.showreel h2 {
  margin-bottom: 14px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.video-container {
  display: flex;
  justify-content: flex-start;
}

.showreel video {
  width: min(980px, 100%);
  height: auto;
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.showreel video:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

.hero-text {
  max-width: 800px;
  margin-top: 18px;
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 15px;
}

.intro {
  max-width: 900px;
}

.intro p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.9;
  font-size: 16px;
}

.intro p:last-child {
  margin-bottom: 0;
}

.intro-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.highlight-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
}

.highlight-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.highlight-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}


/* =========================
   Home Selected Works
========================= */
.selected-works-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.selected-works-heading .page-subtitle {
  margin-top: 4px;
}

.text-link {
  flex: 0 0 auto;
  padding-bottom: 4px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.text-link:hover {
  color: var(--text-primary);
  transform: translateX(3px);
}

.selected-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* =========================
   Works 헤더 / 필터
========================= */
.works-header {
  padding: 48px 0 20px;
}

.works-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.works-stats span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
}

.filter-section {
  margin-top: 18px;
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.86;
}

.filter button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

.filter-btn.active,
.filter button.active {
  background: #fff;
  color: #111;
  border-color: #fff;
  opacity: 1;
}

/* =========================
   Works 카드
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.card {
  position: relative;
  background: var(--bg-card);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  border-color: var(--border-strong);
}

.work-link {
  display: block;
  height: 100%;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card:hover img {
  transform: scale(1.04);
  filter: brightness(1.04);
}

.card-content {
  padding: 18px 18px 20px;
}

.card-kicker {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card-summary {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card.is-hidden {
  display: none;
}

/* =========================
   About
========================= */
.about-page header {
  padding: 48px 0 22px;
}

.about-page .page-subtitle {
  max-width: none;
}

.about-wrap {
  margin-top: 20px;
}

.about-text {
  color: var(--text-secondary);
}

.about-text p {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 16px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-core {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.about-core .core-item {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
}

.about-core .core-item h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.about-core .core-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.tools-section,
.skills-section,
.contact-section {
  margin-top: var(--space-xl);
}

.tools-section h3,
.skills-section h3,
.contact-section h3 {
  font-size: 22px;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.tools-summary {
  color: var(--text-secondary);
  line-height: 1.75;
}

.skills-list {
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--text-secondary);
}

.skills-list li {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  line-height: 1.75;
}

/* =========================
   Contact
========================= */
.contact-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: start;
  gap: 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-list .label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-list .value {
  color: #fff;
  word-break: break-all;
  line-height: 1.75;
}

.contact-list .value:hover {
  opacity: 0.72;
}

/* =========================
   상세 페이지
========================= */
.project-page header,
.project-page main,
.project-page footer {
  width: var(--container-narrow);
  margin: 0 auto;
}

.project-page header {
  padding: 42px 0 14px;
}

.project-page .page-title {
  margin-bottom: 10px;
}

.project-page .page-subtitle {
  max-width: 760px;
}

.project-media {
  margin-top: 24px;
  margin-bottom: 34px;
}

.detail-video,
.detail-image {
  width: 100%;
  border-radius: 18px;
  background: #111;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.project-info {
  display: grid;
  gap: 24px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.meta-item {
  padding: 18px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
}

.meta-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-value {
  color: #fff;
  font-size: 15px;
  line-height: 1.7;
}

.project-description {
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
}

.project-description h3 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.project-description p,
.project-description li {
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 15px;
}

.project-description ul {
  padding-left: 18px;
}

.project-description li + li {
  margin-top: 6px;
}

.project-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 42px 0 0;
}

.project-navigation-spacer {
  min-height: 110px;
}

.project-navigation a {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
}

.project-navigation a:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.045);
}

.project-navigation a span {
  display: block;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
}

.nav-prev {
  text-align: left;
}

.nav-next {
  text-align: right;
}

.project-footer {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-nav {
  display: flex;
  justify-content: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}

.project-nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.project-nav a:hover {
  color: #fff;
  transform: translateX(2px);
}

/* =========================
   footer
========================= */
footer {
  padding-top: 40px;
}

footer .back {
  display: inline-block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

footer .back:hover {
  color: #fff;
}

.site-footer-note {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

/* =========================
   반응형
========================= */
@media (max-width: 900px) {
  .about-core,
  .intro-highlights,
  .project-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding: 20px 0 40px;
  }

  :root {
    --container: min(1180px, calc(100% - 24px));
    --container-narrow: min(1000px, calc(100% - 24px));
  }

  .header {
    padding-top: 34px;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .selected-works-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .grid,
  .selected-grid,
  .about-core,
  .intro-highlights,
  .project-meta,
  .project-navigation {
    grid-template-columns: 1fr;
  }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-nav {
    flex-direction: column;
    gap: 12px;
  }

  .nav-prev,
  .nav-next {
    text-align: left;
  }

  .project-navigation-spacer {
    display: none;
  }

  .showreel video {
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 36px;
  }

  .page-title {
    font-size: 28px;
  }

  .btn {
    width: 100%;
  }
}
.project-playback-action {
  margin-top: 14px;
  cursor: pointer;
  font: inherit;
}

.project-playback-action[hidden] {
  display: none;
}
