/* ================================================
   PORTFOLIO — CYBERPUNK TERMINAL STYLESHEET
   ================================================ */

:root {
  --bg:          #030810;
  --bg-card:     #060d1a;
  --bg-card-hover: #0a1628;
  --border:      #0d1f3c;
  --neon-green:  #00ff88;
  --neon-blue:   #00d4ff;
  --neon-purple: #bf5fff;
  --neon-dim:    #00ff8840;
  --text-primary: #e8f4f8;
  --text-secondary: #7ba3c0;
  --text-muted:  #3a5a78;
  --font:        'Inter', system-ui, sans-serif;
  --mono:        'Share Tech Mono', 'Courier New', monospace;
  --radius:      12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #0d3a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-green); }

/* ================================================
   UTILITY
   ================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.section { padding: 100px 0; position: relative; z-index: 1; }
.neon-green  { color: var(--neon-green); }
.neon-blue   { color: var(--neon-blue); }
.neon-purple { color: var(--neon-purple); }
.gradient-text {
  background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ================================================
   SCANLINES + NOISE
   ================================================ */
.scanlines {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  animation: scanMove 8s linear infinite;
}
@keyframes scanMove {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

.noise-overlay {
  position: fixed; inset: 0; z-index: 9997; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================================================
   TERMINAL OVERLAY
   ================================================ */
#terminal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: #00000f;
  transition: opacity .8s ease, visibility .8s ease;
}
#terminal-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

#scanline-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.04;
}

#terminal-window {
  width: min(780px, 94vw);
  max-height: 86vh;
  background: rgba(2, 8, 20, 0.97);
  border: 1px solid var(--neon-green);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,255,136,0.1),
    0 0 40px rgba(0,255,136,0.15),
    0 0 80px rgba(0,255,136,0.05),
    inset 0 0 80px rgba(0,255,136,0.02);
  position: relative;
}

.terminal-titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(0,255,136,0.03);
  border-bottom: 1px solid rgba(0,255,136,0.15);
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.terminal-titlebar-text {
  margin-left: 8px; font-family: var(--mono); font-size: .72rem;
  color: var(--neon-green); opacity: .5;
}

.terminal-body {
  padding: 20px 28px 28px;
  font-family: var(--mono); font-size: .82rem; line-height: 1.7;
  color: var(--neon-green);
  overflow-y: auto; max-height: calc(86vh - 42px);
}

.terminal-log-line {
  opacity: 0; transform: translateY(3px);
  margin: 1px 0; transition: none;
  white-space: pre-wrap; word-break: break-word;
}
.terminal-log-line.show { opacity: 1; transform: none; }

