:root {
  --yellow: #ffd400;
  --blue: #1fa2ff;
  --pink: #ff3d7f;
  --green: #2ee59d;
  --ink: #0e0e10;
  --ink-2: #1a1a1f;
  --paper: #ffffff;
  --muted: #6b6b76;
  --radius: 18px;
  --display: "Anton", Impact, "Arial Black", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--ink); background: var(--paper); line-height: 1.55; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.highlight { color: var(--yellow); -webkit-text-stroke: 0; }
.section:not(.section-dark) .highlight { color: var(--ink); background: linear-gradient(transparent 55%, var(--yellow) 55%); padding: 0 .1em; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 800; letter-spacing: .02em;
  background: var(--yellow); color: var(--ink); padding: 14px 26px; border-radius: 999px;
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-ghost { background: var(--paper); }
.btn-small { padding: 8px 18px; box-shadow: 3px 3px 0 var(--ink); }
.section-dark .btn { border-color: var(--yellow); box-shadow: 4px 4px 0 var(--yellow); }
.section-dark .btn-ghost { background: transparent; color: var(--paper); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px); background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.logo { font-family: var(--display); font-size: 1.6rem; text-decoration: none; letter-spacing: .03em; }
.logo span { background: var(--yellow); padding: 0 6px; margin-left: 4px; border: 2px solid var(--ink); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 600; }
.nav-links a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--yellow); }
.nav-toggle { display: none; font-size: 1.6rem; background: none; border: 0; cursor: pointer; }

/* Hero */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center; gap: 48px;
  padding: 60px clamp(16px, 6vw, 96px); background: var(--ink); color: var(--paper); overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(31,162,255,.35), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255,61,127,.3), transparent 40%);
}
.hero-inner { position: relative; max-width: 760px; flex: 1 1 auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-weight: 800; color: var(--yellow); margin-bottom: 18px; font-size: .85rem; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.8rem, 7vw, 6rem); line-height: .95; text-transform: uppercase; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 640px; margin: 28px 0 36px; color: #d8d8e0; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn { border-color: var(--yellow); box-shadow: 4px 4px 0 var(--yellow); }
.hero .btn-ghost { background: transparent; color: var(--paper); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--yellow); border-block: 3px solid var(--ink); }
.stat { padding: 34px 20px; text-align: center; border-right: 3px solid var(--ink); }
.stat:last-child { border-right: 0; }
.stat .num { display: block; font-family: var(--display); font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1; }
.stat .label { font-weight: 600; font-size: .95rem; }
.stat em { color: rgba(0,0,0,.45); font-style: normal; font-size: .75rem; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) clamp(16px, 6vw, 96px); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .section-sub { color: #b9b9c4; }
.section-yellow { background: var(--yellow); border-block: 3px solid var(--ink); }
.section-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.2rem, 5.5vw, 4.2rem); line-height: 1; margin-bottom: 18px; }
.section-sub { color: var(--muted); max-width: 640px; margin-bottom: 44px; font-size: 1.1rem; }

