/* ==========================================================================
   0. CUSTOM FONT DECLARATIONS
   ========================================================================== */

/* Primary Font: Space Grotesk */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/Space_Grotesk/static/SpaceGrotesk-Regular.ttf') format('ttf');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/Space_Grotesk/static/SpaceGrotesk-Bold.ttf') format('ttf');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Secondary Font: JetBrains Mono */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrains_Mono,Space_Grotesk/JetBrains_Mono/static/JetBrainsMono-Regular.ttf') format('ttf');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   1. DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
    --bg-dark: #000000;
    --bg-gradient: radial-gradient(circle at top left, rgba(0, 162, 254, 0.25) 0%, rgba(0, 0, 0, 0.96) 40%, rgba(0, 0, 0, 1) 100%);
    --accent-color: #00f2fe;
    --accent-glow: rgba(0, 242, 254, 0.35);
    --accent-hover: #4facfe;
    --glass-bg: rgba(20, 20, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;

    /* 2-Font Setup */
    --font-primary: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-card: 16px;
    --radius-btn: 30px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Utility Classes for Developer Monospace Details */
.font-mono,
code,
pre,
.tech-tag,
.project-number,
.badge {
  font-family: var(--font-mono);
}

/* ==========================================================================
   2. GLOBAL RESETS & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    scroll-behavior: smooth;
    background-color: #0d0e15;
    min-height: 100%;
    overscroll-behavior-y: none;
}

body {
    font-family: var(--font-primary);
    background-color: #0d0e15;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.7;
    padding-top: 90px;
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050505;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ==========================================================================
   TOPBAR COMPONENT STYLES
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg, rgba(20, 20, 20, 0.65));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth, all 0.35s ease);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--accent-glow, rgba(79, 255, 210, 0.35)));
  transition: transform var(--transition-smooth, all 0.35s ease);
}

.logo:hover img {
  transform: rotate(360deg);
}

.logo-text-link {
  text-decoration: none;
  color: var(--text-main, #ffffff);
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-color, #4fffd2);
  text-shadow: 0 0 12px var(--accent-glow, rgba(79, 255, 210, 0.35));
}

.topbar {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted, #a0a0a0);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast, all 0.2s ease);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-color, #4fffd2);
  text-shadow: 0 0 8px var(--accent-glow, rgba(79, 255, 210, 0.35));
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color, #4fffd2);
  box-shadow: 0 0 8px var(--accent-color, #4fffd2);
  transition: var(--transition-smooth, all 0.35s ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.contact-button {
  background: transparent;
  color: var(--accent-color, #4fffd2);
  border: 1px solid var(--accent-color, #4fffd2);
  padding: 9px 20px;
  border-radius: var(--radius-btn, 30px);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition-smooth, all 0.35s ease);
}

.contact-button:hover {
  background: var(--accent-color, #4fffd2);
  color: var(--bg-dark, #0a0a0a);
  box-shadow: 0 0 18px var(--accent-glow, rgba(79, 255, 210, 0.35));
  transform: translateY(-2px);
}

/* ==========================================================================
   TOPBAR RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 12px;
    padding: 12px 4%;
  }

  .topbar {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .contact-button {
    padding: 6px 14px;
    font-size: 0.75rem;
  }
}
/* ==========================================================================
   8. FOOTER SECTION
   ========================================================================== */
.footer {
  background: rgba(5, 5, 5, 0.95);
  border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
  padding: 40px 8% 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  margin-top: 60px;
  box-sizing: border-box;
}

.footer-logo img {
  width: 45px;
  height: auto;
  object-fit: contain;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a,
.footer-secret-links a {
  color: var(--text-muted, #a0a0a0);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition-fast, all 0.2s ease);
}

.footer-links a:hover,
.footer-secret-links a:hover {
  color: var(--accent-color, #4fffd2);
}

.footer-right p {
  font-size: 0.82rem;
  color: var(--text-muted, #a0a0a0);
  margin: 0;
}

.footer-secret-links {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   FOOTER RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
  .footer {
    padding: 30px 5% 20px;
    gap: 14px;
    margin-top: 40px;
  }

  .footer-logo img {
    width: 36px;
  }

  .footer-links {
    gap: 12px;
  }

  .footer-links a {
    font-size: 0.78rem;
  }

  .footer-right p {
    font-size: 0.72rem;
  }

  .footer-secret-links {
    gap: 10px;
    font-size: 0.7rem;
  }

  .footer-secret-links a {
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   CONTEXT MENU STYLING (global.css)
   ========================================================================== */
.context-menu {
  position: fixed;
  display: none; /* Toggled via JS */
  z-index: 99999;
  min-width: 240px;
  background: rgba(18, 18, 18, 0.92);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 8px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 
              0 0 20px rgba(79, 255, 210, 0.12);
  user-select: none;
}

.context-menu .menu-group {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

.context-menu .menu-group.active {
  display: block;
}

.context-menu li:not(.menu-divider) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-label i {
  font-size: 0.85rem;
  color: var(--accent-color, #4fffd2);
  width: 16px;
  text-align: center;
}

/* Muted Nerd Font Shortcut Badges */
.context-menu .shortcut {
  font-family: 'JetBrainsMono Nerd Font', 'FiraCode Nerd Font', 'Hack Nerd Font', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35); /* Muted shortcut text */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

/* Horizontal Dividers */
.context-menu .menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
  padding: 0;
  pointer-events: none;
}

/* Hover States */
.context-menu li:not(.menu-divider):hover {
  background: rgba(79, 255, 210, 0.15);
  color: var(--accent-color, #4fffd2);
}

.context-menu li:not(.menu-divider):hover .shortcut {
  color: rgba(79, 255, 210, 0.75);
  border-color: rgba(79, 255, 210, 0.3);
  background: rgba(79, 255, 210, 0.08);
}

/* ==========================================================================
   COMMAND PALETTE STYLING
   ========================================================================== */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cmd-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cmd-palette {
  width: 90%;
  max-width: 580px;
  background: rgba(18, 18, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(79, 255, 210, 0.15);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}

.cmd-overlay.active .cmd-palette {
  transform: translateY(0);
}

.cmd-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.cmd-icon {
  color: var(--accent-color, #4fffd2);
  font-size: 1.1rem;
}

#cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
}

.cmd-results {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cmd-item i {
  width: 20px;
  text-align: center;
  color: var(--accent-color, #4fffd2);
}

.cmd-item span {
  flex: 1;
  font-size: 0.95rem;
}

.cmd-item kbd {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
}

.cmd-item.selected,
.cmd-item:hover {
  background: rgba(79, 255, 210, 0.12);
  color: #ffffff;
}

.cmd-footer {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.cmd-footer kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  color: #ffffff;
}