:root {
  --bg: #0e0f11;
  --bg-alt: #141518;
  --surface: #1a1b1f;
  --surface-2: #222328;
  --line: #2b2c32;
  --text: #ecebe7;
  --muted: #9a9aa2;
  --accent: #c6f36b;
  --accent-ink: #12160a;
  --photo-bg: #444447;
  --radius: 18px;
  --wrap: 1160px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; font-size: .95rem;
  border: 1px solid var(--accent);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { padding: 8px 16px; font-size: .9rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; text-decoration: none; font-weight: 600; }
.brand__mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--font-head); font-weight: 700; font-size: .9rem;
}
.nav__links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; }

/* Hero */
.hero { padding: 64px 0 40px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto auto; width: 620px; height: 620px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 26px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); } }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); margin-bottom: 22px; }
.hl { color: var(--accent); }
.lead { font-size: 1.12rem; color: #c9c8c3; max-width: 58ch; }
.lead strong { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 28px; }
.hero__cta--center { justify-content: center; }
.featured-pill {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  text-decoration: none; color: var(--muted); font-size: .92rem;
  padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, color .2s;
}
.featured-pill:hover { border-color: var(--accent); color: var(--text); }
.featured-pill__tag { background: #95bf47; color: #0c1405; font-weight: 600; padding: 4px 12px; border-radius: 999px; }

.hero__media { position: relative; justify-self: end; width: 100%; max-width: 460px; }
.hero__media picture { display: block; border-radius: 28px; overflow: hidden; background: var(--photo-bg); box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); }
.hero__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero__badge {
  position: absolute; left: -28px; bottom: 36px;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px;
  font-size: .85rem; color: var(--muted); line-height: 1.3;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.8);
}
.hero__badge-num { font-family: var(--font-head); font-size: 2rem; color: var(--accent); font-weight: 700; }

