/* ==========================================================================
   SYSTEM LOADER SCREEN (PRELOADER)
   ========================================================================== */
#sys-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0b0f17; /* Matches your dark background */
  z-index: 9999; /* Forces layer layout priority above all else */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: monospace;
  color: #3b82f6; /* Accent blue core */
  transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.6s;
}

/* Diagnostic Meta Container */
.loader-terminal {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loader-status {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

/* Outer framework track */
.loader-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

/* Moving fill node */
.loader-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #3b82f6;
  box-shadow: 0 0 12px #3b82f6;
}

/* Systematic Page Reveal State */
.sys-ready #sys-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* --- DESIGN SYSTEM RESETS & VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --bg-color: #030305;
    --surface-color: rgba(10, 10, 15, 0.4);
    --border-color: rgba(255, 255, 255, 0.06);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --neon-green: #00ffaa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* --- CANVAS ACCELERATION LAYER --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}
/* ==========================================================================
   PORTFOLIO-SPECIFIC SYSTEM LOADER
   ========================================================================== */
#sys-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0b0f17; /* Matches your background */
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #3b82f6; /* Accent blue */
  transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.5s;
}

.loader-terminal {
  width: 340px; /* Slightly wider to accommodate terminal text lines */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Terminal logs panel streaming live lines */
.terminal-logs {
  height: 60px;
  font-size: 0.72rem;
  color: #9ca3af; /* Subdued gray logs */
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  opacity: 0.8;
}

.terminal-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-line.success {
  color: #10b981; /* Green accents for completed tasks */
}

.loader-status {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

.loader-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

/* Clear Page Reveal State */
.sys-ready #sys-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* --- MAGNETIC GLASSMORPHIC NAVIGATION BAR --- */
header {
    position: sticky;
    top: 1.5rem;
    z-index: 100;
    margin-top: 1.5rem;
}

nav {
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

nav .logo {
    font-weight: 900;
    font-size: 1.3rem;
    background: linear-gradient(to right, var(--accent-purple), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav .links {
    display: flex;
    gap: 1.5rem;
}

nav .links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-block;
}

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

/* --- SYSTEM SECTIONS --- */
section {
    padding: 8rem 0 4rem 0;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 3rem;
    font-family: monospace;
    text-transform: uppercase;
    color: var(--text-primary);
}

/* --- HERO COMPONENTS --- */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero .badge {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: var(--accent-purple);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-family: monospace;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 30%, #6b7280);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.cta-btn, .secondary-btn {
    padding: 0.9rem 2.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s, border-color 0.3s;
}

.cta-btn {
    background: var(--text-primary);
    color: var(--bg-color);
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

/* --- GRID CARDS SYSTEM --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform-style: preserve-3d;
    transition: border-color 0.4s, box-shadow 0.4s;
}

.card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.08);
}

.project-header {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
}

.project-id { color: var(--accent-purple); font-weight: 700; }
.project-status { color: var(--neon-green); }

.project-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.metric .label { font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; }
.metric .val { font-size: 0.85rem; font-family: monospace; color: var(--text-primary); }

.tag-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { background: rgba(255, 255, 255, 0.04); padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.7rem; color: var(--text-secondary); }

/* --- SKILLS GRID --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.skill-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; }
.skill-meta { font-size: 0.8rem; color: var(--text-secondary); font-family: monospace; margin-bottom: 1.5rem; }
.skill-bar { height: 3px; background: rgba(255,255,255,0.05); border-radius: 10px; overflow: hidden; }
.skill-progress { height: 100%; background: linear-gradient(to right, var(--accent-purple), var(--accent-blue)); }

/* --- CONTACT LAYOUT --- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; }
.contact-metadata-nodes { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }
.meta-node { display: flex; flex-direction: column; }
.meta-label { font-size: 0.7rem; font-family: monospace; color: var(--text-secondary); text-transform: uppercase; }
.meta-val { color: var(--text-primary); text-decoration: none; font-size: 1.1rem; margin-top: 0.25rem; }

form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.8rem; font-family: monospace; color: var(--text-secondary); }

/* Two fields side by side — used in the feedback form to keep it short
   enough to fit in the modal without scrolling. Stacks on narrow screens. */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
form input, form textarea, form select {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}
form input:focus, form textarea:focus, form select:focus { border-color: var(--accent-purple); }

form select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 2.75rem;
}
form select option {
    background: #111319;
    color: #fff;
}
form button { background: var(--text-primary); color: var(--bg-color); border: none; padding: 1rem; border-radius: 8px; font-weight: 700; cursor: pointer; }

footer { margin-top: 8rem; padding: 4rem 0; border-top: 1px solid var(--border-color); }
.footer-bottom { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-secondary); }
.back-to-top { color: var(--text-secondary); text-decoration: none; }

@media (max-width: 768px) {
    .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
    section { padding: 5rem 0; }
}

/* --- UNIVERSAL THEME SYSTEM DESIGN VARIABLES --- */
:root, html[data-theme="dark"] {
    --bg-color: #050508;
    --surface-color: rgba(13, 13, 18, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent: #00ffcc; /* Or your custom purple/blue accent */
    --accent-glow: rgba(0, 255, 204, 0.15);
    --input-bg: #111;
}

html[data-theme="light"] {
    --bg-color: #f4f5f7;
    --surface-color: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent: #00b386; /* Adjusted for readable contrast on white */
    --accent-glow: rgba(0, 179, 134, 0.1);
    --input-bg: #ffffff;
}

/* --- THEME TOGGLE FLOATING ACTION NODE STYLING --- */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.theme-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  /* When a category has fewer cards, the remaining ones compact to the top —
     no gaps are left where hidden cards used to be. Any reserved height (set
     in JS, see #project .grid) must not stretch these rows/cards to fill it —
     it only reserves blank space *below* the compacted cards. */
  align-content: start;
  align-items: start;
}

/* Base fade property for your cards */
.complex-tilt-card {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

/* Container spacing adjustment */
.project-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  padding: 4px;
}

/* Upgraded Fancy Buttons */
.filter-btn {
  position: relative;
  background: rgba(18, 24, 36, 0.6); /* Translucent backing */
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase; /* Cleaner tech layout */
  font-family: system-ui, -apple-system, sans-serif;
  
  /* Hard hardware performance rendering transitions */
  transition: 
    color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.2s ease;
  
  overflow: hidden; /* Clips internal reflection sheen */
}

/* Hover effects */
.filter-btn:hover {
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(18, 24, 36, 0.9);
  transform: translateY(-2px); /* Slight hover lift */
  box-shadow: 0 6px 20px -5px rgba(59, 130, 246, 0.15);
}

/* Active State: The Neon Blue Indicator Core */
.filter-btn.active {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
  border-color: #3b82f6;
  box-shadow: 
    0 0 0 1px #3b82f6, 
    0 0 20px -3px rgba(59, 130, 246, 0.3);
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Subtle Interactive Sheen Layer */
.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transition: none;
}

.filter-btn:hover::before {
  left: 100%;
  transition: left 0.6s ease-in-out;
}

/* Subtle click feedback downscale */
.filter-btn:active {
  transform: translateY(0) scale(0.96);
}

/* Ensure boxing calculations don't cause horizontal page overflows */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  overflow-x: hidden; /* Critical for preventing nasty sideways scrolling on small devices */
}

/* Background 3D Canvas layer must scale to match device viewport perfectly */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

main {
  width: 100%;
  max-width: 1400px; /* Limits size on ultra-wide monitors */
  margin: 0 auto;
  padding: 0 20px; /* Gives nice breathing room padding on mobile */
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  flex-wrap: wrap; /* Allows menu to drop cleanly down if it hits a tiny screen width */
  gap: 15px;
}

nav .links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Prevents text from clipping off-screen */
}

@media (max-width: 600px) {
  nav {
    flex-direction: column; /* Stacks logo over link list on small phones */
    text-align: center;
  }
  nav .links {
    justify-content: center;
    gap: 12px;
    font-size: 0.9rem; /* Slightly smaller typography target for compact panels */
  }
}

/* Universal Adaptive Grid Engine */
.grid, .skills-grid {
  display: grid;
  /* Automatically wraps items to a new line when columns narrow below 300px */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 25px;
  width: 100%;
  margin-top: 20px;
}

/* For exceptionally tiny older mobile displays (under 350px width) */
@media (max-width: 360px) {
  .grid, .skills-grid {
    grid-template-columns: 1fr; /* Force raw single-column stacking rule */
  }
}

.contact-layout {
  display: flex;
  gap: 40px;
  margin-top: 30px;
}

.contact-info, .contact-layout .card {
  flex: 1;
  min-width: 280px;
}

/* Fallback split to stack parameters sequentially on tablet/mobile screens */
@media (max-width: 850px) {
  .contact-layout {
    flex-direction: column;
    gap: 30px;
  }
}

/* Ensure the split transmission form buttons stack cleanly on tiny mobile targets */
@media (max-width: 480px) {
  .routing-options {
    flex-direction: column !important;
  }
  .routing-btn {
    width: 100%;
  }
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3.5rem); /* Dynamically clamps scales across viewports safely */
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 20px;
}

