:root {
    /* Colors */
    --bg-color: #050505;
    --bg-surface: #0f0f12;
    --bg-surface-light: #1a1a1e;
    --primary: #FF4F00;
    --primary-hover: #FF6A2B;
    --text-main: #FAFAFA;
    --text-muted: #8A8A9A;
    --border: rgba(255, 255, 255, 0.07);
    --glow: rgba(255, 79, 0, 0.15);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Variables */
    --container: 1200px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: auto !important; /* Force native cursor visibility */
}

a, button, .btn, .portfolio-link, [role="button"], .libutton {
    cursor: pointer !important;
}

/* ── Preloader ─────────────────────────────── */
.preloader {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000;
    z-index: 9999999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}
.preloader.hidden { opacity: 0; visibility: hidden; }

.cyber-spinner {
    width: 80px; height: 80px; position: relative; margin-bottom: 2rem;
}
.spinner-core {
    transform-origin: 50% 50%;
    animation: preloader-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
/* Named 'preloader-spin' to avoid conflict with services SVG animation */
@keyframes preloader-spin { 100% { transform: rotate(360deg); } }

.loading-text {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    letter-spacing: 5px;
    text-transform: uppercase;
}
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Cyber Grid Background ─────────────────── */
.cyber-grid {
    position: fixed; 
    top: -50%; left: -50%; width: 200%; height: 200%;
    background-image: 
        linear-gradient(rgba(255, 79, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 79, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2; 
    pointer-events: none;
    transform: perspective(800px) rotateX(55deg) scale(1.8);
    animation: cyberGridMove 14s linear infinite;
    opacity: 0.7;
}
@keyframes cyberGridMove {
    0%   { background-position: 0 0; }
    100% { background-position: 0 60px; }
}

/* Floating global bg icons */
.global-icon {
    position: absolute;
    pointer-events: none;
    animation: globalFloat 10s ease-in-out infinite alternate;
}
.global-icon:nth-child(2n)  { animation-duration: 14s; animation-delay: -3s; }
.global-icon:nth-child(3n)  { animation-duration: 11s; animation-delay: -6s; }
.global-icon:nth-child(4n)  { animation-duration: 16s; animation-delay: -1s; }
@keyframes globalFloat {
    from { transform: translateY(0px) rotate(0deg); }
    to   { transform: translateY(-30px) rotate(4deg); }
}

/* ── Icon Visibility ───────────────────────── */
.invert-icon img {
    filter: invert(1) brightness(1.5);
}

/* Custom Cursor Removed */

/* ── Typography ────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

p { letter-spacing: 0.01em; }

/* ── Layout ────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

section { padding: 8rem 0; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

/* ── Navigation ────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    height: 72px; /* Fixed height for exact alignment */
    display: flex;
    align-items: center;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    flex-shrink: 0;
}
.logo-dot { color: var(--primary); }

.main-nav ul { display: flex; list-style: none; gap: 2.5rem; }
.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}
.main-nav a:hover { color: var(--text-main); }

/* Mobile hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    
    .main-nav {
        position: fixed;
        top: 72px; left: 0; right: 0; /* Matches header height */
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 1.75rem 1.5rem;
        /* Use both transform AND visibility to guarantee zero bleed-through */
        transform: translateY(-110%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
        z-index: 998; /* Below site-header z-index: 1000 */
    }
    .main-nav.open { 
        transform: translateY(0); 
        visibility: visible;
        pointer-events: auto;
    }
    .main-nav ul   { flex-direction: column; gap: 1.5rem; }
    .main-nav a    { font-size: 1.05rem; color: var(--text-main); }
    .nav-cta       { display: none; }
}

/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 79, 0, 0.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 35px rgba(255, 79, 0, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255, 255, 255, 0.08);
}

/* ── Footer ────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2.5rem;
    margin-top: 4rem;
}

.footer-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 0.75rem;
    max-width: 280px;
    line-height: 1.6;
}

.footer-links ul { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a  { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
    width: 100%;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.btn-outline:hover {
    background: var(--bg-color);
    color: var(--primary);
}

/* LinkedIn specific button styles (Global) */
.libutton {
    background-color: #0A66C2 !important;
    color: #ffffff !important;
    border: 1px solid #0A66C2 !important;
    text-transform: none !important;
    font-family: inherit;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    transition: opacity 0.3s ease;
}
.libutton:hover { opacity: 0.85; }

/* ── Specific Btn Modifications ────────────── */

/* ── Utilities ─────────────────────────────── */
.mt-4  { margin-top: 1.5rem; }
.mt-5  { margin-top: 3rem; }
.mb-5  { margin-bottom: 3rem; }
.pt-4  { padding-top: 1.5rem; }
.w-100 { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ── Success Popup ────────────────────────── */
.success-popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.success-popup-overlay.active {
    opacity: 1; visibility: visible;
}
.success-popup-content {
    background: #111;
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 3rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(255, 79, 0, 0.2);
}
.success-popup-overlay.active .success-popup-content {
    transform: scale(1);
}
.popup-icon {
    width: 80px; height: 80px;
    background: rgba(255, 79, 0, 0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}
.popup-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
}
.popup-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}
.popup-close-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}
.popup-close-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 79, 0, 0.3);
}

/* ── Global responsive ─────────────────────── */
@media (max-width: 768px) {
    section { padding: 4rem 0; } /* Was 5rem (8rem default) — tightens inter-section gaps on mobile */
    .container { padding: 0 1.25rem; }
    h1 { font-size: clamp(2rem, 7.5vw, 3rem); }
    h2 { font-size: clamp(1.6rem, 5.5vw, 2.5rem); }
    h3 { font-size: clamp(1.3rem, 4.5vw, 2rem); }
}

@media (max-width: 480px) {
    section { padding: 3rem 0; }
    .container { padding: 0 1rem; }
}