/* Stats */
.stats { padding: 28px 0 8px; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.stat { padding: 26px 24px; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; }
.stat__label { color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* Sections */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 44px; max-width: 680px; }
.kicker { color: var(--accent); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 12px; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 14px; }

/* Featured case */
.case {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--surface);
  margin-bottom: 28px;
}
.case__body { padding: 40px; }
.case h3 { font-size: 1.8rem; margin: 16px 0 14px; }
.case__logo { height: 72px; min-width: 200px; }
.case__logo img { max-height: 30px; max-width: 170px; }
.case p { color: #c9c8c3; }
.case__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.case__visual {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px;
  background: linear-gradient(160deg, #2a2b30, #17181b);
  border-left: 1px solid var(--line); padding: 32px;
}
.swatches { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; }
.swatches span { aspect-ratio: 1; border-radius: 16px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: transform .4s ease; }
.case:hover .swatches span:nth-child(odd) { transform: translateY(-6px); }
.case:hover .swatches span:nth-child(even) { transform: translateY(6px); }
.case__visual-label { color: var(--muted); font-size: .9rem; margin: 0; }

.chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chip--accent { background: #95bf47; color: #0c1405; }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; color: #c9c8c3; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

/* Project grid */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project {
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease;
}
.project:hover { transform: translateY(-4px); border-color: #3a3b42; }
.project__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.project__logo, .case__logo {
  display: grid; place-items: center;
  height: 64px; min-width: 132px; padding: 12px 18px;
  border-radius: 14px; background: #f4f3ef;
}
.project__logo img, .case__logo img { max-height: 34px; max-width: 120px; width: auto; height: auto; object-fit: contain; }
.project__logo--dark { background: #000; box-shadow: inset 0 0 0 1px var(--line); }
.project__mono { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: #1a1b1f; letter-spacing: .02em; }
.project__badges { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.badge-plus {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: #95bf47; color: #0c1405;
}
.badge-plus::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #0c1405; opacity: .7; }
.project__num { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: var(--line); line-height: 1; transition: color .25s; }
.project:hover .project__num { color: var(--accent); }
.project__brand { margin: 0 0 6px; font-size: .85rem; font-weight: 600; color: var(--text); }
.project__brand span { font-weight: 400; color: var(--muted); }
.project h3 { font-size: 1.15rem; }
.project__text { color: #b9b8b3; font-size: .93rem; margin: 0; flex: 1; }
.project__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: 4px; }
.project__links { display: flex; flex-wrap: wrap; gap: 16px; }
.project__link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.project__link:hover { text-decoration: underline; }
.project__date { font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* Tech strip */
.marquee { overflow: hidden; padding: 26px 0 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { white-space: nowrap; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.role {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.role__meta { display: flex; flex-direction: column; gap: 4px; }
.role__date { font-family: var(--font-head); font-weight: 600; color: var(--accent); }
.role__co { color: var(--muted); font-size: .9rem; }
.role h3 { font-size: 1.3rem; margin-bottom: 10px; }
.role p { color: #c9c8c3; }
.role ul { margin: 0; padding-left: 18px; color: #b9b8b3; display: grid; gap: 6px; }
.role--small h3 { font-size: 1.05rem; }
.role--small p { margin: 0; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.skill-card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.skill-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.skill-card p { color: #b9b8b3; margin: 0; font-size: .94rem; }

/* About */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.about__media picture { display: block; border-radius: 24px; overflow: hidden; background: #e9e9ec; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__copy p { color: #c9c8c3; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.facts span { width: 110px; flex: none; color: var(--muted); font-size: .9rem; }

/* Contact */
.contact { text-align: center; }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact__avatar { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 22px; border: 3px solid var(--accent); object-fit: cover; }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.contact p { max-width: 52ch; }

.email-copy {
  display: inline-flex; align-items: center; gap: 12px; margin-top: -8px;
  background: none; border: 1px dashed var(--line); border-radius: 999px; padding: 8px 8px 8px 16px;
  color: var(--muted); font: inherit; font-size: .95rem; cursor: pointer; transition: color .2s, border-color .2s;
}
.email-copy:hover { color: var(--text); border-color: var(--muted); }
.email-copy__hint { font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--text); padding: 4px 10px; border-radius: 999px; }
.email-copy.is-copied .email-copy__hint { background: var(--accent); color: var(--accent-ink); }

.footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 16px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer__inner { align-items: center; }
.footer a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1000px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero__grid, .about, .case { grid-template-columns: 1fr; }
  .hero__media { justify-self: center; max-width: 320px; order: -1; }
  .featured-pill { border-radius: 16px; padding: 10px 14px; }
  .hero__badge { left: -10px; bottom: 20px; }
  .case__visual { border-left: 0; border-top: 1px solid var(--line); }
  .case__body { padding: 28px; }
  .role { grid-template-columns: 1fr; gap: 8px; padding: 24px; }
  .about { gap: 36px; }
  .about__media { max-width: 380px; }
  .section { padding: 72px 0; }

  .nav__toggle { display: inline-block; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 18px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li a:not(.btn) { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 14px; justify-content: center; }
}
@media (max-width: 560px) {
  .projects, .skills { grid-template-columns: 1fr; }
  .hero__media { max-width: 260px; }
  .stat { padding: 18px 16px; }
  .stat__num { font-size: 1.25rem; }
  .stat__label { font-size: .82rem; }
  .project__foot { min-height: 0; padding-top: 4px; }
  .swatches { grid-template-columns: repeat(3, 56px); }
  .footer__inner { flex-direction: column; align-items: center; }
  .brand__name { display: none; }
}
@media (max-width: 400px) {
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project { min-width: 0; padding: 22px; }
  .project__logo { min-width: 0; height: 56px; padding: 10px 14px; }
  .project__logo img { max-width: 104px; max-height: 30px; }
  .project__foot { flex-wrap: wrap; row-gap: 0; }
  .project__links { width: 100%; }
  .stat__num { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
