/* =========================================================
   PALETTE — Premium Palette 1 (Terminal / Cyberpunk)
   ========================================================= */
:root {
  --bg:         #040409;
  --bg-2:       #0a0a12;
  --bg-3:       #121220;
  --city-dark:  #020206;
  --city-mid:   #060612;
  --accent-1:   #2a5cff; /* Electric Blue (logo core) */
  --accent-2:   #3ccfe6; /* Logo Cyan */
  --accent-3:   #6f9cff; /* Sky Blue */
  --text:       #e2e2ee;
  --text-dim:   #707085;
  --text-mute:  #38384a;
  --hairline:   rgba(60, 207, 230, 0.15);
  --grid:       rgba(60, 207, 230, 0.18);
  --sun-1:      #5fd8ff;
  --sun-2:      #3ccfe6;
  --win-warm:   #ffaa33;
  --win-cool:   #00ccff;
  --win-violet: #b76aff;
  --glow-1:     0 0 6px var(--accent-1), 0 0 18px var(--accent-1);
  --glow-2:     0 0 6px var(--accent-2), 0 0 18px var(--accent-2);
}

/* =========================================================
   BASE
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Space Mono', monospace;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-1); }

/* =========================================================
   NAV
   ========================================================= */
nav.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.logo {
  display: flex;
  align-items: center;
}
.logo img {
  height: 38px;
  width: auto;
  display: block;
  transition: filter 0.25s ease, transform 0.25s ease;
}
.logo:hover img {
  filter: drop-shadow(0 0 8px rgba(60, 207, 230, 0.6));
  transform: scale(1.02);
}
.nav-right { display: flex; align-items: center; }
.navlinks {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.navlinks a {
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.navlinks a::before {
  content: "[";
  color: var(--accent-1);
  opacity: 0;
  transition: opacity 0.2s;
  margin-right: 4px;
}
.navlinks a::after {
  content: "]";
  color: var(--accent-1);
  opacity: 0;
  transition: opacity 0.2s;
  margin-left: 4px;
}
.navlinks a:hover, .navlinks a.active { color: var(--text); }
.navlinks a:hover::before, .navlinks a:hover::after,
.navlinks a.active::before, .navlinks a.active::after { opacity: 1; }

/* =========================================================
   HERO — Redesigned maximalist view with flat skyline
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 110px 24px 0;
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 20;
  mix-blend-mode: overlay;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center 35%, transparent 30%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
  z-index: 19;
}

/* ---- STARS ---- */
.stars {
  position: absolute; inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(1px 1px at 7%  15%, var(--text), transparent),
    radial-gradient(1px 1px at 12% 28%, var(--text-dim), transparent),
    radial-gradient(1.5px 1.5px at 22% 8%, var(--text), transparent),
    radial-gradient(1px 1px at 31% 22%, var(--text-dim), transparent),
    radial-gradient(1px 1px at 39% 6%, var(--text), transparent),
    radial-gradient(1.5px 1.5px at 47% 30%, var(--text), transparent),
    radial-gradient(1px 1px at 55% 12%, var(--text-dim), transparent),
    radial-gradient(1px 1px at 64% 24%, var(--text), transparent),
    radial-gradient(1.5px 1.5px at 72% 9%, var(--text), transparent),
    radial-gradient(1px 1px at 81% 26%, var(--text-dim), transparent),
    radial-gradient(1px 1px at 88% 14%, var(--text), transparent),
    radial-gradient(1.5px 1.5px at 95% 20%, var(--text), transparent);
  pointer-events: none;
}

/* ---- BRIGHT SKY GLOW & SUN ---- */
.hero-skyglow {
  position: absolute;
  left: -10%; right: -10%;
  bottom: 38vh;
  height: 60vh;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 50% 10%, var(--accent-1) 0%, rgba(0,0,0,0) 70%);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.hero-haze {
  position: absolute;
  left: 0; right: 0;
  bottom: 38vh;
  height: 12vh;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(to top, var(--accent-1) 0%, transparent 100%);
  opacity: 0.4;
  mix-blend-mode: screen;
}

.hero-sun {
  position: absolute;
  bottom: 38vh;
  left: 50%;
  transform: translate(-50%, 40%);
  width: min(380px, 80vw);
  height: min(380px, 80vw);
  border-radius: 50%;
  background: linear-gradient(to bottom, #ffffff 0%, var(--sun-1) 35%, var(--accent-1) 85%);
  z-index: 2;
  box-shadow: 0 0 80px var(--accent-1), 0 0 160px rgba(42, 92, 255, 0.4);
  overflow: hidden;
}
.hero-sun::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 18px,
    var(--bg) 18px,
    var(--bg) 24px
  );
  mask-image: linear-gradient(to top, black 0%, black 50%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, black 0%, black 50%, transparent 85%);
}

/* ---- ATMOSPHERIC FOG between sun and skyline ---- */
.hero-cityfog {
  position: absolute;
  left: 0; right: 0;
  bottom: 36vh;
  height: 24vh;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(to top,
      rgba(15, 35, 90, 0.45) 0%,
      rgba(60, 130, 255, 0.16) 40%,
      transparent 100%);
  mix-blend-mode: screen;
}

/* ---- CITYSCAPE BACKGROUND SPRITE ---- */
.cityscape {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(38vh - 4px); /* Sunk 4px below horizon to hide bottom transition */
  height: 35vh;
  background-image: url('city_sprite.webp');
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: auto 100%;
  z-index: 4;
  pointer-events: none;
  opacity: 0.9;
}

/* ---- BRIGHT HORIZON LIGHT — masks sprite bases ---- */
.horizon-glow {
  position: absolute;
  left: 0; right: 0;
  bottom: 37.4vh;
  height: 3.5vh;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(60, 207, 230, 0.95) 0%,
    rgba(60, 207, 230, 0.65) 30%,
    rgba(60, 207, 230, 0.30) 60%,
    transparent 100%);
  mix-blend-mode: screen;
  filter: blur(2px);
}
.horizon-line {
  position: absolute;
  left: 0; right: 0;
  bottom: 38vh;
  height: 2px;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(60, 207, 230, 0.4) 8%,
    #ffffff 50%,
    rgba(60, 207, 230, 0.4) 92%,
    transparent 100%);
  box-shadow:
    0 0 12px rgba(60, 207, 230, 0.9),
    0 0 28px rgba(60, 207, 230, 0.6),
    0 0 60px rgba(60, 207, 230, 0.4);
}

