:root {
  --bg: #050505;
  --bg-2: #0d0d0d;
  --text: #ededea;
  --soft: #b4b4ae;
  --muted: #74746f;
  --line: #1e1e1e;
  --accent: #ff5b2e;
  --sans: "Hanken Grotesk", system-ui, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--accent); color: var(--bg); }

/* film grain */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  background: rgba(5, 5, 5, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -0.04em; }
.logo span { color: var(--accent); }
.nav nav { display: flex; gap: 32px; font-size: 15px; color: var(--soft); }
.nav nav a { position: relative; transition: color .2s; }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav nav a:hover { color: var(--text); }
.nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang, .nav-cv {
  font: 500 13px var(--sans); color: var(--soft); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; transition: .2s;
}
.lang:hover, .nav-cv:hover { color: var(--text); border-color: var(--soft); }
.nav-cv { color: var(--text); }

/* HERO */
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 64px; max-width: var(--max); margin: 0 auto;
}
.glow {
  position: fixed; left: 0; top: 0; width: 640px; height: 640px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255, 91, 46, .16), transparent 62%);
  transform: translate(calc(var(--mx, 70vw) - 50%), calc(var(--my, 30vh) - 50%));
  transition: transform .9s var(--ease);
}
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--soft); letter-spacing: .02em; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.name {
  margin-top: 22px;
  font-size: clamp(56px, 12.5vw, 184px); font-weight: 800; line-height: .92; letter-spacing: -0.05em;
}
.name .line { display: block; overflow: hidden; padding-top: .08em; margin-top: -.08em; }
.name i { font-style: normal; color: var(--accent); }
.sub { margin-top: 28px; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.3; color: var(--soft); max-width: 760px; }
.sub em { color: var(--text); font-size: 1.1em; }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 56px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: var(--bg-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.5); animation: ping 2.2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  font-size: 15px; font-weight: 600; padding: 12px 22px; border-radius: 999px;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
  transition: background .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--text); border-color: #333; }
.btn.ghost:hover { border-color: var(--text); color: var(--text); }

/* load animations (pure CSS, never block the page) */
.load-up { display: inline-block; animation: up 1.1s var(--ease) both; }
.load { animation: fade 1s var(--ease) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .35s; } .d3 { animation-delay: .5s; }
@keyframes up { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* SECTIONS */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(88px, 12vw, 150px) var(--pad) 0; }
.head {
  display: grid; grid-template-columns: 64px 1fr minmax(0, 400px); gap: 24px; align-items: baseline;
  border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: clamp(40px, 6vw, 72px);
}
.num { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.head h2 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; }
.note { font-size: 14px; color: var(--muted); line-height: 1.55; }
.meta { font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* featured project */
.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(160deg, #111 0%, #080808 60%);
}
.feature h3 { font-size: clamp(30px, 3.8vw, 52px); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; margin: 12px 0 18px; }
.feature-text > p:last-child { color: var(--soft); }
.watch { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 3vw, 36px); }
.watch-label { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.watch-num {
  display: block; margin: 14px 0 24px;
  font-size: clamp(52px, 6.5vw, 92px); font-weight: 300; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums; transition: color .4s;
}
.watch-num.done { color: var(--accent); }
.watch-bar { height: 3px; background: #1a1a1a; border-radius: 3px; overflow: hidden; }
.watch-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffb08f); transform-origin: left; }
.watch-scale { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.card {
  position: relative; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: var(--bg-2);
  overflow: hidden; transition: border-color .3s, transform .4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(400px circle at var(--cx, 50%) var(--cy, 0%), rgba(255, 91, 46, .12), transparent 60%);
}
.card:hover { border-color: #333; transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card-num { font-size: 13px; color: var(--accent); }
.card h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin: 10px 0 12px; }
.card p { color: var(--soft); }
.card .meta { margin-top: 20px; color: var(--muted); }

/* about */
.statement { font-size: clamp(28px, 4vw, 54px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; max-width: 1080px; }
.statement .w { color: #2c2c2a; transition: color .35s; }
.statement .w.on { color: var(--text); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: clamp(40px, 5vw, 64px); max-width: 920px; margin-left: auto; }
.two p { color: var(--soft); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--bg-2); transition: border-color .3s; }
.skill:hover { border-color: #333; }
.skill h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.skill ul { list-style: none; }
.skill h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.skill li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.skill li:last-child { border-bottom: none; }
.langs li { display: flex; justify-content: space-between; }
.langs b { font-weight: 400; color: var(--muted); }

/* rows */
.row {
  display: grid; grid-template-columns: 180px 1fr auto; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease), background .3s;
}
.row:first-child { border-top: 1px solid var(--line); }
.row:hover { padding-left: 14px; }
.when { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row h3 { font-size: clamp(19px, 2vw, 24px); font-weight: 600; letter-spacing: -0.02em; }
.row p { color: var(--soft); font-size: 15px; }
.kind { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* beyond */
.big { font-size: clamp(44px, 8vw, 120px); font-weight: 800; line-height: .95; letter-spacing: -0.05em; }
.big em { color: var(--accent); letter-spacing: -0.02em; }

/* contact */
.contact { padding-bottom: clamp(88px, 12vw, 140px); }
.contact-big { font-size: clamp(64px, 14vw, 220px); font-weight: 800; line-height: .9; letter-spacing: -0.055em; margin-top: 20px; }
.contact-big em { color: var(--accent); letter-spacing: -0.03em; }
.mail {
  display: inline-flex; gap: 12px; margin-top: clamp(28px, 4vw, 48px);
  font-size: clamp(22px, 3vw, 40px); font-weight: 500; letter-spacing: -0.02em;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat;
  padding-bottom: 4px; transition: background-size .6s var(--ease);
}
.mail:hover { background-size: 100% 2px; }
.mail span { display: inline-block; transition: transform .45s var(--ease), color .3s; }
.mail:hover span { transform: translate(4px, -4px); color: var(--accent); }
.links { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 36px; color: var(--soft); }
.links a { border-bottom: 1px solid #333; padding-bottom: 2px; transition: color .2s, border-color .2s; }
.links a:hover { color: var(--accent); border-color: var(--accent); }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) 40px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.foot a:hover { color: var(--accent); }

/* scroll reveal: only hidden when JS is running */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* freelance */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.price { font-size: clamp(64px, 10vw, 140px); font-weight: 300; letter-spacing: -0.05em; line-height: 1; }
.price small { display: block; font-size: 14px; letter-spacing: 0; color: var(--muted); margin-bottom: 10px; }

/* responsive */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .head { grid-template-columns: 40px 1fr; }
  .note { grid-column: 1 / -1; }
  .feature, .cards, .two { grid-template-columns: 1fr; }
  .skills, .steps { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 1fr auto; }
  .row .when { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .skills, .steps { grid-template-columns: 1fr; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
  .glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
