:root {
  --bg: #050505;
  --bg-soft: #0a0f0d;
  --card: #0d1410;
  --card-2: #111a16;
  --line: #1c2a20;
  --line-soft: #16221a;
  --text: #e8fbee;
  --muted: #8fbda0;
  --muted-2: #5f9471;
  --accent: #00ff41;
  --accent-2: #00cc33;
  --ok: #34d399;
  --danger: #f87171;
  --grad: linear-gradient(120deg, var(--accent), #00ffaa);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .6);
  --font-body: "Inter", system-ui, sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-h: 66px;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { position: relative; font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #66ff88; }
ul { list-style: none; }
b, strong { color: #fff; font-weight: 600; }
::selection { background: rgba(0, 255, 65, .3); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2b663f; }

.bg-grid { position: fixed; inset: 0; z-index: -2; pointer-events: none; background-image: linear-gradient(rgba(0, 255, 65, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 65, .04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 55%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 55%, transparent 100%); }
.glow { position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(120px); opacity: .4; }
.glow-1 { width: 500px; height: 500px; top: -150px; left: -100px; background: radial-gradient(circle, rgba(0, 255, 65, .2), transparent 70%); animation: drift 15s ease-in-out infinite alternate; }
.glow-2 { width: 600px; height: 600px; bottom: -200px; right: -150px; background: radial-gradient(circle, rgba(0, 204, 51, .15), transparent 70%); animation: drift 20s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, 30px) scale(1.1); } }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 255, 65, 0.025) 0 1px, transparent 1px 3px),
    radial-gradient(circle at center, transparent 62%, rgba(0, 0, 0, 0.55) 100%);
}

.section-kicker,
.hero-name {
  cursor: default;
  transition: text-shadow 0.2s ease, transform 0.2s ease;
}

.section-kicker:hover {
  color: #7dff9e;
  text-shadow: -2px 0 rgba(248, 113, 113, 0.55), 2px 0 rgba(0, 255, 170, 0.55), 0 0 14px rgba(0, 255, 65, 0.45);
  animation: microGlitch 0.28s steps(2, end);
}

.hero-name:hover {
  text-shadow: -3px 0 rgba(248, 113, 113, 0.45), 3px 0 rgba(0, 255, 170, 0.45);
  animation: microGlitch 0.32s steps(2, end);
}

@keyframes microGlitch {
  0% { transform: translate(0, 0) skewX(0deg); }
  25% { transform: translate(-2px, 0) skewX(-2deg); }
  50% { transform: translate(2px, 0) skewX(2deg); }
  75% { transform: translate(-1px, 0) skewX(-1deg); }
  100% { transform: translate(0, 0) skewX(0deg); }
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.grid { display: grid; gap: 24px; }
.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line-soft); }
.section-kicker { font-family: var(--font-mono); font-size: .95rem; color: var(--accent); letter-spacing: .08em; margin-bottom: 6px; }
.section-title { font-family: var(--font-head); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; margin-bottom: 40px; position: relative; display: inline-block; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: -10px; width: 74px; height: 3px; border-radius: 3px; background: var(--grad); }
.roles-summary {
  margin-top: -6px;
  font-size: 0.84rem;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}
.roles-summary strong {
  color: var(--accent);
  font-weight: 600;
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  background-image:
    linear-gradient(180deg, rgba(13, 20, 16, 0.94), rgba(17, 26, 22, 0.96)),
    radial-gradient(circle at top right, rgba(0, 255, 65, 0.09), transparent 48%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.55), rgba(0, 255, 170, 0.35), transparent);
  opacity: 0.65;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 16px;
  height: 16px;
  border-right: 1.5px solid rgba(0, 255, 65, 0.32);
  border-bottom: 1.5px solid rgba(0, 255, 65, 0.32);
  border-bottom-right-radius: 4px;
  pointer-events: none;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: rgba(0, 255, 65, 0.42);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.72), 0 0 24px rgba(0, 255, 65, 0.08);
}

.card:hover::after {
  border-color: var(--accent);
  transform: translate(-2px, -2px);
}

.card h4 { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 16px; color: #fff; }
.card h4::before { content: "// "; color: var(--accent); font-family: var(--font-mono); }

.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .88rem; font-weight: 500; padding: 12px 22px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: all .22s; }
.btn .arrow { transition: transform .22s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--grad); color: #000; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 255, 65, .2); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(0, 255, 65, .4); transform: translateY(-2px); color: #000; }
.btn-sm { padding: 8px 14px; font-size: .8rem; }
.chip { display: inline-block; font-family: var(--font-mono); font-size: .8rem; padding: 6px 14px; margin: 0 8px 8px 0; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--muted); }
.chip:hover { border-color: var(--accent); color: var(--accent); }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h); background: rgba(5, 5, 5, .7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.nav.scrolled { border-bottom-color: var(--line-soft); background: rgba(5, 5, 5, .9); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: .02em; }
.logo-bracket { color: var(--accent); }
.logo-cursor { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: var(--muted); font-size: .92rem; font-weight: 500; padding: 8px 14px; border-radius: 8px; }
.nav-links a:hover { color: var(--accent); background: rgba(0, 255, 65, .08); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.sound-toggle { background: none; border: 0; cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 8px 4px 8px 12px; color: var(--muted); transition: color .2s; }
.sound-toggle:hover { color: var(--accent); }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 40px) 0 80px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: 28px; align-items: center; }

