/* assets/style.css
   Hacker-themed portfolio CSS
   Mobile-first, separated file, commented.
*/

/* ===== Variables & Base ===== */
:root {
  --bg: #0a0a0a;
  --text: #e0e0e0;
  --neon: #00ff88;
  --cyber: #00bfff;
  --muted: #98a0a6;
  --glass: rgba(255, 255, 255, 0.03);
  --mono: "Fira Code", monospace;
  --sans: "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
}

/* hidden helper */
.hidden {
  display: none !important;
}

/* ===== Loader ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(10, 10, 10, 1), rgba(0, 0, 0, 0.7));
}
.loader-console {
  width: min(720px, 96%);
  background: #020202;
  padding: 18px;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 255, 136, 0.06);
}
#loader-lines {
  color: var(--neon);
  font-family: var(--mono);
  margin: 0;
  font-size: 13px;
  opacity: 0.95;
}
.loader-progress {
  background: rgba(255, 255, 255, 0.03);
  height: 6px;
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}
#loader-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), var(--cyber));
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.7),
    rgba(10, 10, 10, 0.5)
  );
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  width: 28px;
  height: 28px;
  fill: none;
}
.logo-text {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--neon);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.25s ease;
  font-size: 13px;
}
.nav-link:hover {
  color: var(--neon);
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.08);
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--mono);
  color: var(--muted);
  cursor: pointer;
}
.btn-ghost:hover {
  color: var(--cyber);
}

/* ===== Hero ===== */
.hero {
  padding: 36px 12px 60px;
  min-height: 80vh;
  display: grid;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.terminal-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
  font-family: var(--mono);
}
.terminal-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-dot-red {
  background: #ff605c;
}
.term-dot-yellow {
  background: #ffbd2e;
}
.term-dot-green {
  background: #00ff88;
}
.term-title {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.terminal-body {
  padding: 22px;
  color: var(--text);
}
.typewriter .prompt {
  margin-right: 10px;
  color: var(--cyber);
}
.typed {
  color: var(--neon);
  font-weight: 600;
  font-size: 18px;
  display: inline-block;
  white-space: pre;
}
.sub {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
}
.hero-cta {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--mono);
}
.btn-neon {
  background: linear-gradient(90deg, var(--neon), #00ffa8);
  color: #00110a;
  box-shadow: 0 8px 30px rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.08);
}
.btn-blue {
  background: linear-gradient(90deg, var(--cyber), #4fd8ff);
  color: #001224;
}
.btn-small {
  padding: 6px 8px;
  font-size: 13px;
}

/* Avatar & Dossier (right column on wide screens) */
.avatar-dossier {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 6px;
}
.avatar {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(0, 255, 136, 0.06);
}
.dossier {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* ===== Sections ===== */
.section {
  padding: 40px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--mono);
  color: var(--neon);
  font-size: 20px;
  margin: 0 0 16px;
}

/* Terminal output styling */
.terminal-output {
  background: #000;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(0, 255, 136, 0.04);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  color: var(--neon);
  font-family: var(--mono);
  white-space: pre-wrap;
}
.mono {
  font-family: var(--mono);
}
.lead {
  color: var(--text);
  font-size: 15px;
}

/* Skills chips */
.skill-chips {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.project-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.01),
    rgba(255, 255, 255, 0.02)
  );
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.card-inner h3 {
  margin: 0;
  font-family: var(--mono);
  color: var(--neon);
}
.card-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  padding: 20px;
}
.modal-inner {
  background: linear-gradient(180deg, #071217, #000);
  padding: 20px;
  border-radius: 12px;
  max-width: 720px;
  width: 100%;
  border: 1px solid rgba(0, 255, 136, 0.06);
}
.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 32px;
  cursor: pointer;
}

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
}
.contact-form .form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.contact-info a {
  color: var(--cyber);
}

/* PGP block */
.pgp {
  background: #020202;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 136, 0.04);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  padding: 18px 12px;
  margin-top: 40px;
}

/* Accessibility helpers */
.sr-only {
  position: absolute;
  left: -9999px;
}

/* ===== Animations & Effects ===== */
@keyframes typed-cursor {
  50% {
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
  }
}
.typed::after {
  content: " ";
  display: inline-block;
  width: 8px;
  height: 18px;
  background: transparent;
  margin-left: 6px;
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.9);
  animation: typed-cursor 1s steps(2) infinite;
  vertical-align: middle;
}

/* Glitch on hover */
.nav-link:hover,
.btn:hover,
.project-card:hover {
  position: relative;
}
.nav-link:hover::after,
.btn:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 136, 0.06),
    rgba(0, 191, 255, 0.06)
  );
  filter: blur(6px);
  transform: skewX(-6deg);
}