/* Why cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 40px; }
.card { border: 3px solid var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: 6px 6px 0 var(--ink); background: var(--paper); transition: transform .2s; }
.card:hover { transform: translateY(-6px) rotate(-.5deg); }
.card-icon { font-size: 2.2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: #3c3c44; }

/* Skills */
.section-title.dark { color: var(--ink); }
.skills { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.skills span { background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 10px 20px; font-weight: 800; box-shadow: 3px 3px 0 var(--ink); }

/* Timeline */
.timeline { list-style: none; border-left: 4px solid var(--ink); margin: 40px 0 44px 8px; }
.timeline li { position: relative; padding: 0 0 36px 32px; }
.timeline li::before { content: ""; position: absolute; left: -14px; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); border: 4px solid var(--ink); }
.timeline .when { font-weight: 800; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.timeline h3 { font-size: 1.25rem; margin: 2px 0 6px; }

/* Contact */
.contact { text-align: center; }
.contact .section-sub { margin-inline: auto; }
.contact-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.footer { padding: 26px; text-align: center; background: var(--ink); color: #8a8a95; border-top: 1px solid #26262c; font-size: .9rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 18px;
    padding: 24px; background: var(--paper); border-bottom: 3px solid var(--ink); display: none;
  }
  .nav-links.open { display: flex; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 3px solid var(--ink); }
  .hero { flex-direction: column; align-items: flex-start; }
  .terminal { width: 100%; }
  .scope-grid { grid-template-columns: 1fr; }
  .auto-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Terminal / code */
.terminal, .code-card { position: relative; background: #0a0a0c; border: 3px solid var(--yellow); border-radius: 14px; box-shadow: 8px 8px 0 var(--yellow); overflow: hidden; }
.terminal { flex: 0 1 460px; min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #1c1c22; border-bottom: 1px solid #2c2c34; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; font-family: var(--mono); font-size: .78rem; color: #8a8a95; }
.term-body { font-family: var(--mono); font-size: clamp(.72rem, 1.1vw, .86rem); line-height: 1.7; color: #e6e6ee; padding: 18px 20px; overflow-x: auto; white-space: pre; }
.term-body .c { color: #7c7c8a; }
.term-body .ok { color: var(--green); }
.cursor { color: var(--yellow); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Case studies */
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.case { background: var(--ink-2); border: 2px solid #2e2e36; border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.case:hover { transform: translateY(-6px); border-color: var(--yellow); }
.case-head { padding: 26px 24px; min-height: 140px; display: flex; flex-direction: column; justify-content: flex-end; }
.case-head h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.05; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.case-type { align-self: flex-start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; background: rgba(0,0,0,.55); color: #fff; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.c1 { background: linear-gradient(135deg, #1fa2ff, #0b3d91); }
.c2 { background: linear-gradient(135deg, #ff3d7f, #ff9a3d); }
.c3 { background: linear-gradient(135deg, #7b2ff7, #1fa2ff); }
.c4 { background: linear-gradient(135deg, #2ee59d, #0b8a6a); }
.case-body { padding: 22px 24px 26px; }
.case-body p { color: #c9c9d3; margin-bottom: 10px; font-size: .97rem; }
.case-body strong { color: var(--yellow); }
.tags { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tags span { font-family: var(--mono); font-size: .75rem; padding: 4px 10px; border-radius: 999px; border: 1.5px solid #44444e; color: #e6e6ee; }

/* Scope doc */
.scope-doc { border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; background: var(--paper); }
.scope-top { padding: 24px 28px; border-bottom: 3px solid var(--ink); background: #fafaf5; }
.scope-label { font-family: var(--mono); font-size: .78rem; font-weight: 700; background: var(--yellow); border: 2px solid var(--ink); padding: 2px 8px; }
.scope-top h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-top: 12px; }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; }
.scope-grid > div { padding: 24px 28px; border-bottom: 2px dashed #d4d4da; }
.scope-grid > div:nth-child(odd) { border-right: 2px dashed #d4d4da; }
.scope-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.scope-grid ul { list-style: none; display: grid; gap: 7px; }
.scope-grid li { padding-left: 18px; position: relative; color: #2c2c33; }
.scope-grid li::before { content: "▸"; position: absolute; left: 0; color: var(--ink); }
.scope-grid b { font-family: var(--mono); }
.scope-foot { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 18px 28px; background: var(--yellow); border-top: 3px solid var(--ink); font-size: .95rem; }

/* Automation */
.auto-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; }
.auto-list { list-style: none; display: grid; gap: 18px; }
.auto-list li { border-left: 4px solid var(--yellow); padding: 6px 0 6px 20px; }
.auto-list h3 { font-size: 1.15rem; }
.auto-list p { color: #c9c9d3; margin: 4px 0 6px; }
.auto-list a { color: var(--yellow); font-weight: 700; text-decoration: none; }
.auto-list a:hover { text-decoration: underline; }

/* Stack */
.stack-note { font-weight: 600; color: rgba(0,0,0,.55); margin-bottom: 8px; }
.stack-groups { display: grid; gap: 28px; margin-top: 20px; }
.stack-group h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; }
.stack-group .skills { margin-top: 10px; }

/* Certs */
.certs { display: flex; flex-wrap: wrap; gap: 12px; }
.cert { font-weight: 800; border: 3px solid var(--ink); border-radius: 10px; padding: 10px 16px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.case-link { margin: 14px 0 0 !important; }
.case-link a { color: var(--yellow); font-weight: 700; text-decoration: none; }
.case-link a:hover { text-decoration: underline; }
