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

/* ── TOKENS ─────────────────────────────────────────── */
:root, [data-theme="light"] {
  --bg:      #F0EDE8;
  --bg-alt:  #E4E0D8;
  --fg:      #111111;
  --gray:    #777777;
  --coral:   #E83D2A;
  --border:  rgba(0,0,0,0.10);
  --card-bg: #E0DDD6;
  --grain-opacity: 0.025;
}
[data-theme="dark"] {
  --bg:      #0A0A0A;
  --bg-alt:  #1A1A1A;
  --fg:      #F5F5F5;
  --gray:    #888888;
  --coral:   #FF4D3A;
  --border:  rgba(255,255,255,0.08);
  --card-bg: #1A1A1A;
  --grain-opacity: 0.035;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.5s cubic-bezier(0.16,1,0.3,1), color 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* ── GRAIN ──────────────────────────────────────────── */
#grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: var(--grain-opacity);
  transition: opacity 0.5s;
}

/* ── CURSOR ─────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--coral);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%,-50%);
  transition: width 0.25s, height 0.25s, background 0.25s;
}
#cursor-ring {
  position: fixed;
  width: 40px; height: 40px;
  border: 1px solid rgba(232,61,42,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%,-50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}
[data-theme="dark"] #cursor-ring { border-color: rgba(255,77,58,0.5); }
body:has(a:hover) #cursor,
body:has(button:hover) #cursor { width: 6px; height: 6px; }
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring { width: 64px; height: 64px; opacity: 0.4; }
body:has(.behance-card:hover) #cursor { background: var(--fg); width: 60px; height: 60px; mix-blend-mode: difference; }
body:has(.behance-card:hover) #cursor-ring { opacity: 0; }

/* ── NAV ────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  background: var(--bg);
  transition: background 0.5s;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 18px;
  color: var(--fg); letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.5s;
}
.nav-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* ── THEME & LANG TOGGLES ───────────────────────────── */
#theme-toggle, #lang-toggle {
  display: flex; align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden; padding: 0;
  transition: border-color 0.5s;
}
.theme-btn, .lang-btn {
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--fg); opacity: 0.35;
  cursor: none;
  transition: background 0.3s, opacity 0.3s, color 0.5s;
}
.lang-btn {
  font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 11px;
}
.theme-btn { width: 32px; height: 26px; }
.theme-btn svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.theme-btn.active, .lang-btn.active {
  background: var(--fg); color: var(--bg);
  opacity: 1; border-radius: 100px;
}

/* ── HERO ───────────────────────────────────────────── */
#hero {
  position: relative; height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 48px 64px; overflow: hidden;
}
.hero-eyebrow {
  font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--coral);
  margin-bottom: 20px; opacity: 0;
  transition: color 0.5s;
}
.hero-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(42px, 6.5vw, 96px);
  line-height: 0.92; letter-spacing: -0.04em;
  color: var(--fg); margin-bottom: 40px; overflow: hidden;
  transition: color 0.5s;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: block; transform: translateY(110%); }
.hero-title em { font-style: italic; font-weight: 400; color: var(--gray); }
.hero-meta {
  display: flex; justify-content: space-between; align-items: flex-end;
  opacity: 0;
}
.hero-desc { font-size: 15px; color: var(--gray); max-width: 340px; line-height: 1.7; transition: color 0.5s; }
.hero-scroll {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray); display: flex; align-items: center; gap: 12px;
  transition: color 0.5s;
}
.hero-scroll::before { content: ''; display: block; width: 40px; height: 1px; background: var(--coral); }
.hero-line-h {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: var(--border);
  transform: scaleX(0); transform-origin: left;
  transition: background 0.5s;
}

/* ── MARQUEE ────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 18px 0; background: var(--bg-alt);
  transition: background 0.5s, border-color 0.5s;
}
.marquee-track { display: flex; white-space: nowrap; will-change: transform; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 24px;
  padding: 0 32px; font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray); flex-shrink: 0;
  transition: color 0.5s;
}
.marquee-item .dot { width: 5px; height: 5px; background: var(--coral); border-radius: 50%; flex-shrink: 0; transition: background 0.5s; }

/* ── SECTIONS ───────────────────────────────────────── */
section { padding: 120px 48px; }
.section-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 64px;
  display: flex; align-items: center; gap: 16px;
  transition: color 0.5s;
}
.section-label::after { content: ''; flex: 1; max-width: 60px; height: 1px; background: var(--coral); opacity: 0.4; }
.reveal { opacity: 0; transform: translateY(40px); }

/* ── WORK ───────────────────────────────────────────── */
#work { border-top: 1px solid var(--border); transition: border-color 0.5s; }
.work-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }
.work-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(40px, 5vw, 72px); letter-spacing: -0.03em; line-height: 1;
  color: var(--fg); transition: color 0.5s;
}

/* ── BEHANCE CARD ───────────────────────────────────── */
.behance-card {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: 480px; cursor: none; text-decoration: none;
  background: var(--card-bg); transition: background 0.5s;
}
.behance-card-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=1600&q=80&auto=format');
  background-size: cover; background-position: center;
  filter: saturate(0.55) brightness(0.88);
  transition: transform 0.9s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.5s;
}
[data-theme="light"] .behance-card-bg { filter: saturate(0.65) brightness(0.82); }
.behance-card:hover .behance-card-bg { transform: scale(1.04); }
.behance-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,5,5,0.88) 0%, rgba(5,5,5,0.1) 55%, transparent 100%);
}
.behance-card-body {
  position: relative; z-index: 1; width: 100%;
  padding: 48px; display: flex;
  justify-content: space-between; align-items: flex-end; gap: 32px;
}
.behance-card-tag { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(245,245,245,0.7); margin-bottom: 14px; }
.behance-card-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.03em;
  line-height: 0.95; color: #F5F5F5; margin-bottom: 16px;
}
.behance-card-sub { font-size: 14px; color: rgba(245,245,245,0.55); max-width: 400px; line-height: 1.7; }
.behance-card-cta {
  flex-shrink: 0; display: flex; align-items: center; gap: 14px;
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #F5F5F5; white-space: nowrap;
  border-bottom: 1px solid var(--coral); padding-bottom: 4px;
  transition: gap 0.3s, color 0.2s;
}
.behance-card:hover .behance-card-cta { gap: 22px; color: var(--coral); }
.behance-card-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; flex-shrink: 0; }

