@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  --primary: #0055FF;
  --secondary: #111111;
  --text-main: #1A1A1A;
  --text-muted: #666666;
  --bg-white: #FFFFFF;
  --bg-light: #F8F9FA;
  --border: #E9ECEF;
  --ease-smooth: cubic-bezier(0.19, 1, 0.22, 1);
  --font-main: "Pretendard Variable", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

body {
  background-color: var(--bg-white);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Page Transition */
#page-transition {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-white); z-index: 99999;
  pointer-events: none; transition: opacity 0.6s var(--ease-smooth);
}
#page-transition.hidden { opacity: 0; visibility: hidden; }

/* Navigation */
#global-nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 2.2rem 4rem; display: flex; justify-content: space-between; align-items: center;
  background: transparent; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s var(--ease-smooth);
}
#global-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem 4rem; backdrop-filter: blur(15px); border-bottom: 1px solid var(--border);
}
#global-nav .brand {
  font-size: 1.6rem; font-weight: 900; color: var(--primary);
  text-decoration: none; letter-spacing: 0.05em; text-transform: uppercase; transition: 0.3s;
}
#global-nav .nav-links { display: flex; gap: 3.5rem; }
#global-nav .nav-links a {
  font-size: 0.95rem; font-weight: 600; text-decoration: none; color: rgba(255,255,255,0.8); transition: 0.3s;
}
#global-nav.scrolled .nav-links a { color: var(--text-main); }
#global-nav .nav-links a:hover { color: #FFF; }
#global-nav.scrolled .nav-links a:hover { color: var(--primary); }

/* Hero Section */
#hero {
  position: relative; width: 100%; height: 100vh; overflow: hidden;
  display: flex; align-items: center; background: #000;
}
.hero-media { position: absolute; inset: 0; z-index: 1; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.5) 100%);
  z-index: 2;
}
#hero-video-container { width: 100%; height: 100%; }
#hero-video-container img, #hero-video-container video {
  width: 100%; height: 100%; object-fit: cover;
  animation: ken-burns 25s ease-in-out infinite alternate;
}
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.15); } }

.hero-content {
  position: relative; z-index: 10; padding: 0 4rem;
  max-width: 1400px; margin: 0 auto; width: 100%;
}
.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 6rem); font-weight: 850; line-height: 1.05;
  color: #FFF; margin-bottom: 2rem; letter-spacing: -0.04em;
  opacity: 0; transform: translateY(50px);
  animation: reveal-up 1.2s var(--ease-smooth) 0.3s forwards;
}
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.5rem); color: rgba(255,255,255,0.75);
  max-width: 700px; margin-bottom: 4.5rem;
  opacity: 0; transform: translateY(30px);
  animation: reveal-up 1.2s var(--ease-smooth) 0.5s forwards;
}

.btn-premium {
  display: inline-flex; padding: 1.2rem 3.5rem;
  background: var(--primary); color: white; text-decoration: none;
  font-weight: 700; font-size: 0.95rem; border-radius: 4px; transition: 0.4s;
  opacity: 0; animation: reveal-up 1.2s var(--ease-smooth) 0.7s forwards;
}
.btn-premium:hover { background: #0044CC; transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,85,255,0.25); }

/* Technical Grid */
.container { max-width: 1400px; margin: 0 auto; padding: 0 4rem; width: 100%; box-sizing: border-box; }
.section-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 850; letter-spacing: -0.03em; margin-bottom: 1.5rem; }
.section-desc { color: var(--text-muted); font-size: clamp(1rem, 2vw, 1.2rem); margin-bottom: 5rem; }

.grid-archive {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.5rem;
}
.archive-card {
  background: white; border: 1px solid var(--border);
  transition: 0.6s var(--ease-smooth); cursor: pointer;
}
.archive-card:hover { transform: translateY(-15px); border-color: var(--primary); box-shadow: 0 40px 80px rgba(0,0,0,0.08); }

.img-box { aspect-ratio: 16 / 10; overflow: hidden; background: #F0F0F0; }
.img-box img, .img-box video { width: 100%; height: 100%; object-fit: cover; transition: 1s var(--ease-smooth); }

.card-meta { padding: 2.5rem; }
.card-meta .tag { font-size: 0.8rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; display: block; text-transform: uppercase; }
.card-meta h3 { font-size: 1.5rem; font-weight: 700; color: var(--secondary); line-height: 1.3; }

/* Utilities */
.py-xl { padding: 12rem 0; }
.reveal { opacity: 0; transform: translateY(40px); transition: 1.2s var(--ease-smooth); }
.reveal.active { opacity: 1; transform: translateY(0); }

@keyframes reveal-up { to { opacity: 1; transform: translateY(0); } }

/* --- Mobile Optimization --- */

@media (max-width: 1024px) {
  .container { padding: 0 2.5rem; }
  #global-nav, #global-nav.scrolled { padding: 1.2rem 2.5rem; }
  .grid-archive { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .py-xl { padding: 8rem 0; }
}

@media (max-width: 768px) {
  #global-nav { padding: 1rem 1.5rem; }
  #global-nav .brand { font-size: 1.3rem; }
  #global-nav .nav-links { gap: 1.5rem; }
  #global-nav .nav-links a { font-size: 0.85rem; }

  .hero-content { padding: 0 1.5rem; }
  .hero-content h1 { line-height: 1.1; margin-bottom: 1.5rem; }
  .hero-content p { margin-bottom: 3rem; }
  .btn-premium { padding: 1rem 2.5rem; width: 100%; text-align: center; justify-content: center; }

  .grid-archive { grid-template-columns: 1fr; gap: 2rem; }
  .container { padding: 0 1.5rem; }
  .section-desc { margin-bottom: 3rem; }
  .card-meta { padding: 1.5rem; }
  .card-meta h3 { font-size: 1.3rem; }
  
  .py-xl { padding: 6rem 0; }
}

/* Admin Specific Mobile Fixes */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
}

@media (max-width: 1200px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-sidebar { position: static; order: 2; }
  .editor-main { order: 1; }
}