/* Ensure data boxes do not burst layout margins */
.complex-tilt-card {
  width: 100%;
  overflow: hidden; 
}
/* Apply structural layouts for standard and wide desktop monitors */
@media (min-width: 1025px) {
  
  /* Limits projects & reviews to a clean 3-column layout maximum */
  #project .grid, #reviews .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px; /* Generous separation space between system cards */
  }

  /* Limits about section nodes to a clean 2-column or 3-column layout maximum */
  #about .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px;
  }
  
  /* Limits competency skills items into a clean 2-column balance matrix */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px;
  }
}

/* Adjustments for massive Ultra-Wide Monitors to prevent excessive stretching */
@media (min-width: 1600px) {
  main {
    max-width: 1440px; /* Keeps your portfolio contained beautifully in the center */
    margin: 0 auto;
  }
}

/* Force internal card metrics to wrap cleanly if names are long */
.project-metrics {
  display: flex;
  flex-direction: column; /* Stacks label-value nodes vertically instead of horizontally squeezing */
  gap: 10px;
  margin: 15px 0;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 5px;
  gap: 15px; /* Keeps spacing between metric name and values */
}

/* Ensure skill progress track or tags don't smash against card padding bounds */
.card-internal-wrapper {
  padding: 25px; /* Enforces uniform interior spacing buffer zones */
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.tag-row {
  display: flex;
  flex-wrap: wrap; /* Permits code tags to spill cleanly down into a fresh sub-line */
  gap: 8px;
  margin: 15px 0;
}

section {
  padding: 100px 0; /* Enforces structural vertical separation layout breaks */
  clear: both;
}

.hero {
  min-height: 80vh; /* Enforces that hero section owns the initial entry workspace viewport */
  display: flex;
  align-items: center;
}
header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* Keeps the navbar on top of your 3D canvas and cards */
  
  /* Adds a premium glass/blur effect so it reads clearly over your background */
  background: rgba(10, 10, 10, 0.75); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); /* Safari support */
  
  /* Optional: Adds a subtle border below the navbar when scrolling */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
  
  /* Smooth transitions for mobile menu adjustments */
  transition: all 0.3s ease; 
}

/* Ensure the nav element fits perfectly inside the sticky header header */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px; /* Aligns with your main content wrapper width */
  margin: 0 auto;
  padding: 15px 20px; /* Uniform padding as you scroll */
}

/* 1. CRITICAL FIX: Remove any 'overflow-x: hidden' from the HTML tag if it exists, 
   as it completely breaks scrolling mechanics for child elements. */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Moving this safely to body only */
}

/* 2. BULLETPROOF FIXED NAVBAR SETUP */
header {
  position: fixed; /* Forces it to stay pinned relative to the viewport window */
  top: 0;
  left: 0;
  width: 100%;
  
  /* Super high z-index to stay above your 3D canvas and layer-z-high elements */
  z-index: 99999 !important; 
  
  /* Sci-fi frosted glass styling */
  background: rgba(10, 10, 10, 0.85) !important; 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Container alignment inside the fixed header */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px;
}

/* 3. HERO AREA ADJUSTMENT 
   Because 'position: fixed' pulls the header out of the normal page flow, 
   we add top padding to the main element so your Hero content doesn't get hidden behind it. */
main {
  padding-top: 80px; 
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1; /* Keeps the 3D particles in the deep background */
  pointer-events: none; /* Allows you to still click links through the canvas layer */
}

