/* ── Reset & Tokens ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
:root {
  /* SAIOUL Premium Dark Theme */
  --bg: #050505;
  --surface: #111111;
  --surface-hover: #1a1a1a;
  --white: #EFEFEA; /* Paper white */
  --text-main: #EFEFEA;
  --text-muted: #888888;
  --line: #222222;
  --accent: #FF2A00; /* Alert red */
  
  --sans: 'Inter', 'Noto Sans KR', sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.85, 0, 0.15, 1);
}

html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text-main); font-family: var(--sans); overflow-x: hidden; }

/* ── Typography Utilities ── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.03em; }
.mono { font-family: var(--mono); }
.italic { font-style: italic; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 70px;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; padding: 0 max(2rem, 4vw);
  transition: transform 0.4s var(--ease-fluid);
}
.nav-logo { display: flex; align-items: center; gap: 0.4rem; text-decoration: none; color: var(--text-main); font-size: 1.2rem; font-family: var(--mono); font-weight: 700; letter-spacing: -0.05em; text-transform: uppercase; }
.nav-logo em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2.5rem; list-style: none; margin-left: auto; }
.nav-link { text-decoration: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 500; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.3s; }
.nav-link:hover { color: var(--white); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 201; }
.hamburger span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: 0.3s; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 199; display: flex; align-items: center; justify-content: center;
  transform: translateX(100%); transition: transform 0.5s var(--ease-fluid);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu li { margin: 2rem 0; overflow: hidden; }
.mobile-menu a { font-size: 2.5rem; font-weight: 700; color: var(--text-main); text-decoration: none; letter-spacing: -0.03em; transition: color 0.3s; display: block; }
.mobile-menu a:hover { color: var(--accent); }

/* ── Section Shared ── */
.section-header { padding: 8rem max(2rem, 4vw) 3rem; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; }
.section-label { font-size: 0.8rem; font-family: var(--mono); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.section-label::before { content:''; display:block; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; }
.section-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -0.04em; color: var(--text-main); text-transform: uppercase; line-height: 1; }

/* ── Filter Bar ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.filter-btn {
  background: transparent; border: 1px solid var(--line); color: var(--text-muted);
  font-size: 0.75rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.6rem 1.4rem; border-radius: 100px; cursor: pointer; transition: all 0.3s var(--ease-fluid);
}
.filter-btn:hover { border-color: var(--text-muted); color: var(--white); }
.filter-btn.active { background: var(--white); color: var(--bg); border-color: var(--white); font-weight: 700; }

/* ── Works Grid (Editorial / Small Thumbnails) ── */
.works-grid { column-count: 5; column-gap: 2rem; background: transparent; padding: 0 max(2rem, 4vw) 5rem; max-width: 1400px; margin: 0 auto; border: none; display: block; }
.work-card {
  position: relative; cursor: pointer; background: transparent;
  display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;
  break-inside: avoid; margin-bottom: 4rem; width: 100%;
}
.work-card.large { }
.work-card.hidden { display: none !important; }

.card-visual { width: 100%; position: relative; overflow: hidden; border-radius: 4px; }
.card-visual img { width: 100%; height: auto !important; aspect-ratio: auto; display: block; object-fit: cover; filter: grayscale(100%) brightness(0.9); transition: filter 0.6s var(--ease-fluid), transform 0.8s var(--ease-fluid); }
.work-card:hover .card-visual img { filter: grayscale(0%) brightness(1); transform: scale(1.02); }

.card-info {
  position: relative; width: 100%; padding: 0;
  z-index: 10; transform: none; opacity: 1; text-align: left;
}

.card-cat { font-family: var(--mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 0.4rem; transition: color 0.3s; }
.work-card:hover .card-cat { color: var(--accent); }
.card-title { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--white); margin-bottom: 0.1rem; }
.card-year { font-size: 0.8rem; color: var(--text-muted); font-family: var(--sans); }

/* ── About Section (Removed Portrait for sleeker look) ── */
.about-section { padding: 6rem max(2rem, 4vw); max-width: 1000px; margin: 0 auto; }
.about-title { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.3; color: var(--white); margin-bottom: 3rem; }
.about-title em { font-family: var(--mono); font-style: italic; color: var(--accent); }
.about-text { color: var(--text-muted); font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; max-width: 800px; }

/* ── Contact Section (High Impact Red) ── */
.contact-section { padding: 8rem 2rem; text-align: center; background: var(--accent); color: var(--bg); clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%); margin-top: 5rem; }
.contact-inner { max-width: 800px; margin: 0 auto; }
.contact-title { font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; letter-spacing: -0.05em; margin-bottom: 1rem; text-transform: uppercase; line-height: 1; }
.contact-sub { font-size: 1.2rem; font-weight: 500; margin-bottom: 3rem; opacity: 0.9; }
.btn-contact { display: inline-block; font-size: 2rem; font-family: var(--mono); font-weight: 700; color: var(--bg); text-decoration: none; border-bottom: 2px solid var(--bg); padding-bottom: 0.5rem; transition: opacity 0.3s; }
.btn-contact:hover { opacity: 0.6; }

.contact-social { display: flex; align-items: center; gap: 2rem; justify-content: center; margin-top: 5rem; }
.social-link { color: var(--bg); font-family: var(--mono); text-decoration: none; font-size: 1rem; font-weight: 700; text-transform: uppercase; position: relative; }
.social-link::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0%; height: 2px; background: var(--bg); transition: width 0.3s var(--ease-fluid); }
.social-link:hover::after { width: 100%; }

/* ── Footer ── */
.footer { padding: 2rem max(2rem, 4vw); background: var(--bg); border-top: 1px solid var(--line); }
.footer-inner { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-size: 1.2rem; font-family: var(--mono); font-weight: 800; color: var(--white); text-transform: uppercase; letter-spacing: -0.05em; }
.footer-logo em { color: var(--accent); font-style: italic; }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); font-family: var(--mono); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .works-grid { column-count: 3; column-gap: 1.5rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .works-grid { column-count: 2; column-gap: 1rem; border: none; padding: 0 max(2rem, 4vw); display: block; }
  .work-card { border: none; margin-bottom: 3rem; }
  .work-card.large { }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .contact-section { clip-path: polygon(0 2%, 100% 0, 100% 100%, 0 100%); padding: 6rem 1.5rem; }
}