.terminal { position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(10, 15, 12, .95); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 13px 18px; background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--line-soft); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: var(--danger); }
.dot-y { background: #fbbf24; }
.dot-g { background: var(--ok); }
.terminal-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 10px; font-family: var(--font-mono); font-size: .78rem; color: var(--muted-2); }
.terminal-body { padding: 22px 30px 24px; font-family: var(--font-mono); }
.terminal-body p { margin-bottom: 14px; font-size: .92rem; color: var(--muted); }
.prompt { color: var(--accent); font-weight: 700; margin-right: 4px; }
.comment { color: var(--muted-2); }
.hero-name { font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; letter-spacing: .01em; color: #fff; margin: 2px 0 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.typed-line { min-height: 1.5em; color: var(--accent) !important; }
.caret { display: inline-block; width: 9px; height: 1.15em; background: var(--accent); vertical-align: text-bottom; margin-left: 3px; animation: blink .95s steps(1) infinite; }
.hero-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn { font-family: var(--font-body); }

.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(180deg, rgba(13, 20, 16, .9), rgba(10, 15, 12, .9));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.65), rgba(0, 255, 170, 0.35), transparent);
  pointer-events: none;
}
.profile-callsign {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 255, 65, 0.06);
  border: 1px solid rgba(0, 255, 65, 0.28);
  font-family: var(--font-mono);
}
.callsign-tag { font-size: 0.68rem; letter-spacing: 0.14em; color: var(--muted-2); text-transform: uppercase; }
.callsign-handle { font-size: 0.88rem; letter-spacing: 0.12em; color: var(--accent) !important; text-shadow: 0 0 12px rgba(0, 255, 65, 0.45); }
.profile-img { width: 100%; border-radius: 12px; border: 1px solid var(--line-soft); filter: grayscale(20%) contrast(1.1); }
.hero-tagline { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); font-style: italic; padding: 12px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }

.about-grid { grid-template-columns: 1.25fr .75fr; align-items: stretch; }
.about-story p { margin-bottom: 14px; color: var(--muted); }
.facts > div { display: grid; grid-template-columns: 100px 1fr; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.facts dt { font-family: var(--font-mono); font-size: .82rem; color: var(--muted-2); }
.facts dd { font-size: .95rem; color: var(--text); word-break: break-word; }

#education .container > .card + .card { margin-top: 24px; }
.timeline { position: relative; padding-left: 26px; margin-top: 10px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent); }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-item:last-child { margin-bottom: 4px; }
.timeline-dot { position: absolute; left: -26px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 10px rgba(0, 255, 65, .55); }
.timeline-date { font-family: var(--font-mono); font-size: .8rem; color: var(--accent-2); letter-spacing: .04em; margin-bottom: 4px; }
.timeline-body h5 { font-family: var(--font-head); font-size: 1.08rem; color: #fff; margin-bottom: 2px; }
.timeline-role { color: var(--accent); font-size: .88rem; margin-bottom: 8px; }
.timeline-body p { color: var(--muted); font-size: .93rem; }

.skills-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.bar { margin-bottom: 18px; }
.bar-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 7px; }
.bar-val { font-family: var(--font-mono); color: var(--accent); }
.bar-track { height: 9px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 6px; background: var(--grad); box-shadow: 0 0 12px rgba(0, 255, 65, .3); transition: width 1.2s cubic-bezier(.22, .8, .3, 1); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.portfolio-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .25s, border-color .25s; position: relative; }
.portfolio-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 20px rgba(0, 255, 65, 0.1); }
.portfolio-card::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 14px;
  height: 14px;
  z-index: 2;
  border-top: 2px solid rgba(0, 255, 65, 0.55);
  border-left: 2px solid rgba(0, 255, 65, 0.55);
  pointer-events: none;
  opacity: 0.75;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.portfolio-card:hover::before { opacity: 1; transform: translate(2px, 2px); }
