/* =========================================================
   Ashutosh Singh — techy / terminal portfolio theme
   ========================================================= */
:root {
  --bg: #05070b;
  --bg-2: #0a0f17;
  --panel: rgba(12, 18, 28, 0.72);
  --panel-solid: #0b111a;
  --line: rgba(34, 211, 238, 0.14);
  --line-strong: rgba(34, 211, 238, 0.35);
  --text: #c5d0de;
  --muted: #6b7b91;
  --heading: #eaf2fb;
  --cyan: #22d3ee;
  --green: #4ade80;
  --pink: #f472b6;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 10px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --statusbar: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 20% -10%, rgba(34, 211, 238, 0.10), transparent 50%),
    radial-gradient(ellipse at 110% 40%, rgba(244, 114, 182, 0.06), transparent 45%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  padding-bottom: var(--statusbar);
  overflow-x: hidden;
}
body.booting { overflow: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
b { color: var(--heading); font-weight: 600; }
::selection { background: var(--cyan); color: var(--bg); }

.mono { font-family: var(--mono); }
.c-cyan { color: var(--cyan); }
.c-green { color: var(--green); }
.c-muted { color: var(--muted); }
.c-pink { color: var(--pink); }
.c-amber { color: var(--amber); }
.c-red { color: var(--red); }

.container { width: min(1160px, 90%); margin: 0 auto; }
.narrow { width: min(720px, 90%); text-align: center; }

/* ---------- Background layers ---------- */
#net { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.scanlines {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.spotlight {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 30%), rgba(34, 211, 238, 0.07), transparent 60%);
}

/* ---------- Boot screen ---------- */
#boot {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  padding: 2rem; display: flex; flex-direction: column; justify-content: flex-end;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#boot.done { opacity: 0; visibility: hidden; }
#boot-log { font-size: 0.82rem; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
#boot-log .ok { color: var(--green); }
#boot-log .info { color: var(--cyan); }
.boot-skip { position: absolute; top: 1.2rem; right: 1.5rem; font-size: 0.75rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.8rem 1.4rem; border-radius: 6px;
  background: var(--cyan); color: var(--bg); font-family: var(--mono); font-weight: 700;
  border: 1px solid var(--cyan); cursor: pointer; font-size: 0.88rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 24px rgba(34, 211, 238, 0.45); }
.btn-ghost { background: transparent; color: var(--cyan); }
.btn-ghost:hover { background: rgba(34, 211, 238, 0.08); }
.btn-small { padding: 0.4rem 0.85rem; font-size: 0.78rem; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: relative; transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.panel:hover { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(34,211,238,.08), 0 20px 40px -25px rgba(34,211,238,.35); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(5, 7, 11, 0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo { font-size: 0.95rem; font-weight: 700; white-space: nowrap; }
.blink { color: var(--cyan); animation: blink 1s step-end infinite; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; font-size: 0.84rem; }
.nav-links a:not(.btn) { color: var(--text); transition: color 0.2s, text-shadow 0.2s; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--cyan); text-shadow: 0 0 12px rgba(34,211,238,.6); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--cyan); transition: 0.3s; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; padding-top: 80px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.75rem; color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.06);
  padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1.6rem;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(74,222,128,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.hero-pre { font-size: 0.9rem; margin-bottom: 0.4rem; }

.glitch {
  position: relative; font-size: clamp(2.5rem, 6.2vw, 4.6rem); font-weight: 800; line-height: 1.05;
  color: var(--heading); letter-spacing: -0.04em;
  text-shadow: 0 0 30px rgba(34, 211, 238, 0.25);
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: var(--cyan); animation: glitch-a 4s infinite steps(1); clip-path: inset(0 0 100% 0); }
.glitch::after { color: var(--pink); animation: glitch-b 4s infinite steps(1); clip-path: inset(100% 0 0 0); }
@keyframes glitch-a {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  87% { clip-path: inset(10% 0 60% 0); transform: translate(-4px, -1px); }
  89% { clip-path: inset(55% 0 20% 0); transform: translate(3px, 1px); }
  91% { clip-path: inset(30% 0 45% 0); transform: translate(-2px, 0); }
  93% { clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-b {
  0%, 87%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  88% { clip-path: inset(65% 0 10% 0); transform: translate(4px, 1px); }
  90% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, -1px); }
  92% { clip-path: inset(80% 0 5% 0); transform: translate(2px, 0); }
  94% { clip-path: inset(100% 0 0 0); }
}

.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.45rem); font-weight: 500; color: var(--text); margin-top: 1rem; min-height: 1.6em; }
.typed { color: var(--cyan); }
.cursor { color: var(--cyan); animation: blink 1s step-end infinite; margin-left: 2px; font-size: 0.9em; }
@keyframes blink { 50% { opacity: 0; } }
.hero-text { max-width: 540px; margin: 1.4rem 0 2rem; color: var(--muted); font-size: 1.05rem; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-top: 2rem; font-size: 0.8rem; }
.hero-meta li { color: var(--text); }
.hero-meta .c-muted::after { content: " ="; }
.scroll-hint {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; color: var(--muted); animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- Terminal ---------- */
.terminal {
  background: rgba(6, 10, 16, 0.92); border: 1px solid var(--line-strong); border-radius: 12px;
  overflow: hidden; cursor: text; min-width: 0;
  box-shadow: 0 0 0 1px rgba(34,211,238,.05), 0 30px 60px -20px rgba(0,0,0,.8), 0 0 60px -20px rgba(34,211,238,.35);
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 0.7rem 1rem; background: #0d1420; border-bottom: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.terminal-title { flex: 1; text-align: center; font-size: 0.72rem; color: var(--muted); margin-right: 50px; }
.term-body { height: 380px; overflow-y: auto; padding: 1rem 1.1rem; font-size: 0.8rem; line-height: 1.65; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
#term-out { white-space: pre-wrap; word-break: break-word; }
#term-out a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.term-input-line { display: flex; align-items: center; }
.term-input-line[hidden] { display: none; }
.term-prompt { white-space: pre; }
#term-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--heading); font: inherit; caret-color: var(--cyan);
}
.terminal-hint { font-size: 0.68rem; color: var(--muted); padding: 0.5rem 1.1rem; border-top: 1px solid var(--line); background: #0a1019; }
.terminal-hint b { color: var(--cyan); }
.t-caret { display: inline-block; width: 7px; height: 1.05em; background: var(--cyan); vertical-align: text-bottom; animation: blink 1s step-end infinite; }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; scroll-margin-top: 50px; }
.section-cmd {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 500; color: var(--heading); margin-bottom: 2.6rem;
}
.section-cmd::after { content: "█"; color: var(--cyan); animation: blink 1s step-end infinite; font-size: 0.85em; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: start; }
.about-text p { margin-bottom: 1.1rem; font-size: 1.02rem; }
.neofetch { display: flex; gap: 1.4rem; padding: 1.4rem; font-size: 0.78rem; line-height: 1.7; }
.ascii { font-size: 0.78rem; line-height: 1.25; text-shadow: 0 0 10px rgba(34,211,238,.5); }
.nf-title { font-weight: 700; }
.nf-info .k { color: var(--cyan); display: inline-block; min-width: 82px; font-weight: 700; }
.swatches { display: flex; margin-top: 0.7rem; }
.swatches i { width: 18px; height: 14px; }
.swatches i:nth-child(1) { background: #1e293b; } .swatches i:nth-child(2) { background: var(--red); }
.swatches i:nth-child(3) { background: var(--green); } .swatches i:nth-child(4) { background: var(--amber); }
.swatches i:nth-child(5) { background: #60a5fa; } .swatches i:nth-child(6) { background: var(--pink); }
.swatches i:nth-child(7) { background: var(--cyan); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.5rem; }
.metric { padding: 1.1rem 1.2rem 0.6rem; overflow: hidden; }
.metric-label { font-size: 0.7rem; color: var(--muted); }
.metric-value { font-size: 2.1rem; font-weight: 800; color: var(--green); text-shadow: 0 0 18px rgba(74,222,128,.35); line-height: 1.3; }
.spark { width: 100%; height: 28px; display: block; margin-top: 0.3rem; }
.spark path.line { fill: none; stroke: var(--green); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.spark path.area { fill: rgba(74, 222, 128, 0.1); }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.1rem; }
.file { overflow: hidden; }
.file:hover { transform: translateY(-4px); }
.file-tab {
  font-size: 0.78rem; padding: 0.6rem 1rem; color: var(--heading);
  background: rgba(34, 211, 238, 0.05); border-bottom: 1px solid var(--line);
}
.file .tags { padding: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tags li {
  font-size: 0.74rem; padding: 0.22rem 0.6rem; border-radius: 4px;
  border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,0.02);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tags li:hover { color: var(--cyan); border-color: var(--line-strong); background: rgba(34,211,238,.07); }

/* ---------- Experience (git log) ---------- */
.gitlog { position: relative; padding-left: 2.2rem; }
.gitlog::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--cyan), var(--pink) 70%, transparent); opacity: 0.6;
}
.commit { position: relative; margin-bottom: 2.8rem; }
.commit::before {
  content: ""; position: absolute; left: calc(-2.2rem + 1px); top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 12px rgba(34,211,238,.6);
}
.commit:first-child::before { background: var(--cyan); }
.commit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.78rem; margin-bottom: 0.4rem; }
.hash { color: var(--amber); }
.ref { color: var(--pink); border: 1px solid rgba(244,114,182,.35); padding: 0 0.45rem; border-radius: 4px; }
.ref-head { color: var(--green); border-color: rgba(74,222,128,.4); }
.ref-tag { color: var(--amber); border-color: rgba(251,191,36,.4); }
.commit-date { color: var(--muted); }
.commit h4 { font-family: var(--mono); color: var(--heading); font-size: 1.08rem; font-weight: 700; margin-bottom: 0.7rem; }
.commit .at { color: var(--muted); font-weight: 400; }
.commit ul li { position: relative; padding-left: 1.3rem; margin-bottom: 0.4rem; color: var(--muted); font-size: 0.95rem; }
.commit ul li::before { content: "+"; position: absolute; left: 0; color: var(--green); font-family: var(--mono); font-weight: 700; }
.certs { padding: 1.2rem 1.4rem; margin-left: 2.2rem; }
.certs p { font-size: 0.8rem; margin-bottom: 0.8rem; }

/* ---------- Highlights ---------- */
.filters { display: flex; gap: 0.5rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.filter {
  background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 0.4rem 0.9rem;
  border-radius: 4px; cursor: pointer; font-family: var(--mono); font-size: 0.78rem; transition: 0.2s;
}
.filter:hover { border-color: var(--line-strong); color: var(--cyan); }
.filter.active { background: rgba(34,211,238,.12); border-color: var(--cyan); color: var(--cyan); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; }
.project { padding: 1.4rem; display: flex; flex-direction: column; }
.project:hover { transform: translateY(-5px); }
.project.hidden { display: none; }
.project-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.76rem; gap: 0.5rem; }
.deploy { color: var(--muted); }
.deploy b { color: var(--cyan); font-weight: 500; }
.running { color: var(--green); white-space: nowrap; }
.ns { font-size: 0.7rem; color: var(--muted); margin: 0.2rem 0 1rem; }
.project h4 { color: var(--heading); font-size: 1.08rem; margin-bottom: 0.6rem; }
.project > p:not(.ns) { color: var(--muted); font-size: 0.93rem; flex: 1; }
.tech { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-top: 1.2rem; font-size: 0.72rem; color: var(--amber); }
.tech li::before { content: "#"; color: var(--muted); }

/* ---------- Contact ---------- */
.contact .section-cmd { justify-content: center; }
.contact-title { font-size: clamp(1.8rem, 4.5vw, 2.8rem); color: var(--heading); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem; }
.contact-lead { color: var(--muted); }
.contact-form { margin-top: 2.4rem; padding: 1.5rem; display: grid; gap: 0.9rem; text-align: left; font-size: 0.88rem; }
.contact-form label { display: flex; align-items: center; gap: 0.8rem; border-bottom: 1px dashed var(--line); padding-bottom: 0.6rem; }
.contact-form label.msg { align-items: flex-start; }
.contact-form label span { min-width: 76px; }
.contact-form input, .contact-form textarea {
  flex: 1; background: transparent; border: none; outline: none; color: var(--heading);
  font: inherit; caret-color: var(--cyan); resize: vertical;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #3b4859; }
.contact-form label:focus-within { border-bottom-color: var(--cyan); }
.contact-form .btn { justify-self: start; margin-top: 0.4rem; }
.form-status { min-height: 1.4em; color: var(--green); font-size: 0.8rem; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.4rem; font-size: 0.85rem; }
.socials a { color: var(--muted); transition: color 0.2s, text-shadow 0.2s; }
.socials a::before { content: "→ "; color: var(--cyan); }
.socials a:hover { color: var(--cyan); text-shadow: 0 0 12px rgba(34,211,238,.6); }

/* ---------- Footer & status bar ---------- */
.footer { padding: 2.5rem 0 2rem; text-align: center; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line); }
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--statusbar); z-index: 60;
  display: flex; align-items: center; font-size: 0.72rem; background: #0a0f17; border-top: 1px solid var(--line);
  color: var(--muted);
}
.sb-seg { padding: 0 0.9rem; height: 100%; display: flex; align-items: center; gap: 0.35rem; border-right: 1px solid var(--line); white-space: nowrap; }
.sb-seg b { color: var(--heading); font-weight: 500; }
.sb-mode { background: var(--cyan); color: var(--bg); font-weight: 800; border: none; }
.sb-spacer { flex: 1; }
.sb-spacer + .sb-seg { border-left: 1px solid var(--line); }

