/* ===========================================================
   Cyber-Sentry HUD design system
   =========================================================== */

:root {
  --bg: #0a0a0c;
  --bg-raised: #121315;
  --surface: #141419;
  --line: #24242c;
  --line-bright: #34343f;

  --text: #e3e2e5;
  --text-dim: #8b8b96;

  --cyan: #00f0ff;
  --pink: #ff003c;
  --yellow: #fcee0a;
  --purple: #b026ff;
  --green: #00ff41;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --pad-x: clamp(16px, 4vw, 64px);
  --hud-top-h: 72px;
  --hud-bottom-h: 34px;

  /* signature angular corner: top-right + bottom-left cut */
  --notch: 15px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.booting { overflow: hidden; height: 100vh; }

a { color: inherit; text-decoration: none; }
::selection { background: var(--cyan); color: #000; }

.cyan { color: var(--cyan); }
.pink { color: var(--pink); }
.yellow { color: var(--yellow); }
.ok { color: var(--green); }
.dot-pink { color: var(--pink); }

/* notched corner helpers */
.notch-a { clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch))); }
.notch-b { clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch)); }

/* ===================== boot sequence ===================== */

.boot {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-inner { width: min(560px, 88vw); }
.boot-log {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.9;
  color: var(--green);
  margin: 0 0 16px;
  min-height: 148px;
  white-space: pre-wrap;
}
.boot-bar { height: 2px; background: var(--line); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

/* ===================== custom HUD cursor ===================== */
/* Only enabled on devices with a real pointer — see app.js */

.cursor-dot, .cursor-ring { display: none; }

body.has-cursor { cursor: none; }
body.has-cursor a,
body.has-cursor button,
body.has-cursor [data-cursor] { cursor: none; }

body.has-cursor .cursor-dot {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.2s ease, transform 0.12s ease;
}

body.has-cursor .cursor-ring {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  pointer-events: none;
  z-index: 9998;
  transition: width 0.22s cubic-bezier(.2,.8,.2,1),
              height 0.22s cubic-bezier(.2,.8,.2,1),
              margin 0.22s cubic-bezier(.2,.8,.2,1),
              opacity 0.2s ease;
}

/* four corner brackets — the reticle */
.cr-c {
  position: absolute;
  width: 9px; height: 9px;
  border: 1.5px solid var(--cyan);
  transition: border-color 0.2s ease;
}
.cr-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.cr-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.cr-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.cr-br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.cr-label {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* hover state: reticle opens up, label appears */
body.has-cursor.cursor-hover .cursor-ring {
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
}
body.has-cursor.cursor-hover .cr-label { opacity: 1; }
body.has-cursor.cursor-hover .cursor-dot { transform: scale(0.4); }

/* click feedback */
body.has-cursor.cursor-down .cursor-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
body.has-cursor.cursor-down .cr-c { border-color: var(--pink); }
body.has-cursor.cursor-down .cursor-dot { background: var(--pink); box-shadow: 0 0 10px var(--pink); }

/* leaves the window */
body.has-cursor.cursor-out .cursor-dot,
body.has-cursor.cursor-out .cursor-ring { opacity: 0; }

/* ===================== fullscreen FX ===================== */

.fx-scanlines, .fx-grid, .fx-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}
.fx-scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 240, 255, 0.035) 0px,
    rgba(0, 240, 255, 0.035) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
  opacity: 0.55;
}
.fx-grid {
  background-image:
    linear-gradient(rgba(0, 255, 65, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.5;
  z-index: 0;
}
.fx-vignette {
  background: radial-gradient(ellipse 78% 62% at 50% 45%, transparent 40%, rgba(0,0,0,0.72) 100%);
  z-index: 61;
}

/* ===================== top HUD bar ===================== */

.hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hud-top-h);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 var(--pad-x);
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 26px; height: 26px;
  background: var(--pink);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
  box-shadow: 0 0 14px rgba(255, 0, 60, 0.6);
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.14em;
}
.brand-text .b2 { color: var(--pink); }

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  transition: color 0.2s ease, text-shadow 0.2s ease;
  position: relative;
  padding: 3px 0;
}
.nav a:hover { color: var(--cyan); text-shadow: 0 0 8px rgba(0, 240, 255, 0.8); }
.nav a.active { color: var(--cyan); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: -6px; right: -6px; bottom: -5px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.nav a.nav-active-box {
  color: var(--green);
  border: 1px solid rgba(0, 255, 65, 0.5);
  padding: 6px 14px;
}
.nav a.nav-active-box:hover { color: var(--green); background: rgba(0, 255, 65, 0.08); text-shadow: none; }

.sys-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  border: 1px solid rgba(0, 255, 65, 0.4);
  padding: 6px 12px;
  white-space: nowrap;
}

