/* ==========================================================================
   DESIGN TOKENS
   Palette: "Ops console" — deep navy void, indigo "wire" for connections,
   amber "signal" for status/highlights. Grounded in the idea that Owais's
   daily work is literally connecting systems (AWS, Workspace, Entra ID...).
   ========================================================================== */
:root {
  --void:      #0B1220;   /* page background */
  --panel:     #121A2E;   /* card / raised surface */
  --panel-2:   #16203A;   /* slightly lighter surface */
  --line:      #223050;   /* borders, dividers */
  --wire:      #6C8EF5;   /* primary accent — connections, links, focus */
  --wire-dim:  #4A5F9E;
  --signal:    #F5A623;   /* secondary accent — status, highlights */
  --signal-dim:#B97E1B;
  --paper:     #E8ECF6;   /* primary text */
  --mist:      #8B96AC;   /* secondary / muted text */
  --mist-dim:  #5D6981;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1120px;
  --gap: 24px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--paper); margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; color: var(--mist); }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--wire); color: var(--void); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--signal);
  color: var(--void);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--panel);
  border: 1px solid var(--wire);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--wire);
}
.brand-dot { color: var(--signal); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--mist); font-size: 0.92rem; font-weight: 500; transition: color 0.2s var(--ease); position: relative; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--paper); }
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--wire);
  transition: width 0.25s var(--ease);
}
.main-nav a:hover::after { width: 100%; }

.nav-cta {
  border: 1px solid var(--wire);
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--paper) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--wire); color: var(--void) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--paper); transition: transform 0.25s var(--ease), opacity 0.2s; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(108,142,245,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,142,245,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--signal);
  border: 1px solid var(--signal-dim);
  background: rgba(245, 166, 35, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(245,166,35, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245,166,35, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(245,166,35, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245,166,35, 0); }
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.hero-title .hl { color: var(--wire); }

.hero-sub { font-size: 1.05rem; max-width: 56ch; margin-bottom: 24px; }

.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.meta-chip {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--mist);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 24px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-primary { background: var(--wire); color: var(--void); }
.btn-primary:hover { transform: translateY(-2px); background: #82a0ff; }
.btn-ghost { border-color: var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--wire); color: var(--wire); }
.btn-text { color: var(--mist); padding: 13px 4px; }
.btn-text:hover { color: var(--paper); }

.hero-visual { display: flex; justify-content: center; }
#topology { width: 100%; max-width: 420px; height: auto; }
.node circle { transition: stroke 0.3s var(--ease), filter 0.3s var(--ease); }
.node-label { font-family: var(--font-mono); font-size: 12px; fill: var(--mist); }
.node-label-main { font-family: var(--font-mono); font-size: 17px; fill: var(--wire); font-weight: 600; }
.node-label-sub { font-family: var(--font-mono); font-size: 9px; fill: var(--mist-dim); letter-spacing: 0.04em; }
.node:hover circle { stroke: var(--wire); filter: drop-shadow(0 0 6px rgba(108,142,245,0.5)); }

.hero-scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 36px; border: 1px solid var(--line); border-radius: 12px;
}
.hero-scroll-cue span {
  display: block; width: 4px; height: 8px; margin: 6px auto 0; border-radius: 2px;
  background: var(--wire); animation: scrollcue 1.8s infinite;
}
@keyframes scrollcue { 0%{ transform: translateY(0); opacity:1;} 70%{ transform: translateY(12px); opacity:0;} 100%{opacity:0;} }

/* ==========================================================================
   SECTIONS (shared)
   ========================================================================== */
.section { padding: 96px 0; }
.section-alt { background: linear-gradient(180deg, var(--void) 0%, #0E1728 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--wire);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 16px;
  max-width: 22ch;
}

.section-lede { max-width: 62ch; font-size: 1.02rem; margin-bottom: 40px; }

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

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.about-story p { font-size: 1rem; }
.about-story strong { color: var(--paper); }

.fact-list { display: flex; flex-direction: column; gap: 18px; }
.fact { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--mist-dim); text-transform: uppercase; margin-bottom: 4px; }
.fact dd { margin: 0; color: var(--paper); font-size: 0.95rem; }