.to-top {
  position: fixed; right: 1.3rem; bottom: calc(var(--statusbar) + 1.2rem); width: 42px; height: 42px; border-radius: 6px;
  border: 1px solid var(--cyan); background: rgba(5,7,11,.8); color: var(--cyan); font-size: 1.05rem; cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: 0.3s; z-index: 55;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { box-shadow: 0 0 18px rgba(34,211,238,.5); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 110px; padding-bottom: 5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .scroll-hint { display: none; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 64px; right: 0; height: calc(100vh - 64px - var(--statusbar)); width: min(78vw, 300px);
    flex-direction: column; justify-content: center; gap: 1.8rem; font-size: 1rem;
    background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform 0.3s;
  }
  .nav-links.open { transform: none; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 600px) {
  .logo { font-size: 0.8rem; }
  .neofetch { flex-direction: column; }
  .term-body { height: 320px; }
  .section { padding: 4.5rem 0; }
  .sb-hide { display: none; }
  .certs { margin-left: 0; }
  .contact-form label { flex-direction: column; align-items: stretch; gap: 0.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   v3 — more motion + tech logos
   ========================================================= */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rotate-angle { to { --angle: 360deg; } }

/* tech icons inside chips */
.ti { width: 13px; height: 13px; vertical-align: -2px; margin-right: 0.35rem; flex-shrink: 0; }
.aws-mark {
  display: inline-block; font-family: var(--mono); font-weight: 800; font-size: 0.72em; letter-spacing: -0.02em;
  color: #FF9900; margin-right: 0.35rem; position: relative; line-height: 1;
}
.aws-mark::after {
  content: ""; position: absolute; left: 5%; right: 5%; bottom: -3px; height: 4px;
  border-bottom: 2px solid #FF9900; border-radius: 0 0 50% 50%;
}
.tags li, .tech li { display: inline-flex; align-items: center; }
.tags li[style*="--c"]:hover {
  color: var(--c); border-color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  box-shadow: 0 0 14px -4px var(--c);
}

/* scroll progress */
.scroll-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform-origin: left; transform: scaleX(var(--sp, 0));
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--pink));
  box-shadow: 0 0 10px var(--cyan);
}

/* animated conic border */
.glow-border::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--angle), transparent 0 65%, var(--cyan) 80%, var(--pink) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotate-angle 5s linear infinite;
}
.terminal { position: relative; }

