/* ═══════════════════════════════════════════════════════
   krypthane — main.css  v7.0
   Cloudflare Pages · wavegxz-design
═══════════════════════════════════════════════════════ */

/* ── TOKENS ───────────────────────────────────────────── */
:root {
  --g:   #00ff41;
  --gd:  #00c832;
  --gk:  #003b00;
  --g2:  #80ff80;
  --r:   #ff2d2d;
  --cy:  #00cfff;
  --bg:  #000a00;
  --b2:  #010f01;
  --b3:  #020f02;
  --tx:  #c8ffc8;
  --mo: 'Share Tech Mono', monospace;
  --di: 'Orbitron', sans-serif;
  --vt: 'VT323', monospace;
  --ease: cubic-bezier(.16,1,.3,1);
  --ease-in: cubic-bezier(.4,0,1,1);
}

/* ── RESET ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--g);
  font-family: var(--mo);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* ── PAGE LOAD REVEAL ─────────────────────────────────── */
#kx-veil {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
  transition: opacity .7s var(--ease);
}
#kx-veil.gone { opacity: 0; }

/* ── SCANLINES ────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 997;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,.11) 2px, rgba(0,0,0,.11) 4px
  );
}

/* ── MATRIX CANVAS ────────────────────────────────────── */
#kx-matrix {
  position: fixed; inset: 0;
  z-index: 0;
  opacity: .09;
  pointer-events: none;
  will-change: contents;
}

/* ── CURSOR GLOW ──────────────────────────────────────── */
#kx-cg {
  position: fixed;
  pointer-events: none;
  z-index: 996;
  width: 440px; height: 440px;
  margin: -220px 0 0 -220px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .5s;
  background: radial-gradient(
    circle,
    rgba(0,255,65,.06) 0%,
    rgba(0,255,65,.018) 40%,
    transparent 70%
  );
  will-change: left, top;
}
@media (hover: hover) {
  body { cursor: crosshair; }
  #kx-cg.on { opacity: 1; }
}

/* ── SCROLL REVEAL ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .6s var(--ease),
    transform .6s var(--ease);
}
.reveal.vis {
  opacity: 1;
  transform: none;
}

/* ── REDUCED MOTION ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  #kx-veil { display: none; }
}

/* ══════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 300; height: 52px;
  background: rgba(0,4,0,.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid #001a00;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  gap: 12px;
}
.nav-logo {
  font-family: var(--di);
  font-weight: 900;
  font-size: .84rem;
  letter-spacing: .16em;
  color: var(--g);
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(0,255,65,.4);
  flex-shrink: 0;
  position: relative;
}
.nav-logo span { color: var(--r); }
/* Glitch flicker on logo */
.nav-logo::after {
  content: attr(data-t);
  position: absolute; inset: 0;
  color: var(--cy);
  opacity: 0;
  animation: logo-glitch 7s 4s infinite;
  clip-path: polygon(0 30%, 100% 30%, 100% 55%, 0 55%);
}
@keyframes logo-glitch {
  0%,96%,100% { opacity: 0; transform: none; }
  97% { opacity: .7; transform: translateX(4px); }
  98% { opacity: 0; }
  99% { opacity: .4; transform: translateX(-3px); }
}
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
}
.nav-links a {
  font-size: .63rem;
  color: #3a6a3a;
  text-decoration: none;
  letter-spacing: .09em;
  padding: 0 12px;
  height: 52px;
  display: flex;
  align-items: center;
  position: relative;
  transition: color .25s;
  white-space: nowrap;
}
.nav-links a::before {
  content: '> ';
  color: var(--r);
  opacity: .45;
  transition: opacity .25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 1px;
  background: var(--g);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
  box-shadow: 0 0 6px rgba(0,255,65,.5);
}
.nav-links a:hover,
.nav-links a.act { color: var(--g); }
.nav-links a:hover::before,
.nav-links a.act::before { opacity: 1; }
.nav-links a:hover::after,
.nav-links a.act::after { transform: scaleX(1); }