.t-ok      { color: var(--neon-green); }
.t-info    { color: var(--neon-blue); }
.t-warn    { color: #ffcc00; }
.t-error   { color: #ff4444; }
.t-dim     { color: #2a5a4a; }
.t-white   { color: #cce8dc; }
.t-sep     { color: #1a4a3a; display: block; }

#terminal-cursor-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; color: var(--neon-green);
}
.t-prompt { opacity: .6; }
.t-cursor { animation: blink .7s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.terminal-progress-bar {
  display: block; width: 0; height: 10px;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  border-radius: 2px;
  transition: width .05s linear;
}
.terminal-progress-track {
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 3px; overflow: hidden;
  width: 100%; margin: 4px 0;
}

.terminal-launch-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 28px auto 0;
  padding: 13px 40px;
  background: transparent;
  border: 1px solid var(--neon-green);
  border-radius: 4px;
  color: var(--neon-green); font-family: var(--mono); font-size: .9rem;
  font-weight: 600; cursor: pointer; letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(0,255,136,.2), inset 0 0 20px rgba(0,255,136,.04);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: all .3s ease;
}
.terminal-launch-btn.visible {
  opacity: 1; transform: translateY(0); pointer-events: auto;
  animation: btnPulse 2.5s ease-in-out infinite;
}
.terminal-launch-btn:hover {
  background: rgba(0,255,136,0.1);
  box-shadow: 0 0 40px rgba(0,255,136,.5), inset 0 0 30px rgba(0,255,136,.08);
  color: #fff;
}
@keyframes btnPulse {
  0%,100% { box-shadow: 0 0 20px rgba(0,255,136,.2), inset 0 0 20px rgba(0,255,136,.04); }
  50%      { box-shadow: 0 0 35px rgba(0,255,136,.45), inset 0 0 25px rgba(0,255,136,.08); }
}

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content.hidden { opacity: 0; pointer-events: none; }
.main-content {
  transition: opacity .8s ease;
  position: relative;
}

/* Atmospheric ambient glow is now handled by the fixed orb canvas */

/* ================================================
   NAVBAR
   ================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0;
  background: rgba(3, 8, 16, 0.7);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
}
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(3, 8, 16, 0.92);
  border-bottom-color: rgba(0,255,136,0.12);
  box-shadow: 0 4px 30px rgba(0,255,136,0.04);
}
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }

.nav-logo { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--text-primary); transition: color .3s; }
.logo-bracket { color: var(--neon-green); }
.logo-slash { color: var(--neon-blue); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 7px 14px; font-size: .83rem; font-weight: 500;
  color: var(--text-secondary); border-radius: 4px;
  transition: all .25s ease; font-family: var(--mono);
  letter-spacing: .04em; position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--neon-green); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 2px; left: 14px; right: 14px;
  height: 1px; background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green);
}

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--neon-green); border-radius: 2px; transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Language Toggle */
.lang-toggle {
  display: flex; align-items: center; gap: 5px;
  background: transparent;
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .25s ease;
  white-space: nowrap;
}
.lang-toggle:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 14px rgba(0,255,136,0.18);
}
.lang-toggle__icon { font-size: .85rem; line-height: 1; }
.lang-toggle__code { font-weight: 600; }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: -100%;
    width: 70vw; max-width: 320px; height: 100vh;
    flex-direction: column;
    background: rgba(3, 8, 16, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 32px 32px; gap: 4px;
    transition: right .3s ease;
    border-left: 1px solid rgba(0,255,136,0.1);
  }
  .nav-links.open { right: 0; }
  .nav-link { font-size: 1.1rem; padding: 14px 16px; width: 100%; }
}

/* ================================================
   HERO SECTION — ASCII ORB
   ================================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: transparent;
  overflow: hidden;
}

#orb-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  display: block;
}

#grain-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.6;
  display: block;
}

/* Hero overlay — content floated over the canvas */
.hero-overlay {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 520px;
  width: calc(100% - 64px);
  padding: 32px 36px;
  background: rgba(3, 8, 16, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.1);
  border-radius: 12px;
  box-shadow:
    0 0 40px rgba(0, 0, 0, 0.4),
    inset 0 0 30px rgba(0, 255, 136, 0.015);
}

.hero-greeting {
  font-family: var(--mono); font-size: .9rem;
  color: var(--neon-green); letter-spacing: .1em; margin-bottom: 14px;
  opacity: .8;
}
.prompt-char { color: var(--neon-blue); margin-right: 8px; }

.hero-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700; line-height: 1.05; margin-bottom: 14px;
  letter-spacing: -.02em;
}

.glitch-text {
  display: inline-block; position: relative;
  color: var(--text-primary);
}
.glitch-text::before, .glitch-text::after {
  content: attr(data-text); position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.glitch-text::before { color: var(--neon-green); animation: glitchA 5s infinite 2s; }
.glitch-text::after  { color: var(--neon-blue);  animation: glitchB 5s infinite 2.1s; }
.name-alt { color: var(--neon-green); text-shadow: 0 0 30px rgba(0,255,136,.3); }

@keyframes glitchA {
  0%,95%,100% { opacity: 0; transform: none; clip-path: none; }
  96%   { opacity: .7; transform: translateX(-3px); clip-path: inset(20% 0 60% 0); }
  97%   { opacity: .7; transform: translateX(3px); clip-path: inset(60% 0 10% 0); }
  98%   { opacity: .7; transform: translateX(-2px); clip-path: inset(40% 0 40% 0); }
  99%   { opacity: 0; }
}
@keyframes glitchB {
  0%,95%,100% { opacity: 0; transform: none; clip-path: none; }
  96%   { opacity: .5; transform: translateX(3px); clip-path: inset(50% 0 30% 0); }
  97%   { opacity: .5; transform: translateX(-3px); clip-path: inset(10% 0 70% 0); }
  99%   { opacity: 0; }
}

.hero-subtitle {
  font-family: var(--mono); font-size: 1rem;
  color: var(--text-secondary); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px; min-height: 1.8rem;
}
.blink-cursor { color: var(--neon-green); animation: blink .7s step-end infinite; }

.hero-desc {
  font-size: .85rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 22px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px; font-size: .8rem; font-weight: 600;
  border-radius: 4px; cursor: pointer; transition: all .3s ease;
  border: none; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
.btn-primary {
  background: transparent; color: var(--neon-green);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 20px rgba(0,255,136,.15), inset 0 0 20px rgba(0,255,136,.04);
}
.btn-bracket { color: var(--neon-blue); }
.btn-primary:hover {
  background: rgba(0,255,136,.1);
  box-shadow: 0 0 40px rgba(0,255,136,.4), inset 0 0 25px rgba(0,255,136,.08);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--neon-blue); color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0,212,255,.15);
  transform: translateY(-2px);
}

.hero-stats { display: flex; align-items: center; gap: 24px; }
.hstat { display: flex; flex-direction: column; }
.hstat-n { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; line-height: 1; text-shadow: 0 0 20px currentColor; }
.hstat-l { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 3px; }
.hstat-divider { width: 1px; height: 36px; background: var(--border); }

/* Attribution */
.hero-attribution {
  position: absolute;
  bottom: 14px;
  left: 20px;
  z-index: 10;
  font-family: var(--mono);
  font-size: .65rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}

/* CV Button */
.btn-cv {
  background: transparent; color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-cv:hover {
  background: rgba(0,212,255,.1);
  box-shadow: 0 0 30px rgba(0,212,255,.3);
  transform: translateY(-2px);
}
.btn-cv-icon { width: 16px; height: 16px; flex-shrink: 0; }

.scroll-indicator {
  position: absolute; bottom: 32px; right: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.4); font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  animation: fadeInUp 1s ease forwards 1s; opacity: 0;
  z-index: 10;
}
.mouse { width: 20px; height: 32px; border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; position: relative; }
.wheel { width: 2px; height: 6px; background: var(--neon-green); border-radius: 2px; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); animation: scrollWheel 2s ease-in-out infinite; box-shadow: 0 0 6px var(--neon-green); }
@keyframes scrollWheel { 0%{opacity:1;transform:translateX(-50%) translateY(0)} 100%{opacity:0;transform:translateX(-50%) translateY(12px)} }