.portfolio-card img.contain { object-fit: contain; background: #050805; }
.photo-badge { position: absolute; top: 12px; right: 12px; z-index: 2; font-family: var(--font-mono); font-size: .74rem; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.75); border: 1px solid var(--accent); color: var(--accent); backdrop-filter: blur(4px); }
.portfolio-card img { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid var(--line); }
.portfolio-info { padding: 20px; position: relative; background: linear-gradient(180deg, rgba(13, 20, 16, 0.92), rgba(9, 14, 11, 0.98)); }
.portfolio-info h4 { color: #fff; font-family: var(--font-head); margin-bottom: 6px; }
.portfolio-info h4::before { content: "> "; color: var(--accent); font-family: var(--font-mono); font-size: 0.85em; }
.portfolio-info p { color: var(--muted); font-size: 0.9rem; }

.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal.active { opacity: 1; pointer-events: auto; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); }
.modal-content { position: relative; z-index: 1; width: min(900px, 92vw); max-height: 92vh; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow: auto; }
.modal-content h3 { color: var(--accent); font-family: var(--font-head); text-align: center; }
.modal-close { position: absolute; top: 8px; right: 14px; z-index: 3; font-size: 2rem; line-height: 1; background: none; border: none; color: #fff; cursor: pointer; }
.modal-close:hover { color: var(--danger); }
.modal-close:focus { outline: none; }
.modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.gallery-stage { position: relative; display: flex; align-items: center; justify-content: center; background: #000; border-radius: var(--radius-sm); margin: 18px 0 14px; min-height: 200px; }
.gallery-stage img { max-width: 100%; max-height: 60vh; width: auto; margin: 0 auto; object-fit: contain; border-radius: var(--radius-sm); }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--accent); background: rgba(0,0,0,.7); color: var(--accent); font-size: 1.1rem; cursor: pointer; transition: background .2s, color .2s; }
.gallery-nav:hover { background: var(--accent); color: #000; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-count { text-align: center; font-family: var(--font-mono); font-size: .8rem; color: var(--muted-2); margin: 4px 0 12px; }
.gallery-thumbs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; background: #000; opacity: .6; transition: opacity .2s, border-color .2s; }
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.active { border-color: var(--accent); opacity: 1; }
.gallery-thumbs img { width: 84px; height: 56px; object-fit: cover; border: 0; }
.gallery-single .gallery-nav, .gallery-single .gallery-thumbs, .gallery-single .gallery-count { display: none; }

.contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.contact-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--accent); }
.contact-icon { font-family: var(--font-mono); width: 34px; height: 34px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: rgba(0, 255, 65, .08); border: 1px solid rgba(0, 255, 65, .3); color: var(--accent); }

.footer { border-top: 1px solid var(--line-soft); padding: 34px 0; background: var(--bg-soft); }
.footer-inner { display: flex; justify-content: center; text-align: center; font-size: .88rem; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

.replay-btn { flex-shrink: 0; margin-left: auto; font-family: var(--font-mono); font-size: .74rem; color: var(--muted-2); background: none; border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; cursor: pointer; transition: color .2s, border-color .2s; }
.replay-btn:hover { color: var(--accent); border-color: var(--accent); }
.bootlog { font-family: var(--font-mono); font-size: .88rem; line-height: 1.9; color: var(--accent); min-height: 120px; }
.bootlog .line { white-space: pre-wrap; word-break: break-word; }
.bootlog .line.ok { color: var(--ok); }
.bootlog .line.granted { color: var(--ok); font-weight: 700; text-shadow: 0 0 16px rgba(52, 211, 153, .6); }
.bootlog .cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--accent); vertical-align: text-bottom; animation: blink .9s steps(1) infinite; }

html.js .hero-reveal { opacity: 0; }
.hero-reveal { transition: opacity .35s ease; }
html.js .hero-reveal.revealed { opacity: 1; }

html.js .hero-card { display: none; }
html.js .hero-card.revealed { display: flex; animation: cardIn .55s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

html.js body.locked main, html.js body.locked .footer, html.js body.locked .nav { display: none !important; }
html.js body.locked .hero-reveal { display: none; }
html.js .hero-reveal.revealed { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html.js body.locked .nav-links a { pointer-events: none; opacity: .45; }
.hero-reveal.revealed .hero-name { animation: glitchIn .7s steps(9) both; }
@keyframes glitchIn { 0% { clip-path: inset(0 0 100% 0); transform: translateX(0); } 25% { clip-path: inset(0); transform: translateX(-6px); } 45% { clip-path: inset(8% 0 8% 0); transform: translateX(6px); } 70% { clip-path: inset(0); transform: translateX(-3px); } 100% { clip-path: inset(0); transform: translateX(0); } }

.terminal.boot-running::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(0, 255, 65, .55), transparent); top: 0; pointer-events: none; animation: scan 2.2s linear infinite; }
@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }

.hack-game { font-family: var(--font-mono); padding: 10px 0; text-align: center; }
.hack-game-head { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 460px; margin: 0 auto 20px; }
.hack-game-title { color: var(--danger); font-weight: 700; letter-spacing: .08em; font-size: 1rem; text-shadow: 0 0 14px rgba(248, 113, 113, .4); }
.hack-game-sub { color: var(--muted); font-size: .85rem; line-height: 1.6; }