/* ---- CANVAS FLOOR ENGINE ---- */
#mode7-canvas {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 38vh;
  width: 100%;
  z-index: 4;
  display: block;
  pointer-events: none;
  border-top: 2px solid var(--accent-2);
  box-shadow: 0 -4px 24px rgba(60, 207, 230, 0.25);
}

/* ---- HERO CONTENT ---- */
.hero-content {
  position: relative;
  z-index: 15;
  max-width: 900px;
}
.hero-content::before {
  content: "";
  position: absolute;
  inset: -40px -100px;
  background: radial-gradient(ellipse 65% 70% at 50% 50%, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.45) 40%, rgba(0,0,0,0) 80%);
  z-index: -1;
  pointer-events: none;
}
.hero-tag {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: var(--accent-2);
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-shadow: var(--glow-2), 0 1px 6px rgba(0,0,0,0.9);
}
.hero-tag::before { content: "// "; }
.hero-tag::after  { content: " //"; }

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(52px, 10vw, 130px);
  letter-spacing: 4px;
  line-height: 0.95;
  margin-bottom: 24px;
  display: inline-block;
  filter:
    drop-shadow(-2.5px 0 0 rgba(42, 92, 255, 0.55))
    drop-shadow(2.5px 0 0 rgba(96, 224, 224, 0.55))
    drop-shadow(0 0 28px rgba(60, 207, 230, 0.45));
}
.hero-title .lo,
.hero-title .fi,
.hero-title .seo {
  background-image: linear-gradient(180deg, #bfeaff 0%, #5fd8ff 30%, #2a8cff 65%, #2040e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-title .seo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.42em;
  letter-spacing: 14px;
  display: block;
  margin-top: 10px;
  background-image: linear-gradient(90deg, #2040e0 0%, #2a8cff 50%, #5fd8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 16px;
  color: var(--text);
  max-width: 650px;
  margin: 0 auto 32px;
  line-height: 1.7;
  text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 0 15px rgba(0,0,0,0.8);
}
.hero-sub strong { color: #ffffff; font-weight: 700; }
.hero-sub .pink { color: var(--accent-1); }
.hero-sub .cyan { color: var(--accent-2); }

.hero-cta { display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1.5px solid var(--accent-1);
  color: var(--accent-1);
  background: rgba(0,0,0,0.65);
  cursor: pointer;
  transition: all 0.2s;
}
.btn::before { content: "> "; }
.btn:hover {
  background: var(--accent-1);
  color: var(--bg);
  box-shadow: var(--glow-1);
  transform: translateY(-2px);
}
.btn.alt { border-color: var(--accent-2); color: var(--accent-2); }
.btn.alt:hover { background: var(--accent-2); color: var(--bg); box-shadow: var(--glow-2); }

/* =========================================================
   SECTION SHELL
   ========================================================= */
section {
  position: relative;
  padding: 120px 36px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-head {
  margin-bottom: 64px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 20px;
}
.section-head .num {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: var(--accent-2);
}
.section-head h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 38px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text);
}
.section-head h2 span { color: var(--accent-1); text-shadow: var(--glow-1); }
.section-head .blip {
  margin-left: auto;
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--text-dim);
}
.section-head .blip::before {
  content: "▮";
  color: var(--accent-2);
  margin-right: 6px;
  animation: blink 1.1s infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

/* =========================================================
   PORTFOLIO
   ========================================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.card {
  background: #141424;
  border: 1px solid rgba(60, 207, 230, 0.25);
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 2px solid var(--accent-1);
  border-left: 2px solid var(--accent-1);
  transition: border-color 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-3);
  box-shadow: 0 6px 0 -1px var(--accent-3);
}
.card:hover::before { border-color: var(--accent-2); }

.card-thumb {
  height: 160px;
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}
.card-thumb svg { width: 100%; height: 100%; display: block; }
.card-tag {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--bg);
  color: var(--accent-2);
  font-family: 'VT323', monospace;
  font-size: 14px;
  padding: 2px 8px;
  border: 1px solid var(--hairline);
  letter-spacing: 1px;
}
.card-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 17px;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin-bottom: 6px;
}
.card .stack {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--accent-1);
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.card p {
  font-size: 13px;
  color: #b6b6cc;
  margin-bottom: 18px;
  flex: 1;
}
.card .more {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 2px;
  align-self: flex-start;
}
.card .more::after { content: " ▸"; transition: transform 0.2s; display: inline-block; }
.card:hover .more::after { transform: translateX(4px); }

/* =========================================================
   CV
   ========================================================= */
#cv { padding-top: 80px; padding-bottom: 140px; }
.cv-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
}
.cv-side {
  position: sticky;
  top: 110px;
  align-self: start;
  border: 1px solid var(--hairline);
  background: transparent;
  padding: 28px 24px 26px;
  position: relative;
}
.cv-side::before {
  content: "// profile.dat";
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--bg);
  color: var(--text-dim);
  font-family: 'VT323', monospace;
  font-size: 15px;
  padding: 0 8px;
  letter-spacing: 1px;
}
.cv-avatar {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}
.cv-avatar .face {
  font-family: 'VT323', monospace;
  color: var(--accent-2);
  font-size: 14px;
  line-height: 1.1;
  white-space: pre;
}
.cv-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.cv-role {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--accent-1);
  margin-bottom: 22px;
  letter-spacing: 1px;
}
.cv-meta {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.9;
}
.cv-meta b {
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 10.5px;
  display: block;
  margin-top: 14px;
  margin-bottom: 2px;
}
.cv-meta .pill {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--hairline);
  padding: 2px 8px;
  margin: 3px 4px 3px 0;
  font-size: 11px;
  color: var(--text);
  letter-spacing: 0.5px;
}

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 4px;
  width: 1px;
  background: var(--hairline);
}
.tl-item { position: relative; padding-bottom: 44px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -28px; top: 8px;
  width: 9px; height: 9px;
  background: var(--accent-1);
}
.tl-item:nth-child(even)::before { background: var(--accent-2); }
.tl-date {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--accent-2);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.tl-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.tl-org {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.tl-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 640px;
}
.tl-desc ul { margin-top: 10px; padding-left: 18px; }
.tl-desc li { margin-bottom: 5px; }
.tl-desc li::marker { color: var(--text-mute); content: "▸ "; }