/* Hamburger */
.nav-burger {
  display: none;
  background: none;
  border: 1px solid #002200;
  padding: 0;
  cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .2s;
}
.nav-burger:hover { border-color: var(--g); }
.nav-burger span {
  width: 18px; height: 1px;
  background: var(--g);
  display: block;
  transition: all .3s var(--ease);
}
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 52px; left: 0; right: 0;
  z-index: 299;
  background: rgba(0,3,0,.99);
  border-bottom: 1px solid #001a00;
  flex-direction: column;
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  font-size: .72rem;
  color: #3a6a3a;
  text-decoration: none;
  letter-spacing: .12em;
  padding: 16px 24px;
  border-bottom: 1px solid #001200;
  transition: color .2s, background .2s;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover,
.nav-drawer a.act { color: var(--g); background: rgba(0,255,65,.04); }

@media (max-width: 500px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 340px) {
  .nav-logo { font-size: .72rem; }
  nav { padding: 0 14px; }
}

/* ══════════════════════════════════════════════════════
   TERMINAL BLOCKS
══════════════════════════════════════════════════════ */
.tb {
  background: var(--b2);
  border: 1px solid #001a00;
  border-radius: 2px;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.tb:hover {
  border-color: #1a3a1a;
  box-shadow: 0 0 22px rgba(0,255,65,.07);
}
.tb-bar {
  background: #000d00;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #001500;
  min-height: 30px;
}
.tb-dot {
  width: 8px; height: 8px;
  min-width: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28c840; }
.tb-title {
  font-size: .58rem;
  color: #2a4a2a;
  margin-left: auto;
  letter-spacing: .1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-body {
  padding: 14px 16px;
  font-size: .74rem;
  line-height: 2;
  color: var(--tx);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.t-prompt { color: var(--g); }
.t-cmd    { color: #80ff80; }
.t-out    { color: #4a7a4a; padding-left: 12px; display: block; }
.t-hi     { color: var(--g); padding-left: 12px; display: block; font-weight: bold; }
.tb-body a {
  color: var(--gd);
  text-decoration: none;
  word-break: break-all;
  transition: color .2s;
}
.tb-body a:hover { color: var(--g); }

/* ══════════════════════════════════════════════════════
   LAYOUT UTILS
══════════════════════════════════════════════════════ */
.w {
  position: relative;
  z-index: 10;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 22px;
}
.w-wide {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Page header block */
.ph {
  padding: 100px 0 48px;
  text-align: center;
  position: relative;
  z-index: 10;
}
.ph-badge {
  display: inline-block;
  font-size: .59rem;
  letter-spacing: .28em;
  color: var(--r);
  border: 1px solid rgba(255,45,45,.45);
  padding: 4px 14px;
  margin-bottom: 14px;
  animation: fi .7s ease both;
  position: relative;
  overflow: hidden;
}
.ph-badge::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,45,45,.12), transparent);
  animation: shine 2.8s 1s infinite;
}
.ph-title {
  font-family: var(--di);
  font-weight: 900;
  font-size: clamp(2rem, 8vw, 5rem);
  color: var(--g);
  letter-spacing: .07em;
  text-shadow: 0 0 36px rgba(0,255,65,.5), 0 0 72px rgba(0,255,65,.1);
  animation: fi .7s .15s ease both;
  line-height: 1;
}
.ph-sub {
  font-family: var(--vt);
  font-size: 1.2rem;
  color: #4a7a4a;
  letter-spacing: .14em;
  margin-top: 10px;
  animation: fi .7s .3s ease both;
}

/* Section header */
.sh {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
}
.sh-num {
  font-size: .6rem;
  color: var(--r);
  letter-spacing: .2em;
  border: 1px solid rgba(255,45,45,.4);
  padding: 2px 8px;
  flex-shrink: 0;
}
.sh-title {
  font-family: var(--di);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .14em;
  color: var(--g);
}
.sh-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, #001500, transparent);
}

/* ══════════════════════════════════════════════════════
   AUDIO PLAYER
══════════════════════════════════════════════════════ */
#kx-ap {
  position: fixed;
  bottom: 18px; right: 18px;
  z-index: 500;
  background: linear-gradient(135deg, rgba(0,5,0,.98), rgba(0,14,0,.98));
  border: 1px solid #001a00;
  border-radius: 2px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 182px;
  max-width: 212px;
  transition: border-color .4s, box-shadow .4s;
  box-shadow: 0 4px 24px rgba(0,0,0,.6);
}
#kx-ap.on {
  border-color: var(--g);
  box-shadow: 0 0 24px rgba(0,255,65,.22), 0 0 56px rgba(0,255,65,.06);
}
#kx-ap-name {
  font-family: var(--mo);
  font-size: .55rem;
  color: #2a5a2a;
  letter-spacing: .07em;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .4s;
}
#kx-ap.on #kx-ap-name { color: #7aff7a; }
#kx-ap-btn {
  background: none;
  border: 1px solid #002200;
  color: #008a20;
  width: 30px; height: 30px;
  min-width: 30px;
  border-radius: 2px;
  cursor: pointer;
  font-size: .77rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
  flex-shrink: 0;
  padding: 0;
}
#kx-ap-btn:hover { border-color: var(--g); color: var(--g); background: rgba(0,255,65,.08); }
#kx-ap.on #kx-ap-btn { border-color: var(--g); color: var(--g); }
#kx-ap-viz {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 15px;
  flex-shrink: 0;
}
#kx-ap-viz s {
  width: 3px;
  background: #002200;
  border-radius: 1px;
  height: 3px;
  display: block;
  text-decoration: none;
  transition: background .4s;
  will-change: height;
}
#kx-ap.on #kx-ap-viz s {
  background: var(--g);
  animation: av .88s ease-in-out infinite;
}
#kx-ap-viz s:nth-child(1) { animation-delay: 0s; }
#kx-ap-viz s:nth-child(2) { animation-delay: .13s; }
#kx-ap-viz s:nth-child(3) { animation-delay: .26s; }
#kx-ap-viz s:nth-child(4) { animation-delay: .13s; }
#kx-ap-viz s:nth-child(5) { animation-delay: 0s; }
@keyframes av {
  0%,100% { height: 3px; }
  22% { height: 13px; }
  55% { height: 6px; }
  77% { height: 15px; }
}
@media (max-width: 480px) {
  #kx-ap { min-width: 0; max-width: 50px; padding: 8px 10px; bottom: 14px; right: 14px; }
  #kx-ap-name, #kx-ap-viz { display: none; }
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid #001500;
  padding: 34px 0;
  text-align: center;
  position: relative;
  z-index: 10;
}
.foot-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  list-style: none;
}
.foot-links a {
  font-size: .6rem;
  color: #2a5a2a;
  text-decoration: none;
  letter-spacing: .09em;
  transition: color .2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.foot-links a:hover { color: var(--g); }
.foot-copy {
  font-size: .56rem;
  color: #1a3a1a;
  letter-spacing: .13em;
}

/* ══════════════════════════════════════════════════════
   GLOBAL KEYFRAMES
══════════════════════════════════════════════════════ */
@keyframes fi {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 7px var(--g); }
  50%      { opacity: .25; box-shadow: none; }
}