.ctf { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.ctf-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.ctf-steps li { flex: 1; min-width: 72px; text-align: center; font-size: .72rem; letter-spacing: .06em; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted-2); transition: all .25s; }
.ctf-steps li.active { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px rgba(0, 255, 65, .25); }
.ctf-steps li.done { border-color: var(--ok); color: var(--ok); background: rgba(52, 211, 153, .08); }
.ctf-steps li.done::after { content: " ✓"; }
.ctf-title { font-family: var(--font-mono); font-size: .92rem; color: #fff; margin-bottom: 4px; }
.ctf-text { font-size: .8rem; line-height: 1.6; color: var(--muted); margin-bottom: 10px; }
.ctf-cipher { font-size: .85rem; padding: 10px 12px; border: 1px dashed var(--accent-2); border-radius: 8px; background: rgba(0, 255, 65, .05); color: var(--accent); word-break: break-all; user-select: all; }
.cli { border: 1px solid var(--line); background: #050806; border-radius: 10px; overflow: hidden; }
.cli-out { height: 130px; overflow-y: auto; padding: 10px 12px; font-size: .8rem; line-height: 1.55; color: var(--muted); }
.cli-out div { white-space: pre-wrap; word-break: break-word; }
.cli-out .cmd { color: #fff; }
.cli-out .res { color: var(--accent); }
.cli-out .err { color: var(--danger); }
.cli-out .sys { color: var(--muted-2); }
.cli-line { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line-soft); font-size: .8rem; cursor: text; }
.cli-prompt { color: var(--accent); font-weight: 700; white-space: nowrap; }
.cli-line input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; caret-color: var(--accent); }
.flag-form { display: flex; gap: 8px; }
.flag-form input { flex: 1; min-width: 0; background: #050806; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; color: var(--accent); font: inherit; font-size: .85rem; }
.flag-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 255, 65, .15); }
.ctf-status { min-height: 1.3em; font-size: .82rem; font-weight: 700; }
.ctf-status.ok { color: var(--ok); }
.ctf-status.bad { color: var(--danger); }
.ctf-hint { align-self: flex-start; background: none; border: 0; font: inherit; font-size: .78rem; color: var(--muted-2); cursor: pointer; text-decoration: underline dotted; }
.ctf-hint:hover { color: var(--accent); }
.hero-grid.game-on { grid-template-columns: 1fr; }
.hero-grid.game-on .terminal { max-width: 640px; width: 100%; margin: 0 auto; }

.hack-overlay[hidden] { display: none; }
.hack-overlay { position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, .95); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px; animation: overlayIn .18s ease both; }
.hack-overlay-bars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(0, 255, 65, .06) 6px 7px); mix-blend-mode: screen; }
.hack-overlay-inner { position: relative; z-index: 1; }
.hack-glitch { font-family: var(--font-mono); font-weight: 700; font-size: clamp(2rem, 7vw, 4.4rem); letter-spacing: .06em; color: #fff; position: relative; margin-bottom: 6px; animation: hackFlicker .9s steps(2) infinite; }
.hack-glitch::before, .hack-glitch::after { content: attr(data-text); position: absolute; inset: 0; opacity: .85; pointer-events: none; }
.hack-glitch::before { color: var(--accent); clip-path: inset(0 0 55% 0); animation: glitchShift 1.1s steps(3) infinite; }
.hack-glitch::after { color: var(--danger); clip-path: inset(45% 0 0 0); animation: glitchShift 1.1s steps(3) infinite reverse; }
.hack-sub { font-family: var(--font-mono); font-size: .95rem; color: var(--muted); letter-spacing: .05em; }
.hack-sub .ok-text { color: var(--accent); font-weight: 700; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes hackFlicker { 0%, 100% { opacity: 1; } 45% { opacity: .72; } 50% { opacity: 1; } 55% { opacity: .25; } 60% { opacity: 1; } }
@keyframes glitchShift { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-6px, 2px); } 50% { transform: translate(5px, -2px); } 75% { transform: translate(-3px, 1px); } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; max-width: 400px; margin: 0 auto; }
  .about-grid, .skills-grid, .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}
@media (max-width: 720px) {
  .terminal-body { padding: 18px 16px 20px; }
  .flag-form { flex-direction: column; }
  .cli-out { height: 110px; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; background: rgba(5, 5, 5, .98); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; transform: translateY(-120%); transition: transform .3s ease; backdrop-filter: blur(14px); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 10px; font-size: 1rem; }
  .nav-toggle { display: block; }
  .footer-inner { flex-direction: column; }
}

.credential-link { margin-top: 7px; }
.credential-link a { color: var(--accent); font-family: var(--font-mono); font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.credential-link a:hover { color: #fff; }

.ctf-skip { display: block; margin: 0 0 10px auto; padding: 4px 0; border: 0; background: transparent; color: var(--muted-2); font: .72rem var(--font-mono); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ctf-skip:hover, .ctf-skip:focus-visible { color: var(--accent); }

.konami-term {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10020;
  width: min(370px, calc(100vw - 32px));
  border-radius: 12px;
  border: 1px solid rgba(255, 42, 68, 0.65);
  background: rgba(12, 4, 6, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), 0 0 28px rgba(255, 30, 56, 0.25);
  font-family: var(--font-mono);
  overflow: hidden;
  animation: konamiPop 0.24s cubic-bezier(0.2, 0.85, 0.3, 1) both;
}
@keyframes konamiPop {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.konami-term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 30, 56, 0.14);
  border-bottom: 1px solid rgba(255, 42, 68, 0.35);
}
.konami-term-bar .k-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff2a44;
  box-shadow: 0 0 8px #ff2a44;
}
.konami-term-title { font-size: 0.74rem; color: #ff8a96; letter-spacing: 0.04em; }
.konami-term-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: #ff8a96;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.konami-term-close:hover { color: #fff; }
.konami-term-body { padding: 12px; }
.konami-term-out {
  height: 112px;
  overflow-y: auto;
  font-size: 0.76rem;
  line-height: 1.55;
  color: #f4d6da;
  margin-bottom: 8px;
}
.konami-term-out .k-warn { color: #ff3b52; font-weight: 700; }
.konami-term-out .k-dim { color: #b5848b; }
.konami-term-out .k-cmd { color: #fff; font-weight: 700; }
.konami-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.k-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 42, 68, 0.5);
  background: rgba(255, 30, 56, 0.12);
  color: #ff9aa6;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.k-pill:hover {
  background: #ff2a44;
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 42, 68, 0.5);
}
.konami-term-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 42, 68, 0.35);
  font-size: 0.78rem;
}
.k-prompt { color: #ff2a44; font-weight: 700; white-space: nowrap; }
.konami-term-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
  caret-color: #ff2a44;
}