footer {
  width: 100%;
  padding: 60px 0 30px 0;
  margin-top: 80px;
  background: rgba(10, 10, 10, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr; /* Matches the layout balance of image_0b8017.png */
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand-col .logo {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.footer-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #888;
  max-width: 400px;
  margin-bottom: 20px;
}

.footer-social-icons {
  display: flex;
  gap: 15px;
}

.footer-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
}

.footer-social-icons a:hover {
  color: var(--accent, #00ffcc);
  background: rgba(0, 255, 204, 0.05);
  border-color: var(--accent, #00ffcc);
}

.footer-links-col h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: #fff;
  letter-spacing: 0.5px;
}

.footer-links-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-col ul li {
  margin-bottom: 12px;
}

.footer-links-col ul li a {
  color: #888;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-links-col ul li a:hover {
  color: var(--accent, #00ffcc);
}

.footer-divider {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  max-width: 1400px;
  margin: 40px auto 25px auto;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 0.85rem;
  color: #666;
}

.footer-credit {
  font-family: monospace;
}

/* Responsive Breakpoints: Ensures nothing collapses or merges on smaller displays */
@media (max-width: 850px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr; /* Stacks links side-by-side below brand profile */
  }
  .footer-brand-col {
    grid-column: span 2;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr; /* Clean single column stack rule on small viewports */
  }
  .footer-brand-col {
    grid-column: span 1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

.contact-metadata-nodes {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 25px;
}

/* Card layout wrapper modeled directly from image_0b929e.png */
.meta-node-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(245, 245, 247, 0.05); /* Soft dark/light responsive background blend */
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease, background 0.2s ease;
}

.meta-node-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Rounded square background container framework around info graphics */
.meta-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(147, 112, 219, 0.15); /* Soft premium purple accent tint tint */
  color: #9370DB; /* Soft Purple Glyph Color */
  flex-shrink: 0;
}

.meta-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Strict label settings emphasizing style metadata */
.meta-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #88888d;
  text-transform: uppercase;
}

/* Content font definition rules */
.meta-val {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

a.meta-val:hover {
  color: #9370DB;
}

/* Media query adjustment boundary layers */
@media (max-width: 480px) {
  .meta-node-card {
    padding: 16px;
    gap: 15px;
  }
  .meta-val {
    font-size: 1rem;
  }
}
/* Container pairing links and CTA button smoothly side-by-side */
.links-wrapper {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* Premium Sci-Fi Terminal 'Hire Me' Accent Button Styling */
.hire-me-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  
  /* Cyberpunk style defaults using your accent color variable or fallback violet */
  color: #9370DB; 
  background: rgba(147, 112, 219, 0.08);
  border: 1px solid rgba(147, 112, 219, 0.3);
  box-shadow: 0 0 10px rgba(147, 112, 219, 0.05);
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hire-me-btn:hover {
  color: #ffffff;
  background: #9370DB;
  border-color: #9370DB;
  box-shadow: 0 0 20px rgba(147, 112, 219, 0.4);
  transform: translateY(-1px);
}

/* Responsive Scaling: Prevents layout collisions on smaller viewports */
@media (max-width: 768px) {
  .links-wrapper {
    gap: 15px;
  }
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 12px;
  }
  .links-wrapper {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .hire-me-btn {
    width: 100%;
    max-width: 200px;
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  width: 100%;
}

.skill-item .card-internal-wrapper {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.skill-meta {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #888;
  min-height: 45px; /* Keeps card layouts uniformly proportioned */
}

.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 5px;
}

.skill-progress {
  height: 100%;
  background: var(--accent, #9370DB); /* Matches your purple layout highlights */
  border-radius: 3px;
}

/* Rigid Grid protections across clear desktop displays */
@media (min-width: 1025px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Balanced 2-column dashboard layout matrix */
    gap: 30px;
  }
}
/* Pinned Lower Bottom Navigation Framework */
.origin-nav-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  
  /* OVERRIDE GUARD: High z-index ensures it sits above all canvas and WebGL viewports */
  z-index: 999999 !important; 
  
  /* FORCE VISIBILITY */
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
  
  color: #9370DB; /* Matches your core purple accent design */
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid rgba(147, 112, 219, 0.4);
  border-radius: 30px;
  cursor: pointer;
  
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease-in-out;
}
/* Base styles for your button */
.origin-nav-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 1;
    visibility: visible;
}

/* Class to hide the button */
.origin-nav-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Prevents clicking while invisible */
}
/* Hover Interactive State */
.origin-nav-btn:hover {
  color: #ffffff !important;
  background: #9370DB !important;
  border-color: #9370DB !important;
  box-shadow: 0 0 15px rgba(147, 112, 219, 0.6);
  transform: translateY(-2px);
}

.origin-nav-btn:hover svg {
  transform: translateY(-2px);
}

.origin-nav-btn svg {
  transition: transform 0.2s ease;
}

/* Structural Breakpoints: Adjusts seamlessly for mobile viewports */
@media (max-width: 600px) {
  .origin-nav-btn {
    bottom: 20px;
    right: 20px;
    padding: 10px 12px;
  }
  .origin-label {
    display: none; /* Collapses text node to preserve UI real estate on mobile screens */
  }
}

/* Apply structured margins to the desktop viewing matrix */
@media (min-width: 1025px) {
  
  /* Restricts content from blowing out layout margins on wide displays */
  main, 
  header nav, 
  footer .footer-grid, 
  footer .footer-bottom {
    max-width: 1280px;      /* Restricts extreme width stretching */
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;  /* Safety buffer block margins */
    padding-right: 40px !important;
  }

  /* Structural buffer zone enforcement for page sections */
  section {
    max-width: 1280px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* Hard protective barrier for Ultrawide Monitors (1600px and up) */
@media (min-width: 1600px) {
  main, section, header nav, footer .footer-grid {
    max-width: 1400px; /* Expands perfectly just for massive resolutions */
  }
}

/* Container rules to ensure both cards sit perfectly side-by-side on desktop */
#about .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

/* Specific styling for the profile image card */
.profile-picture-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Keeps it perfectly square */
    margin: 1.5rem 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Matches your card edges */
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2); /* Fallback background */
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents stretching */
    filter: grayscale(20%) contrast(110%); /* Subtle tech filter */
    transition: filter 0.3s ease;
}

.profile-picture-card:hover .profile-img {
    filter: grayscale(0%) contrast(100%);
}

/* Optional: Cyan/Green security tag to contrast your active engineer tag */
.project-status.security {
    background: rgba(0, 255, 200, 0.1);
    color: #00ffc8;
    border: 1px solid rgba(0, 255, 200, 0.2);
}

/* Optional: Sci-Fi animated scanning line overlay */
.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffc8, transparent);
    opacity: 0.4;
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}
/* Filter Container Styling */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