/* ==========================================================================
   SKILLS
   ========================================================================== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.skill-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.skill-card:hover { border-color: var(--wire-dim); transform: translateY(-3px); }
.skill-card h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.skill-icon { font-size: 1rem; color: var(--signal); }
.tag-list li {
  font-size: 0.88rem;
  color: var(--mist);
  padding: 7px 0;
  border-top: 1px dashed var(--line);
}
.tag-list li:first-child { border-top: none; }

/* ==========================================================================
   EXPERIENCE / TIMELINE
   ========================================================================== */
.timeline { position: relative; padding-left: 32px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 56px; }
.timeline-marker {
  position: absolute; left: -37px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--void); border: 2px solid var(--wire);
}
.timeline-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.status-live { color: #7CE0C1; border: 1px solid #2E6A55; background: rgba(124,224,193,0.08); }
.status-past { color: var(--mist); border: 1px solid var(--line); }
.timeline-content h3 { font-size: 1.2rem; margin-bottom: 4px; }
.timeline-org { color: var(--wire); font-size: 0.92rem; margin-bottom: 14px; }
.timeline-content ul { display: flex; flex-direction: column; gap: 8px; }
.timeline-content li { font-size: 0.94rem; color: var(--mist); padding-left: 18px; position: relative; }
.timeline-content li::before { content: "—"; position: absolute; left: 0; color: var(--mist-dim); }

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.project-card:hover { border-color: var(--wire-dim); transform: translateY(-3px); }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 999px; }
.chip-concept { color: var(--wire); border: 1px solid var(--wire-dim); background: rgba(108,142,245,0.08); }
.chip-progress { color: var(--signal); border: 1px solid var(--signal-dim); background: rgba(245,166,35,0.08); }
.project-stack { font-family: var(--font-mono); font-size: 0.72rem; color: var(--mist-dim); }
.project-card h3 { font-size: 1.06rem; margin-bottom: 10px; }
.project-card p { font-size: 0.9rem; margin-bottom: 0; }

/* ==========================================================================
   CERTIFICATIONS
   ========================================================================== */
.cert-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: left;
}
.cert-empty-title { font-family: var(--font-display); color: var(--paper); font-size: 1.1rem; margin-bottom: 10px; }
.cert-empty-body { max-width: 60ch; margin-bottom: 24px; }
.cert-target-list { display: flex; flex-direction: column; gap: 10px; }
.cert-target {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--mist);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cert-target em { color: var(--signal); font-style: normal; }

/* ==========================================================================
   DOCUMENTATION
   ========================================================================== */
.doc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.doc-card { padding: 22px 0; border-top: 1px solid var(--line); }
.doc-card h3 { font-size: 0.98rem; margin-bottom: 10px; color: var(--wire); }
.doc-card p { font-size: 0.88rem; }

/* ==========================================================================
   ACHIEVEMENTS
   ========================================================================== */
.milestone-list { display: flex; flex-direction: column; }
.milestone-list li {
  display: flex; gap: 20px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  color: var(--mist); font-size: 0.96rem;
}
.milestone-year {
  font-family: var(--font-mono);
  color: var(--signal);
  min-width: 64px;
  font-size: 0.85rem;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 50px; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.05em; color: var(--mist); text-transform: uppercase; }