.deface-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 10090;
  background: radial-gradient(circle at center, #220207 0%, #070001 75%, #000 100%);
  color: #ffe5e8;
  font-family: var(--font-mono);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  animation: defaceFlash 0.35s steps(3) both;
}
@keyframes defaceFlash {
  0% { filter: invert(1) hue-rotate(180deg); opacity: 0.4; }
  50% { filter: contrast(2); opacity: 1; }
  100% { filter: none; opacity: 1; }
}
.deface-matrix { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.25; }
.deface-scanlines { position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 20, 45, 0.06) 0 1px, transparent 1px 3px); }
.deface-vignette { position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(255, 0, 34, 0.35); }
.deface-container {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  max-height: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(5px, 1vh, 10px);
}
.deface-top-banner {
  width: 100%;
  padding: 4px 10px;
  border: 1px solid rgba(255, 36, 62, 0.55);
  background: rgba(255, 20, 45, 0.12);
  color: #ff4d63;
  font-size: clamp(0.6rem, 0.85vw, 0.7rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deface-ascii {
  font-family: var(--font-mono);
  font-size: clamp(0.32rem, 0.68vh, 0.5rem);
  line-height: 1.02;
  color: #ff243e;
  text-shadow: 0 0 12px rgba(255, 36, 62, 0.65);
  user-select: none;
  margin: 0;
}
.deface-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #ff243e;
  background: rgba(255, 36, 62, 0.16);
  color: #ff7a8a;
  font-size: clamp(0.62rem, 0.9vw, 0.7rem);
  letter-spacing: 0.12em;
}
.deface-headline {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 3.3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 24, 52, 0.85), -2px 0 #ff1e38, 2px 0 #ff9aa6;
  animation: defaceGlitch 1.6s steps(2) infinite;
}
.deface-headline::before,
.deface-headline::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.deface-headline::before { color: #ff1e38; clip-path: inset(0 0 58% 0); animation: glitchShift 1.1s steps(3) infinite; }
.deface-headline::after { color: #ff99a6; clip-path: inset(52% 0 0 0); animation: glitchShift 1.1s steps(3) infinite reverse; }
@keyframes defaceGlitch {
  0%, 92%, 100% { transform: none; }
  94% { transform: translate(-3px, 1px) skewX(-2deg); }
  96% { transform: translate(3px, -1px) skewX(2deg); }
}
.deface-manifesto { max-width: 660px; font-size: clamp(0.72rem, 1.05vw, 0.84rem); line-height: 1.4; color: #f3c6cc; }
.deface-manifesto strong { color: #ff334b; text-shadow: 0 0 10px rgba(255, 51, 75, 0.55); }

.deface-center-action { margin: 2px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ransom-btn {
  font-family: var(--font-mono);
  font-size: clamp(0.88rem, 1.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 11px 28px;
  color: #fff;
  background: linear-gradient(180deg, #ff243e 0%, #9e081a 100%);
  border: 2px solid #ff7082;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255, 36, 62, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  animation: ransomPulse 1.8s ease-in-out infinite;
}
.ransom-btn:hover,
.ransom-btn:focus-visible {
  transform: scale(1.05);
  background: linear-gradient(180deg, #ff4259 0%, #c40c22 100%);
  box-shadow: 0 0 38px rgba(255, 36, 62, 0.95), 0 0 10px #fff;
  outline: none;
}
@keyframes ransomPulse {
  0%, 100% { box-shadow: 0 0 22px rgba(255, 36, 62, 0.55); }
  50% { box-shadow: 0 0 36px rgba(255, 36, 62, 0.9); }
}
.ransom-sub { font-size: clamp(0.6rem, 0.85vw, 0.68rem); letter-spacing: 0.1em; color: #ff8a98; }

.deface-intel-grid { width: 100%; display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; text-align: left; }
.deface-box { background: rgba(18, 3, 6, 0.88); border: 1px solid rgba(255, 36, 62, 0.4); border-radius: 8px; padding: 8px 12px; }
.deface-box-title { font-size: 0.68rem; font-weight: 700; color: #ff3b52; letter-spacing: 0.08em; margin-bottom: 4px; }
.deface-box ul li { display: flex; justify-content: space-between; gap: 8px; font-size: clamp(0.64rem, 0.9vw, 0.72rem); padding: 2px 0; border-bottom: 1px dashed rgba(255, 36, 62, 0.2); color: #d99aa2; }
.deface-box ul li:last-child { border-bottom: 0; }
.deface-box ul li b { color: #fff; }
.deface-trace { font-size: clamp(0.64rem, 0.9vw, 0.72rem); line-height: 1.38; color: #f3b8c0; max-height: 76px; overflow: hidden; }
.deface-footer { font-size: clamp(0.6rem, 0.85vw, 0.68rem); letter-spacing: 0.12em; color: #ff5c70; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 720px) {
  .deface-screen { overflow-y: auto; height: auto; min-height: 100dvh; max-height: none; }
  .deface-intel-grid { grid-template-columns: 1fr; }
}

.certification-chips { display: flex; flex-wrap: wrap; gap: 10px; position: relative; overflow: visible !important; }
.certification-chips .chip { margin: 0; }
.cert-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .22s ease, border-color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
}
.cert-chip:hover,
.cert-chip:focus-visible,
.cert-chip[aria-expanded="true"] {
  color: #eaffef;
  border-color: rgba(0, 255, 105, .92);
  background: linear-gradient(135deg, rgba(0, 255, 65, .2), rgba(0, 255, 170, .08));
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, .15), 0 8px 24px rgba(0, 255, 65, .16);
}
.cert-chip:focus-visible { outline: 2px solid rgba(0, 255, 65, .6); outline-offset: 3px; }

.cert-popover {
  position: fixed;
  z-index: 10050;
  width: min(320px, calc(100vw - 28px));
  padding: 16px 18px 15px;
  border: 1px solid rgba(0, 255, 105, .48);
  border-radius: 15px;
  color: #e9f8ed;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(0, 255, 90, .2), transparent 58%),
    linear-gradient(145deg, rgba(10, 18, 14, .84), rgba(4, 9, 7, .9));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .72), 0 0 28px rgba(0, 255, 65, .18), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(7px) scale(.98);
  transform-origin: top center;
  transition: opacity .17s ease, transform .2s cubic-bezier(.2, .8, .2, 1), visibility .17s ease;
  pointer-events: none;
}
.cert-popover.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.cert-popover::before { content: ""; display: block; width: 34px; height: 3px; border-radius: 4px; margin-bottom: 11px; background: var(--accent); box-shadow: 0 0 12px rgba(0, 255, 65, .75); }
.cert-popover-kicker { display: block; margin-bottom: 5px; color: #69ff9b; font: 700 .6rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 0 10px rgba(0, 255, 65, .35); }
.cert-popover-title { display: block; color: #f4fff7; font: 600 .98rem/1.35 var(--font-head); overflow-wrap: anywhere; }
.cert-popover-hint { display: block; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(0, 255, 105, .18); color: rgba(218, 242, 224, .66); font: .69rem/1.45 var(--font-mono); }

@media (prefers-reduced-motion: reduce) {
  body::after { background: radial-gradient(circle at center, transparent 68%, rgba(0, 0, 0, 0.45) 100%); }
  .section-kicker, .hero-name, .card, .card::after, .portfolio-card, .portfolio-card::before, .cert-chip, .cert-popover { animation: none !important; transition: none; transform: none !important; }
}

.ctf-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.ctf-actions .ctf-hint, .ctf-actions .ctf-skip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: auto; margin: 0; padding: 10px 18px; border-radius: 10px; font: 600 .78rem var(--font-mono); letter-spacing: .04em; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s; }
.ctf-actions .ctf-hint { color: var(--accent); background: rgba(0, 255, 65, .06); border: 1px solid rgba(0, 255, 65, .35); }
.ctf-actions .ctf-hint:hover, .ctf-actions .ctf-hint:focus-visible { background: rgba(0, 255, 65, .14); border-color: var(--accent); box-shadow: 0 0 16px rgba(0, 255, 65, .22); transform: translateY(-1px); }
.ctf-actions .ctf-skip { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.ctf-actions .ctf-skip:hover, .ctf-actions .ctf-skip:focus-visible { color: #fbbf24; border-color: rgba(251, 191, 36, .6); background: rgba(251, 191, 36, .07); box-shadow: 0 0 16px rgba(251, 191, 36, .15); transform: translateY(-1px); }
.ctf-actions .ctf-skip span { transition: transform .2s; }
.ctf-actions .ctf-skip:hover span { transform: translateX(3px); }
@media (max-width: 720px) { .ctf-actions .ctf-hint, .ctf-actions .ctf-skip { flex: 1 1 0; min-width: 0; padding: 11px 8px; font-size: .72rem; white-space: nowrap; } }

#musicToggle { padding-left: 4px; font-size: 1.15rem; }
#musicToggle.off { opacity: .45; text-decoration: line-through; }
.nav-tools { display: flex; align-items: center; }

.credential-link .credential-btn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-family: var(--font-mono); font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.credential-link .credential-btn:hover, .credential-link .credential-btn:focus-visible { color: #fff; }

.about-side { display: flex; flex-direction: column; gap: 24px; }
.emblem-card { text-align: center; padding: 24px 22px 18px; background-image: linear-gradient(180deg, rgba(13, 20, 16, .94), rgba(17, 26, 22, .96)), radial-gradient(circle at 50% 70%, rgba(0, 255, 65, .12), transparent 60%); }
.emblem-brand { font-family: var(--font-head); font-size: 1.6rem; letter-spacing: .06em; font-weight: 300; color: var(--accent); text-shadow: 0 0 16px rgba(0, 255, 65, .35); }
.emblem-brand b { font-weight: 800; color: var(--accent); }
.emblem-sub { margin-top: 4px; font-family: var(--font-mono); font-size: .72rem; color: var(--muted-2); letter-spacing: .12em; text-transform: uppercase; }
.emblem-mode { font-family: var(--font-head); font-size: 1.3rem; color: var(--accent); margin-bottom: 4px; transition: color .3s; }
#emblemCanvas { display: block; width: 100%; aspect-ratio: 1 / 1; cursor: grab; touch-action: pan-y; outline: none; user-select: none; -webkit-user-select: none; }
#emblemCanvas.grabbing { cursor: grabbing; }
#emblemCanvas:focus-visible { outline: 2px solid rgba(0, 255, 65, .5); outline-offset: 4px; border-radius: 12px; }
.emblem-hint { margin: 2px 0 0; font-family: var(--font-mono); font-size: .68rem; color: var(--muted-2); }

.egg-hints { position: absolute; top: 0; bottom: 0; left: 0; width: 260px; z-index: 2; pointer-events: none; overflow: hidden; user-select: none; -webkit-user-select: none; }
.egg-key { position: absolute; top: var(--t); left: var(--l); font-family: var(--font-mono); font-weight: 700; font-size: var(--s); line-height: 1; color: var(--accent); opacity: .16; text-shadow: 0 0 22px rgba(0, 255, 65, .55); transform: rotate(var(--r)); animation: eggFloat var(--d) ease-in-out infinite alternate; }
.egg-key.egg-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.5em; height: 1.5em; border: .06em solid currentColor; border-radius: 50%; font-size: calc(var(--s) * .75); }
@keyframes eggFloat { from { transform: rotate(var(--r)) translateY(-8px); } to { transform: rotate(var(--r)) translateY(8px); } }
html.js body.locked .egg-hints { display: none; }
@media (max-width: 720px) { .egg-hints { width: 130px; } .egg-key { font-size: calc(var(--s) * .6); opacity: .1; } .egg-key.egg-btn { font-size: calc(var(--s) * .5); } }
@media (prefers-reduced-motion: reduce) { .egg-key { animation: none; } }

@media (max-width: 720px) {
  :root { --nav-h: 60px; }
  html, body { overflow-x: hidden; }
  .container { padding: 0 16px; }

  .nav-inner { gap: 4px; }
  .nav-tools { margin-left: auto; }
  .sound-toggle { padding: 10px 8px; min-width: 40px; min-height: 40px; }
  #musicToggle { padding-left: 8px; }
  .nav-toggle { padding: 10px 8px; margin-right: -8px; }
  .nav-links a { padding: 14px 10px; }

  .hero { min-height: 0; padding: calc(var(--nav-h) + 20px) 0 48px; }
  .hero-grid { gap: 20px; }
  .terminal-bar { padding: 11px 14px; gap: 6px; }
  .terminal-title { margin-left: 6px; font-size: .72rem; }
  .terminal-body p { font-size: .86rem; }
  .bootlog { font-family: var(--font-mono); font-size: .88rem; line-height: 1.9; color: var(--accent); min-height: 120px; }
  .bootlog:empty { display: none; min-height: 0; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-card { max-width: 100%; padding: 16px; }
  .hero-links { gap: 8px; }
  .hero-links .chip { margin: 0; }

  .hack-game-head { max-width: 100%; }
  .ctf-steps li { min-width: 0; flex: 1 1 calc(50% - 8px); }
  .ctf-cipher { font-size: .78rem; }
  .cli-line input, .flag-form input { font-size: 16px; }
  .flag-form { gap: 10px; }
  .flag-form .btn { width: 100%; justify-content: center; }

  .section { padding: 56px 0; }
  .section-title { margin-bottom: 32px; }
  .card { padding: 22px 18px; }
  .about-grid, .skills-grid, .contact-grid { gap: 18px; }
  .about-side { gap: 18px; }
  .facts > div { grid-template-columns: 82px 1fr; }
  .facts dd { overflow-wrap: anywhere; }
  .emblem-card { padding: 20px 14px 16px; }
  .emblem-brand { font-size: 1.4rem; }
  .timeline-body h5 { font-size: 1rem; }
  .certification-chips { gap: 8px; }
  .chip { font-size: .76rem; }

  .portfolio-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .portfolio-card img { height: 190px; }
  .photo-badge { top: 10px; right: 10px; }

  .modal-content { width: 94vw; max-height: 90vh; padding: 14px 12px; }
  .modal-content h3 { font-size: 1.05rem; padding: 0 28px; }
  .gallery-stage { margin: 28px 0 12px; min-height: 140px; }
  .gallery-stage img { max-height: 46vh; }
  .gallery-nav { width: 38px; height: 38px; }
  .gallery-prev { left: 6px; }
  .gallery-next { right: 6px; }
  .gallery-thumbs { gap: 8px; }
  .gallery-thumbs img { width: 62px; height: 42px; }

  .contact-list li { gap: 10px; }
  .contact-list a { overflow-wrap: anywhere; min-width: 0; }
  .calendar-container iframe { height: 460px; }
  .footer { padding: 26px 0; }

  .egg-hints { display: none; }

  .konami-term { right: 12px; left: 12px; bottom: 12px; width: auto; }
  .konami-term-out { height: 96px; }
  .k-pill { padding: 7px 11px; }
  .konami-term-form input { font-size: 16px; }
  .deface-screen { padding: 14px 12px 24px; align-items: flex-start; }
  .deface-container { gap: 10px; }
  .deface-ascii { font-size: .3rem; }
  .deface-top-banner { white-space: normal; font-size: .58rem; letter-spacing: .08em; }
  .deface-footer { white-space: normal; font-size: .56rem; }
  .ransom-btn { width: 100%; padding: 14px 16px; }
  .deface-trace { max-height: none; }
}

@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero-name { font-size: 1.45rem; }
  .section-title { font-size: 1.55rem; }
  .card { padding: 20px 15px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .ctf-actions .ctf-hint, .ctf-actions .ctf-skip { font-size: .68rem; padding: 11px 6px; }
}

.egg-dot, .egg-dot-toast { display: none; }
@media (max-width: 720px) {
  .egg-dot { display: block; position: absolute; z-index: 6; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 255, 65, .38); background: rgba(0, 255, 65, .07); box-shadow: 0 0 10px rgba(0, 255, 65, .15); opacity: .55; cursor: pointer; -webkit-tap-highlight-color: transparent; animation: eggDotPulse 3.2s ease-in-out infinite; }
  .egg-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
  .egg-dot.found { border-color: #ff243e; background: rgba(255, 36, 62, .45); box-shadow: 0 0 16px rgba(255, 36, 62, .75); opacity: 1; animation: none; }
  html.js body.locked .egg-dot { display: none; }
  

html.js body.locked .hero-reveal {
  display: none !important;
}
  .egg-dot-toast { display: block; position: fixed; left: 50%; bottom: 26px; z-index: 10030; transform: translate(-50%, 12px); padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(255, 42, 68, .6); background: rgba(12, 4, 6, .94); color: #ff8a96; font: 700 .74rem var(--font-mono); letter-spacing: .06em; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
  .egg-dot-toast.show { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes eggDotPulse { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .egg-dot { animation: none; } }


/* Projects Grid & Project Details Modal */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 255, 65, 0.12);
  outline: none;
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.project-badge {
  color: var(--accent);
  letter-spacing: 0.08em;
}

.project-stack-tag {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 65, 0.3);
  background: rgba(0, 255, 65, 0.07);
  color: var(--muted);
}

.project-card h4 {
  font-family: var(--font-head);
  font-size: 1.08rem;
  color: #fff;
  line-height: 1.35;
}

.project-caption {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.project-card-footer {
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.project-cta {
  color: var(--accent);
  font-weight: 600;
}

.project-detail-dialog {
  width: min(760px, 94vw);
  padding: 28px;
  text-align: left;
}

.proj-detail-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.proj-detail-heading.proj-detail-heading {
  text-align: left;
  color: #fff;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  padding-right: 36px;
  margin-bottom: 10px;
}

.proj-detail-caption {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 255, 65, 0.04);
  margin-bottom: 18px;
}

.proj-meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.proj-meta-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(5, 10, 7, 0.75);
}

.proj-meta-item dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-2);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.proj-meta-item dd {
  font-size: 0.88rem;
  color: #fff;
}

.proj-detail-section {
  margin-bottom: 18px;
}

.proj-detail-section h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.proj-detail-section p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.proj-feature-list {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-feature-list li {
  font-size: 0.88rem;
  color: var(--text);
}

.proj-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

/* === Z1M SAFE PC & MOBILE FIX === */
.terminal.reveal {
  opacity: 1 !important;
  transform: none !important;
}
.grid > *,
.hero-grid > *,
.about-grid > *,
.skills-grid > *,
.contact-grid > * {
  min-width: 0;
}
@media (max-width: 720px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .hero-name {
    font-size: clamp(1.36rem, 6vw, 2rem);
    overflow-wrap: break-word;
  }
  .modal-content {
    max-height: 90dvh;
    -webkit-overflow-scrolling: touch;
  }
  .calendar-container iframe {
    width: 100%;
    max-width: 100%;
    height: 420px;
    display: block;
  }
  .cli-line input,
  .flag-form input,
  .konami-term-form input {
    font-size: 16px;
  }
}