@media (max-width: 600px) {
  .hero-overlay {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 60px;
    transform: none;
    width: auto;
    padding: 24px 20px;
    align-items: center;
    text-align: center;
  }
  .hero-buttons, .hero-stats { justify-content: center; }
  .hero-name { font-size: 2rem; }
  .scroll-indicator { right: 16px; bottom: 20px; }
}

/* ================================================
   SECTION TITLES
   ================================================ */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: 48px;
}
.section-number { font-family: var(--mono); font-size: .85rem; color: var(--neon-green); margin-right: 10px; font-weight: 400; }
.section-header-centered { text-align: center; margin-bottom: 60px; }
.section-title-centered { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 10px; }
.section-subtitle { color: var(--text-secondary); font-size: .9rem; font-family: var(--mono); }

/* ================================================
   GLASS
   ================================================ */
.glass {
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(6, 13, 26, 0.75);
  border: 1px solid rgba(0,255,136,0.1);
  transition: all .3s ease;
}
.glass:hover {
  background: rgba(6, 13, 26, 0.9);
  border-color: rgba(0,255,136,0.25);
  box-shadow: 0 0 30px rgba(0,255,136,0.06);
}

/* ================================================
   ABOUT
   ================================================ */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.about-text p { font-size: .93rem; color: var(--text-secondary); line-height: 1.78; margin-bottom: 20px; }
.about-text strong { color: var(--neon-green); }

.terminal-mini { padding: 16px 20px; border-radius: 8px; margin-top: 8px; }
.tm-header { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.tm-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,255,136,0.3); }
.tm-title { font-family: var(--mono); font-size: .72rem; color: var(--text-muted); margin-left: 6px; }
.tm-body { font-family: var(--mono); font-size: .78rem; }
.tm-line { margin-bottom: 6px; }
.tm-key { color: var(--text-muted); display: inline-block; min-width: 80px; }

