:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --text: #e0e0e0;
  --text-dim: #7a7a8a;
  --accent: #ff8c00;
  --accent-dim: #cc7000;
  --accent-alt: #ff6b35;
  --border: #2a2a3a;
  --green: #4ade80;
  --green-dim: #2a4a2a;
  --term-red: #ff5f57;
  --term-yellow: #febc2e;
  --term-green: #28c840;
  --font-mono: 'Courier New', Consolas, 'Lucida Console', monospace;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.8rem 1.2rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar.scrolled {
  border-bottom-color: rgba(255, 140, 0, 0.15);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(255, 140, 0, 0.35);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(255, 140, 0, 0.09), transparent 50%),
    radial-gradient(ellipse at 80% 25%, rgba(255, 107, 53, 0.09), transparent 50%),
    radial-gradient(ellipse at 50% 85%, rgba(255, 140, 0, 0.06), transparent 55%);
}

.hero-glitch {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 4px;
  position: relative;
  animation: glitch 3s infinite;
  text-shadow: 0 0 30px rgba(255, 140, 0, 0.3);
}

.hero-glitch::before,
.hero-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-glitch::before {
  color: var(--accent);
  animation: glitch-shift 2s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-2px, -2px);
}

.hero-glitch::after {
  color: var(--accent-alt);
  animation: glitch-shift 3s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  transform: translate(2px, 2px);
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 500px;
}

.hero-cursor {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

.hero-cta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, border-color 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 0 22px rgba(255, 140, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(255, 140, 0, 0.55);
}

.btn-ghost {
  border: 1px solid var(--accent-dim);
  color: var(--accent);
}

.btn-ghost:hover {
  background: rgba(255, 140, 0, 0.08);
  transform: translateY(-2px);
}

@keyframes glitch {
  0%, 90%, 100% { transform: none; }
  92% { transform: skewX(-2deg); }
  94% { transform: skewX(2deg); }
  96% { transform: skewX(-1deg); }
}

@keyframes glitch-shift {
  0%, 85%, 100% { transform: translate(0); }
  87% { transform: translate(-3px, 1px); }
  89% { transform: translate(3px, -1px); }
  91% { transform: translate(-1px, 2px); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
}

/* ===== ABOUT ===== */
.about-greeting {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-dim);
}

.highlight {
  color: var(--accent);
  font-weight: 700;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 34px rgba(255, 140, 0, 0.14), 0 0 0 1px rgba(255, 140, 0, 0.2);
}

.project-name {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  flex: 1;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.ptag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 140, 0, 0.08);
  border: 1px solid var(--border);
  color: var(--accent-dim);
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.project-link-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
  text-align: center;
  transition: border-color 0.3s, color 0.3s, background 0.3s, box-shadow 0.3s;
}

.project-link-btn:hover {
  background: rgba(255, 140, 0, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 18px rgba(255, 140, 0, 0.25);
}

.projects-disclaimer {
  margin-top: 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  opacity: 0.8;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 1rem;
  color: var(--text-dim);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(255, 140, 0, 0.12);
}

.contact-link {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: color 0.3s;
}

.contact-card:hover .contact-link {
  color: var(--accent);
}

.contact-copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 1px;
  padding: 0.4rem 0.9rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.contact-copy:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  box-shadow: 0 0 14px rgba(255, 140, 0, 0.2);
}

.contact-copy.copied {
  color: var(--green);
  border-color: var(--green-dim);
}

/* ===== STATUS BADGE ===== */
.status-badge {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  background: rgba(18, 18, 26, 0.6);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ===== WHY PRIVACY STRIP ===== */
.strip {
  max-width: 760px;
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 140, 0, 0.06), transparent 70%);
}

.strip-line {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.prompt {
  color: var(--accent);
  font-weight: 700;
}

.term-dim {
  color: var(--text-dim);
}

/* ===== TERMINAL / NOTES ===== */
.terminal {
  max-width: 640px;
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
}

.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.terminal-bar .dot:nth-child(1) { background: var(--term-red); }
.terminal-bar .dot:nth-child(2) { background: var(--term-yellow); }
.terminal-bar .dot:nth-child(3) { background: var(--term-green); }

.terminal-title {
  margin-left: auto;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 1.2rem 1.4rem;
}

.term-line {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.term-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.footer-built {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

.footer-built a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: color 0.3s;
}

.footer-built a:hover {
  color: var(--accent-alt);
}

.footer-disclaimer {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  max-width: 560px;
  margin: 1rem auto 0;
  opacity: 0.7;
}

.footer-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  opacity: 0.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    display: none;
    background: rgba(10, 10, 15, 0.97);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
  }

  .hero-glitch {
    letter-spacing: 2px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .section {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-cta .btn {
    width: 100%;
  }
}

/* ===== FADE-IN ===== */
.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ===== SCANLINE OVERLAY (subtle retro feel) ===== */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 999;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
