:root{
  --ink: #0B1120;
  --panel: #131B2E;
  --panel-2: #182338;
  --line: #223049;
  --teal: #2DD4BF;
  --teal-dim: rgba(45,212,191,0.14);
  --amber: #F5A623;
  --text: #E6EDF7;
  --muted: #8B96AC;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }
body{
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a{ color: inherit; text-decoration: none; }
::selection{ background: var(--teal-dim); color: var(--teal); }

.wrap{ max-width: 1080px; margin: 0 auto; padding: 0 32px; }
section{ padding: 100px 0; border-bottom: 1px solid var(--line); }
section:last-of-type{ border-bottom: none; }

/* ---------- Sticky Nav ---------- */
header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,17,32,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
header.scrolled{ box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
nav.wrap{
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.logo{
  font-family: var(--mono); font-size: 17px; font-weight: 500;
  letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px;
}
.logo .dot{
  width: 9px; height: 9px; border-radius: 0;
  background: var(--teal); transform: rotate(45deg);
  animation: blip 2.4s ease-in-out infinite;
}
@keyframes blip{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0.4; }
}
.navlinks{ display: flex; align-items: center; gap: 36px; }
.navlinks a{
  font-size: 14px; color: var(--muted); font-weight: 500;
  position: relative; padding: 4px 0;
  transition: color .2s ease;
}
.navlinks a:hover, .navlinks a:focus-visible{ color: var(--text); }
.navlinks a.active{ color: var(--teal); }
.navlinks a::after{
  content: ''; position: absolute; left:0; bottom:-4px;
  width: 0; height: 1px; background: var(--teal);
  transition: width .25s ease;
}
.navlinks a:hover::after{ width: 100%; }
.navlinks a.active::after{ width: 100%; }
.nav-status{
  font-family: var(--mono); font-size: 12px; color: var(--teal);
  background: var(--teal-dim); border: 2px solid rgba(45,212,191,0.5);
  padding: 6px 12px; border-radius: 0; white-space: nowrap;
}
.nav-toggle{
  display: none; background: none; border: 2px solid var(--line);
  color: var(--text); width: 40px; height: 40px; align-items: center;
  justify-content: center; cursor: pointer;
}
.nav-toggle svg{ width: 18px; height: 18px; }
@media (max-width: 860px){
  .navlinks{
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--ink); border-bottom: 2px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .navlinks.open{ max-height: 320px; }
  .navlinks a{ width: 100%; padding: 16px 32px; border-top: 1px solid var(--line); }
  .navlinks a::after{ display: none; }
  .nav-toggle{ display: flex; }
  .nav-status{ display: none; }
}

/* ---------- Page header (non-home pages) ---------- */
.page-hero{ padding: 70px 0 60px; }
.page-hero h1{
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.02em;
}
.page-hero p{ margin-top: 16px; color: var(--muted); font-size: 17px; max-width: 560px; }

/* ---------- Hero (home) ---------- */
.hero{ padding-top: 100px; padding-bottom: 90px; }
.badge{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--teal);
  border: 2px solid var(--teal);
  padding: 6px 14px; border-radius: 0;
  margin-bottom: 28px;
  opacity: 0; animation: stamp-in .4s ease forwards .15s;
}
@keyframes stamp-in{
  from{ opacity: 0; transform: scale(1.1); }
  to{ opacity: 1; transform: scale(1); }
}
h1{
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05; letter-spacing: -0.02em;
  max-width: 780px;
}
h1 .accent{ color: var(--teal); }
.hero p.lede{
  margin-top: 24px; font-size: 18px; color: var(--muted);
  max-width: 560px;
}
.hero-actions{ display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.btn{
  font-family: var(--body); font-weight: 600; font-size: 14px;
  padding: 13px 24px; border-radius: 0; display: inline-flex;
  align-items: center; gap: 8px; transition: transform .12s ease, box-shadow .12s ease;
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary{ background: var(--teal); color: #04211d; }
.btn-primary:hover{ transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--amber); }
.btn-ghost{ border: 2px solid var(--line); color: var(--text); }
.btn-ghost:hover{ transform: translate(-2px,-2px); border-color: var(--teal); box-shadow: 4px 4px 0 var(--teal); }

.section-label{
  font-family: var(--mono); font-size: 12px; color: var(--teal);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before{ content: '//'; color: var(--muted); }
h2{ font-family: var(--display); font-size: clamp(28px, 3.4vw, 38px); font-weight: 600; margin-bottom: 20px; }

/* ---------- About ---------- */
.about-grid{ display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: start; }
.about-grid p{ color: var(--muted); font-size: 16px; margin-bottom: 16px; max-width: 560px; }
.stat-list{ display: flex; flex-direction: column; gap: 22px; }
.stat{ border-left: 3px solid var(--teal); padding-left: 16px; }
.stat .num{ font-family: var(--display); font-size: 28px; font-weight: 700; }
.stat .label{ font-size: 13px; color: var(--muted); }
@media (max-width: 780px){ .about-grid{ grid-template-columns: 1fr; } }

/* ---------- Stack / Services ---------- */
.stack-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.skill-card{
  background: var(--panel); border: 2px solid var(--line); border-radius: 0;
  padding: 18px 18px; display: flex; align-items: center; justify-content: space-between;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative;
}
.skill-card:hover{ border-color: var(--teal); transform: translate(-3px,-3px); box-shadow: 5px 5px 0 var(--teal-dim); }
.skill-name{ font-weight: 600; font-size: 15px; }
.skill-sub{ font-size: 12px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.verified-check{
  width: 22px; height: 22px; border-radius: 0; background: var(--teal-dim);
  border: 1px solid rgba(45,212,191,0.4);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: 12px;
}
.verified-check svg{ width: 12px; height: 12px; }

.service-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; margin-top: 20px; }
.service-card{
  background: var(--panel); border: 2px solid var(--line);
  padding: 28px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.service-card:hover{ border-color: var(--teal); transform: translate(-3px,-3px); box-shadow: 5px 5px 0 var(--teal-dim); }
.service-card .num{ font-family: var(--mono); color: var(--teal); font-size: 13px; margin-bottom: 12px; display: block; }
.service-card h3{ font-family: var(--display); font-size: 19px; margin-bottom: 10px; }
.service-card p{ color: var(--muted); font-size: 14px; }

/* ---------- Timeline (Client work) ---------- */
.timeline{ display: flex; flex-direction: column; }
.tl-item{
  display: grid; grid-template-columns: 90px 1fr; gap: 28px;
  padding: 28px 0; border-top: 2px solid var(--line);
  position: relative;
}
.tl-item:first-child{ border-top: none; }
.tl-index{ font-family: var(--mono); color: var(--teal); font-size: 13px; padding-top: 4px; }
.tl-role{ font-family: var(--display); font-weight: 600; font-size: 19px; }
.tl-meta{ font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.tl-desc{ color: var(--muted); font-size: 15px; max-width: 600px; }

/* ---------- Projects ---------- */
.project-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; }
.project-card{
  background: var(--panel); border: 2px solid var(--line); border-radius: 0;
  padding: 26px; display: flex; flex-direction: column; height: 100%;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.project-card:hover{ transform: translate(-3px,-3px); border-color: var(--teal); box-shadow: 5px 5px 0 var(--teal-dim); }
.project-tag{
  font-family: var(--mono); font-size: 11px; color: var(--amber);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.project-card h3{ font-family: var(--display); font-size: 19px; margin-bottom: 10px; }
.project-card p{ color: var(--muted); font-size: 14px; flex-grow: 1; }
.project-link{ margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--teal); }
.project-link::after{ content: ' →'; }

/* ---------- Contact ---------- */
.contact-box{
  background: var(--panel); border: 2px solid var(--line); border-radius: 0;
  padding: 56px; text-align: center; position: relative;
}
.contact-box::before, .contact-box::after{
  content: ''; position: absolute; width: 22px; height: 22px;
  border-color: var(--teal); border-style: solid;
}
.contact-box::before{ top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.contact-box::after{ bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }
.contact-box h2{ margin-bottom: 14px; }
.contact-box p{ color: var(--muted); max-width: 480px; margin: 0 auto 30px; }
.contact-actions{ display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.contact-form{ max-width: 560px; margin: 0 auto; text-align: left; }
.form-row{ margin-bottom: 20px; }
.form-row label{ display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.form-row input, .form-row textarea{
  width: 100%; background: var(--panel-2); border: 2px solid var(--line);
  color: var(--text); padding: 12px 14px; font-family: var(--body); font-size: 14px;
  border-radius: 0; transition: border-color .15s ease;
}
.form-row input:focus, .form-row textarea:focus{ outline: none; border-color: var(--teal); }
.form-row textarea{ resize: vertical; min-height: 120px; }

footer{ padding: 40px 0; text-align: center; }
footer p{ font-family: var(--mono); font-size: 12px; color: var(--muted); }

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
