:root {
  /* ── Color tokens ── */
  --ink: #0a0f1c;           /* deep navy-black — base dark surface */
  --ink-soft: #111a2e;      /* elevated dark surface (cards on dark) */
  --ink-line: rgba(255,255,255,.08);
  --paper: #f7f5f0;         /* warm off-white — base light surface */
  --paper-card: #ffffff;
  --ink-900: #10141f;       /* primary text on light */
  --muted: #6b7280;
  --muted-dark: #7d8699;

  --accent: #ff7a3d;        /* signal orange — primary accent */
  --accent-deep: #e05a1f;
  --accent-dim: rgba(255,122,61,.14);
  --cyan: #4fd1c5;          /* network / infra accent */
  --cyan-dim: rgba(79,209,197,.14);

  /* ── Type tokens ── */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

a { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── CIRCUIT DIVIDER (signature element) ──
   A short trace-and-node motif used everywhere a rule/divider is needed —
   nods to the PCB traces & network topologies this person actually builds. */
.circuit-divider {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 1.1rem 0 2.1rem;
}
.circuit-divider.mx-auto { justify-content: center; }
.circuit-divider .seg {
  height: 2px;
  width: 34px;
  background: linear-gradient(90deg, var(--accent), rgba(255,122,61,.15));
  border-radius: 2px;
}
.circuit-divider .seg.rev { background: linear-gradient(90deg, rgba(255,122,61,.15), var(--accent)); }
.circuit-divider .node {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
  flex-shrink: 0;
}
.circuit-divider .node.cy { background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-dim); }

/* ── NAVBAR ── */
.navbar {
  background: rgba(10,15,28,.92);
  backdrop-filter: blur(14px);
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--ink-line);
  transition: padding .3s ease, background .3s ease;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff !important;
  text-decoration: none;
}
.brand-dot { color: var(--accent); }
.nav-link {
  font-family: var(--font-mono);
  color: rgba(255,255,255,.55) !important;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .4px;
  padding: .45rem .8rem !important;
  border-radius: 7px;
  transition: all .25s;
  position: relative;
}
.nav-link::before { content: '// '; color: var(--accent); opacity: 0; transition: opacity .2s; }
.nav-link:hover::before, .nav-link.active::before { opacity: 1; }
.nav-link:hover { color: #fff !important; background: rgba(255,255,255,.05); }
.nav-link.active { color: #fff !important; background: var(--accent-dim); }
.nav-cta {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  padding: .5rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all .25s;
  white-space: nowrap;
  letter-spacing: .3px;
}
.nav-cta:hover { background: var(--accent-deep); color: #fff; transform: translateY(-1px); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  background: var(--ink);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-circuit-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
  pointer-events: none;
}
.hero-circuit-bg .trace {
  fill: none;
  stroke: rgba(255,122,61,.35);
  stroke-width: 1.4;
  stroke-dasharray: 6 5;
  animation: traceFlow 14s linear infinite;
}
.hero-circuit-bg .trace.cy { stroke: rgba(79,209,197,.3); animation-duration: 18s; animation-direction: reverse; }
.hero-circuit-bg .node { fill: var(--accent); opacity: .55; }
.hero-circuit-bg .node.cy { fill: var(--cyan); }
@keyframes traceFlow { to { stroke-dashoffset: -110; } }

#hero::before {
  content: '';
  position: absolute;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(255,122,61,.14) 0%, transparent 70%);
  top: -140px; right: -120px;
  border-radius: 50%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(255,122,61,.3);
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .78rem;
  letter-spacing: .3px;
  margin-bottom: 1.1rem;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -.5px;
}
.hero-title .highlight { color: var(--accent); }
.hero-eyebrow {
  font-family: var(--font-mono);
  color: #8a93a6;
  font-size: .95rem;
  letter-spacing: .2px;
}
.hero-typed-line {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: .6rem;
}
.hero-typed-line .caret { color: var(--accent); }
.hero-desc { color: #9aa2b1; font-size: 1.03rem; line-height: 1.8; max-width: 46ch; }

.btn-orange {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .75rem 1.9rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: all .3s;
  text-decoration: none;
  display: inline-block;
}
.btn-orange:hover { background: var(--accent-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255,122,61,.35); }
.btn-outline-orange {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.25);
  padding: .7rem 1.9rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: all .3s;
  text-decoration: none;
  display: inline-block;
}
.btn-outline-orange:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Bubble image */
.hero-img-wrap { position: relative; display: flex; justify-content: center; align-items: center; }
.bubble-clip {
  width: 400px; height: 440px;
  clip-path: polygon(30% 0%, 80% 5%, 100% 30%, 95% 70%, 75% 100%, 20% 95%, 0% 65%, 5% 20%);
  overflow: hidden;
  position: relative;
  animation: floatBubble 7s ease-in-out infinite;
}
.bubble-clip img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.bubble-ring {
  position: absolute;
  width: 420px; height: 460px;
  border: 2px solid rgba(255,122,61,.35);
  clip-path: polygon(30% 0%, 80% 5%, 100% 30%, 95% 70%, 75% 100%, 20% 95%, 0% 65%, 5% 20%);
  top: 10px; left: calc(50% - 220px);
  animation: floatBubble 7s ease-in-out infinite reverse;
}
.bubble-node {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px var(--cyan-dim);
}
@keyframes floatBubble { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-16px) rotate(1.5deg); } }