.info-card { padding: 28px; border-radius: var(--radius); }
.info-card h3 { font-family: var(--mono); font-size: .8rem; color: var(--neon-green); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 20px; }
.info-list li { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgba(0,255,136,0.06); }
.info-list li:last-child { border-bottom: none; }
.info-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--neon-green); margin-top: 2px; }
.info-label { display: block; font-size: .7rem; color: var(--text-muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.info-value { display: block; font-size: .88rem; color: var(--text-secondary); }

@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ================================================
   SKILLS
   ================================================ */
.tech-stack-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 20px; max-width: 900px; margin: 0 auto;
}
.tech-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; border-radius: 8px; width: 130px; aspect-ratio: 1;
  text-align: center; transition: all .4s cubic-bezier(.16,1,.3,1);
  background: rgba(6,13,26,0.5);
}
.tech-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,255,136,0.4);
  box-shadow: 0 15px 40px rgba(0,255,136,0.1), 0 0 0 1px rgba(0,255,136,0.1);
}
.tech-icon-box { width: 46px; height: 46px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; transition: transform .3s; }
.tech-card:hover .tech-icon-box { transform: scale(1.1); }
.tech-icon-svg { width: 100%; height: 100%; }
.tech-name { font-family: var(--mono); font-size: .78rem; color: var(--text-muted); transition: color .3s; letter-spacing: .04em; }
.tech-card:hover .tech-name { color: var(--neon-green); }

/* ================================================
   PROJECTS
   ================================================ */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.project-card {
  padding: 28px; border-radius: var(--radius);
  display: flex; flex-direction: column;
  transition: all .4s cubic-bezier(.16,1,.3,1);
  background: rgba(6,13,26,0.7);
  border: 1px solid rgba(0,255,136,0.08);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,255,136,0.3);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(0,255,136,0.06);
}
.project-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.project-icon-wrapper { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
.project-lang-icon { width: 34px; height: 34px; }
.project-icon { width: 38px; height: 38px; color: var(--neon-green); }
.project-links { display: flex; gap: 10px; }
.project-link-icon { width: 20px; height: 20px; fill: var(--text-muted); transition: all .25s; }
.project-link-icon:hover { fill: var(--neon-green); transform: translateY(-2px); }
.project-name { font-family: var(--mono); font-size: 1rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); transition: color .3s; }
.project-card:hover .project-name { color: var(--neon-green); }
.project-desc { font-size: .85rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 16px; flex: 1; }
.project-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; font-family: var(--mono); font-size: .75rem; color: var(--text-muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: .68rem; padding: 3px 10px; background: rgba(0,255,136,0.06); color: var(--neon-green); border: 1px solid rgba(0,255,136,0.15); border-radius: 3px; letter-spacing: .04em; }

.projects-loading { grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 60px 0; }
.projects-loading p { font-family: var(--mono); font-size: .82rem; color: var(--text-muted); }
.loading-spinner { width: 36px; height: 36px; border: 2px solid rgba(0,255,136,.1); border-top-color: var(--neon-green); border-radius: 50%; animation: spin .8s linear infinite; box-shadow: 0 0 10px rgba(0,255,136,.2); }
@keyframes spin { to { transform: rotate(360deg); } }

.projects-error, .projects-empty { grid-column:1/-1; display:flex; flex-direction:column; align-items:center; gap:16px; padding:60px 0; text-align:center; }
.projects-error p, .projects-empty p { font-size:.9rem; color:var(--text-secondary); }
.error-icon { width:48px; height:48px; color:var(--text-muted); }

