/* ==========================================================================
   CSS VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-color: #050816;
    --primary: #00E5FF;
    --secondary: #7C3AED;
    --accent: #00FFCC;
    --text-main: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Mobile first base */
}

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

body.loading,
body.menu-open {
    overflow: hidden;
}

/* ==========================================================================
   SPLINE 3D MODEL 1 & HERO (RESPONSIVE FIX)
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Adjust padding to prevent overlapping with the fixed header */
    padding-top: 80px; 
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%; /* Full width on mobile */
    text-align: center; /* Center on mobile */
}

.spline1 {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%) scale(1.2);
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3; /* Slightly lower opacity on mobile so text is readable */
}

.spline1 spline-viewer {
    position: absolute; /* Changed from fixed to prevent scroll glitches */
    width: 100%;
    height: 100%;
}

/* ======================================================================
   SPLINE 3D MODEL 2 - CONTACT
   ====================================================================== */
/* Spline between About and Contact */

.spline2 {
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transform: scale(1.2);
}

.spline2 spline-viewer {
    width: 420px;
    height: 420px;
}

/* ======================================================================
   SPLINE 3D MODEL 3 - CONTACT
   ====================================================================== */
/* Spline between About and Contact */

.legal-hero{
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Adjust padding to prevent overlapping with the fixed header */
    padding-top: 80px; 
}

.legal-hero .container{
    position: relative;
    z-index: 2;
    width: 100%; /* Full width on mobile */
    text-align: center; /* Center on mobile */
}

.spline3{
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%) scale(1.2);
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3; /* Prevent blocking clicks */
}

.spline3 spline-viewer{
    position: absolute; /* Changed from fixed to prevent scroll glitches */
    width: 100%;
    height: 100%;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ==========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.section { padding: 4rem 1.5rem; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.container { max-width: 1200px; margin: 0 auto; width: 100%; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-size: 2.5rem; margin-bottom: 1rem; }
.w-100 { width: 100%; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: var(--transition);
}
.border-top-only { border: none; border-top: 1px solid var(--glass-border); border-radius: 0; }

/* ==========================================================================
   CUSTOM CURSOR & SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }


.scroll-progress {
    position: fixed; top: 0; left: 0; width: 0%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 10000;
}

/* ==========================================================================
   LOADER & BACKGROUND
   ========================================================================== */
#loader {
    position: fixed; inset: 0; background: #03050d; z-index: 99999;
    display: flex; justify-content: center; align-items: center; transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}
.loader-content {
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.loader-logo { 
    font-family: var(--font-heading); 
    font-size: 3rem; 
    font-weight: 700; 
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0; 
    animation: pulseFade 1.5s infinite; }

.loader-logo .dot { 
    color: var(--primary); }
@keyframes pulseFade { 0%, 100% { opacity: 0.3; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1); text-shadow: 0 0 20px rgba(0,229,255,0.5); } 

}
.loader-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Background floating particles for loader */
.loader-bg-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.loader-bg-particles .particle {
    position: absolute;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(10px);
    animation: floatParticle 8s infinite alternate ease-in-out;
}
.loader-bg-particles .particle:nth-child(1) { width: 300px; height: 300px; top: -10%; left: -10%; animation-duration: 10s; }
.loader-bg-particles .particle:nth-child(2) { width: 400px; height: 400px; bottom: -20%; right: -10%; background: radial-gradient(circle, var(--secondary) 0%, transparent 70%); animation-duration: 12s; }
.loader-bg-particles .particle:nth-child(3) { width: 200px; height: 200px; top: 40%; left: 60%; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); animation-duration: 8s; }
.loader-bg-particles .particle:nth-child(4) { width: 250px; height: 250px; bottom: 30%; left: 10%; animation-duration: 9s; }