/* Matrix canvas full screen */
.matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.matrix.hidden {
  display: none;
}

/* Larger screens */
@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 320px;
  }
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr 320px;
  }
}

/* Subtle parallax effect */
[data-theme="dark"] .hero {
  transform: translateZ(0);
  will-change: transform;
  transition: transform 0.6s ease;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .typed::after {
    animation: none;
  }
  * {
    transition: none !important;
    transform: none !important;
  }
}
/* Header Container Fix */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem;
}

/* Logo Adjustments */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 24px;
  height: 24px;
}

.logo-text {
  white-space: nowrap;
}

/* Hide Desktop Nav on Mobile */
@media (max-width: 992px) {
  .nav {
    display: none;
  }
}

/* Hamburger Menu Button */
.mobile-menu-toggle {
  display: none; /* Hidden by default */
  background: none;
  border: none;
  color: var(--neon-green);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 1rem;
}

/* Show Hamburger on Mobile */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: block;
  }
}

/* Mobile Menu Panel */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 10, 0.98);
  z-index: 1000;
  padding: 2rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--neon-green);
  cursor: pointer;
}

/* Mobile Navigation Links */
@media (max-width: 992px) {
  .mobile-nav .nav-link,
  .mobile-nav .btn-ghost {
    font-size: 1.4rem; /* Increased from ~1rem */
    padding: 1.2rem 0; /* Increased vertical padding */
    margin: 0.5rem 0; /* Added spacing between items */
  }

  .mobile-menu {
    padding-top: 3rem; /* More space at top */
  }
}

/* Mobile Menu Layout Fix */
@media (max-width: 992px) {
  .mobile-nav {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2-column layout */
    gap: 1rem; /* Spacing between items */
  }

  .mobile-nav .nav-link,
  .mobile-nav .btn-ghost {
    padding: 1rem;
    margin: 0;
    text-align: center;
  }
}

/* Mobile About Section Fix (ONLY for mobile) */
@media (max-width: 768px) {
  .about-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .about .lead {
    font-size: 1rem;
    line-height: 1.6;
    padding: 0 0.5rem;
    text-align: left;
  }

  .dossier-extended pre {
    font-size: 0.85rem;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--neon-green);
  }
}

/* Projects Section Button Fixes */
.project-card .btn-small {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  padding: 0.5rem 1rem;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.project-card .btn-small:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
  text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.project-card .btn-small::before {
  content: ">> ";
  opacity: 0;
  transition: all 0.3s;
}

.project-card .btn-small:hover::before {
  opacity: 1;
  margin-right: 5px;
}

/* Neon Blue Variation */
.project-card .btn-blue {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 8px rgba(0, 191, 255, 0.3);
}

.project-card .btn-blue:hover {
  background: rgba(0, 191, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 191, 255, 0.5);
  text-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .project-card .btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* View Repo Button Fixes */
.project-card .muted-link {
  display: inline-block;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--neon-purple);
  color: var(--neon-purple);
  padding: 0.5rem 1rem;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 0 8px rgba(183, 0, 255, 0.3);
  margin-left: 0.5rem;
}

.project-card .muted-link:hover {
  background: rgba(183, 0, 255, 0.1);
  box-shadow: 0 0 12px rgba(183, 0, 255, 0.5);
  text-shadow: 0 0 5px rgba(183, 0, 255, 0.5);
  transform: translateY(-1px);
}

.project-card .muted-link::before {
  content: "<< ";
  opacity: 0;
  transition: all 0.3s;
}

.project-card .muted-link:hover::before {
  opacity: 1;
  margin-right: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .project-card .muted-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    margin-left: 0;
    margin-top: 0.5rem;
    display: block;
  }
}

button.btn-small.btn-blue.view-project {
  cursor: pointer;
}

button.btn-small.btn-neon.view-project {
  cursor: pointer;
}

/* Fix section anchor positioning */
section {
  scroll-margin-top: 100px; /* Adjust based on your header height */
}

/* For mobile menu */
@media (max-width: 992px) {
  section {
    scroll-margin-top: 80px; /* Smaller value for mobile */
  }
}
/* === Button Hover Effects === */
.btn-neon,
.btn-blue {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease-out;
}

/* Neon Green Button (Download Resume) */
.btn-neon:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6), 0 0 16px rgba(0, 255, 136, 0.3);
  transform: translateY(-2px);
  color: #ffffff;
}