@media (max-width: 900px) { .projects-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

/* ================================================
   CONTACT
   ================================================ */
.contact-container { text-align: center; }
.contact-text { font-size: 1rem; color: var(--text-secondary); max-width: 520px; margin: 0 auto 40px; line-height: 1.75; }
.contact-grid { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 40px; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 28px 36px; border-radius: 8px; min-width: 160px;
  transition: all .4s cubic-bezier(.16,1,.3,1);
}
.contact-card:hover { transform: translateY(-8px); border-color: rgba(0,255,136,0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 25px rgba(0,255,136,0.08); }
.contact-icon { width: 28px; height: 28px; fill: var(--neon-green); transition: transform .3s; }
.contact-card:hover .contact-icon { transform: scale(1.2); filter: drop-shadow(0 0 8px var(--neon-green)); }
.contact-label { font-size: .9rem; font-weight: 600; color: var(--text-primary); }
.contact-handle { font-family: var(--mono); font-size: .75rem; color: var(--text-muted); }

/* ── CV Button ── */
.btn-cv {
  background: transparent; color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-cv:hover {
  background: rgba(0,212,255,.1);
  box-shadow: 0 0 30px rgba(0,212,255,.3);
  transform: translateY(-2px);
}
.btn-cv-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ================================================
   TERMINAL CONTACT FORM
   ================================================ */
.contact-form-terminal {
  max-width: 700px; margin: 0 auto;
  background: rgba(2, 8, 20, 0.95);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 40px rgba(0,255,136,0.06),
    inset 0 0 60px rgba(0,255,136,0.01);
  text-align: left;
}

/* Titlebar */
.cft-titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
}
.cft-dot { width: 12px; height: 12px; border-radius: 50%; }
.cft-dot--red    { background: #ff5f57; }
.cft-dot--yellow { background: #febc2e; }
.cft-dot--green  { background: #28c840; }
.cft-titlebar-text {
  margin-left: 10px; font-family: var(--mono); font-size: .72rem;
  color: var(--text-muted); opacity: .7;
}

.cft-separator {
  height: 1px;
  background: rgba(0,255,136,0.15);
  box-shadow: 0 0 6px rgba(0,255,136,0.1);
}

/* Form body */
.cft-body {
  padding: 28px 28px 32px;
}

.cft-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-bottom: 20px;
}

.cft-field { margin-bottom: 0; }
.cft-field + .cft-field:not(.cft-row .cft-field) { margin-top: 20px; }
.cft-body > .cft-field { margin-top: 0; margin-bottom: 0; }
.cft-body > .cft-field:nth-child(2) { margin-top: 20px; }

.cft-label {
  display: block;
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  color: var(--neon-green); letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 8px;
}

.cft-input, .cft-textarea {
  width: 100%;
  background: rgba(0,255,136,0.03);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: var(--mono); font-size: .84rem;
  color: var(--neon-green);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

.cft-input::placeholder, .cft-textarea::placeholder {
  color: rgba(0,255,136,0.25);
}

.cft-input:focus, .cft-textarea:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0,255,136,0.15), inset 0 0 12px rgba(0,255,136,0.03);
}

.cft-textarea {
  resize: vertical; min-height: 120px;
}

/* Submit button */
.cft-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 24px;
  padding: 16px 32px;
  background: var(--neon-green);
  color: #030810; font-family: var(--mono); font-size: .88rem;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  border: none; border-radius: 4px; cursor: pointer;
  transition: all .3s ease;
  box-shadow: 0 0 20px rgba(0,255,136,0.3);
}
.cft-submit:hover {
  background: #33ffaa;
  box-shadow: 0 0 40px rgba(0,255,136,0.5), 0 4px 20px rgba(0,255,136,0.3);
  transform: translateY(-2px);
}
.cft-submit:active { transform: translateY(0); }
.cft-submit-icon { width: 18px; height: 18px; stroke: #030810; }

/* Success state */
.cft-success {
  padding: 20px 28px;
  font-family: var(--mono); font-size: .88rem;
  color: var(--neon-green);
  text-align: center;
}

@media (max-width: 600px) {
  .cft-row { grid-template-columns: 1fr; gap: 0; }
  .cft-row .cft-field + .cft-field { margin-top: 20px; }
  .cft-body { padding: 20px 16px 24px; }
}

/* ================================================
   FOOTER
   ================================================ */
.footer { padding: 40px 0; border-top: 1px solid rgba(0,255,136,0.08); position: relative; z-index: 1; }
.footer-content { text-align: center; }
.footer-content p { font-size: .82rem; color: var(--text-muted); margin-bottom: 6px; }
.footer-sig { font-family: var(--mono); font-size: .8rem; margin-top: 8px; }
.footer-blink { animation: blink .7s step-end infinite; color: var(--neon-green); }
.footer-year { opacity: .5; }

/* ================================================
   SCROLL ANIMATIONS
   ================================================ */
.scroll-animate { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.scroll-animate.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: .1s; }
.stagger-2 { transition-delay: .2s; }
.stagger-3 { transition-delay: .3s; }
.stagger-4 { transition-delay: .4s; }
.stagger-5 { transition-delay: .5s; }

@keyframes fadeInUp { 0%{opacity:0;transform:translateY(30px)} 100%{opacity:1;transform:translateY(0)} }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 480px) {
  .section { padding: 60px 0; }
  .container { padding: 0 16px; }
  .hero-name { font-size: 2.3rem; }
  .contact-card { padding: 22px 24px; min-width: 130px; }
}

/* ================================================
   HACKER TERMINAL — INTERACTIVE EASTER EGG
   ================================================ */

/* ---------- Variables ---------- */
:root {
  --ht-green:  #00ff88;
  --ht-cyan:   #00d4ff;
  --ht-bg:     #020810;
  --ht-bg-win: rgba(2, 6, 16, 0.97);
}

/* ---------- Overlay ---------- */
.hacker-terminal {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 8, 0.88);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}
.hacker-terminal.ht-active {
  opacity: 1; visibility: visible; pointer-events: auto;
}

/* ---------- CRT Power-On Animation ---------- */
@keyframes htCrtOn {
  0%   { transform: scaleY(0.005) scaleX(0.3); opacity: 0; filter: brightness(30); }
  40%  { transform: scaleY(0.005) scaleX(1);   opacity: 1; filter: brightness(10); }
  60%  { transform: scaleY(1.1)   scaleX(1);   filter: brightness(2); }
  80%  { transform: scaleY(0.95)  scaleX(1);   filter: brightness(1.3); }
  100% { transform: scaleY(1)     scaleX(1);   filter: brightness(1); }
}
@keyframes htCrtOff {
  0%   { transform: scale(1);                opacity: 1; filter: brightness(1); }
  20%  { transform: scaleY(1.1) scaleX(1.02); opacity: 1; filter: brightness(2); }
  50%  { transform: scaleY(0.005) scaleX(0.8);opacity: 1; filter: brightness(8); }
  100% { transform: scaleY(0) scaleX(0);      opacity: 0; filter: brightness(20); }
}

.hacker-terminal.ht-active .ht-window {
  animation: htCrtOn .55s cubic-bezier(.22,1,.36,1) forwards;
}
.hacker-terminal.ht-closing .ht-window {
  animation: htCrtOff .4s cubic-bezier(.55,.1,.66,1) forwards;
}

/* ---------- Scanlines overlay inside terminal ---------- */
.ht-scanlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  animation: scanMove 8s linear infinite;
}

