/* withai portfolio — dark premium */

:root {
  --bg: #0a0c11;
  --bg-soft: #0e1118;
  --surface: rgba(255, 255, 255, 0.032);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9ecf3;
  --text-dim: #a3abbb;
  --text-faint: #6f7789;
  --blue: #63a8f0;
  --blue-soft: rgba(99, 168, 240, 0.14);
  --gold: #dcb474;
  --gold-soft: rgba(220, 180, 116, 0.14);
  --green: #6ed0a4;
  --radius: 18px;
  --maxw: 1140px;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: -0.011em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

/* ambient light */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 460px at 14% -6%, rgba(99, 168, 240, 0.16), transparent 68%),
    radial-gradient(680px 420px at 88% 6%, rgba(220, 180, 116, 0.11), transparent 66%),
    radial-gradient(900px 620px at 50% 108%, rgba(120, 100, 200, 0.10), transparent 70%);
}

main, .topbar, .footer { position: relative; z-index: 1; }

/* ── top bar ─────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 5vw, 56px);
  background: rgba(10, 12, 17, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5.5px;
  border-radius: 50%;
  background: var(--blue);
}

.brand-dim { color: var(--text-faint); font-weight: 500; }

.topnav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-size: 14px;
  color: var(--text-dim);
}

.topnav a { transition: color 0.18s ease; }
.topnav a:hover { color: var(--text); }

/* ── hero ────────────────────────────────────────── */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 132px) clamp(20px, 5vw, 56px) clamp(48px, 7vw, 84px);
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.eyebrow-blue { color: var(--blue); }
.eyebrow-gold { color: var(--gold); }

.hero h1 {
  margin: 0 0 26px;
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #7cb8f5 6%, #c9c6dc 46%, #e6c489 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--text-dim);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
  margin: 42px 0 36px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat { display: flex; align-items: baseline; gap: 10px; }

.stat b {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat span { font-size: 13.5px; color: var(--text-faint); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(100deg, rgba(99, 168, 240, 0.22), rgba(220, 180, 116, 0.2));
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── sections ────────────────────────────────────── */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 92px) clamp(20px, 5vw, 56px);
}

.section-head { max-width: 68ch; margin-bottom: clamp(32px, 4vw, 48px); }

.section-head h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-lede { margin: 0; color: var(--text-dim); font-size: 16px; }

.section-lede b, .card p b, .feats b { color: var(--text); font-weight: 700; }

/* ── cards ───────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014));
  overflow: hidden;
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 50px -28px rgba(0, 0, 0, 0.9);
}

.card-blue:hover { border-color: rgba(99, 168, 240, 0.42); }
.card-gold:hover { border-color: rgba(220, 180, 116, 0.42); }

.shot {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #05070b;
  border-bottom: 1px solid var(--line);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.card:hover .shot img { transform: scale(1.028); }

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 12, 17, 0.55));
  pointer-events: none;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.6vw, 28px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-body h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 21px);
  letter-spacing: -0.025em;
  font-weight: 700;
  line-height: 1.35;
}

.card-body h3 .sub { color: var(--text-faint); font-weight: 500; font-size: 0.78em; }

.badge {
  flex: none;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0;
  white-space: nowrap;
}

.badge-live {
  color: var(--green);
  border-color: rgba(110, 208, 164, 0.32);
  background: rgba(110, 208, 164, 0.1);
}

.domain {
  align-self: flex-start;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.01em;
  color: var(--text-faint);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.card-blue .domain:hover { color: var(--blue); border-bottom-color: rgba(99, 168, 240, 0.5); }
.card-gold .domain:hover { color: var(--gold); border-bottom-color: rgba(220, 180, 116, 0.5); }

.card-body p { margin: 0; font-size: 15px; color: var(--text-dim); }

.feats {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: var(--text-dim);
}

.feats li { position: relative; padding-left: 18px; line-height: 1.6; }

.feats li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.card-blue .feats li::before { background: var(--blue); opacity: 0.85; }
.card-gold .feats li::before { background: var(--gold); opacity: 0.85; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 6px;
}

.tags span {
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}

.card-blue .tags span { background: var(--blue-soft); border-color: rgba(99, 168, 240, 0.2); }
.card-gold .tags span { background: var(--gold-soft); border-color: rgba(220, 180, 116, 0.2); }

/* wide card — image beside body */
.card-wide { grid-column: 1 / -1; }

@media (min-width: 861px) {
  .card-wide { flex-direction: row; }
  .card-wide .shot { flex: 1 1 56%; aspect-ratio: auto; border-bottom: none; border-right: 1px solid var(--line); }
  .card-wide .card-body { flex: 1 1 44%; justify-content: center; }
}

/* ── footer ──────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 60px) clamp(20px, 5vw, 56px);
  display: grid;
  gap: 12px;
}

.footer-brand { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.footer-note { margin: 0; font-size: 14px; color: var(--text-faint); max-width: 60ch; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.footer-links a {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-faint);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-links a:hover { color: var(--text); border-color: var(--line-strong); }

/* ── reveal ──────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.in { opacity: 1; transform: none; }

/* ── responsive ──────────────────────────────────── */

@media (max-width: 860px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .topnav { font-size: 13px; }
  .stats { gap: 20px 28px; }
}

@media (max-width: 560px) {
  .stat b { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
  .card:hover .shot img { transform: none; }
}