.form-row input, .form-row textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--wire); }
.form-note { font-family: var(--font-mono); font-size: 0.82rem; color: var(--signal); min-height: 1.2em; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s var(--ease);
}
.contact-link:hover { border-color: var(--wire); }
.contact-link-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--mist-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-link-value { color: var(--paper); font-size: 0.95rem; }
.contact-note { font-size: 0.8rem; color: var(--mist-dim); margin-top: 6px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; font-size: 0.85rem; color: var(--mist-dim); }
.to-top {
  background: var(--panel); border: 1px solid var(--line); color: var(--paper);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.to-top:hover { border-color: var(--wire); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto 20px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .skills-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed; top: 68px; left: 0; right: 0;
    background: var(--void); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: all 0.25s var(--ease);
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-cta { border: none; padding: 12px 0; }
  .nav-toggle { display: flex; }

  .hero { padding: 110px 0 70px; }
  .skills-grid, .project-grid, .doc-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   V2 ADDITIONS — loading screen, signature, floating tech, rotating role,
   stats, terminal, pipeline animation, github/live project extras
   ========================================================================== */

/* ---------- Loading screen ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--void);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-sig { width: 240px; max-width: 60vw; height: auto; }
.loader-sig-text {
  font-family: "Great Vibes", cursive;
  font-size: 46px;
  fill: var(--paper);
  stroke: var(--wire);
  stroke-width: 0.6;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: sig-draw 1.6s var(--ease) forwards;
}
@keyframes sig-draw { to { stroke-dashoffset: 0; fill: var(--paper); } }
.loader-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--mist);
  letter-spacing: 0.05em;
  margin: 0;
}
@media (prefers-reduced-motion: reduce) {
  .loader-sig-text { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--wire), var(--signal));
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---------- Signature / brand ---------- */
.brand-signature {
  font-family: "Great Vibes", cursive;
  font-size: 1.5rem;
  color: var(--paper);
  line-height: 1;
  padding-top: 4px;
}
.signature-svg { width: 220px; max-width: 100%; height: auto; }
.signature-svg-sm { width: 150px; }
.signature-svg-text { font-family: "Great Vibes", cursive; font-size: 38px; fill: var(--paper); }
.contact-signoff { margin-top: 6px; opacity: 0.9; }

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.footer-credit { font-family: var(--font-mono); font-size: 0.7rem; color: var(--mist-dim); margin: 0; }
.footer-inner { flex-wrap: wrap; gap: 16px; }
.footer-copy { margin: 0; font-size: 0.85rem; color: var(--mist-dim); }

/* ---------- Floating tech pills (hero background) ---------- */
.floating-tech { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.tech-pill {
  position: absolute;
  left: var(--x); top: var(--y);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--mist);
  background: rgba(18, 26, 46, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 999px;
  animation: float-badge 7s ease-in-out infinite;
  animation-delay: var(--d);
  opacity: 0.75;
}
@keyframes float-badge {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) { .tech-pill { animation: none; } }
@media (max-width: 900px) { .floating-tech { display: none; } }

/* ---------- Rotating hero role ---------- */
.hero-role { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 18px; font-family: var(--font-mono); font-size: 0.95rem; }
.hero-role-fixed { color: var(--mist); }
.hero-role-rotate { color: var(--signal); border-bottom: 1px solid var(--signal-dim); padding-bottom: 2px; min-height: 1.4em; }

/* ---------- Hero stats ---------- */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--paper); }
.stat-label { font-size: 0.76rem; color: var(--mist-dim); line-height: 1.3; }

/* ---------- Terminal window (Skills section) ---------- */
.skills-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap); align-items: start; }
.terminal-window {
  background: #0D1425;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red { background: #F16C6C; } .dot-yellow { background: #F5C260; } .dot-green { background: #6FCF97; }
.terminal-title { font-family: var(--font-mono); font-size: 0.72rem; color: var(--mist-dim); margin-left: 8px; }
.terminal-body { padding: 18px 16px; font-family: var(--font-mono); font-size: 0.82rem; color: #9FE3B8; min-height: 220px; line-height: 1.7; white-space: pre-wrap; }
.terminal-body .prompt { color: var(--wire); }
.terminal-body .comment { color: var(--mist-dim); }
.terminal-cursor { display: inline-block; width: 7px; height: 14px; background: var(--signal); vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 900px) { .skills-layout { grid-template-columns: 1fr; } .terminal-window { position: static; } }

/* ---------- CI/CD pipeline animation ---------- */
.pipeline { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 50px 10px 20px; }
.pipeline-track { position: absolute; left: 5%; right: 5%; top: 65px; height: 2px; background: var(--line); z-index: 0; }
.pipeline-packet {
  position: absolute; top: 60px; left: 5%;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 12px 2px rgba(245,166,35,0.6);
  animation: packet-move 5s linear infinite;
  z-index: 1;
}
@keyframes packet-move { 0% { left: 5%; } 100% { left: 92%; } }
.pipeline-node { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--mist); flex: 1; }
.pipeline-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--wire-dim); display: grid; place-items: center; font-size: 1.1rem; color: var(--wire); }
@media (prefers-reduced-motion: reduce) { .pipeline-packet { animation: none; left: 5%; } }
@media (max-width: 720px) { .pipeline { flex-wrap: wrap; gap: 24px; } .pipeline-track, .pipeline-packet { display: none; } }