/* =========================================================
   NEW CYBERPUNK FOOTER
   ========================================================= */
footer.cyber-footer {
  margin-top: 80px;
  padding: 60px 36px 40px;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(to top, var(--bg-2) 0%, transparent 100%);
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  align-items: start;
  text-align: left;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-brand .logo img {
  height: 34px;
  width: auto;
}
.footer-desc {
  font-size: 12px;
  color: var(--text-dim);
  max-width: 320px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.footer-links a {
  color: var(--text-dim);
  transition: color 0.2s, padding-left 0.2s;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.footer-links a:hover {
  color: var(--accent-2);
  padding-left: 6px;
}
.footer-links a::before {
  content: "▫ ";
  color: var(--accent-1);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.footer-email {
  font-size: 14px;
  color: var(--accent-1);
  letter-spacing: 1px;
  transition: text-shadow 0.2s, color 0.2s;
}
.footer-email:hover {
  color: #ffffff;
  text-shadow: var(--glow-1);
}
.footer-loc {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text);
  letter-spacing: 1px;
}
.footer-loc span.time {
  color: var(--accent-2);
  font-weight: 700;
  text-shadow: var(--glow-2);
}
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(60, 207, 230, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-mute);
}
.footer-bottom .ascii-art {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--accent-1);
  letter-spacing: 1px;
}

/* =========================================================
   INTERACTIVE TOOLS PAGE (tools.html)
   ========================================================= */
.tools-container {
  max-width: 1200px;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
}
.tool-panel {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  padding: 28px;
  position: relative;
}
.tool-panel::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 2px solid var(--accent-1);
  border-left: 2px solid var(--accent-1);
}
.tool-panel h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(60, 207, 230, 0.1);
  padding-bottom: 10px;
}
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg);
  border: 1px solid var(--hairline);
  color: var(--text);
  padding: 10px 14px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 8px rgba(42, 92, 255, 0.2);
}
.code-output-panel {
  background: #020206;
  border: 1px solid var(--hairline);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.code-output-panel h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-2);
  font-size: 13px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.code-output-panel pre {
  background: transparent;
  color: #3ccfe6;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  flex: 1;
  margin-bottom: 16px;
  max-height: 480px;
}
.copy-btn {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 11px;
}