/* tilt glare */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform 0.15s ease-out, border-color .3s, box-shadow .3s; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(34, 211, 238, 0.12), transparent 45%);
}
.tilt:hover::after { opacity: 1; }
.file:hover, .project:hover { transform: none; }

/* staggered children */
@keyframes rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
.reveal .stagger > * { opacity: 0; }
.reveal.visible .stagger > * { animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 80ms); }

/* ---------- hero floaters ---------- */
.terminal-wrap { position: relative; min-width: 0; }
.floaters { position: absolute; inset: -40px; pointer-events: none; z-index: 3; }
.floater {
  position: absolute; display: inline-flex; align-items: center; gap: 0.1rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--heading);
  background: rgba(10, 15, 23, 0.85); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.3rem 0.7rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px -10px rgba(0,0,0,.8), 0 0 18px -6px var(--c, var(--cyan));
  animation: float 6s ease-in-out infinite;
}
.f1 { top: 0; left: -10px; animation-delay: -1s; }
.f2 { top: 18%; right: -18px; animation-delay: -3s; }
.f3 { bottom: 22%; left: -30px; animation-delay: -2s; }
.f4 { bottom: 0; right: 12%; animation-delay: -4s; }
.f5 { top: -6px; right: 28%; animation-delay: -5s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* ---------- tech marquee ---------- */
.tech-strip { padding: 1rem 0 3rem; overflow: hidden; }
.strip-label { text-align: center; font-size: 0.78rem; color: var(--muted); margin-bottom: 1.2rem; }
.marquee {
  display: flex; width: max-content; gap: 0.9rem; padding: 0.45rem 0;
  animation: marquee 45s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.tech-strip { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee { -webkit-mask-image: none; }
.marquee.reverse { animation-direction: reverse; animation-duration: 55s; }
.tech-strip:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.chip {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.65rem 1.1rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  font-family: var(--mono); font-size: 0.85rem; color: var(--text); white-space: nowrap;
  transition: transform .25s, border-color .25s, box-shadow .25s, color .25s;
}
.chip img { width: 22px; height: 22px; }
.chip .aws-mark { font-size: 1.05rem; margin: 0 .1rem 4px 0; }
.chip:hover {
  transform: translateY(-4px) scale(1.06); color: var(--heading);
  border-color: var(--c); box-shadow: 0 0 26px -6px var(--c), inset 0 0 18px -10px var(--c);
}

/* ---------- orbit ---------- */
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-bottom: 3rem; }
.orbit { position: relative; width: min(460px, 100%); aspect-ratio: 1; margin: 0 auto; }
.orbit:hover .ring, .orbit:hover .planet-inner { animation-play-state: paused; }
.ring {
  position: absolute; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, 0.22);
  animation: spin var(--dur) linear infinite;
}
.ring.rev { animation-direction: reverse; }
.planet { position: absolute; transform: translate(-50%, -50%); }
.planet-inner {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 15, 23, 0.92); border: 1px solid var(--line-strong);
  box-shadow: 0 0 18px -6px var(--c); animation: spin var(--dur) linear infinite reverse;
  position: relative; cursor: default;
}
.ring.rev .planet-inner { animation-direction: normal; }
.planet-inner img { width: 22px; height: 22px; }
.planet-inner .aws-mark { margin: 0 0 4px; font-size: 0.85rem; }
.planet-inner::after {
  content: attr(data-name); position: absolute; top: calc(100% + 6px); left: 50%; translate: -50% 0;
  font-family: var(--mono); font-size: 0.66rem; color: var(--heading); white-space: nowrap;
  background: #0a0f17; border: 1px solid var(--line); padding: 0.1rem 0.45rem; border-radius: 4px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.planet-inner:hover { border-color: var(--c); box-shadow: 0 0 24px -2px var(--c); }
.planet-inner:hover::after { opacity: 1; }
.core { position: absolute; inset: 37%; display: grid; place-items: center; }
.core-inner {
  position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  background: radial-gradient(circle, rgba(34,211,238,.18), rgba(10,15,23,.95) 70%);
  border: 1px solid var(--cyan); box-shadow: 0 0 40px -6px var(--cyan), inset 0 0 30px -10px var(--cyan);
  font-size: 0.66rem; text-align: center; line-height: 1.25; color: var(--muted);
}
.core-inner img { animation: spin 12s linear infinite; filter: drop-shadow(0 0 8px var(--cyan)); }
.core-inner b { color: var(--cyan); }
.ping { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--cyan); animation: ping 3s ease-out infinite; }
.ping.p2 { animation-delay: 1.5s; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.3); opacity: 0; } }

