/* ===== Design tokens ===== */
:root {
  --bg: #0e0e10;
  --surface: #18181b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #ff5c39;
  --border: #2a2a2e;
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR", "Space Grotesk", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo { font-family: "Space Grotesk", "Noto Sans KR", sans-serif; }

.accent { color: var(--accent); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 60px);
  background: rgba(14, 14, 16, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo { font-size: 1.25rem; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.logo .dot { color: var(--accent); }

.nav { display: flex; gap: 28px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav a:hover { color: var(--text); }

.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(70px, 14vw, 150px) clamp(20px, 5vw, 60px) clamp(50px, 8vw, 90px);
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-title { font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.hero-sub { max-width: 520px; color: var(--muted); margin: 26px 0 36px; font-size: 1.05rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 100px;
  font-weight: 500;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px var(--accent); }

/* ===== Sections ===== */
section { padding-block: clamp(40px, 7vw, 80px); }
.work, .about, .contact { max-width: var(--max); margin: 0 auto; padding-inline: clamp(20px, 5vw, 60px); }

.section-head { margin-bottom: 42px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
.section-head p { color: var(--muted); margin-top: 8px; }

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: #222; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
.card:hover .card-img img { transform: scale(1.06); }

/* 이미지가 없을 때 보이는 자리표시자 */
.card-img img.placeholder { object-fit: contain; }
.card-img img.placeholder::after {
  content: "이미지를 넣어주세요";
}
.card-img:has(img.placeholder) {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #1d1d20, #1d1d20 12px, #202024 12px, #202024 24px);
}
.card-img:has(img.placeholder)::before {
  content: "이미지 준비 중";
  color: var(--muted);
  font-size: 0.9rem;
}
.card-img img.placeholder { display: none; }

figcaption { padding: 18px 20px 22px; }
figcaption h3 { font-size: 1.1rem; font-weight: 500; }
figcaption p { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; }
.about-text p { color: var(--muted); margin-bottom: 18px; max-width: 48ch; }
.about-list { list-style: none; }
.about-list li { padding: 16px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.about-list li span { color: var(--accent); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ===== Contact ===== */
.contact { text-align: center; }
.contact .section-head { margin-bottom: 30px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.contact-links a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 100px;
  transition: border-color 0.25s, color 0.25s;
}
.contact-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Footer ===== */
.site-footer { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 40px; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 24px; right: 30px; background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 64px;
    right: 20px;
    flex-direction: column;
    gap: 14px;
    background: var(--surface);
    padding: 20px 26px;
    border: 1px solid var(--border);
    border-radius: 14px;
  }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
}