/* Blue Button (Contact Me) */
.btn-blue:hover {
  background: rgba(0, 191, 255, 0.1);
  box-shadow: 0 0 8px rgba(0, 191, 255, 0.6), 0 0 16px rgba(0, 191, 255, 0.3);
  transform: translateY(-2px);
  color: white;
}

/* Glow Pulse Animation */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 8px currentColor;
  }
  50% {
    box-shadow: 0 0 16px currentColor;
  }
  100% {
    box-shadow: 0 0 8px currentColor;
  }
}

.btn-neon:hover::after,
.btn-blue:hover::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    transparent 45%,
    currentColor 50%,
    transparent 55%
  );
  opacity: 0.3;
  animation: shine 1.5s infinite;
}

@keyframes shine {
  to {
    transform: translate(50%, 50%) rotate(360deg);
  }
}

button.btn.btn-neon {
  cursor: pointer;
}

/* PGP Key Block Fix */
#pgpblock {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap; /* Wrap long lines */
  word-wrap: break-word;
  background: rgba(15, 15, 15, 0.7);
  padding: 1rem;
  border-left: 3px solid var(--neon-green);
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 1rem 0;
}

/* Optional: Add terminal-like line numbers */
#pgpblock {
  counter-reset: line;
}

#pgpblock .line::before {
  counter-increment: line;
  content: counter(line) " ";
  color: var(--neon-green);
  margin-right: 1rem;
  user-select: none;
}

p.lead {
  font-family: Source Code Pro;
}

button.btn-small.btn-neon {
  cursor: pointer;
}

/* ===== Theme-Matched Terminal ===== */
.live-terminal {
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid var(--neon-green);
  font-family: "Fira Code", monospace;
  width: 100%;
  margin: 0 auto;
}

/* Terminal Output - No Empty Space */
.terminal-output.live {
  padding: 1rem;
  color: var(--text-light);
  min-height: auto;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre;
  background: rgba(15, 15, 15, 0.7);
}

/* Command Line - Tight Layout */
.terminal-form {
  display: flex;
  padding: 0.5rem;
  background: rgba(10, 10, 10, 0.9);
  border-top: 1px solid var(--dark-border);
  align-items: center;
}

/* Prompt - Theme Green */
.prompt {
  color: var(--neon-green);
  font-weight: bold;
  white-space: nowrap;
  margin-right: 0.5rem;
}

/* Input Field - No Spacing */
.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-family: "Fira Code", monospace;
  padding: 0.25rem 0;
}

/* Execute Button - Theme Matched */
.btn-execute {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  padding: 0.25rem 0.75rem;
  margin-left: 0.5rem;
  font-family: "Fira Code", monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-execute:hover {
  background: rgba(0, 255, 136, 0.2);
  text-shadow: 0 0 5px var(--neon-green);
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .terminal-form {
    flex-wrap: wrap;
    padding: 0.5rem;
  }

  .cmd-input {
    min-width: 60%;
    margin: 0.25rem 0;
  }

  .btn-execute {
    margin-left: auto;
  }
}

/* ===== Terminal Dot Styles ===== */
.terminal-dots {
  display: flex;
  gap: 8px;
  margin-right: 12px;
}

.terminal-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.terminal-dot-red {
  background: #ff5f56;
  border: 1px solid #e0443e;
}

.terminal-dot-yellow {
  background: #ffbd2e;
  border: 1px solid #dea123;
}

.terminal-dot-green {
  background: #27c93f;
  border: 1px solid #1aab29;
}

:root {
  --neon-blue: #00bfff; /* or your specific blue value */
}

.encrypted-tag {
  font-family: "Fira Code", monospace;
  color: var(--neon-green);
  text-align: center;
  margin: 1rem 0;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--neon-blue); /* Using your existing blue variable */
}

a.nav-link {
  cursor: pointer;
}

a.contact-list {
  text-decoration: none;
  color: var(--neon-blue);
}

/* Toast notification styling */
.toast {
  position: fixed;
  bottom: 20px;
  right: -300px; /* start off screen */
  background: #222;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-family: "Fira Code", sans-serif;
  font-size: 17px;
  z-index: 9999;
  /* font-weight: ; */
  transition: right 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}
.toast.show {
  right: 20px;
  opacity: 1;
}
.toast.success {
  background: #17722c;
}
.toast.error {
  background: #dc3545;
}

/* Desktop Form Spacing Fix */
@media (min-width: 992px) {
  #contact-form input,
  #contact-form textarea {
    margin-bottom: 1.5rem; /* Adds space between fields */
  }

  #contact-form textarea {
    min-height: 150px; /* Better for message area */
  }
}

.hero-h1-goo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