/* Individual Filter Buttons */
.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Hover and Active State */
.filter-btn:hover, .filter-btn.active {
    background: #fff;
    color: #000; /* Invert colors based on your site's aesthetic */
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* ============================================================
   Expanding Cards (Technical Stack) — vanilla port of the shadcn
   "expanding-cards" component. Hover/focus/click a card to
   expand it; the rest compact down to a thin rail.
   ============================================================ */
#skills .expanding-cards {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 0;
    height: 820px;
}

@media (min-width: 768px) {
    #skills .expanding-cards {
        flex-direction: row;
        height: min(400px, 58vh);
    }
}

.expanding-card {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0a0f;
    outline: none;
    transition: flex-grow 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.expanding-card[data-active="true"] {
    flex-grow: 6;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.expanding-card-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Unified purple → blue theme, matching the site's --accent-purple /
   --accent-blue branding (hero CTA, skill-progress bars, project IDs).
   Each card gets a slightly different angle/mix so the row still reads as
   distinct cards while staying in the same brand palette. */
.expanding-card[data-gradient="1"] .expanding-card-media { background: linear-gradient(150deg, var(--accent-purple, #a855f7), var(--accent-blue, #3b82f6)); }
.expanding-card[data-gradient="2"] .expanding-card-media { background: linear-gradient(165deg, var(--accent-purple, #a855f7) 15%, var(--accent-blue, #3b82f6) 100%); }
.expanding-card[data-gradient="3"] .expanding-card-media { background: linear-gradient(140deg, var(--accent-blue, #3b82f6), var(--accent-purple, #a855f7)); }
.expanding-card[data-gradient="4"] .expanding-card-media { background: linear-gradient(175deg, var(--accent-purple, #a855f7) 0%, var(--accent-blue, #3b82f6) 85%); }
.expanding-card[data-gradient="5"] .expanding-card-media { background: linear-gradient(155deg, var(--accent-blue, #3b82f6) 10%, var(--accent-purple, #a855f7) 100%); }
.expanding-card[data-gradient="6"] .expanding-card-media { background: linear-gradient(160deg, var(--accent-purple, #a855f7), var(--accent-blue, #3b82f6) 70%); }
.expanding-card[data-gradient="7"] .expanding-card-media { background: linear-gradient(145deg, var(--accent-purple, #a855f7) 20%, var(--accent-blue, #3b82f6)); }
.expanding-card[data-gradient="8"] .expanding-card-media { background: linear-gradient(170deg, var(--accent-blue, #3b82f6), var(--accent-purple, #a855f7) 80%); }
.expanding-card[data-gradient="9"] .expanding-card-media { background: linear-gradient(160deg, var(--accent-purple, #a855f7) 10%, var(--accent-blue, #3b82f6) 90%); }

.expanding-card-media i {
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.5s ease, opacity 0.4s ease;
}
.expanding-card[data-active="true"] .expanding-card-media i {
    transform: scale(1.15);
    opacity: 0.5;
}

/* Font glyph fallback (e.g. MCP) for skills without a devicon icon —
   emoji render at full color regardless of `color`, so opacity carries
   the same dim/highlight effect instead. */
.expanding-card-media i.expanding-card-glyph {
    font-style: normal;
    opacity: 0.35;
}
.expanding-card[data-active="true"] .expanding-card-media i.expanding-card-glyph {
    opacity: 0.75;
}
.expanding-card-icon i.expanding-card-glyph {
    font-style: normal;
    font-size: 1.1em;
}

.expanding-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 3, 5, 0.88) 0%, rgba(3, 3, 5, 0.35) 55%, rgba(3, 3, 5, 0.05) 100%);
}

.expanding-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 18px;
}

.expanding-card-title-vertical {
    position: absolute;
    left: 18px;
    bottom: 18px;
    margin: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    opacity: 1;
    transition: opacity 0.25s ease;
    white-space: nowrap;
}
.expanding-card[data-active="true"] .expanding-card-title-vertical { opacity: 0; }
@media (max-width: 767px) {
    .expanding-card-title-vertical { display: none; }

    /* On mobile the cards stack and compact vertically instead of
       horizontally, so the sideways rail title doesn't fit — show a
       plain horizontal title on collapsed cards instead. */
    .expanding-card-title-mobile {
        position: absolute;
        left: 14px;
        bottom: 10px;
        right: 14px;
        margin: 0;
        font-size: 0.85rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
        opacity: 1;
        transition: opacity 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .expanding-card[data-active="true"] .expanding-card-title-mobile { opacity: 0; }
}
@media (min-width: 768px) {
    .expanding-card-title-mobile { display: none; }
}

.expanding-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.expanding-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #00ffcc);
    font-size: 1.4rem;
}

.expanding-card-header,
.expanding-card-title,
.expanding-card-desc,
.expanding-card-tags,
.expanding-card-link {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.expanding-card[data-active="true"] .expanding-card-header { opacity: 1; transform: none; transition-delay: 0.05s; pointer-events: auto; }
.expanding-card[data-active="true"] .expanding-card-title { opacity: 1; transform: none; transition-delay: 0.1s; pointer-events: auto; }
.expanding-card[data-active="true"] .expanding-card-desc { opacity: 1; transform: none; transition-delay: 0.15s; pointer-events: auto; }
.expanding-card[data-active="true"] .expanding-card-tags { opacity: 1; transform: none; transition-delay: 0.2s; pointer-events: auto; }
.expanding-card[data-active="true"] .expanding-card-link { opacity: 1; transform: none; transition-delay: 0.25s; pointer-events: auto; }

/* Qualitative skill-level pill (replaces the old numeric percentage) */
.expanding-card-level {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(to right, var(--accent-purple, #a855f7), var(--accent-blue, #3b82f6));
}

.expanding-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.expanding-card-desc {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    max-width: 46ch;
}

.expanding-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.expanding-card-tags .tech-pill {
    font-size: 0.7rem;
}

.expanding-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent, #00ffcc);
    text-decoration: none;
    width: fit-content;
}
.expanding-card-link:hover { text-decoration: underline; }

#reviews {
    padding: 100px 4%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Section title + "Give Feedback" trigger, side by side */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.section-header-row h2 {
    margin-bottom: 0;
}

#add-feedback-btn {
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

/* Marquee viewport: clips the track and fades its left/right edges so
   cards scroll in from — and out to — transparent instead of a hard cut. */
.reviews-container {
    overflow: hidden;
    margin-top: 50px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

/* Single-line auto-scrolling track: content is duplicated once in JS
   (see app.js) so translateX(-50%) loops seamlessly, left to right.
   align-items: flex-start stops flex's default stretch behaviour — without
   it, every card is forced to match the tallest one, and card-internal-wrapper's
   justify-content: space-between then pads that extra height in as visible
   gaps between each card's header/quote/metrics/reviewer blocks. */
.review-track {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    width: max-content;
    animation: reviews-marquee linear infinite;
    animation-duration: var(--marquee-duration, 32s);
}

.reviews-container:hover .review-track {
    animation-play-state: paused;
}

/* Shifts by exactly one real-card-set width (--marquee-shift, set in JS —
   not a flat 50%, since the duplicated set has one fewer gap than half the
   track, which would leave a visible seam) so the loop is seamless, and
   runs shift -> 0 so the track visually slides rightward (cards travel
   left-to-right across the viewport). */
@keyframes reviews-marquee {
    from { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); }
    to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .review-track {
        animation: none;
    }
}

/* --- GIVE FEEDBACK MODAL --- */
.feedback-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    /* Must clear the fixed header (z-index: 99999 !important) and the
       floating button group (999999 !important), or they render on top of
       the modal instead of being covered by it. */
    z-index: 1000000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.feedback-modal-overlay.open {
    display: flex;
}

.feedback-modal-box {
    position: relative;
    width: 100%;
    /* Wider, shorter rectangle — two fields per row keeps the whole form
       short enough to fit without scrolling on ordinary viewports. */
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    background: #0c0c10;
    border: 1px solid var(--accent, #00ffcc);
    border-radius: 0;
    padding: 32px 34px 28px;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.15);
    /* Still scrollable as a fallback on very short viewports, just without a
       visible scrollbar track/thumb. */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* legacy Edge/IE */
}

.feedback-modal-box::-webkit-scrollbar {
    display: none; /* Chrome, Safari, modern Edge */
}

.feedback-modal-box h3 {
    margin: 0 0 6px;
    font-family: monospace;
}

.feedback-modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.feedback-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

.fb-star-picker {
    display: flex;
    gap: 6px;
}

.fb-star {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--border-color);
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, transform 0.15s ease;
}

.fb-star:hover {
    transform: scale(1.15);
}

.fb-star.filled {
    color: var(--accent, #00ffcc);
}

/* Submit button: same rectangular shape as the rest of the form, colored to
   match the navbar's "Hire Me" gradient (see .hire-me-btn.magnetic) instead
   of the generic light "form button" default. */
#feedback-form button[type="submit"] {
    background: linear-gradient(135deg, #00d2ff 0%, #a960ee 100%);
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(169, 96, 238, 0.25);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

#feedback-form button[type="submit"]:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.4), 0 0 40px rgba(169, 96, 238, 0.3);
}

#feedback-form button[type="submit"]:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

#reviews .complex-tilt-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 18px;
    flex: 0 0 240px; /* Fixed width — the marquee track scrolls, it doesn't wrap/reflow */
    max-width: 240px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

#reviews .complex-tilt-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Shrink interior spacing to match the smaller review card footprint */
#reviews .card-internal-wrapper {
    padding: 16px;
}
#reviews .project-header {
    font-size: 0.65rem;
    margin-bottom: 0.75rem;
}
#reviews .project-metrics {
    padding: 0.6rem;
    margin: 0.75rem 0;
    gap: 0.5rem;
}
#reviews .metric .label { font-size: 0.6rem; white-space: nowrap; }
#reviews .metric {
    flex-wrap: nowrap;
}
#reviews .metric .val {
    font-size: 0.72rem;
    /* Single line + ellipsis so a long value ("Full-Stack Solution") never
       wraps to a second line and grows the card past the others. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Modern Minimal Star Styling */
.review-rating {
    color: #ffc107; /* Sleek gold accent */
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* Enhanced Review Text Typography */
.review-text {
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    margin-bottom: 14px;
    /* Fixed height (matches the Asad Marchant card's ~7 lines) so every
       card ends up the same overall size regardless of quote length —
       longer quotes clip with an ellipsis instead of growing the card. */
    height: 138px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
}

/* Status Tags matching your layout syntax */
.project-status.peer-review {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.project-status.verified {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

/* Metadata Footer formatting */
.reviewer-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}

.reviewer-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.reviewer-title {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Single line + ellipsis, same reasoning as .metric .val above — keeps
       every card's footer the same height. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#skills {
    padding: 100px 4%;
    max-width: 1400px;
    margin: 0 auto;
}

/* 3-Column Balanced Responsive Grid Layout */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

/* Inherits your exact portfolio card structure and glass properties */
.skill-item.complex-tilt-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                border-color 0.4s ease, 
                box-shadow 0.4s ease;
}

/* Card hover glow matches your primary project cards */
.skill-item.complex-tilt-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* Header Info Alignment */
.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.skill-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff; /* Static high-contrast typography token */
    letter-spacing: 0.5px;
}

/* Data marker styling matches your project-id tags (e.g., SYS-01) */
.skill-percentage {
    font-family: monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sleek progress line built to layer on layer-z-low */
.skill-bar {
    width: 100%;
    height: 4px; 
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

/* The fill utilizes your theme's clean white/translucent gradient profile */
.skill-progress {
    height: 100%;
    /* Immersive transitioning gradient from neon blue to sleek purple */
    background: linear-gradient(90deg, #00d2ff 0%, #a960ee 100%);
    /* Layered glow effect that makes the bars pop off the dark layout background */
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3), 0 0 20px rgba(169, 96, 238, 0.2);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}
.skill-item.complex-tilt-card:hover .skill-percentage {
    color: #00d2ff;
    border-color: rgba(169, 96, 238, 0.3);
    background: rgba(169, 96, 238, 0.05);
}

/* Tech Pills Container running fluid flex alignment */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Badges configured to look identical to your project tags (.tag) */
.tech-pill {
    font-size: 0.78rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.5); /* Dimmed state for text hierarchies */
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: default;
}

/* Activates tag highlights safely on layout interactions */
.skill-item.complex-tilt-card:hover .tech-pill {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

/* Meta Icon Box Container Placement */
.meta-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-right: 12px;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6); /* Default elegant muted theme tone */
    transition: all 0.3s ease;
}

/* When hovering over the skill card, light up the icons using your theme colors */
.skill-item.complex-tilt-card:hover .meta-icon-box {
    color: #00d2ff; /* Your theme's neon blue */
    border-color: rgba(169, 96, 238, 0.3); /* Transparent purple border border */
    background: rgba(169, 96, 238, 0.05);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2); /* Soft neon blue radial backing */
}

/* About Section Grid Layout */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Base text styling for the bio */
.about-description {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* Beautiful Timeline UI for Education & Experience */
.timeline-wrapper {
    position: relative;
    padding-left: 20px;
    margin-top: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 15px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* The glowing dot on the timeline */
.timeline-icon {
    position: absolute;
    left: -46px; /* Centers it perfectly on the border */
    top: 0;
    width: 28px;
    height: 28px;
    background: rgba(169, 96, 238, 0.1);
    border: 1px solid rgba(169, 96, 238, 0.4);
    color: #00d2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
    transition: all 0.3s ease;
}

/* Highlight the timeline icon when hovering over the card */
.complex-tilt-card:hover .timeline-icon {
    background: #00d2ff;
    color: #000;
    border-color: #00d2ff;
    box-shadow: 0 0 15px #00d2ff, 0 0 30px rgba(169, 96, 238, 0.4);
}

/* Timeline Typography */
.timeline-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.timeline-subtitle {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.timeline-subtitle .highlight {
    color: #00d2ff; /* Accents grades/scores in neon blue */
    font-weight: 600;
}

.timeline-date {
    display: block;
    font-size: 0.8rem;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

/* Small tag specifically for experience dates */
.date-pill {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #a960ee; /* Purple accent */
}

.timeline-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}



.about-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    justify-content: center; /* This forces the 4th item to sit perfectly in the center */
}

/* Force items to behave like a 3-column responsive row layout */
.about-grid .card {
    flex: 1 1 calc(33.333% - 30px);
    min-width: 350px; /* Keeps dimensions stable down to mobile breakpoints */
}
/* Core Styling for the Hire Me Button */
.hire-me-btn.magnetic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    border-radius: 30px; /* Modern pill profile */
    
    /* Vibrant theme gradient shifting from neon blue to sleek purple */
    background: linear-gradient(135deg, #00d2ff 0%, #a960ee 100%);
    color: #ffffff;
    
    /* Layered glow effect */
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2), 0 4px 30px rgba(169, 96, 238, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow 0.3s ease, 
                filter 0.3s ease;
    cursor: pointer;
}

/* Hover Interaction Layer */
.hire-me-btn.magnetic:hover {
    /* Amplifies the color vibrancy and expanding glow when hovered or magnetized */
    filter: brightness(1.1);
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.45), 0 0 40px rgba(169, 96, 238, 0.3);
}

/* Active pressing state */
.hire-me-btn.magnetic:active {
    transform: scale(0.96);
    filter: brightness(0.95);
}

/* Container Layout */
.hero-actions {
    display: flex;
    gap: 20px;
    margin-top: 35px;
}

/* Base style shared across both magnetic action buttons */
.hero-actions .magnetic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    border-radius: 30px;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow 0.3s ease, 
                background 0.3s ease, 
                color 0.3s ease,
                border-color 0.3s ease;
}

/* ==========================================================================
   1. PRIMARY CTA BUTTON (Initiate Connection)
   ========================================================================== */
.cta-btn.magnetic {
    background: linear-gradient(135deg, #00d2ff 0%, #a960ee 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2), 0 4px 30px rgba(169, 96, 238, 0.15);
}

.cta-btn.magnetic:hover {
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.45), 0 0 40px rgba(169, 96, 238, 0.3);
    filter: brightness(1.1);
}

/* ==========================================================================
   2. SECONDARY BUTTON (Inspect Systems)
   ========================================================================== */
.secondary-btn.magnetic {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fluid transition to full color on hover */
.secondary-btn.magnetic:hover {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.1) 0%, rgba(169, 96, 238, 0.1) 100%);
    border-color: #a960ee;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(169, 96, 238, 0.2);
}

/* Click Action feedback for both elements */
.hero-actions .magnetic:active {
    transform: scale(0.96);
}

/* Extra utility classes */
.text-center { text-align: center; justify-content: center; }
.accent-text { color: #00d2ff !important; font-weight: bold; }
.metric .label i { margin-right: 6px; color: #a960ee; }
.theme-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Filter Controls Container */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center; /* Centers the filtering row */
}

/* Base Filter Button Styling */
.filter-btn.magnetic {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px; /* Clean rounded capsule profile */
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
                background 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Hover Interaction State */
.filter-btn.magnetic:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.4); /* Subtle glowing blue border hint */
}

/* ==========================================================================
   ACTIVE FILTER STATE (Selected Tab)
   ========================================================================== */
.filter-btn.magnetic.active {
    background: linear-gradient(135deg, #00d2ff 0%, #a960ee 100%);
    color: #ffffff;
    border-color: transparent;
    font-weight: 600;
    /* Immersive dual-color glow */
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.25), 0 4px 25px rgba(169, 96, 238, 0.2);
}

/* Hovering while button is already active keeps it brilliant */
.filter-btn.magnetic.active:hover {
    filter: brightness(1.05);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4), 0 0 30px rgba(169, 96, 238, 0.3);
}

/* Click feedback compression */
.filter-btn.magnetic:active {
    transform: scale(0.95);
}

/* Contact Meta Cards Container Layout */
.meta-node-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Interaction over the Entire Node Card */
.meta-node-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(169, 96, 238, 0.2); /* Transparent purple border touch */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Icon Box Custom Adjustments */
.meta-node-card .meta-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-right: 16px;
    color: rgba(255, 255, 255, 0.6); /* Muted default stroke state */
    transition: all 0.3s ease;
}

/* Direct Target SVG Vector Strokes for Blue & Purple Core */
.meta-node-card .meta-icon-box svg {
    stroke: url(#bluePurpleGradient) rgba(255, 255, 255, 0.6); /* Handled gracefully via CSS fallback */
    transition: stroke 0.3s ease;
}

/* Activate Glow Matrix on Box Hover */
.meta-node-card:hover .meta-icon-box {
    color: #00d2ff; /* Lights up icon inside with neon blue */
    background: rgba(169, 96, 238, 0.06); /* Infuses warm purple atmosphere background */
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

/* Internal Metadata Typography Hierarchy */
.meta-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-family: monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: #a960ee; /* The clean purple token handles labels beautifully */
    letter-spacing: 1px;
    text-transform: uppercase;
}

.meta-val {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Link-specific Hover Action for Anchors (like Phone and Mail links) */
a.meta-val:hover {
    color: #00d2ff; /* Turns neon blue when interacting with actual numbers/links */
}
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 1000; /* Ensures it stays on top */
}

/* This class will be toggled via JavaScript */
nav.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
}
nav {
    position: fixed !important;
    top: 0 !important;
    z-index: 999999 !important;
}

.origin-nav-btn {
    position: fixed;
    bottom: 30px; /* Adjust placement as needed */
    right: 30px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;           /* Hidden by default at the origin */
    visibility: hidden;   /* Keeps it unclickable when invisible */
    z-index: 9999;
}

/* This class will be applied when the user scrolls down */
.origin-nav-btn.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-to-origin {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 45px !important;  /* Ensure it has a physical size */
    height: 45px !important; /* Ensure it has a physical size */
    z-index: 999999 !important; /* Forces it to the absolute top layer */
    
    /* Smooth transition */
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    
    /* Start hidden at the top */
    opacity: 0 !important;
    visibility: hidden !important;
}

/* This must override the hidden properties completely */
#scroll-to-origin.visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important; /* Ensures the SVG inside renders nicely */
    align-items: center;
    justify-content: center;
}

/* 1. The main container that safely anchors both buttons */
/* 1. The main container that safely stacks both buttons */
.floating-btn-group {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    display: flex !important;
    flex-direction: column !important; /* Vertically stacks them */
    gap: 14px !important;              /* Clean gap so they never overlap */
    align-items: center !important;
    z-index: 999999 !important;        /* Forces them on top of everything */
}

/* 2. Base structural styles for both buttons */
.whatsapp-btn, #scroll-to-origin, .sys-chat-toggle {
    position: static !important;       /* Removes conflicting fixed screen calculations */
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease !important;
}

/* 3. WhatsApp Button Styling (Kept as standard green) */
.whatsapp-btn {
    background-color: #25D366 !important;
    color: white !important;
}
.whatsapp-btn:hover {
    transform: scale(1.1) !important;
    background-color: #20ba5a !important;
}

/* 4. Scroll to Origin - Hidden State (Blue & Purple Gradient) */
#scroll-to-origin {
    /* Vivid Blue to Royal Purple Gradient */
    background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%) !important; 
    color: #ffffff !important; /* White arrow to stand out on the gradient */
    
    /* Safely hidden by default at the very top */
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important; /* Prevents an empty physical space at the bottom */
}

/* 5. Scroll to Origin - Visible State (Triggered via JS) */
#scroll-to-origin.visible {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important; /* Re-introduces it into the flex stack */
}

#scroll-to-origin.visible:hover {
    transform: scale(1.1) !important;
    /* Shifts gradient angle slightly on hover for a dynamic fluid effect */
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%) !important; 
}


/* --- FOOLPROOF LIGHT THEME OVERRIDES --- */

/* 1. Main Background */
body.light-theme, 
body.light-theme main, 
body.light-theme #canvas-container {
    background-color: #f4f6f9 !important;
    background: #f4f6f9 !important;
    color: #1a1a24 !important;
}

/* 2. Portfolio Cards & Skill Grids */
body.light-theme .card, 
body.light-theme .skill-item, 
body.light-theme .meta-node-card {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1a1a24 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* 3. Global Text Overrides */
body.light-theme h1, 
body.light-theme h2, 
body.light-theme h3, 
body.light-theme .skill-title,
body.light-theme .timeline-title {
    color: #0f172a !important;
}

body.light-theme p, 
body.light-theme .about-description, 
body.light-theme .timeline-desc, 
body.light-theme .review-text, 
body.light-theme .footer-description,
body.light-theme .meta-label {
    color: #475569 !important;
}

/* 4. Navbar & Footer Background Tweaks */
body.light-theme nav, 
body.light-theme footer {
    background-color: rgba(244, 246, 249, 0.95) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
body.light-theme nav a,
body.light-theme .logo {
    color: #1a1a24 !important;
}

/* 5. Theme Toggle Button Sizing */
#theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin: 0 5px;
    border-radius: 50%;
}

/* ==========================================================================
   HIGH-CONTRAST CYBER-LIGHT THEME OVERRIDES 
   ========================================================================== */

/* 1. Base Document Reset */
/* ==========================================================================
   HIGH-CONTRAST LIGHT THEME OPERATORS (WHITE, BLACK, PURPLE, BLUE)
   ========================================================================== */

/* 1. Primary Background Overrides (Forced White) */
body.light-theme, 
body.light-theme main {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #000000 !important; /* Forced Black Text */
}

/* Re-maps the background lines cleanly so they become visible wireframes */
body.light-theme #canvas-container {
    opacity: 0.15 !important;
    filter: invert(1) contrast(1.5) brightness(0.8);
}

/* 2. Portfolio Structural Containers & Skill Item Blocks */

/* ==========================================================================
   PROJECT DETAIL PAGES (/projects/*.html)
   ========================================================================== */
.detail-hero {
    padding: 160px 4% 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: monospace;
    margin-bottom: 28px;
    transition: color 0.3s ease;
}
.detail-back-link:hover { color: var(--accent-blue); }

.detail-hero .project-header { margin-bottom: 20px; }
.detail-hero h1 { margin-bottom: 18px; }
.detail-hero .tag-row { margin-top: 22px; }
.detail-lede {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 720px;
}

.detail-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 4% 120px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.detail-section h2 {
    font-size: 1.35rem;
    margin-bottom: 18px;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1rem;
    max-width: 760px;
}

.detail-section p + p { margin-top: 14px; }

.detail-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.detail-tech-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.detail-tech-item .meta-icon-box { flex-shrink: 0; margin-right: 0; }
.detail-tech-item h4 { font-size: 0.92rem; margin-bottom: 4px; color: var(--text-primary); }
.detail-tech-item p { font-size: 0.8rem; margin: 0; line-height: 1.5; }

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 760px;
}
.feature-list li i {
    color: var(--accent-blue);
    margin-top: 4px;
    flex-shrink: 0;
}

.detail-note {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-purple);
    border-radius: 8px;
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
    max-width: 760px;
}

.detail-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 4px;
}



/* ==========================================================================
   PROJECT CARDS (#project) — flat HUD redesign
   Scoped to #project .pc so the Reviews cards (which share .card and
   .project-header / .metric) are untouched. Accent comes from data-accent.
   ========================================================================== */
#project .pc {
    --pc: #a855f7;
    --pc-rgb: 168, 85, 247;
    --pc-soft: #c084fc;
    --pc-text: #f3f4f6;
    --pc-muted: #a3aab8;
    --pc-body: #aeb6c4;
    --pc-status: #00ffaa;
    --pc-tag-border: rgba(255, 255, 255, 0.16);
}
#project .pc[data-accent="cyan"] {
    --pc: #22d3ee;
    --pc-rgb: 34, 211, 238;
    --pc-soft: #67e8f9;
    --pc-tag-border: rgba(34, 211, 238, 0.45);
}

#project .grid { align-items: stretch; }

#project .card.pc {
    position: relative;
    padding: 0;
    border-radius: 14px;
    background: #060609;
    border: 1px solid rgba(var(--pc-rgb), 0.5);
    box-shadow: none;
    transition: border-color 0.35s, box-shadow 0.35s, opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
#project .card.pc:hover {
    border-color: rgba(var(--pc-rgb), 0.85);
    box-shadow: none;
}

#project .pc .pc-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
}
#project .pc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 22px 18px;
}

/* header row + hairline */
#project .pc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--pc-rgb), 0.6);
    text-transform: uppercase;
}
#project .pc-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--pc-soft);
}
#project .pc-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    color: var(--pc-status);
    text-align: right;
}
#project .pc-dot {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pc-status);
    box-shadow: 0 0 7px var(--pc-status);
    animation: pc-pulse 2s ease-in-out infinite;
}
@keyframes pc-pulse { 50% { opacity: 0.35; } }

