/* ============================================
   BASE STYLES - Reset & Foundation
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
}

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

ul, ol {
  list-style: none;
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--section-padding) 0;
}

.section--alt {
  background-color: var(--bg-secondary);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 섹션 헤더 등장 애니메이션 */
.section-enter {
  opacity: 0;
  transform: translateY(20px);
}

.section-enter.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

.section__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: var(--space-6) auto 0;
}

/* ── Selection ── */
::selection {
  background-color: rgba(var(--color-accent-rgb), 0.2);
  color: var(--color-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}