/* cyan border, not --line-bright: at 34px on a near-black bar the dim
   border made the only mobile menu affordance almost invisible */
.nav-burger { display: none; width: 34px; height: 34px; background: rgba(0,240,255,0.06); border: 1px solid rgba(0,240,255,0.5); position: relative; margin-left: auto; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 1.5px; background: var(--cyan); transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-burger span { top: 50%; }
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }
body.nav-open .nav-burger span { background: transparent; }
body.nav-open .nav-burger span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* ===================== hero ===================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--hud-top-h) + 40px) var(--pad-x) calc(var(--hud-bottom-h) + 40px);
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(255, 0, 60, 0.14), transparent);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-grid {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 8px 18px;
  margin-bottom: 26px;
  background: rgba(252, 238, 10, 0.05);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0 0 30px;
  text-transform: uppercase;
}
.hero-name .ln { display: block; position: relative; }
.hero-name .ln:nth-child(1) { color: #fff; text-shadow: 0 0 22px rgba(255,255,255,0.45); }
.hero-name .ln:nth-child(2) { color: #fff; text-shadow: 0 0 22px rgba(0, 240, 255, 0.85); padding-left: 0.14em; }
.hero-name .ln:nth-child(3) { color: #fff; text-shadow: 0 0 22px rgba(252, 238, 10, 0.85); padding-left: 0.28em; }

/* glitch layers driven by data-text */
.hero-name .ln::before,
.hero-name .ln::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}
.hero-name.glitching .ln::before {
  opacity: 0.85;
  color: var(--pink);
  text-shadow: none;
  animation: glitchA 0.42s steps(2, end);
}
.hero-name.glitching .ln::after {
  opacity: 0.85;
  color: var(--cyan);
  text-shadow: none;
  animation: glitchB 0.42s steps(2, end);
}
@keyframes glitchA {
  0%   { transform: translate(0); clip-path: inset(0 0 82% 0); }
  20%  { transform: translate(-4px, 2px); clip-path: inset(38% 0 40% 0); }
  40%  { transform: translate(3px, -2px); clip-path: inset(70% 0 12% 0); }
  60%  { transform: translate(-3px, 1px); clip-path: inset(20% 0 62% 0); }
  80%  { transform: translate(2px, -1px); clip-path: inset(56% 0 26% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 100% 0); }
}
@keyframes glitchB {
  0%   { transform: translate(0); clip-path: inset(72% 0 8% 0); }
  25%  { transform: translate(4px, -2px); clip-path: inset(12% 0 70% 0); }
  50%  { transform: translate(-3px, 2px); clip-path: inset(48% 0 32% 0); }
  75%  { transform: translate(3px, 1px); clip-path: inset(28% 0 56% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 100% 0); }
}

.hero-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--text);
  margin: -12px 0 22px;
}
.hero-now:empty { display: none; }
.hero-now .hn-k { color: var(--green); letter-spacing: 0.18em; font-size: 11px; }
.hero-now .hn-at { color: var(--pink); }

.hero-tagline {
  border-left: 3px solid var(--cyan);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.07), transparent 75%);
  padding: 14px 20px;
  margin-bottom: 34px;
  max-width: 560px;
}
.hero-tagline p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 15px 30px;
  display: inline-block;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.2s ease, color 0.2s ease;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
}
.btn:hover { transform: translateY(-2px); }
.btn-yellow { background: var(--yellow); color: #000; }
.btn-yellow:hover { box-shadow: 0 0 26px rgba(252, 238, 10, 0.65); }
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { box-shadow: 0 0 26px rgba(255, 0, 60, 0.65); }
.btn-cyan { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }
.btn-cyan:hover { background: rgba(0, 240, 255, 0.12); box-shadow: 0 0 26px rgba(0, 240, 255, 0.45); }

/* ---- identity panel (right side) ---- */

.hero-right { display: flex; justify-content: center; }

.id-panel {
  position: relative;
  width: min(370px, 78vw);
  aspect-ratio: 3 / 3.6;
  background: linear-gradient(160deg, #16161c, #0d0d11);
  border: 1px solid var(--line-bright);
  /* NOT overflow:hidden — the .id-org badge is meant to hang off the corner.
     The sweeping scan line is clipped by .id-inner instead. */
}
.id-inner { position: absolute; inset: 0; overflow: hidden; }
.br { position: absolute; width: 24px; height: 24px; z-index: 3; }
.br-tl { top: -1px; left: -1px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.br-tr { top: -1px; right: -1px; border-top: 2px solid var(--pink); border-right: 2px solid var(--pink); }
.br-bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--pink); border-left: 2px solid var(--pink); }
.br-br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }

.id-badge {
  position: absolute;
  top: 18px; left: 0;
  z-index: 4;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 5px 14px;
}

/* radar readout — deliberately no photo */
.radar {
  position: absolute;
  left: 50%; top: 46%;
  width: 72%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background:
    linear-gradient(rgba(0, 240, 255, 0.16), rgba(0, 240, 255, 0.16)) center / 1px 100% no-repeat,
    linear-gradient(rgba(0, 240, 255, 0.16), rgba(0, 240, 255, 0.16)) center / 100% 1px no-repeat,
    repeating-radial-gradient(circle, transparent 0 calc(25% - 1px), rgba(0, 240, 255, 0.16) calc(25% - 1px) 25%),
    radial-gradient(circle, rgba(0, 240, 255, 0.07), transparent 70%);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.08), inset 0 0 30px rgba(0, 240, 255, 0.06);
  overflow: hidden;
  z-index: 2;
}
.radar::after {   /* center pip */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
/* leading edge at 0deg (12 o'clock), fading trail behind it */
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 270deg, rgba(0, 240, 255, 0.04) 300deg, rgba(0, 240, 255, 0.38) 360deg);
  animation: radarSweep 4s linear infinite;   /* RADAR_PERIOD in app.js */
}
@keyframes radarSweep { to { transform: rotate(360deg); } }

.blip {
  position: absolute;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
  opacity: 0.12;
  animation: blip 4s ease-out infinite;      /* RADAR_PERIOD in app.js */
}
.blip:nth-child(3n) { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
@keyframes blip {
  0%   { opacity: 1; transform: scale(1.5); }
  70%  { opacity: 0.12; transform: scale(1); }
  100% { opacity: 0.12; transform: scale(1); }
}

.id-focus {
  position: absolute;
  left: 0; right: 0; bottom: 44px;
  z-index: 4;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  white-space: nowrap;
}
.id-focus .if-k { color: var(--text-dim); }
.if-caret {
  display: inline-block;
  width: 7px; height: 12px;
  margin-left: 3px;
  vertical-align: -1px;
  background: var(--cyan);
  animation: caret 1s steps(2, start) infinite;
}
@keyframes caret { to { visibility: hidden; } }

/* HUD frame detailing */
.id-panel::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px dashed rgba(0, 240, 255, 0.14);
  pointer-events: none;
  z-index: 1;
}
.id-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  /* right padding clears the .id-org badge that overlaps this corner */
  padding: 10px 62px 12px 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  background: linear-gradient(to top, rgba(10,10,12,0.95), transparent);
}
.id-meta b { color: var(--green); font-weight: 500; }


.id-org {
  position: absolute;
  right: -14px; bottom: -14px;
  z-index: 4;
  background: var(--yellow);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  padding: 16px 18px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

/* ===================== sections ===================== */

.section {
  position: relative;
  padding: 110px var(--pad-x);
  border-top: 1px solid var(--line);
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  /* keeps the heading clear of the fixed top HUD when jumped to via nav */
  scroll-margin-top: var(--hud-top-h);
}
#hero { scroll-margin-top: 0; }

.ghost-word {
  position: absolute;
  left: -2vw; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15vw;
  color: #fff;
  opacity: 0.022;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  z-index: 0;
}

.sec-head { margin-bottom: 52px; position: relative; z-index: 1; }
.sec-idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--pink);
  margin-bottom: 10px;
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
}

/* ---- about ---- */