/* ---------- Window ---------- */
.ht-window {
  width: min(820px, 94vw);
  max-height: 80vh;
  background: var(--ht-bg-win);
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 10px;
  overflow: hidden;
  position: relative; z-index: 3;
  box-shadow:
    0 0 0 1px rgba(0,255,136,0.08),
    0 0 60px rgba(0,255,136,0.18),
    0 0 120px rgba(0,255,136,0.06),
    inset 0 0 120px rgba(0,255,136,0.02);
  transform-origin: center center;
}

/* ---------- Titlebar ---------- */
.ht-titlebar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(0,255,136,0.04);
  border-bottom: 1px solid rgba(0,255,136,0.15);
  user-select: none;
}
.ht-dots { display: flex; gap: 6px; }
.ht-dot { width: 12px; height: 12px; border-radius: 50%; }
.ht-dot--red    { background: #ff5f57; }
.ht-dot--yellow { background: #febc2e; }
.ht-dot--green  { background: #28c840; }
.ht-titlebar-text {
  flex: 1; text-align: center;
  font-family: var(--mono); font-size: .7rem; color: var(--ht-green); opacity: .45;
}
.ht-close-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 1rem; cursor: pointer; padding: 4px 8px;
  transition: color .2s, text-shadow .2s;
  font-family: var(--mono);
}
.ht-close-btn:hover {
  color: #ff5f57; text-shadow: 0 0 10px rgba(255,95,87,.6);
}

/* ---------- Body ---------- */
.ht-body {
  padding: 20px 24px 24px;
  font-family: var(--mono); font-size: .82rem; line-height: 1.75;
  color: var(--ht-green);
  overflow-y: auto; max-height: calc(80vh - 42px);
  scroll-behavior: smooth;
  position: relative;
}
.ht-body::-webkit-scrollbar { width: 4px; }
.ht-body::-webkit-scrollbar-track { background: transparent; }
.ht-body::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.2); border-radius: 2px; }