@keyframes floatParticle {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

#bg-canvas { position: fixed; inset: 0; z-index: 1; overflow: hidden; perspective: 1000px; }
#bg-video { width: 120%; height: 120%; object-fit: cover; position: absolute; top: -10%; left: -10%; transition: transform 0.1s linear; }
.bg-overlay { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 0.8rem 2rem; border-radius: 30px; font-weight: 600; font-family: var(--font-heading);
    transition: var(--transition); position: relative; overflow: hidden;
}
.btn-primary {
    background: linear-gradient(45deg, var(--secondary), var(--primary)); color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}
.btn-primary:hover { box-shadow: 0 0 25px rgba(0, 229, 255, 0.6); transform: translateY(-2px); }
.btn-outline {
    background: transparent; border: 1px solid var(--primary); color: var(--primary);
}
.btn-outline:hover { background: rgba(0, 229, 255, 0.1); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-icon { border: 1px solid var(--glass-border); color: var(--text-main); border-radius: 50%; width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: 1rem; }


/* ==========================================================================
   SERVICE PRICING (POP-UP MODAL STYLES)
   ========================================================================== */
/* Completely hide the tiers inside the cards so they don't show on the main page */
.pricing-tiers-wrapper {
    display: none; 
}

/* Make the pricing modal wider to fit 3 columns */
.pricing-modal-content {
    max-width: 1000px !important; 
    width: 95%;
}

.text-center { text-align: center; }

/* Grid layout for the pop-up */
.pricing-modal-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stacks on mobile */
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Desktop: 3 columns side-by-side */
@media (min-width: 768px) {
    .pricing-modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* (Keep your existing .pricing-tier, .tier-price, and .tier-features styles here!) */
.pricing-tier {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    transition: var(--transition);
}

.pricing-tier:hover {
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.05);
}

.pricing-tier.standard {
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
}

.pricing-tier h4 { color: var(--text-main); margin-bottom: 0.5rem; font-size: 1.1rem; }
.tier-price { font-size: 1.5rem; font-family: var(--font-heading); color: var(--accent); margin-bottom: 1rem; font-weight: 700; }
.tier-features { margin-bottom: 1.5rem; font-size: 0.85rem; color: var(--text-muted); }
.tier-features li { margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px; }
.tier-features li::before {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--primary); font-size: 0.8rem;
}


/* ==========================================================================
   HEADER & NAVIGATION (PREMIUM UPGRADE)
   ========================================================================== */
header {
    position: fixed; top: 0; width: 100%; z-index: 9000; transition: var(--transition);
    padding: 1rem 0;
}
header.scrolled {
    background: rgba(5, 8, 22, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); padding: 0.5rem 0;
}
.header-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%;
}

/* Ensure Logo and Toggle stay above the mobile menu overlay */
.logo { position: relative; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; z-index: 9999; }
.logo span { color: var(--primary); }

/* Premium Hamburger Animation */
.menu-toggle { 
    position: relative; display: flex; flex-direction: column; gap: 6px; 
    z-index: 9999; padding: 10px; cursor: pointer; 
}
.menu-toggle .bar { 
    width: 30px; height: 2px; background: var(--text-main); 
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    transform-origin: left center;
}
.menu-toggle.active .bar:nth-child(1) { transform: rotate(45deg); width: 34px; background: var(--primary); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; width: 0; }
.menu-toggle.active .bar:nth-child(3) { transform: rotate(-45deg); width: 34px; background: var(--primary); }

/* Full Screen Glassmorphism Mobile Menu */
.nav-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(5, 8, 22, 0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9998; 
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-20px);
}
.nav-menu.active {
    opacity: 1; pointer-events: auto; transform: translateY(0);
}

.nav-links { display: flex; flex-direction: column; text-align: center; gap: 2.5rem; }

/* Staggered Link Animations */
.nav-link { 
    font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; 
    color: var(--text-muted); position: relative;
    display: block; opacity: 0; transform: translateY(20px);
    transition: color 0.3s ease, transform 0.4s ease, opacity 0.4s ease;
}
.nav-menu.active .nav-link { opacity: 1; transform: translateY(0); }

/* Delay each link slightly for a cascade effect */
.nav-menu.active li:nth-child(1) .nav-link { transition-delay: 0.1s; }
.nav-menu.active li:nth-child(2) .nav-link { transition-delay: 0.15s; }
.nav-menu.active li:nth-child(3) .nav-link { transition-delay: 0.2s; }
.nav-menu.active li:nth-child(4) .nav-link { transition-delay: 0.25s; }
.nav-menu.active li:nth-child(5) .nav-link { transition-delay: 0.3s; }

.nav-link.active, .nav-link:hover { color: var(--primary); transform: scale(1.05); }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero { text-align: center; justify-content: center; align-items: center; }
.hero .subtitle { font-size: 1rem; text-transform: uppercase; letter-spacing: 3px; color: var(--accent); margin-bottom: 1rem; }
.hero .title { font-size: 3rem; margin-bottom: 1rem; }
.typing-container { font-size: 1.2rem; font-family: var(--font-heading); height: 30px; margin-bottom: 1.5rem; color: var(--text-muted); }
.typing-container .cursor { animation: blink 0.8s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .description { max-width: 600px; margin: 0 auto 2rem auto; color: var(--text-muted); }
.cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.social-icons { display: flex; gap: 1.5rem; justify-content: center; }
.social-icons a { font-size: 1.2rem; color: var(--text-muted); transition: var(--transition); }
.social-icons a:hover { color: var(--primary); transform: translateY(-3px); text-shadow: 0 0 10px var(--primary); }

.scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); text-align: center; opacity: 0.6; }
.mouse { width: 24px; height: 36px; border: 2px solid var(--text-main); border-radius: 12px; margin: 0 auto 8px auto; position: relative; }
.mouse::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: var(--primary); border-radius: 50%; animation: scrollWheel 2s infinite; }
@keyframes scrollWheel { 0% { top: 6px; opacity: 1; } 100% { top: 20px; opacity: 0; } }