/* number + title + dotted grid */
#project .pc-head { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
#project .pc-head::after {
    content: "";
    flex: none;
    width: 42px;
    height: 44px;
    margin-left: auto;
    background-image: radial-gradient(rgba(var(--pc-rgb), 0.55) 1px, transparent 1.4px);
    background-size: 8px 8px;
    opacity: 0.7;
}
#project .pc-num {
    flex: none;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 4rem;
    line-height: 0.9;
    letter-spacing: -0.08em;
    color: rgba(var(--pc-rgb), 0.05);
    -webkit-text-stroke: 1.5px rgba(var(--pc-rgb), 0.42);
    user-select: none;
}
#project .pc-title { min-width: 0; }
#project .pc h3 {
    margin: 0 0 10px;
    font-size: clamp(1.15rem, 1.4vw, 1.4rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--pc-text);
    overflow-wrap: anywhere;
}
#project .pc-rule { display: block; width: 38px; height: 2px; background: var(--pc); }

#project .pc-desc {
    margin: 16px 0 14px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--pc-body);
}

/* metrics panel */
#project .pc-panel {
    padding: 2px 16px;
    border: 1px solid rgba(var(--pc-rgb), 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.015);
}
#project .pc-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(var(--pc-rgb), 0.22);
}
#project .pc-row:last-child { border-bottom: 0; }
#project .pc-row .pc-i { color: var(--pc-soft); }
#project .pc-key {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pc-muted);
    line-height: 1.35;
}
#project .pc-val {
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    text-wrap: balance;
    color: var(--pc-text);
}