/* ---------- Output lines ---------- */
.ht-line {
  margin: 1px 0;
  white-space: pre-wrap; word-break: break-word;
  opacity: 0; transform: translateY(2px);
  animation: htLineIn .2s ease forwards;
}
@keyframes htLineIn {
  to { opacity: 1; transform: none; }
}

.ht-line--cmd  { color: var(--text-secondary); }
.ht-line--ok   { color: var(--ht-green); }
.ht-line--info { color: var(--ht-cyan); }
.ht-line--warn { color: #ffcc00; }
.ht-line--err  { color: #ff4444; }
.ht-line--dim  { color: #2a5a4a; }
.ht-line--accent { color: var(--neon-purple); }
.ht-line--header {
  color: var(--ht-cyan);
  font-weight: bold;
  text-shadow: 0 0 8px rgba(0,212,255,.4);
}
.ht-line--separator {
  color: rgba(0,255,136,.2);
  user-select: none;
}

/* Skills formatting */
.ht-skill-bar {
  display: inline-block;
  color: var(--ht-green);
  text-shadow: 0 0 4px var(--ht-green);
}
.ht-skill-empty {
  color: rgba(0,255,136,.15);
}
.ht-skill-name {
  display: inline-block;
  min-width: 140px;
  color: var(--text-secondary);
}
.ht-skill-level {
  color: var(--ht-cyan);
  font-size: .75rem;
}

/* ---------- Input line ---------- */
.ht-input-line {
  display: flex; align-items: center;
  margin-top: 4px;
  position: relative;
}
.ht-prompt {
  color: var(--ht-green); opacity: .6;
  white-space: nowrap; flex-shrink: 0;
}
.ht-input-display {
  color: var(--text-primary);
  white-space: pre;
}
.ht-cursor {
  color: var(--ht-green);
  animation: blink .7s step-end infinite;
}
.ht-input-real {
  position: absolute;
  left: 0; top: 0; width: 100%; height: 100%;
  opacity: 0;
  font-size: 16px; /* Prevents iOS zoom */
  border: none; outline: none;
  background: transparent; color: transparent;
  caret-color: transparent;
  font-family: var(--mono);
}

/* ---------- Body lock ---------- */
body.ht-locked {
  overflow: hidden !important;
}

/* ---------- Mobile hint ---------- */
.ht-mobile-hint {
  position: fixed;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .68rem;
  color: var(--text-muted);
  padding: 6px 14px;
  background: rgba(0,255,136,0.05);
  border: 1px solid rgba(0,255,136,0.12);
  border-radius: 20px;
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
  z-index: 100002;
  white-space: nowrap;
}
.ht-mobile-hint.ht-hint-show {
  opacity: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .ht-window { max-height: 90vh; border-radius: 0; }
  .ht-body { padding: 14px 14px 18px; font-size: .76rem; max-height: calc(90vh - 42px); }
  .ht-skill-name { min-width: 100px; }
}

/* ================================================
   HACK SEQUENCE — FULLSCREEN OVERLAY
   ================================================ */

/* ── Body lock during hack ── */
body.hack-active {
  overflow: hidden !important;
  cursor: none !important;
  user-select: none !important;
}

/* ── Overlay container ── */
#hack-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #000000;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow: hidden;
}
#hack-overlay.hack-visible {
  opacity: 1;
}

/* ── Matrix rain canvas ── */
#hack-matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ── Glitch scanline layer (overlay on top of Matrix) ── */
.hack-glitch-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 136, 0.03) 2px,
    rgba(0, 255, 136, 0.03) 4px
  );
  animation: hackScanlines 0.1s linear infinite;
  mix-blend-mode: screen;
}
.hack-glitch-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 255, 136, 0.04) 50%,
    transparent 100%
  );
  animation: hackScanBar 3s linear infinite;
}
@keyframes hackScanlines {
  0%   { background-position: 0 0; }
  100% { background-position: 0 4px; }
}
@keyframes hackScanBar {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* ── Hack logs container ── */
.hack-logs {
  position: absolute;
  bottom: 40px;
  left: 40px;
  z-index: 3;
  max-width: 600px;
  max-height: 50vh;
  overflow-y: auto;
  font-family: var(--mono, 'Share Tech Mono', monospace);
  font-size: 0.82rem;
  line-height: 1.8;
  scrollbar-width: none;
}
.hack-logs::-webkit-scrollbar { display: none; }

/* ── Single log line ── */
.hack-log-line {
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0;
  transform: translateX(-10px);
  animation: hackLogIn 0.3s ease forwards;
  text-shadow: 0 0 6px currentColor;
}
@keyframes hackLogIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Log severity colors */
.hack-log--ok       { color: #00ff88; }
.hack-log--warn     { color: #ffcc00; }
.hack-log--err      { color: #ff4444; }
.hack-log--critical {
  color: #ff0040;
  font-weight: bold;
  text-shadow: 0 0 12px rgba(255, 0, 64, 0.8);
  animation: hackLogIn 0.3s ease forwards, hackCriticalPulse 0.4s ease-in-out infinite alternate;
}
.hack-log--reboot {
  color: #ffffff;
  font-weight: bold;
  font-size: 1rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

@keyframes hackCriticalPulse {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}

/* ── Center ASCII warning ── */
.hack-ascii {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-family: var(--mono, 'Share Tech Mono', monospace);
  font-size: clamp(1.2rem, 4vw, 2.5rem);
  font-weight: bold;
  color: #ff0040;
  text-shadow:
    0 0 20px rgba(255, 0, 64, 0.6),
    0 0 60px rgba(255, 0, 64, 0.3),
    0 0 100px rgba(255, 0, 64, 0.1);
  white-space: nowrap;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: hackAsciiIn 0.8s ease 1.5s forwards, hackAsciiPulse 1.2s ease-in-out 2.3s infinite;
  pointer-events: none;
}
@keyframes hackAsciiIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); filter: blur(10px); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.1); filter: blur(0); }
  100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
}
@keyframes hackAsciiPulse {
  0%, 100% { opacity: 0.8; text-shadow: 0 0 20px rgba(255,0,64,0.6), 0 0 60px rgba(255,0,64,0.3); }
  50%      { opacity: 1;   text-shadow: 0 0 40px rgba(255,0,64,0.9), 0 0 80px rgba(255,0,64,0.5), 0 0 120px rgba(255,0,64,0.2); }
}

/* ── Screen shake — light phase (2-4s) ── */
.hack-shake-light {
  animation: hackShakeLight 0.08s linear infinite !important;
}
@keyframes hackShakeLight {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(2px, -1px); }
  75%  { transform: translate(-1px, 2px); }
  100% { transform: translate(1px, -2px); }
}