/* Stats row */
.hero-stats { display: flex; gap: 2.2rem; margin-top: 2.2rem; }
.hero-stat-num { font-family: var(--font-display); color: #fff; font-size: 1.6rem; font-weight: 700; }
.hero-stat-label { font-family: var(--font-mono); color: #6b7280; font-size: .72rem; letter-spacing: .3px; text-transform: uppercase; }

/* Tech stack + network skills */
.stack-label {
  font-family: var(--font-mono);
  color: #616a7c; font-size: .72rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: .6rem;
}
.techstack-scroll {
  display: flex;
  gap: .5rem;
  overflow-x: hidden;
  padding-bottom: .4rem;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  user-select: none;
}
.ts-badge {
  font-family: var(--font-mono);
  background: rgba(255,255,255,.05);
  color: #c4cad6;
  border: 1px solid rgba(255,255,255,.1);
  font-size: .74rem;
  font-weight: 500;
  padding: .32rem .85rem;
  border-radius: 7px;
  white-space: nowrap;
  transition: all .25s;
  cursor: default;
}
.ts-badge:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.ts-net { background: var(--cyan-dim); border-color: rgba(79,209,197,.25); color: #9fe6dd; }
.ts-net:hover { background: rgba(79,209,197,.22); border-color: var(--cyan); color: #fff; }

/* ── SECTION COMMON ── */
section { padding: 100px 0; }
.section-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -.4px;
}
.section-title span { color: var(--accent); }

/* ── EDUCATION TIMELINE ── */
#education { background: var(--paper); }
.timeline { position: relative; padding-left: 2.1rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(255,122,61,.05));
}
.timeline-item {
  position: relative;
  margin-bottom: 2.4rem;
  padding-left: 1.6rem;
  opacity: 0;
  transform: translateX(-24px);
  transition: all .6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-dot {
  position: absolute;
  left: -2.45rem;
  top: .35rem;
  width: 14px; height: 14px;
  background: var(--paper);
  border: 3px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper);
}
.timeline-card {
  background: var(--paper-card);
  border-radius: 10px;
  padding: 1.3rem 1.6rem;
  box-shadow: 0 1px 3px rgba(16,20,31,.05);
  border: 1px solid rgba(16,20,31,.07);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.timeline-card:hover { transform: translateX(6px); box-shadow: 0 10px 26px rgba(16,20,31,.08); border-color: rgba(255,122,61,.25); }
.timeline-card h5 { font-family: var(--font-display); font-weight: 700; }
.timeline-year {
  font-family: var(--font-mono);
  background: var(--ink-900);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  padding: .22rem .7rem;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: .55rem;
  letter-spacing: .3px;
}
.timeline-school { font-size: .9rem; color: var(--muted); }

/* Map card */
.map-card {
  background: var(--paper-card);
  border-radius: 14px;
  padding: 1.6rem;
  height: 100%;
  border: 1px solid rgba(16,20,31,.07);
}
.map-card h6 { font-family: var(--font-display); color: var(--accent); font-weight: 700; }

/* ── CERTIFICATES ── */
.cert-card {
  background: var(--paper-card);
  border-radius: 12px;
  padding: 1.6rem;
  box-shadow: 0 1px 3px rgba(16,20,31,.05);
  border: 1px solid rgba(16,20,31,.07);
  transition: all .3s;
  height: 100%;
}
.cert-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(16,20,31,.09); border-color: rgba(255,122,61,.25); }
.cert-icon {
  width: 46px; height: 46px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.cert-card h6 { font-family: var(--font-display); font-weight: 700; }
.cert-issuer { font-family: var(--font-mono); font-size: .76rem; color: var(--accent); font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.cert-year { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.cert-card .btn-orange { font-size: .78rem; padding: .45rem 1.1rem; font-family: var(--font-mono); }

/* ── EXPERIENCE ── */
#experience { background: var(--ink); position: relative; overflow: hidden; }
#experience .section-title { color: #fff; }
#experience .section-tag { color: var(--cyan); }
.exp-type-badge {
  font-family: var(--font-mono);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: .18rem .6rem;
  border-radius: 4px;
  display: inline-block;
}
.exp-type-badge.cy { background: var(--cyan-dim); color: var(--cyan); }
.exp-card {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  padding: 1.9rem;
  transition: all .3s;
  height: 100%;
}
.exp-card:hover { background: #15203a; border-color: rgba(255,122,61,.3); transform: translateY(-4px); }
.exp-title { font-family: var(--font-display); color: #fff; font-weight: 700; font-size: 1.12rem; }
.exp-company { color: var(--accent); font-weight: 600; font-size: .92rem; }
.exp-period { font-family: var(--font-mono); color: #616a7c; font-size: .8rem; }
.exp-desc { color: #9aa2b1; font-size: .9rem; line-height: 1.75; }
.exp-tag {
  font-family: var(--font-mono);
  background: rgba(255,255,255,.06);
  color: #b9c0cf;
  font-size: .72rem;
  padding: .22rem .65rem;
  border-radius: 5px;
  display: inline-block;
  margin: .2rem .25rem .2rem 0;
  border: 1px solid rgba(255,255,255,.08);
}

/* ── PROJECTS ── */
.project-card {
  background: var(--paper-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16,20,31,.05);
  border: 1px solid rgba(16,20,31,.07);
  transition: all .35s;
  height: 100%;
}
.project-card:hover { transform: translateY(-8px); box-shadow: 0 20px 44px rgba(16,20,31,.14); border-color: rgba(255,122,61,.3); }
.project-img { height: 200px; position: relative; overflow: hidden; }
.project-img-cover { background: #eeece5; display: block; padding: 0; }
.project-img-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .5s ease; }
.project-card:hover .project-img-cover img { transform: scale(1.05); }
.project-body { padding: 1.6rem; }
.project-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; margin-bottom: .55rem; color: var(--ink-900); }
.project-wip {
  font-family: var(--font-mono);
  background: rgba(255,193,7,.15);
  color: #a5760a;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: .18rem .5rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: .4rem;
}
.project-desc { color: var(--muted); font-size: .9rem; line-height: 1.65; }
.project-tag {
  font-family: var(--font-mono);
  background: var(--accent-dim);
  color: var(--accent-deep);
  font-size: .72rem;
  padding: .2rem .6rem;
  border-radius: 5px;
  display: inline-block;
  margin: .2rem .2rem .2rem 0;
}
.project-links a {
  font-family: var(--font-mono);
  color: var(--ink-900);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  margin-right: 1rem;
  transition: color .3s;
  border-bottom: 1px solid transparent;
}
.project-links a:hover { color: var(--accent); border-color: var(--accent); }

/* ── FOOTER ── */
footer { background: #06090f; padding: 70px 0 32px; position: relative; }
.footer-name { font-family: var(--font-display); color: #fff; font-size: 1.6rem; font-weight: 700; }
.footer-name span { color: var(--accent); }
.footer-desc { color: #616a7c; font-size: .92rem; line-height: 1.7; }
footer h6 { font-family: var(--font-display); }
footer .list-unstyled a { font-family: var(--font-mono); font-size: .85rem; }
.footer-contact { font-family: var(--font-mono); font-size: .85rem; color: #9aa2b1; line-height: 2; }
.social-link {
  width: 42px; height: 42px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #9aa2b1;
  text-decoration: none;
  font-size: 1.05rem;
  transition: all .3s;
  margin: .2rem;
}
.social-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }
.footer-divider { border-color: var(--ink-line); margin: 2.2rem 0 1.5rem; }
.footer-copy { font-family: var(--font-mono); color: #4b5262; font-size: .8rem; }
.footer-copy span { color: var(--accent); }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(28px); transition: all .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .nav-cta { margin-top: .6rem; display: inline-block; }
  .hero-stats { justify-content: center; }
}
@media (max-width: 768px) {
  .bubble-clip { width: 250px; height: 278px; }
  .bubble-ring { width: 264px; height: 292px; left: calc(50% - 132px); }
  #hero { text-align: center; }
  .hero-img-wrap { margin-bottom: 1.6rem; }
  .hero-desc { max-width: none; }
  .hero-stats { gap: 1.6rem; }
  .d-flex.flex-wrap.gap-3 { justify-content: center; }
  .circuit-divider.mx-auto { margin-left: auto; margin-right: auto; }

  footer { padding: 55px 20px 30px; }
  footer .container { padding-left: 24px; padding-right: 24px; }
  footer .col-lg-5, footer .col-lg-3, footer .col-lg-4 { padding-left: 4px; padding-right: 4px; }
}