/* ==========================================================================
   PORTFOLIO SECTION
   ========================================================================== */
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.portfolio-card { padding: 1rem; overflow: hidden; display: flex; flex-direction: column; gap: 1rem; }
.portfolio-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 10px 40px rgba(0,229,255,0.15); }
.project-img-wrapper { border-radius: 10px; overflow: hidden; height: 200px; }
.placeholder-img { width: 100%; height: 100%; background: linear-gradient(45deg, #1a1a2e, #16213e); display: flex; justify-content: center; align-items: center; color: var(--text-muted); font-size: 0.9rem; transition: transform 0.5s ease; }
.portfolio-card:hover .placeholder-img { transform: scale(1.05); }
.project-info h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.tech-stack { font-size: 0.8rem; color: var(--accent); margin-bottom: 1rem; }
.project-links { display: flex; gap: 1rem; margin-top: auto; padding-top: 1rem; }

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.service-card { text-align: center; padding: 2.5rem 1.5rem; display: flex; flex-direction: column; align-items: center; }
.service-card:hover { transform: translateY(-5px); border-color: var(--secondary); background: rgba(124, 58, 237, 0.05); }
.service-icon { font-size: 3rem; color: var(--primary); margin-bottom: 1.5rem; filter: drop-shadow(0 0 10px rgba(0,229,255,0.4)); }
.service-card h3 { margin-bottom: 1rem; font-size: 1.3rem; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; flex-grow: 1; }
.price-placeholder { font-size: 1.5rem; font-family: var(--font-heading); font-weight: 700; color: var(--accent); margin: 1.5rem 0 0.5rem 0; }

/* ==========================================================================
   ABOUT & SKILLS SECTION
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; margin-top: 2rem; }
.stat-item h3 { display: inline-block; font-size: 2.5rem; color: var(--primary); }
.stat-item span { font-size: 2rem; color: var(--primary); }
.stat-item p { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }

.skills-wrapper { display: flex; flex-direction: column; gap: 1.5rem; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; }
.skill-bar { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.skill-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--secondary), var(--primary)); border-radius: 4px; transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1); }

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.contact-links a { display: flex; align-items: center; gap: 1rem; color: var(--text-muted); transition: var(--transition); }
.contact-links a:hover { color: var(--primary); transform: translateX(5px); }
.map-placeholder { height: 200px; background: var(--glass-bg); border-radius: 10px; display: flex; justify-content: center; align-items: center; color: var(--text-muted); border: 1px dashed var(--glass-border); }

.input-group { position: relative; margin-bottom: 1.5rem; }
.input-group input, .input-group textarea {
    width: 100%; padding: 1rem; background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border);
    border-radius: 8px; color: var(--text-main); font-family: inherit; font-size: 1rem; transition: var(--transition);
}
.input-group input:focus, .input-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 10px rgba(0,229,255,0.1); }
.input-group label {
    position: absolute; left: 1rem; top: 1rem; color: var(--text-muted); transition: var(--transition); pointer-events: none;
}
.input-group input:focus ~ label, .input-group textarea:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label, .input-group textarea:not(:placeholder-shown) ~ label {
    top: -0.5rem; left: 0.8rem; font-size: 0.8rem; background: var(--bg-color); padding: 0 0.4rem; color: var(--primary);
}
.form-status { margin-top: 1rem; text-align: center; font-size: 0.9rem; display: none; }
.form-status.success { color: var(--accent); display: block; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer { padding: 4rem 1.5rem 2rem 1.5rem; margin-top: 4rem; z-index: 2; position: relative; }
.footer-content { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand p { color: var(--text-muted); margin-top: 1rem; font-size: 0.9rem; }
.footer-links h4 { margin-bottom: 1rem; color: var(--text-main); }
.footer-links ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--primary); padding-left: 5px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--glass-border); grid-column: 1 / -1; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }

#back-to-top { position: fixed;
    right: 30px;
    bottom: 30px;

    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);

    width: 40px;
    height: 40px;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);

    z-index: 999; }

#back-to-top.visible { 
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0); 
}
#back-to-top:hover { 
    background: var(--primary);
    color: var(--bg-color); 
}

/* ==========================================================================
   MODAL (POLICIES)
   ========================================================================== */
body{
    background:#050816;
    color:#fff;
    font-family:'Poppins',sans-serif;
}

.legal-hero{
    padding:140px 20px 80px;
    text-align:center;
}

.legal-badge{
    display:inline-block;
    padding:8px 20px;
    border-radius:50px;
    background:rgba(0,229,255,.12);
    color:#00e5ff;
    border:1px solid rgba(0,229,255,.3);
    margin-bottom:20px;
    font-weight:600;
}

.legal-hero h1{
    font-size:3.5rem;
    margin-bottom:20px;
}

.legal-hero p{
    max-width:700px;
    margin:auto;
    color:#b5b5b5;
    line-height:1.8;
}

.legal-meta{
    display:flex;
    justify-content:center;
    gap:30px;
    margin-top:40px;
    color:#8f9bb3;
    flex-wrap:wrap;
}

.legal-content{
    padding:60px 20px 120px;
}

.legal-card{
    max-width:950px;
    margin:30px auto;
    padding:35px;
    background:rgba(255,255,255,.05);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    transition:.35s;
}

.legal-card:hover{
    transform:translateY(-6px);
    border-color:#00e5ff;
    box-shadow:0 20px 50px rgba(0,229,255,.18);
}

.legal-card h2{
    color:#00e5ff;
    margin-bottom:20px;
}

.legal-card p,
.legal-card li{
    color:#cfd8dc;
    line-height:1.9;
}

.legal-card ul{
    padding-left:20px;
}

.back-home{
    display:inline-flex;
    align-items:center;
    gap:10px;
    margin-top:50px;
    color:#00e5ff;
    text-decoration:none;
    font-weight:600;
}

/* ==========================
   Legal Page Header
========================== */

.legal-header{
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8,12,25,.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.legal-header .container{
    max-width: 1200px;
    margin: auto;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo{
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo span{
    color: #00e5ff;
}

/* ==========================
   Back Home Button
========================== */

.back-home-btn{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg,#00e5ff,#0066ff);
    transition: .3s;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,229,255,.25);
}

.back-home-btn:hover{
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,229,255,.4);
}

.back-home-btn i{
    font-size: .95rem;
}

/* ==========================
   Footer
========================== */

.legal-footer{
    text-align: center;
    padding: 70px 20px;
}

/* ==========================================================================
   ANIMATIONS (REVEAL)
   ========================================================================== */
.reveal { opacity: 0; transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.fade-up { transform: translateY(50px); }
.reveal.fade-left { transform: translateX(50px); }
.reveal.fade-right { transform: translateX(-50px); }
.reveal.active { opacity: 1; transform: translate(0, 0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ==========================================================================
   MEDIA QUERIES (TABLET & DESKTOP)
   ========================================================================== */
@media (min-width: 768px) {
    .menu-toggle { display: none; }
    .nav-menu { position: static; clip-path: none; background: transparent; }
    .nav-links { flex-direction: row; gap: 2rem; }
    .nav-link { font-size: 1rem; }
    
    .hero .title { font-size: 5rem; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr 1fr; align-items: center; }
    .contact-grid { grid-template-columns: 1fr 1.5fr; }
    .footer-content { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .menu-toggle { display: none; }
    
    /* Reset Menu to standard horizontal layout */
    .nav-menu { 
        position: static; height: auto; width: auto; 
        background: transparent; backdrop-filter: none; 
        opacity: 1; pointer-events: auto; transform: none; 
    }
    .nav-links { flex-direction: row; gap: 2rem; }
    
    /* Reset Links for Desktop */
    .nav-link { 
        font-size: 1rem; font-weight: 600; 
        opacity: 1; transform: none; display: inline-block;
    }
    .nav-link.active, .nav-link:hover { transform: none; }
    .nav-link::after {
        content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px;
        background: var(--primary); transition: var(--transition);
    }
    .nav-link.active::after, .nav-link:hover::after { width: 100%; }
    
    /* Kill the mobile stagger delay on desktop */
    .nav-menu.active li .nav-link, .nav-link { transition-delay: 0s !important; }
}

    /* Keep your other desktop rules below this (Hero, Spline, etc.) */

/* ==========================================================================
   MODAL (POLICY OVERLAY)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(5, 8, 22, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}
.modal.active {
    display: flex;
}
.modal-content {
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}
.modal-content #modal-body {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}
.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    line-height: 1;
}
.close-modal:hover { color: var(--primary); }

.legal-card {
    scroll-margin-top: 100px;
}