/* ══════════════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════════════ */
#kx-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 22px 60px;
  position: relative;
  z-index: 10;
}
#kx-hero::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,255,65,.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .6rem;
  letter-spacing: .26em;
  color: var(--r);
  border: 1px solid rgba(255,45,45,.45);
  padding: 5px 14px;
  margin-bottom: 24px;
  animation: fi 1s ease both;
  position: relative;
  overflow: hidden;
}
.hero-badge::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,45,45,.14), transparent);
  animation: shine 2.4s 1.2s infinite;
}
.hero-name {
  font-family: var(--di);
  font-weight: 900;
  font-size: clamp(2.8rem, 11vw, 8rem);
  line-height: .92;
  letter-spacing: .04em;
  color: var(--g);
  text-shadow: 0 0 40px rgba(0,255,65,.5), 0 0 80px rgba(0,255,65,.12);
  animation: fi 1s .25s ease both, name-glitch 9s 3.5s infinite;
  position: relative;
  display: inline-block;
  will-change: transform;
}
.hero-name::before,
.hero-name::after {
  content: attr(data-t);
  position: absolute; inset: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: transparent;
  pointer-events: none;
}
.hero-name::before {
  color: var(--r);
  animation: glitch-r 9s 3.5s infinite;
  opacity: 0;
  clip-path: polygon(0 15%, 100% 15%, 100% 38%, 0 38%);
}
.hero-name::after {
  color: var(--cy);
  animation: glitch-c 9s 3.58s infinite;
  opacity: 0;
  clip-path: polygon(0 57%, 100% 57%, 100% 78%, 0 78%);
}
@keyframes name-glitch {
  0%,87%,100% { transform: none; }
  88%  { transform: skew(-1.5deg); }
  90%  { transform: skew(1.5deg) translateX(5px); }
  92%  { transform: none; }
  94%  { transform: skew(-.8deg) translateX(-3px); }
  96%  { transform: none; }
}
@keyframes glitch-r {
  0%,87%,100% { opacity: 0; transform: none; }
  88% { opacity: .8; transform: translateX(-6px); }
  90% { opacity: 0; }
  93% { opacity: .5; transform: translateX(6px); }
  95% { opacity: 0; }
}
@keyframes glitch-c {
  0%,87%,100% { opacity: 0; transform: none; }
  89% { opacity: .7; transform: translateX(6px); }
  91% { opacity: 0; }
  94% { opacity: .4; transform: translateX(-5px); }
  96% { opacity: 0; }
}
.hero-spec {
  font-family: var(--vt);
  font-size: clamp(1rem, 3.5vw, 1.9rem);
  color: var(--tx);
  letter-spacing: .18em;
  margin-top: 14px;
  animation: fi 1s .55s ease both;
}
.hero-typed {
  font-size: .75rem;
  color: #6aff6a;
  letter-spacing: .07em;
  margin-top: 10px;
  min-height: 1.4em;
  animation: fi 1s .85s ease both;
}
.kx-cur {
  display: inline-block;
  width: 8px; height: .95em;
  background: var(--g);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
.hero-div {
  width: 220px; height: 1px;
  margin: 28px auto;
  background: linear-gradient(90deg, transparent, var(--g), transparent);
  box-shadow: 0 0 10px rgba(0,255,65,.3);
  animation: fi 1s 1s ease both;
}
.hero-tag {
  font-size: .72rem;
  color: #5a9f5a;
  max-width: 480px;
  margin: 0 auto;
  line-height: 2.1;
  animation: fi 1s 1.2s ease both;
}
.hero-btns {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fi 1s 1.4s ease both;
}
.hbtn {
  font-family: var(--di);
  font-size: .64rem;
  letter-spacing: .18em;
  padding: 13px 30px;
  border: 1px solid;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: color .3s, box-shadow .3s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.hbtn::before {
  content: '';
  position: absolute; inset: 0;
  transform: translateX(-101%);
  transition: transform .38s cubic-bezier(.4,0,.2,1);
}
.hbtn-p { border-color: var(--g); color: var(--g); }
.hbtn-p::before { background: var(--g); }
.hbtn-p:hover { color: var(--bg); box-shadow: 0 0 30px rgba(0,255,65,.5); }
.hbtn-s { border-color: #2a5a2a; color: #4a8a4a; }
.hbtn-s::before { background: #2a5a2a; }
.hbtn-s:hover { color: var(--bg); box-shadow: 0 0 18px rgba(0,255,65,.2); }
.hbtn:hover::before { transform: translateX(0); }

/* HOME sections */
section.kx-sec {
  padding: 80px 0;
  border-top: 1px solid #001500;
  position: relative;
  z-index: 10;
}
/* About grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 620px) { .about-grid { grid-template-columns: 1fr; } }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 680px) { .skills-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 400px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-card {
  background: var(--b2);
  border: 1px solid #001500;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .25s;
}
.skill-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--g);
  opacity: 0;
  transition: opacity .3s;
  box-shadow: 0 0 8px rgba(0,255,65,.5);
}
.skill-card:hover {
  border-color: var(--g);
  box-shadow: 0 0 22px rgba(0,255,65,.1);
  transform: translateY(-3px);
}
.skill-card:hover::after { opacity: 1; }
.sk-icon {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 9px;
}
.sk-name {
  font-family: var(--di);
  font-size: .6rem;
  letter-spacing: .13em;
  color: var(--g);
  margin-bottom: 7px;
}
.sk-desc {
  font-size: .67rem;
  color: #4a7a4a;
  line-height: 1.65;
}
.sk-bar {
  margin-top: 12px;
  height: 2px;
  background: #001500;
  overflow: hidden;
  border-radius: 2px;
}
.sk-fill {
  height: 100%;
  background: linear-gradient(90deg, #003a00, var(--g));
  box-shadow: 0 0 6px rgba(0,255,65,.4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.3s var(--ease);
}
.skill-card.vis .sk-fill { transform: scaleX(1); }

/* CTF list */
.ctf-list { display: flex; flex-direction: column; gap: 12px; }
.ctf-row {
  background: var(--b2);
  border: 1px solid #001500;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  transition: border-color .3s, box-shadow .3s, transform .2s;
}
@media (max-width: 460px) {
  .ctf-row { grid-template-columns: 40px 1fr; }
  .ctf-tags { display: none; }
}
.ctf-row:hover {
  border-color: #2a5a2a;
  box-shadow: 0 0 18px rgba(0,255,65,.08);
  transform: translateX(4px);
}
.ctf-num {
  font-family: var(--vt);
  font-size: 1.8rem;
  color: #003300;
  line-height: 1;
  transition: color .2s;
}
.ctf-row:hover .ctf-num { color: #005500; }
.ctf-name {
  font-family: var(--di);
  font-size: .71rem;
  letter-spacing: .09em;
  color: var(--g);
  margin-bottom: 3px;
}
.ctf-sub { font-size: .61rem; color: #4a7a4a; }
.ctf-tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  font-size: .55rem;
  letter-spacing: .09em;
  border: 1px solid #002200;
  color: #4a7a4a;
  padding: 2px 6px;
  transition: all .25s;
}
.ctf-row:hover .tag { border-color: #2a5a2a; color: #6aff6a; }
.tag-hot { border-color: rgba(255,45,45,.4) !important; color: var(--r) !important; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .contact-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════
   TOOLS PAGE
══════════════════════════════════════════════════════ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 18px;
  padding: 0 0 70px;
  position: relative;
  z-index: 10;
}
@media (max-width: 470px) { .tools-grid { grid-template-columns: 1fr; gap: 12px; } }

.tool-card {
  background: linear-gradient(145deg, #010f01, #020f02, #010a01);
  border: 1px solid #001800;
  overflow: hidden;
  position: relative;
  transition: transform .3s, border-color .35s, box-shadow .4s;
  will-change: transform;
}
/* Shimmer sweep */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,.85), transparent);
  transition: left .6s var(--ease);
}
.tool-card:hover::before { left: 140%; }
/* Corner accent */
.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 0;
  border-bottom: 1px solid transparent;
  border-right:  1px solid transparent;
  transition: width .3s, height .3s, border-color .3s;
}
.tool-card:hover::after {
  width: 28px; height: 28px;
  border-color: var(--g);
}
.tool-card:hover {
  border-color: rgba(0,255,65,.45);
  box-shadow:
    0 0 0 1px rgba(0,255,65,.07),
    0 10px 36px rgba(0,0,0,.55),
    inset 0 0 40px rgba(0,255,65,.025);
  transform: translateY(-3px);
}
.tool-top {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #001800;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.tool-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 6px rgba(0,255,65,.3));
}
.tool-name {
  font-family: var(--di);
  font-size: .88rem;
  letter-spacing: .12em;
  color: var(--g);
  margin-bottom: 7px;
  text-shadow: 0 0 8px rgba(0,255,65,.25);
}
.tool-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 9px; }
.badge {
  font-size: .54rem;
  letter-spacing: .09em;
  padding: 2px 7px;
  border: 1px solid;
}
.badge-v { border-color: rgba(0,255,65,.5); color: var(--g); background: rgba(0,255,65,.06); }
.badge-l { border-color: #004500; color: #6aff6a; }
.badge-m { border-color: #4a0000; color: #ff8080; }
.tool-desc {
  font-size: .69rem;
  color: #4a7a4a;
  line-height: 1.75;
  max-width: 300px;
}
.tool-status { flex-shrink: 0; }
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .57rem;
  color: #2a5a2a;
  letter-spacing: .09em;
}
.status-led {
  width: 7px; height: 7px;
  min-width: 7px;
  border-radius: 50%;
  background: var(--g);
  box-shadow: 0 0 7px var(--g);
  animation: pulse 2.3s infinite;
}
/* Feature grid */
.tool-feats {
  padding: 10px 20px;
  border-bottom: 1px solid #001800;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.feat-item {
  font-size: .62rem;
  color: #3a6a3a;
  padding: 3px 0;
  transition: color .25s;
}
.feat-item::before { content: '→ '; color: #004800; }
.tool-card:hover .feat-item { color: #4a8a4a; }
/* Terminal inside card */
.tool-term {
  border: none;
  border-top: 1px solid #001800;
  border-radius: 0;
  background: transparent;
}
.tool-term:hover { box-shadow: none; }
/* Install row */
.tool-actions {
  padding: 11px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.install-bar {
  flex: 1;
  min-width: 120px;
  background: #000900;
  border: 1px solid #002200;
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .25s, box-shadow .25s;
}
.install-bar:hover {
  border-color: #2a6a2a;
  box-shadow: 0 0 12px rgba(0,255,65,.1);
}
.install-cmd {
  font-family: var(--mo);
  font-size: .59rem;
  color: #3a6a3a;
  padding: 7px 8px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  transition: color .2s;
}
.install-bar:hover .install-cmd { color: var(--g); }
.copy-btn {
  background: none;
  border: none;
  border-left: 1px solid #002200;
  color: #2a5a2a;
  cursor: pointer;
  padding: 0 12px;
  font-size: .72rem;
  min-height: 36px;
  min-width: 36px;
  transition: all .2s;
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--g); background: rgba(0,255,65,.08); }
.gh-btn {
  font-size: .62rem;
  letter-spacing: .09em;
  padding: 9px 16px;
  border: 1px solid var(--g);
  color: var(--g);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: color .3s, box-shadow .3s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.gh-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--g);
  transform: translateX(-101%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.gh-btn:hover { color: var(--bg); box-shadow: 0 0 18px rgba(0,255,65,.4); }
.gh-btn:hover::before { transform: translateX(0); }

@media (max-width: 470px) {
  .tool-top { flex-wrap: wrap; }
  .tool-desc { max-width: 100%; }
  .tool-actions { flex-direction: column; align-items: stretch; }
  .gh-btn { justify-content: center; }
  .tool-feats { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   INTEL PAGE
══════════════════════════════════════════════════════ */
.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 16px;
  padding: 0 0 70px;
  position: relative;
  z-index: 10;
}
@media (max-width: 490px) { .intel-grid { grid-template-columns: 1fr; gap: 10px; } }

.intel-card {
  background: linear-gradient(145deg, #010f01, #020f02);
  border: 1px solid #001500;
  overflow: hidden;
  transition: border-color .35s, box-shadow .3s, transform .25s;
}
.intel-card:hover {
  border-color: #1a3a1a;
  box-shadow: 0 4px 28px rgba(0,0,0,.45);
  transform: translateY(-2px);
}
.intel-head {
  padding: 15px 17px;
  border-bottom: 1px solid #001500;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  border-left: 2px solid;
}
.intel-ico {
  font-size: 1.65rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.intel-cat {
  font-family: var(--di);
  font-size: .68rem;
  letter-spacing: .13em;
  margin-bottom: 6px;
  font-weight: 700;
}
.intel-sum {
  font-size: .66rem;
  color: #4a7a4a;
  line-height: 1.72;
}
.intel-items { padding: 2px 0; }
.intel-item {
  padding: 9px 17px;
  border-bottom: 1px solid rgba(0,35,0,.6);
  transition: background .2s;
}
.intel-item:last-child { border-bottom: none; }
.intel-item:hover { background: rgba(0,255,65,.022); }
.intel-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.intel-link {
  font-size: .7rem;
  color: var(--gd);
  text-decoration: none;
  letter-spacing: .05em;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s, text-shadow .2s;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.intel-link:hover {
  color: var(--g);
  text-shadow: 0 0 8px rgba(0,255,65,.4);
}
.intel-tag {
  font-size: .51rem;
  letter-spacing: .1em;
  border: 1px solid #002500;
  color: #2a5a2a;
  padding: 1px 6px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all .2s;
}
.intel-item:hover .intel-tag { border-color: #3a7a3a; color: #5aaa5a; }
.intel-desc {
  font-size: .62rem;
  color: #2a5a2a;
  line-height: 1.55;
  transition: color .2s;
}
.intel-item:hover .intel-desc { color: #4a8a4a; }

/* Dynamic card entrance — para cards generadas por JS después del DOMContentLoaded */
.kx-fadein {
  animation: fi .6s ease both;
  /* opacity arranca en 1 via animation-fill-mode:both + @keyframes fi */
}

/* ══════════════════════════════════════════════════════
   SEPARATOR + 404
══════════════════════════════════════════════════════ */
.kx-sep {
  text-align: center;
  padding: 0 0 42px;
  font-size: .58rem;
  color: #1a3a1a;
  letter-spacing: .28em;
  position: relative;
  z-index: 10;
}
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 22px;
  position: relative;
  z-index: 10;
}
.e404-bg {
  font-family: var(--di);
  font-size: clamp(4rem, 20vw, 12rem);
  font-weight: 900;
  color: var(--g);
  opacity: .06;
  line-height: 1;
  user-select: none;
  text-shadow: 0 0 60px rgba(0,255,65,.25);
}
.e404-title {
  font-family: var(--di);
  font-size: 1.1rem;
  letter-spacing: .18em;
  color: var(--g);
  margin-top: -2rem;
  margin-bottom: 1.2rem;
}
.e404-sub {
  font-size: .72rem;
  color: #4a7a4a;
  letter-spacing: .09em;
  margin-bottom: 2rem;
}
.e404-back {
  display: inline-flex;
  align-items: center;
  font-family: var(--di);
  font-size: .64rem;
  letter-spacing: .18em;
  padding: 12px 28px;
  border: 1px solid var(--g);
  color: var(--g);
  text-decoration: none;
  transition: all .3s;
  min-height: 44px;
}
.e404-back:hover {
  background: var(--g);
  color: var(--bg);
  box-shadow: 0 0 28px rgba(0,255,65,.5);
}

/* ══════════════════════════════════════════════════════
   RESOURCES PAGE
   v7.1 — krypthane
══════════════════════════════════════════════════════ */

/* Stats bar */
.res-stats {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border: 1px solid #001500;
  background: var(--b2);
  overflow: hidden;
  position: relative;
  z-index: 10;
  animation: fi .5s ease both;
}
.res-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;
  border-right: 1px solid #001500;
  transition: background .2s;
}
.res-stat:last-child { border-right: none; }
.res-stat:hover { background: rgba(0,255,65,.025); }
.res-stat-n {
  font-family: var(--di);
  font-size: 1.1rem;
  color: var(--g);
  letter-spacing: .06em;
  text-shadow: 0 0 10px rgba(0,255,65,.3);
}
.res-stat-l {
  font-size: .52rem;
  color: #2a5a2a;
  letter-spacing: .14em;
}
@media (max-width: 500px) {
  .res-stats { flex-wrap: wrap; }
  .res-stat { flex: 1 1 50%; border-bottom: 1px solid #001500; }
}

/* Search */
.res-search-wrap {
  position: relative;
  z-index: 10;
  margin-bottom: 28px;
  animation: fi .55s .05s ease both;
}
.res-search {
  width: 100%;
  background: var(--b2);
  border: 1px solid #001a00;
  border-radius: 0;
  padding: 11px 100px 11px 40px;
  font-family: var(--mo);
  font-size: .73rem;
  color: var(--g);
  letter-spacing: .06em;
  outline: none;
  -webkit-appearance: none;
  transition: border-color .25s, box-shadow .25s;
}
.res-search:focus {
  border-color: var(--g);
  box-shadow: 0 0 0 1px rgba(0,255,65,.15), 0 0 20px rgba(0,255,65,.07);
}
.res-search::placeholder { color: #1a3a1a; }
.res-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.res-search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #2a5a2a;
  font-size: .85rem;
  pointer-events: none;
  user-select: none;
}
.res-search-count {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: .57rem;
  color: #2a4a2a;
  letter-spacing: .1em;
  white-space: nowrap;
  pointer-events: none;
}

/* Category section */
.res-section {
  margin-bottom: 36px;
  position: relative;
  z-index: 10;
  animation: fi .6s ease both;
}
.res-section:nth-child(1) { animation-delay: .06s; }
.res-section:nth-child(2) { animation-delay: .11s; }
.res-section:nth-child(3) { animation-delay: .16s; }
.res-section:nth-child(4) { animation-delay: .21s; }
.res-section:nth-child(5) { animation-delay: .26s; }
.res-section:nth-child(6) { animation-delay: .31s; }

/* Section header */
.res-header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #010f01, #020f02);
  border: 1px solid #001800;
  border-bottom: none;
  border-left: 3px solid var(--g);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background .2s;
}
.res-header:hover { background: rgba(0,255,65,.02); }
.res-header::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,255,65,.04), transparent);
  pointer-events: none;
}
.res-icon { font-size: 1.25rem; flex-shrink: 0; }
.res-title {
  font-family: var(--di);
  font-size: .72rem;
  letter-spacing: .13em;
  color: var(--g);
  text-shadow: 0 0 8px rgba(0,255,65,.25);
  flex-shrink: 0;
}
.res-hdesc {
  font-size: .63rem;
  color: #3a6a3a;
  letter-spacing: .05em;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.res-count {
  font-size: .56rem;
  color: #2a5a2a;
  letter-spacing: .1em;
  border: 1px solid #002500;
  padding: 2px 8px;
  flex-shrink: 0;
  transition: all .2s;
}
.res-header:hover .res-count { border-color: #3a7a3a; color: #5aaa5a; }

/* Item list */
.res-list {
  border: 1px solid #001500;
  border-top: none;
  background: var(--b2);
  overflow: hidden;
}
.res-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(0,25,0,.7);
  border-left: 2px solid transparent;
  transition: background .18s, border-left-color .18s;
}
.res-item:last-child { border-bottom: none; }
.res-item:hover {
  background: rgba(0,255,65,.022);
  border-left-color: var(--g);
}
.res-item-name {
  font-family: var(--mo);
  font-size: .71rem;
  color: var(--gd);
  letter-spacing: .04em;
  margin-bottom: 3px;
  transition: color .18s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-item:hover .res-item-name { color: var(--g); }
.res-item-desc {
  font-size: .61rem;
  color: #2a5a2a;
  line-height: 1.52;
  transition: color .18s;
}
.res-item:hover .res-item-desc { color: #3a7a3a; }
.res-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.res-tag {
  font-size: .51rem;
  letter-spacing: .1em;
  border: 1px solid #002200;
  color: #2a5a2a;
  padding: 1px 7px;
  white-space: nowrap;
  transition: all .18s;
}
.res-item:hover .res-tag { border-color: #3a7a3a; color: #5aaa5a; }
.res-link {
  font-size: .57rem;
  color: #1a3a1a;
  letter-spacing: .09em;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #001800;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  transition: all .2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.res-link::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--g);
  transform: translateX(-101%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.res-link:hover { color: var(--bg); border-color: var(--g); box-shadow: 0 0 10px rgba(0,255,65,.2); }
.res-link:hover::before { transform: translateX(0); }
.res-link span { position: relative; z-index: 1; }

/* Filter states */
.res-item.kx-hidden   { display: none; }
.res-section.kx-empty { display: none; }

@media (max-width: 500px) {
  .res-item { grid-template-columns: 1fr; gap: 8px; }
  .res-item-right { flex-direction: row; align-items: center; }
  .res-hdesc { display: none; }
  .res-search { padding: 11px 80px 11px 38px; font-size: .67rem; }
}