#project .pc-i {
    width: 22px;
    height: 22px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* system-architecture flow (Street Cart) */
#project .pc-arch { padding: 12px 14px; border-color: rgba(var(--pc-rgb), 0.5); }
#project .pc-flow { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
#project .pc-node { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
#project .pc-box {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--pc-rgb), 0.55);
    border-radius: 10px;
    background: rgba(var(--pc-rgb), 0.07);
    color: var(--pc-soft);
}
#project .pc-box .pc-i { width: 26px; height: 26px; stroke-width: 1.3; }
#project .pc-cap { font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.3; color: var(--pc-body); }
#project .pc-link { flex: none; width: 20px; height: 20px; margin-top: 13px; color: rgba(var(--pc-rgb), 0.75); }

/* technologies */
#project .pc-stack { margin-top: auto; padding-top: 16px; }
#project .pc-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pc-soft);
}
#project .pc-label::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.09); }
#project .pc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#project .pc-tag {
    padding: 4px 12px;
    border: 1px solid var(--pc-tag-border);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--pc-text);
}

/* CTA — full-width bar docked at the bottom of the card */
#project .pc-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    border-top: 1px solid rgba(var(--pc-rgb), 0.5);
    background: rgba(var(--pc-rgb), 0.03);
    color: var(--pc-soft);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}
