/* ==========================================================================
   SHIVA GANESH PORTFOLIO - MAIN STYLESHEET
   Core Layout, Global Resets, Typography, Navigation, Hero, Background
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');
@import url('./tokens.css');

/* Resets & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

::selection {
  background: rgba(0, 242, 254, 0.25);
  color: #fff;
}

/* Background Canvas & Ambient Mesh */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#bg-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ambient-light {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 1;
  opacity: 0.45;
  transition: transform 0.5s ease-out;
}

.ambient-1 {
  top: -10%;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.2) 0%, transparent 70%);
}

.ambient-2 {
  top: 40%;
  right: -5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.18) 0%, transparent 70%);
}

.ambient-3 {
  bottom: 5%;
  left: 5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(0, 245, 160, 0.15) 0%, transparent 70%);
}

/* Layout Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-cyan {
  color: var(--accent-cyan);
}

.text-emerald {
  color: var(--accent-emerald);
}

.text-violet {
  color: var(--accent-purple);
}

.mono {
  font-family: var(--font-mono);
}

/* Section Common Styling */
section {
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

.section-header {
  margin-bottom: 60px;
  text-align: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 16px;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 16px;
  font-weight: 800;
}

.section-desc {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(4, 6, 11, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-glass-border);
  transition: all var(--transition-normal);
}

.site-nav.scrolled {
  background: rgba(6, 9, 18, 0.92);
  border-bottom-color: rgba(0, 242, 254, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(157, 78, 221, 0.2));
  border: 1px solid rgba(0, 242, 254, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
  transition: all var(--transition-normal);
}

.nav-brand:hover .brand-icon-box {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transform: rotate(5deg) scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 28px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
  border-radius: var(--radius-full);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-white);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Sound Toggle Button */
.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.sound-toggle-btn:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
}

.sound-toggle-btn.active {
  color: var(--accent-emerald);
  border-color: rgba(0, 245, 160, 0.4);
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.2);
}

/* Terminal Nav Trigger */
.terminal-nav-btn {
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.12);
}

.terminal-nav-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.terminal-kbd-badge {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  border: 1px solid rgba(0, 242, 254, 0.4);
}

.terminal-nav-btn:hover .terminal-kbd-badge {
  background: #000;
  color: #fff;
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  padding: 8px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + 16px);
  padding-bottom: 70px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 48px;
  align-items: flex-start;
}

.hero-badge-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-emerald);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-ring 2s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 245, 160, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0); }
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-size: 1.15rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-name {
  font-size: clamp(2.3rem, 5.5vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.1;
  word-break: normal;
  overflow-wrap: break-word;
}

.hero-roles {
  font-size: clamp(1.2rem, 2.5vw, 2.1rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
  min-height: 48px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.role-decipher {
  color: var(--text-white);
  position: relative;
}

.role-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--accent-cyan);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 0.9s infinite;
}

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

.hero-bio {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 600px;
}

.hero-bio strong {
  color: var(--text-white);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 48px;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #030712;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.35);
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(0, 242, 254, 0.5);
  color: #000;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-white);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 242, 254, 0.4);
  color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: var(--accent-cyan);
}

.btn-outline:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
}

/* Hero Metrics Strip */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--bg-glass-border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat-num .stat-unit {
  font-size: 1rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* Hero Right: Interactive 3D Holographic Identity Shield */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 8px;
}

.identity-card-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  perspective: 1200px;
}

.identity-card {
  position: relative;
  background: var(--bg-glass-elevated);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card-elevated);
  transition: transform 0.25s ease-out, border-color 0.3s ease;
  overflow: hidden;
}

.identity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.identity-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 242, 254, 0.12), transparent 60%);
  pointer-events: none;
}

.identity-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.avatar-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 2px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.25);
}

.avatar-badge-verified {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-emerald);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.identity-meta {
  display: flex;
  flex-direction: column;
}

.identity-meta h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.identity-meta .meta-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

.identity-meta .meta-loc {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.identity-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.25);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.spec-key {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.spec-val {
  color: var(--text-primary);
  font-weight: 600;
}

.spec-val.active-status {
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

.identity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-chip {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tech-chip:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
}

/* Floating Badges on Hero */
.floating-shield-badge {
  position: absolute;
  background: rgba(10, 16, 32, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.3);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}

.floating-shield-badge.top-right {
  top: -20px;
  right: -20px;
  animation-delay: 0s;
}

.floating-shield-badge.bottom-left {
  bottom: -20px;
  left: -20px;
  animation-delay: 2s;
  border-color: rgba(0, 245, 160, 0.3);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.badge-icon {
  font-size: 1.3rem;
}

.badge-text-top {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.badge-text-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
}

/* Footer Styling */
.site-footer {
  padding: 60px 0 30px;
  background: rgba(3, 5, 10, 0.95);
  border-top: 1px solid var(--bg-glass-border);
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 12px;
  max-width: 380px;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 18px;
  color: var(--text-white);
  font-family: var(--font-display);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links-list a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.footer-domains {
  display: flex;
  align-items: center;
  gap: 12px;
}

.domain-pill {
  padding: 4px 10px;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  text-decoration: none;
}