/* ── Screen shake — heavy phase (4s+) ── */
.hack-shake-heavy {
  animation: hackShakeHeavy 0.05s linear infinite !important;
}
@keyframes hackShakeHeavy {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-6px, 3px); }
  40%  { transform: translate(5px, -4px); }
  60%  { transform: translate(-4px, 5px); }
  80%  { transform: translate(6px, -2px); }
  100% { transform: translate(-3px, 4px); }
}

/* ── Reboot white flash ── */
.hack-reboot-flash {
  animation: hackFlash 0.6s ease-out forwards !important;
}
@keyframes hackFlash {
  0%   { filter: brightness(1); background: #000000; }
  30%  { filter: brightness(10); background: #ffffff; }
  60%  { filter: brightness(20); background: #ffffff; }
  100% { filter: brightness(30); background: #ffffff; opacity: 1; }
}

/* ── Responsive adjustments ── */
@media (max-width: 600px) {
  .hack-logs {
    left: 16px;
    right: 16px;
    bottom: 24px;
    max-width: none;
    font-size: 0.72rem;
    line-height: 1.6;
  }
  .hack-ascii {
    font-size: clamp(0.9rem, 5vw, 1.6rem);
    letter-spacing: 0.08em;
  }
  .hack-log--reboot {
    font-size: 0.85rem;
  }
}