/* =========================================================
   BLOG MODULE (blog.html)
   ========================================================= */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.blog-card {
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  padding: 30px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}
.blog-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 2px solid var(--accent-2);
  border-left: 2px solid var(--accent-2);
}
.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-1);
}
.blog-meta {
  display: flex;
  gap: 16px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--accent-2);
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.blog-meta span.date {
  color: var(--accent-1);
}
.blog-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--text);
  font-size: 20px;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.blog-excerpt {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Blog Post Reader Overlay */
.blog-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 4, 9, 0.95);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.blog-reader {
  background: var(--bg-2);
  border: 2px solid var(--accent-1);
  box-shadow: 0 0 30px rgba(42, 92, 255, 0.3);
  width: 100%;
  max-width: 800px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: monitorOn 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}
@keyframes monitorOn {
  0% { transform: scaleY(0.01) scaleX(0); filter: brightness(3); }
  50% { transform: scaleY(0.01) scaleX(1); }
  100% { transform: scaleY(1) scaleX(1); }
}
.reader-header {
  background: #020206;
  padding: 16px 24px;
  border-bottom: 1.5px solid var(--accent-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reader-title {
  font-family: 'Orbitron', sans-serif;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.close-reader {
  background: transparent;
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.2s;
}
.close-reader:hover {
  background: var(--accent-2);
  color: var(--bg);
}
.reader-body {
  padding: 30px 40px;
  overflow-y: auto;
  flex: 1;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 6px 100%;
}
.reader-body h1, .reader-body h2, .reader-body h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-2);
  margin: 24px 0 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.reader-body h2 { font-size: 18px; }
.reader-body p { margin-bottom: 20px; }
.reader-body pre {
  background: #020206;
  border: 1px solid var(--hairline);
  padding: 16px;
  color: var(--accent-2);
  font-size: 13px;
  overflow-x: auto;
  margin-bottom: 24px;
}

/* =========================================================
   CV PRINT SUPPORT
   ========================================================= */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  nav.topnav, footer.cyber-footer, .btn, .btn.alt, .cv-avatar {
    display: none !important;
  }
  section#cv {
    padding: 0 !important;
    margin: 0 !important;
  }
  .cv-wrap {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .cv-side {
    position: static !important;
    border: none !important;
    padding: 0 !important;
  }
  .cv-side::before {
    display: none !important;
  }
  .cv-name {
    color: #000000 !important;
    font-size: 24px !important;
  }
  .cv-role {
    color: #333333 !important;
  }
  .cv-meta {
    color: #333333 !important;
  }
  .cv-meta b {
    color: #000000 !important;
    margin-top: 8px !important;
  }
  .cv-meta .pill {
    border: 1px solid #999999 !important;
    color: #000000 !important;
  }
  .timeline::before {
    background: #cccccc !important;
  }
  .tl-item::before {
    background: #000000 !important;
  }
  .tl-date {
    color: #333333 !important;
  }
  .tl-title {
    color: #000000 !important;
  }
  .tl-org {
    color: #444444 !important;
  }
  .tl-desc {
    color: #222222 !important;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  nav.topnav { padding: 14px 18px; flex-wrap: wrap; gap: 12px; }
  .navlinks { gap: 14px; font-size: 11px; }
  section { padding: 80px 20px; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .cv-wrap { grid-template-columns: 1fr; gap: 40px; }
  .cv-side { position: static; }
  .section-head h2 { font-size: 26px; }
  .hero-sun { width: 260px; height: 260px; }
  .hero-content { margin-bottom: 25vh; }
  .tools-container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* =========================================================
   INTRO / ABOUT PROSE
   ========================================================= */
.intro-copy { max-width: 760px; }
.intro-copy p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 18px;
}
.intro-copy p:last-child { margin-bottom: 0; }
.intro-copy strong, .intro-copy .hl { color: var(--text); font-weight: 700; }
.intro-copy .name { color: var(--accent-2); font-weight: 700; }

/* =========================================================
   PORTFOLIO — SCREENSHOT THUMBS + TAG SYSTEM
   ========================================================= */
.card-thumb.shot {
  height: 188px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg-3);
}
.card-thumb.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.shot-ph {
  font-family: 'VT323', monospace;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-align: center;
  padding: 0 12px;
}
.shot-ph::before { content: "▣ "; color: var(--accent-2); }
.card .visit {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  display: inline-block;
  align-self: flex-start;
}
.card .visit:hover { text-shadow: var(--glow-1); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  min-height: 54px;
  align-items: flex-start;
  align-content: flex-start;
}
.tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-2);
  border: 1px solid var(--hairline);
  padding: 3px 8px;
}

/* =========================================================
   BLOG POST PAGE (/blogs/*.html)
   ========================================================= */
.post-body {
  max-width: 820px;
  margin: 0 auto;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
}
.post-body .back-link {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: inline-block;
  margin-bottom: 24px;
}
.post-body .back-link:hover { text-shadow: var(--glow-1); }
.post-body h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin: 10px 0 24px;
  line-height: 1.2;
}
.post-body h2 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-2);
  margin: 28px 0 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 18px;
}
.post-body p { margin-bottom: 20px; }
.post-body pre {
  background: #020206;
  border: 1px solid var(--hairline);
  padding: 16px;
  color: var(--accent-2);
  font-size: 13px;
  overflow-x: auto;
  margin-bottom: 24px;
  white-space: pre-wrap;
}
.post-body code { color: var(--accent-2); }