/* ---------- yaml ---------- */
.yaml { overflow: hidden; }
.yaml-hint { font-size: 0.7rem; }
.yaml-body { padding: 1rem 1.2rem; font-size: 0.8rem; line-height: 1.7; min-height: 430px; white-space: pre; overflow-x: auto; }
.yaml-body .ln { display: inline-block; width: 2.2em; color: #34404f; user-select: none; }
.y-k { color: var(--cyan); }
.y-s { color: var(--amber); }
.y-v { color: var(--green); }
.y-c { color: var(--muted); font-style: italic; }
.y-ok { color: var(--green); text-shadow: 0 0 10px rgba(74,222,128,.6); }

/* ---------- pipeline ---------- */
.section-lead { color: var(--muted); margin: -1.6rem 0 1.6rem; }
.pipeline { padding: 1.4rem 1.6rem 1.2rem; overflow: hidden; }
.pl-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; margin-bottom: 2rem; }
.pl-status { color: var(--muted); }
.pl-status.running { color: var(--amber); animation: blink 1s step-end infinite; }
.pl-status.passed { color: var(--green); text-shadow: 0 0 10px rgba(74,222,128,.6); }
.pl-track { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; --p: 0%; }
.pl-line { position: absolute; top: 27px; left: calc(100% / 14); right: calc(100% / 14); height: 2px; background: var(--line); }
.pl-fill {
  height: 100%; width: var(--p); background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: 0 0 12px var(--cyan); transition: width 0.8s ease, height 0.8s ease; position: relative;
}
.pl-fill::after {
  content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  translate: 0 -50%; background: #fff; box-shadow: 0 0 14px 4px var(--cyan);
}
.pl-stage { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; z-index: 1; }
.pl-node {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; position: relative;
  background: #0a0f17; border: 1px solid var(--line); filter: grayscale(1) brightness(.6);
  transition: filter .4s, border-color .4s, box-shadow .4s, transform .4s;
}
.pl-node img { width: 26px; height: 26px; }
.pl-node::after {
  content: "✓"; position: absolute; right: -7px; top: -7px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.65rem; font-weight: 800; color: var(--bg);
  background: var(--green); transform: scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.pl-stage.running .pl-node {
  filter: none; border-color: var(--amber); transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(251,191,36,.12), 0 0 24px -4px var(--amber);
}
.pl-stage.running .pl-node::before {
  content: ""; position: absolute; inset: -6px; border-radius: 18px; border: 2px solid transparent;
  border-top-color: var(--amber); animation: spin 0.9s linear infinite;
}
.pl-stage.done .pl-node { filter: none; border-color: var(--green); box-shadow: 0 0 22px -6px var(--green); }
.pl-stage.done .pl-node::after { transform: scale(1); }
.pl-name { font-size: 0.78rem; color: var(--heading); margin-top: 0.7rem; }
.pl-tool { font-size: 0.66rem; color: var(--muted); }
.pl-log {
  margin-top: 1.6rem; padding: 0.9rem 1rem; background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.75rem; line-height: 1.7; height: 158px; overflow: hidden; white-space: pre-wrap; color: var(--text);
}
.pl-log .t { color: var(--muted); }
.pl-log .s { color: var(--cyan); }
.pl-log .ok { color: var(--green); }

/* ---------- matrix easter egg ---------- */
#matrix { position: fixed; inset: 0; z-index: 150; background: #000; cursor: pointer; }

/* ---------- responsive (v3) ---------- */
@media (max-width: 960px) {
  .stack-grid { grid-template-columns: 1fr; }
  .floaters { display: none; }
}
@media (max-width: 760px) {
  .pl-track { grid-template-columns: 1fr; gap: 1rem; }
  .pl-line { top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; }
  .pl-fill { width: 100%; height: var(--p); }
  .pl-fill::after { right: auto; left: 50%; top: auto; bottom: -5px; translate: -50% 0; }
  .pl-stage { flex-direction: row; text-align: left; gap: 1rem; }
  .pl-name { margin-top: 0; }
  .pl-stage p { display: inline; }
  .pl-tool::before { content: " · "; }
  .yaml-body { min-height: 0; font-size: 0.72rem; }
  .planet-inner { width: 36px; height: 36px; }
  .planet-inner img { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .stagger > * { opacity: 1 !important; }
  .marquee { flex-wrap: wrap; width: auto; justify-content: center; }
}
.gitlog::before { transform-origin: top; transform: scaleY(var(--gp, 0)); transition: transform 0.15s linear; }
.yaml-body { min-height: 500px; }
@media (max-width: 760px) { .yaml-body { min-height: 0; } }

/* =========================================================
   Theme switch + LIGHT MODE
   ========================================================= */
.nav-inner { justify-content: flex-start; }
.nav-links { order: 2; margin-left: auto; }
.theme-toggle { order: 3; margin-left: 1.3rem; }
.nav-toggle { order: 4; margin-left: 0.9rem; }
@media (max-width: 860px) { .theme-toggle { margin-left: auto; } }

.theme-toggle { background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0; }
.tt-track {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: 60px; height: 30px; padding: 0 8px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 12px -6px var(--cyan); transition: background .3s, border-color .3s;
}
.tt-icon { font-size: 0.8rem; line-height: 1; z-index: 1; transition: color .3s, opacity .3s; }
.tt-moon { color: var(--cyan); }
.tt-sun { color: var(--muted); opacity: .6; }
.tt-knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  transition: transform .4s cubic-bezier(.4,1.6,.5,1), background .3s;
}
.tt-moon, .tt-sun { position: relative; }
[data-theme="dark"] .tt-moon { color: var(--bg); }
[data-theme="light"] .tt-knob { transform: translateX(30px); background: #f59e0b; box-shadow: 0 0 14px rgba(245,158,11,.8); }
[data-theme="light"] .tt-sun { color: #fff; opacity: 1; }
[data-theme="light"] .tt-moon { opacity: .6; color: var(--muted); }
.theme-toggle:hover .tt-track { border-color: var(--cyan); }
.theme-toggle:focus-visible .tt-track { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* circular reveal when switching (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- light palette ---------- */
[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-2: #ffffff;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-solid: #ffffff;
  --line: rgba(8, 145, 178, 0.18);
  --line-strong: rgba(8, 145, 178, 0.42);
  --text: #334155;
  --muted: #64748b;
  --heading: #0b1424;
  --cyan: #0891b2;
  --green: #16a34a;
  --pink: #db2777;
  --amber: #b45309;
  --red: #dc2626;
  color-scheme: light;
}
[data-theme="dark"] { color-scheme: dark; }

/* things that stay dark in both themes: terminal, boot screen */
[data-theme="light"] .terminal,
[data-theme="light"] #boot {
  --bg: #05070b; --line: rgba(34, 211, 238, 0.14); --line-strong: rgba(34, 211, 238, 0.35);
  --text: #c5d0de; --muted: #6b7b91; --heading: #eaf2fb;
  --cyan: #22d3ee; --green: #4ade80; --pink: #f472b6; --amber: #fbbf24; --red: #f87171;
  color: var(--text);
}
[data-theme="light"] .terminal { box-shadow: 0 30px 60px -25px rgba(15, 23, 42, 0.45), 0 0 50px -25px rgba(8, 145, 178, 0.5); }

/* hard-coded dark surfaces → light equivalents */
[data-theme="light"] .scanlines { opacity: 0; }
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(8, 145, 178, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 145, 178, 0.07) 1px, transparent 1px);
}
[data-theme="light"] .nav { background: rgba(244, 247, 251, 0.75); }
[data-theme="light"] .tags li { background: rgba(255, 255, 255, 0.7); }
[data-theme="light"] .contact-form input::placeholder,
[data-theme="light"] .contact-form textarea::placeholder { color: #a3b1c2; }
[data-theme="light"] .statusbar { background: #e6edf5; }
[data-theme="light"] .to-top { background: rgba(255, 255, 255, 0.9); }
[data-theme="light"] .floater { background: rgba(255, 255, 255, 0.92); box-shadow: 0 8px 22px -12px rgba(15,23,42,.35), 0 0 16px -8px var(--c, var(--cyan)); }
[data-theme="light"] .planet-inner { background: #fff; box-shadow: 0 4px 14px -6px rgba(15,23,42,.25), 0 0 16px -8px var(--c); }
[data-theme="light"] .planet-inner::after { background: #fff; }
[data-theme="light"] .ring { border-color: rgba(8, 145, 178, 0.3); }
[data-theme="light"] .core-inner { background: radial-gradient(circle, rgba(8,145,178,.14), #fff 70%); }
[data-theme="light"] .yaml-body .ln { color: #c3ccd8; }
[data-theme="light"] .pl-node { background: #fff; filter: grayscale(1) opacity(.45); }
[data-theme="light"] .pl-stage.running .pl-node,
[data-theme="light"] .pl-stage.done .pl-node { filter: none; }
[data-theme="light"] .pl-log { background: rgba(15, 23, 42, 0.035); }
[data-theme="light"] .pl-fill::after { background: var(--cyan); }
[data-theme="light"] .metric-value { text-shadow: none; }
[data-theme="light"] .glitch { text-shadow: 0 0 24px rgba(8, 145, 178, 0.18); }
[data-theme="light"] .panel:hover { box-shadow: 0 0 0 1px rgba(8,145,178,.08), 0 20px 40px -25px rgba(8,145,178,.45); }
[data-theme="light"] .file-tab { background: rgba(8, 145, 178, 0.06); }
[data-theme="light"] .chip { background: rgba(255, 255, 255, 0.85); }
/* Kafka's logo is white in dark mode — flip it to black on light backgrounds */
[data-theme="light"] img[src*="apachekafka"] { filter: invert(1); }
[data-theme="light"] [style*="FFFFFF"] { --c: #231F20; }

/* ---------- experience timeline spacing fix ---------- */
ol { list-style: none; }
.gitlog { padding-left: 2.6rem; margin-top: 0.5rem; }
.gitlog::before { left: 8px; }
.commit { margin-bottom: 3.2rem; padding-bottom: 0.2rem; }
.commit:last-child { margin-bottom: 2rem; }
.commit::before { left: calc(-2.6rem + 2px); top: 3px; }
.commit-head { margin-bottom: 0.55rem; row-gap: 0.4rem; }
.commit h4 { line-height: 1.4; margin-bottom: 0.9rem; }
.commit ul li { margin-bottom: 0.55rem; line-height: 1.6; }
.certs { margin-left: 2.6rem; }
@media (max-width: 600px) {
  .gitlog { padding-left: 2rem; }
  .commit::before { left: calc(-2rem + 2px); }
  .commit { margin-bottom: 2.6rem; }
  .certs { margin-left: 0; }
}

/* ---------- company logos in experience ---------- */
.commit-title { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.9rem; }
.commit-title h4 { margin-bottom: 0; }
.co-logo {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.06), 0 6px 18px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s, box-shadow 0.3s;
}
.co-logo img { display: block; object-fit: contain; }
.co-emoji { font-size: 1.25rem; line-height: 1; }
.commit:hover .co-logo { transform: translateY(-2px) rotate(-4deg); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15), 0 0 20px -4px var(--cyan); }
[data-theme="light"] .co-logo { box-shadow: 0 4px 14px -6px rgba(15, 23, 42, 0.3); }
@media (max-width: 600px) {
  .co-logo { width: 34px; height: 34px; border-radius: 8px; }
  .commit-title { gap: 0.7rem; align-items: flex-start; }
}