.about-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 52px; position: relative; z-index: 1; }
.about-text { font-size: 15.5px; line-height: 1.9; color: #c9c8ce; }
.about-text strong { color: var(--cyan); font-weight: 600; }
.about-text em { font-style: normal; color: var(--yellow); }
.about-loc { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); margin-top: 18px; letter-spacing: 0.08em; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.stat {
  border: 1px solid var(--line-bright);
  background: var(--surface);
  padding: 20px 18px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.stat-n { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--cyan); text-shadow: 0 0 14px rgba(0,240,255,0.5); }
.stat-l { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--text-dim); margin-top: 8px; }

/* ---- skills ---- */

.skills-wrap { display: grid; gap: 26px; position: relative; z-index: 1; }
.skill-block { border: 1px solid var(--line); background: rgba(20,20,25,0.5); padding: 24px 26px; }
.skill-block h3 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--yellow);
  margin: 0 0 16px;
}
.skill-n { color: var(--text-dim); margin-left: 6px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--line-bright);
  padding: 7px 14px;
  transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.tag:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 16px rgba(0,240,255,0.28); transform: translateY(-2px); }

/* ---- projects ---- */

.proj-wrap { position: relative; z-index: 1; }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj[hidden] { display: none; }

.proj-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.pf {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line-bright);
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.pf:hover { color: var(--cyan); border-color: var(--cyan); }
.pf.on { color: #000; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,0.35); }
.pf-n { font-size: 10px; opacity: 0.7; }
.pf:focus-visible, .exp-more:focus-visible, .copy:focus-visible { outline: 1px solid var(--yellow); outline-offset: 3px; }
.proj {
  position: relative;
  border: 1px solid var(--line-bright);
  background: linear-gradient(150deg, #141419, #0d0d11);
  padding: 30px 28px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
}
.proj:hover { border-color: var(--cyan); transform: translateY(-4px); box-shadow: 0 0 34px rgba(0, 240, 255, 0.16); }
.proj { display: flex; flex-direction: column; }
.proj-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.proj-idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--pink); }
.proj-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ptag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; padding: 3px 8px; border: 1px solid currentColor; }
.ptag-security { color: var(--cyan); }
.ptag-ai { color: var(--purple); }
.ptag-mobile { color: var(--yellow); }
.ptag-platform { color: var(--text-dim); }
.proj-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.01em; }
.proj-desc { font-size: 14px; line-height: 1.8; color: #a9a8b2; margin: 0 0 18px; flex: 1; }
.proj-desc strong { color: var(--yellow); font-weight: 600; }
.proj-desc em { font-style: normal; color: var(--cyan); }
.proj-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-sm { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--text-dim); border: 1px solid var(--line); padding: 4px 10px; }
.proj-link { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.1em; }
.proj-link:hover { text-shadow: 0 0 10px var(--cyan); }

/* ---- experience ---- */

.exp-wrap { position: relative; z-index: 1; padding-left: 30px; }
.exp-wrap::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(to bottom, var(--cyan), var(--pink)); }
.exp { position: relative; padding-bottom: 46px; }
.exp:last-child { padding-bottom: 0; }
.exp::before {
  content: "";
  position: absolute;
  left: -30px; top: 7px;
  width: 9px; height: 9px;
  background: var(--bg);
  border: 2px solid var(--cyan);
  transform: rotate(45deg);
}
.exp-kind { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--pink); margin-bottom: 8px; }
.exp-role { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: 0 0 4px; }
.exp-org { font-family: var(--font-mono); font-size: 13px; color: var(--cyan); margin-bottom: 4px; }
.exp-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); letter-spacing: 0.06em; margin-bottom: 14px; }
.exp-org-lg { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--cyan); margin-bottom: 4px; }
.exp-meta .dur { color: var(--cyan); opacity: 0.8; }
.exp-kind .promo { color: var(--green); margin-left: 8px; }