/* ---------- GitHub project cards ---------- */
.chip-lang { color: var(--signal); border: 1px solid var(--signal-dim); background: rgba(245,166,35,0.08); }
.gh-card { justify-content: space-between; }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; margin-top: 14px; align-self: flex-start; }
.inline-link { color: var(--wire); border-bottom: 1px solid var(--wire-dim); }
.inline-link:hover { color: var(--paper); }
.section-footnote { margin-top: 24px; font-size: 0.85rem; color: var(--mist-dim); }

/* ---------- Nav active state (scrollspy) ---------- */
.main-nav a.is-active { color: var(--paper); }
.main-nav a.is-active::after { width: 100%; }

/* ==========================================================================
   ADDITIONS — signature branding, loader, rotating roles, floating tech
   icons, terminal, stats, pipeline strip, GitHub/live project cards
   ========================================================================== */

/* ---------- Loading screen ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--void);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-sig {
  font-family: "Dancing Script", cursive;
  font-size: 2.6rem;
  color: var(--wire);
  margin-bottom: 10px;
}
.loader-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--mist);
  margin-bottom: 18px;
  min-height: 1.2em;
}
.loader-cursor { color: var(--signal); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.loader-bar { width: 180px; height: 3px; background: var(--line); border-radius: 3px; margin: 0 auto; overflow: hidden; }
.loader-bar span {
  display: block; height: 100%; width: 40%;
  background: var(--wire);
  animation: loaderslide 1.1s ease-in-out infinite;
}
@keyframes loaderslide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--wire), var(--signal));
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---------- Signature branding ---------- */
.brand-sig {
  font-family: "Dancing Script", cursive;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--paper);
  line-height: 1;
}
.brand-sig::after { content: ""; }

.footer-sig-block { display: flex; flex-direction: column; gap: 4px; }
.footer-signature {
  font-family: "Dancing Script", cursive;
  font-size: 1.7rem;
  color: var(--wire);
  margin: 0;
}
.footer-credit { font-size: 0.78rem; color: var(--mist-dim); margin: 0; }

.contact-signature {
  font-family: "Dancing Script", cursive;
  font-size: 1.8rem;
  color: var(--wire);
  margin-top: 18px;
  text-align: right;
}

/* ---------- Hero glows (cloud-like ambient blur) ---------- */
.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.28;
  z-index: 0;
}
.hero-glow-a { width: 420px; height: 420px; background: var(--wire); top: -120px; right: -80px; }
.hero-glow-b { width: 320px; height: 320px; background: var(--signal); bottom: -100px; left: -60px; opacity: 0.16; }

/* ---------- Floating tech badges ---------- */
.floating-icons { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.ficon {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mist);
  border: 1px solid var(--line);
  background: rgba(18, 26, 46, 0.6);
  padding: 5px 12px;
  border-radius: 999px;
  animation: floaty 7s ease-in-out infinite;
  white-space: nowrap;
}
.fi-1 { top: 18%; left: 4%; animation-delay: 0s; }
.fi-2 { top: 68%; left: 8%; animation-delay: 1.1s; }
.fi-3 { top: 12%; left: 46%; animation-delay: 2.2s; }
.fi-4 { top: 82%; left: 40%; animation-delay: 0.6s; }
.fi-5 { top: 30%; right: 6%; animation-delay: 1.7s; }
.fi-6 { top: 60%; right: 3%; animation-delay: 2.9s; }
.fi-7 { top: 6%; right: 30%; animation-delay: 3.4s; }
.fi-8 { top: 90%; right: 20%; animation-delay: 0.3s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(-14px); opacity: 0.9; }
}
@media (max-width: 900px) { .floating-icons { display: none; } }