#project .pc-cta span { flex: 1; }
#project .pc-arrow { transition: transform 0.3s; }
#project .pc-cta:hover,
#project .pc-cta:focus-visible {
    background: rgba(var(--pc-rgb), 0.14);
    color: #fff;
    outline: none;
}
#project .pc-cta:hover .pc-arrow,
#project .pc-cta:focus-visible .pc-arrow { transform: translateX(5px); }

/* footer strip */

/* narrower desktops: 2 columns keeps the cards roomy */
@media (min-width: 1025px) and (max-width: 1279px) {
    #project .grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    #project .pc-body { padding: 16px 16px 16px; }
    #project .pc-cta { padding: 13px 16px; }
    #project .pc-num { font-size: 3.2rem; }
    #project .pc-head { gap: 12px; }
    #project .pc-head::after { display: none; }
    #project .pc-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 2px; }
    #project .pc-val { grid-column: 2; }
    #project .pc-status { font-size: 0.66rem; }
}
@media (prefers-reduced-motion: reduce) {
    #project .pc-dot { animation: none; }
    #project .pc-arrow, #project .pc-cta { transition: none; }
}

/* light theme */
:is(body.light-theme, html[data-theme="light"]) #project .pc {
    --pc: #7c3aed;
    --pc-rgb: 124, 58, 237;
    --pc-soft: #6d28d9;
    --pc-text: #0f172a;
    --pc-muted: #64748b;
    --pc-body: #475569;
    --pc-status: #059669;
    --pc-tag-border: rgba(15, 23, 42, 0.18);
}
:is(body.light-theme, html[data-theme="light"]) #project .pc[data-accent="cyan"] {
    --pc: #0891b2;
    --pc-rgb: 8, 145, 178;
    --pc-soft: #0e7490;
    --pc-tag-border: rgba(8, 145, 178, 0.5);
}
:is(body.light-theme, html[data-theme="light"]) #project .card.pc {
    background: #ffffff !important;
    border: 1px solid rgba(var(--pc-rgb), 0.5) !important;
    box-shadow: none !important;
}
:is(body.light-theme, html[data-theme="light"]) #project .pc-num { color: rgba(var(--pc-rgb), 0.05); }
:is(body.light-theme, html[data-theme="light"]) #project .pc-label::after { background: rgba(15, 23, 42, 0.1); }
:is(body.light-theme, html[data-theme="light"]) #project .pc-cta:hover,
:is(body.light-theme, html[data-theme="light"]) #project .pc-cta:focus-visible { color: var(--pc-soft); }