.roles { display: grid; gap: 14px; margin-top: 18px; }
.roles .role {
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-bright);
  background: rgba(20,20,25,0.5);
  padding: 20px 22px;
}
.roles .role-now { border-left-color: var(--green); }
.role-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 4px; }
.role-head .exp-role { margin: 0; }
.badge-now {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em;
  color: var(--green); border: 1px solid rgba(0,255,65,0.45); padding: 3px 9px;
}
.role li.more { display: none; }
.role.open li.more { display: list-item; }
.exp-more {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  background: transparent;
  border: 1px dashed rgba(0,240,255,0.45);
  padding: 7px 14px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.exp-more:hover { background: rgba(0,240,255,0.08); border-style: solid; }

.exp ul { margin: 0; padding-left: 18px; }
.exp li { font-size: 14px; line-height: 1.85; color: #a9a8b2; margin-bottom: 5px; }
.exp li::marker { color: var(--cyan); }
.exp li strong { color: var(--yellow); font-weight: 600; }
.exp li em { font-style: normal; color: var(--cyan); }
.exp p { font-size: 14px; line-height: 1.85; color: #a9a8b2; margin: 0; }

/* ---- certifications ---- */

.cert-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; position: relative; z-index: 1; }
.cert {
  border: 1px solid var(--line-bright);
  background: var(--surface);
  padding: 22px 20px;
  position: relative;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.cert:hover { border-color: var(--green); box-shadow: 0 0 26px rgba(0, 255, 65, 0.16); }
.cert-ach .cert-valid { color: var(--yellow); }
.cert-ach:hover { border-color: var(--yellow); box-shadow: 0 0 26px rgba(252, 238, 10, 0.14); }
.cert-valid { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--green); margin-bottom: 10px; }
.cert-name { font-size: 14.5px; line-height: 1.6; color: var(--text); margin-bottom: 8px; }
.cert-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }

/* ---- contact ---- */

.contact-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.contact-lead { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.2; margin: 0 0 22px; text-transform: uppercase; }
.contact-sub { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); line-height: 1.9; margin-bottom: 26px; }
.contact-rows { display: grid; gap: 12px; }
.crow {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-bright);
  background: var(--surface);
  padding: 15px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.crow:hover { border-color: var(--cyan); box-shadow: 0 0 22px rgba(0,240,255,0.18); transform: translateX(3px); }
.crow .k { color: var(--pink); letter-spacing: 0.12em; font-size: 10.5px; min-width: 86px; }
.crow .v { color: var(--text); word-break: break-all; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.crow .v a:hover { color: var(--cyan); }
.copy {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line-bright);
  padding: 3px 8px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.copy:hover { color: var(--cyan); border-color: var(--cyan); }

.site-foot {
  position: relative;
  z-index: 1;
  margin: 80px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.site-foot .sf-sep { color: var(--pink); margin: 0 6px; }

/* ===================== bottom HUD bar ===================== */

.hud-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--hud-bottom-h);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 var(--pad-x);
  background: rgba(10, 10, 12, 0.92);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
}
.hb-item { display: inline-flex; align-items: center; gap: 7px; }
.hb-spacer { flex: 1; }
.hb-uptime { color: var(--green); border: 1px solid rgba(0,255,65,0.35); padding: 3px 10px; }
.led { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); display: inline-block; }
.led.green { background: var(--green); box-shadow: 0 0 8px var(--green); animation: ledPulse 2s ease-in-out infinite; }
@keyframes ledPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ===================== reveal ===================== */

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Fail open: if the reveal JS never runs (no IntersectionObserver, crawler,
   script error) content must still be visible rather than blank forever. */
.reveal-fallback [data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .radar-sweep, .blip, .if-caret, .led.green { animation: none; }
  .blip { opacity: 0.8; }
  html { scroll-behavior: auto; }
}

/* ===================== responsive ===================== */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-right { order: -1; }
  .id-panel { width: min(300px, 70vw); }
  .about-wrap, .contact-wrap { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 1180px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .proj-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .sys-status { display: none; }
  .nav-burger { display: block; }
  .nav {
    position: fixed;
    top: var(--hud-top-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    background: rgba(10,10,12,0.98);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad-x) 18px;
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }
  body.nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a { width: 100%; padding: 13px 0; font-size: 13px; }
  .nav a.nav-active-box { margin-top: 8px; text-align: center; }

  .section { padding: 76px var(--pad-x); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hb-hide-sm { display: none; }
  /* the full "SESSION_UPTIME:" label pushes the bar past the viewport here */
  .hb-lbl { display: none; }
  .hud-bottom { gap: 14px; }
  .ghost-word { font-size: 26vw; }
  .roles .role { padding: 18px 16px; }
  .exp-wrap { padding-left: 22px; }
  .exp::before { left: -22px; }
}

@media (max-width: 420px) {
  .hero-actions { gap: 10px; }
  .btn { padding: 13px 18px; font-size: 11.5px; }
}