/* ---------- Rotating hero role ---------- */
.hero-role-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 18px; font-size: 1rem; }
.hero-role-prefix { color: var(--mist); }
.hero-role-rotator {
  font-family: var(--font-mono);
  color: var(--signal);
  font-weight: 600;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.hero-role-rotator.is-swapping { opacity: 0; transform: translateY(6px); }

/* ---------- Hero terminal ---------- */
.hero-terminal {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0D1526;
  max-width: 480px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
}
.terminal-chrome {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.tdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.td-r { background: #F16668; } .td-y { background: #F5C451; } .td-g { background: #63C776; }
.terminal-title { margin-left: 8px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--mist-dim); }
.terminal-body { padding: 16px 18px; font-family: var(--font-mono); font-size: 0.85rem; min-height: 3.2em; }
.tprompt { color: var(--signal); }
.tterm-typed { color: var(--paper); }
.terminal-cursor { color: var(--wire); animation: blink 1s step-end infinite; }

/* ---------- Stats ---------- */
.stats-section { padding: 64px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.stat-card { text-align: center; padding: 20px; border-right: 1px solid var(--line); }
.stat-card:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  color: var(--wire);
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.85rem; color: var(--mist); margin: 0; }
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 10px; }
}

/* ---------- CI/CD pipeline strip ---------- */
.pipeline-strip { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.pipeline-track {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 720px; margin: 0 auto 16px;
  flex-wrap: wrap; gap: 8px;
}
.pipeline-node {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--mist);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 1;
}
.pipeline-node-end { color: var(--signal); border-color: var(--signal-dim); }
.pipeline-line { flex: 1; height: 1px; background: var(--line); min-width: 20px; }
.pipeline-dot {
  position: absolute; top: 50%; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wire);
  box-shadow: 0 0 10px 2px rgba(108,142,245,0.7);
  transform: translateY(-50%);
  animation: pipelinemove 4s linear infinite;
}
@keyframes pipelinemove {
  0% { left: 0%; }
  100% { left: 100%; }
}
.pipeline-caption { text-align: center; font-size: 0.85rem; color: var(--mist-dim); max-width: 46ch; margin: 0 auto; }

/* ---------- GitHub project cards ---------- */
.section-lede .inline-link { color: var(--wire); border-bottom: 1px dashed var(--wire-dim); }
.gh-grid { grid-template-columns: repeat(3, 1fr); }
.gh-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.gh-card:hover { border-color: var(--wire-dim); transform: translateY(-3px); }
.gh-card-top { display: flex; justify-content: space-between; align-items: center; }
.gh-updated { font-family: var(--font-mono); font-size: 0.68rem; color: var(--mist-dim); }
.chip-live { color: #7CE0C1; border: 1px solid #2E6A55; background: rgba(124,224,193,0.08); font-family: var(--font-mono); font-size: 0.66rem; padding: 4px 9px; border-radius: 999px; letter-spacing: 0.05em; }
.gh-card h3 { font-size: 1.02rem; }
.gh-card p { font-size: 0.88rem; margin-bottom: 0; }
.gh-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--mist);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
}
.gh-stats { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--signal); }
.gh-link { font-size: 0.85rem; color: var(--wire); margin-top: auto; }
.gh-link:hover { text-decoration: underline; }
.gh-more { text-align: center; margin-top: 36px; }

/* ---------- Live project cards ---------- */
.live-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.live-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.live-card:hover { border-color: var(--wire-dim); transform: translateY(-3px); }
.browser-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.browser-url { margin-left: 8px; font-family: var(--font-mono); font-size: 0.68rem; color: var(--mist-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card-preview {
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
}
.live-preview-a { background: linear-gradient(135deg, rgba(108,142,245,0.18), rgba(108,142,245,0.02)); }
.live-preview-b { background: linear-gradient(135deg, rgba(245,166,35,0.16), rgba(245,166,35,0.02)); }
.live-preview-c { background: linear-gradient(135deg, rgba(124,224,193,0.14), rgba(124,224,193,0.02)); }
.live-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.live-card-body h3 { font-size: 1rem; }
.live-card-body p { font-size: 0.86rem; margin-bottom: 0; }
.live-card-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; }

@media (max-width: 900px) {
  .gh-grid, .live-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .gh-grid, .live-grid { grid-template-columns: 1fr; }
  .pipeline-track { flex-direction: column; align-items: flex-start; }
  .pipeline-line { display: none; }
  .pipeline-dot { display: none; }
}