/* ── ABOUT ──────────────────────────────────────────── */
#about {
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
  transition: border-color 0.5s;
}
.about-big {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(36px, 4.5vw, 64px); letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 32px; color: var(--fg); transition: color 0.5s;
}
.about-big em { font-style: italic; font-weight: 400; color: var(--gray); }
.about-body { font-size: 16px; color: var(--gray); line-height: 1.8; max-width: 420px; margin-bottom: 48px; transition: color 0.5s; }
.about-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); text-decoration: none;
  border-bottom: 1px solid var(--coral); padding-bottom: 4px;
  transition: color 0.2s, gap 0.2s;
}
.about-cta:hover { color: var(--coral); gap: 20px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 48px; }
.stat-cell { background: var(--card-bg); padding: 32px; transition: background 0.5s; }
.stat-num {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 52px; letter-spacing: -0.04em; color: var(--fg);
  line-height: 1; margin-bottom: 8px; transition: color 0.5s;
}
.stat-num span { color: var(--coral); }
.stat-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); transition: color 0.5s; }
.skill-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--fg);
  transition: color 0.5s, border-color 0.5s;
}
.skill-row:first-child { border-top: 1px solid var(--border); }
.skill-name { letter-spacing: 0.02em; }
.skill-bar-wrap { width: 120px; height: 2px; background: var(--border); position: relative; overflow: hidden; transition: background 0.5s; }
.skill-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: background 0.5s; }

/* ── PROCESS ────────────────────────────────────────── */
#process { border-top: 1px solid var(--border); background: var(--bg-alt); transition: background 0.5s, border-color 0.5s; }
.process-header { margin-bottom: 80px; }
.process-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(36px, 4vw, 60px); letter-spacing: -0.03em; line-height: 1.05;
  color: var(--fg); transition: color 0.5s;
}
.process-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; }
.process-card {
  background: var(--bg); padding: 40px 32px;
  position: relative; overflow: hidden;
  transition: background 0.5s;
}
.process-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--coral);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), background 0.5s;
}
.process-card:hover::after { transform: scaleX(1); }
.process-num { font-family: 'Syne', sans-serif; font-size: 11px; letter-spacing: 0.14em; color: var(--coral); margin-bottom: 48px; transition: color 0.5s; }
.process-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin-bottom: 16px; color: var(--fg); transition: color 0.5s; }
.process-desc { font-size: 14px; color: var(--gray); line-height: 1.7; transition: color 0.5s; }

/* ── FOOTER ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 64px 48px;
  display: flex; justify-content: space-between; align-items: center;
  transition: border-color 0.5s;
}
.footer-name { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -0.03em; margin-bottom: 8px; color: var(--fg); transition: color 0.5s; }
.footer-tagline { font-size: 13px; color: var(--gray); transition: color 0.5s; }
.footer-links { display: flex; gap: 32px; }
.footer-links a { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--coral); }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  .nav-controls { gap: 8px; }
  #hero { padding: 0 24px 48px; }
  section { padding: 80px 24px; }
  #about { grid-template-columns: 1fr; gap: 48px; }
  .about-body { max-width: 100%; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .behance-card { min-height: 380px; }
  .behance-card-body { flex-direction: column; align-items: flex-start; padding: 32px 24px; gap: 24px; }
  footer { padding: 48px 24px; flex-direction: column; gap: 32px; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 20px; }
}
@media (max-width: 700px) {
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-scroll { display: none; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .stat-cell { padding: 24px 20px; }
  .stat-num { font-size: 40px; }
  .skill-bar-wrap { width: 80px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-card { padding: 32px 24px; }
  .process-num { margin-bottom: 32px; }
}
@media (max-width: 480px) {
  nav { padding: 16px 20px; }
  .nav-logo { font-size: 16px; }
  .lang-btn { padding: 5px 8px; font-size: 10px; }
  .theme-btn { width: 28px; height: 24px; }
  .theme-btn svg { width: 11px; height: 11px; }
  #hero { padding: 0 20px 40px; }
  section { padding: 64px 20px; }
  .section-label { margin-bottom: 40px; }
  .work-header { margin-bottom: 24px; }
  .behance-card { min-height: 280px; }
  .behance-card-body { padding: 24px 20px; gap: 20px; }
  .behance-card-title { font-size: 28px; }
  .about-big { font-size: clamp(28px, 7vw, 40px); }
  .about-body { font-size: 15px; margin-bottom: 32px; }
  .about-stats { gap: 2px; margin-bottom: 32px; }
  .stat-cell { padding: 20px 16px; }
  .stat-num { font-size: 36px; }
  .stat-label { font-size: 10px; }
  .skill-bar-wrap { width: 64px; }
  .process-title { font-size: clamp(28px, 6vw, 40px); }
  .process-header { margin-bottom: 48px; }
  footer { padding: 40px 20px; gap: 28px; }
  .footer-name { font-size: 22px; }
  .footer-links { gap: 16px; }
  .footer-links a { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
