/* ==============================================
   NIXSEC LABS — Global Stylesheet
   Shared reset, variables, nav, and footer
============================================== */

/* =============================================
   RESET
============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =============================================
   DESIGN TOKENS — LIGHT MODE (default)
============================================= */
:root {
  --bg:             #F4F6FA;
  --bg-card:        #FFFFFF;
  --bg-card2:       #EDF0F5;
  --bg-border:      #D0DBE8;
  --lime:           #009944;
  --red:            #CC1E1E;
  --blue:           #0080B3;
  --amber:          #C47000;
  --text:           #1A2535;
  --text-dim:       #6A7A8A;
  --mono:           'JetBrains Mono', monospace;
  --sans:           'Inter', Helvetica Neue, sans-serif;
  /* theme extras */
  --nav-bg:         rgba(244,246,250,0.93);
  --mobile-nav-bg:  rgba(244,246,250,0.98);
  --overlay-bg:     rgba(244,246,250,0.94);
  --text-bright:    #0F1B2A;
  --nav-cta-text:   #FFFFFF;
  --hover-tint:     rgba(0,0,0,0.025);
  --hex-color:      rgba(0,153,68,0.05);
  --footer-copy:    #9AAABB;
}

/* =============================================
   DESIGN TOKENS — DARK MODE
============================================= */
[data-theme="dark"] {
  --bg:             #0A0A0A;
  --bg-card:        #111111;
  --bg-card2:       #141414;
  --bg-border:      #1e1e1e;
  --lime:           #32FF7E;
  --red:            #FF3E3E;
  --blue:           #18DCFF;
  --amber:          #FFA500;
  --text:           #C8D6E5;
  --text-dim:       #5a6a7a;
  --nav-bg:         rgba(10,10,10,0.9);
  --mobile-nav-bg:  rgba(10,10,10,0.97);
  --overlay-bg:     rgba(10,10,10,0.92);
  --text-bright:    #ffffff;
  --nav-cta-text:   #0A0A0A;
  --hover-tint:     rgba(255,255,255,0.02);
  --hex-color:      rgba(50,255,126,0.03);
  --footer-copy:    #2a3a4a;
}

/* =============================================
   BASE
============================================= */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* CRT scanlines — dark mode only */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: none;
  pointer-events: none;
  z-index: 9999;
}
[data-theme="dark"] body::after {
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.022) 2px, rgba(0,0,0,0.022) 4px
  );
}

/* =============================================
   NAV
============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-border);
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--lime);
  letter-spacing: 0.08em;
  cursor: pointer;
  position: relative;
  user-select: none;
  text-decoration: none;
  transition: letter-spacing 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-logo::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--lime), var(--blue));
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-logo:hover {
  background: linear-gradient(90deg, var(--lime), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.12em;
}
.nav-logo:hover::after { width: 100%; }

.nav-links { display: flex; gap: 2rem; list-style: none; flex: 1; justify-content: center; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--lime); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nav-cta-text);
  background: var(--lime);
  border: none;
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.nav-cta:hover {
  background: #5fffA0;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(50,255,126,0.3);
}

@media (max-width: 640px) {
  nav { padding: 0.85rem 1rem; }
  .nav-links { display: none; }
}

/* =============================================
   MOBILE HAMBURGER & MOBILE NAV
============================================= */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--lime);
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--mobile-nav-bg);
  z-index: 98;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--lime); }
.mobile-nav .mob-cta {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--nav-cta-text);
  background: var(--lime);
  padding: 0.75rem 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

@media (max-width: 640px) {
  .nav-hamburger { display: flex; }
}

/* =============================================
   NAV RIGHT GROUP
============================================= */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* =============================================
   THEME TOGGLE BUTTON
============================================= */
.theme-toggle {
  background: none;
  border: 1px solid var(--bg-border);
  color: var(--text-dim);
  padding: 0.38rem 0.6rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.theme-toggle-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* =============================================
   FOOTER
============================================= */
.footer-linkedin {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  display: inline-block;
  margin-top: 0.6rem;
}
.footer-linkedin:hover { color: var(--lime); }

footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--bg-border);
  position: relative;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: 2rem;
}
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; gap: 2rem; } }

.footer-brand .footer-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 240px;
}

.footer-col-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
}
.footer-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--lime); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--footer-copy);
  letter-spacing: 0.07em;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}
.footer-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.4); }
}

/* =============================================
   FLOATING CONTACT PILL
============================================= */
.float-contact {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65rem 1.3rem;
  background: var(--lime);
  color: var(--nav-cta-text);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.25s ease, background 0.2s;
}
.float-contact.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.float-contact:hover {
  background: #5fffA0;
  transform: translateY(-2px);
}
@media (max-width: 640px) {
  .float-contact { bottom: 1.2rem; right: 1rem; font-size: 0.65rem; padding: 0.55rem 1rem; }
}
