/* CyberWolf Design System - V2.0 (Advanced Cyberpunk) */

:root {
    /* Colors */
    --bg-dark: #050505;
    --bg-panel: #0a0a0a;
    --text-main: #e0e0e0;
    --text-muted: #888;

    --neon-cyan: #00f3ff;
    --neon-green: #0aff00;
    --neon-purple: #bd00ff;
    --alert-red: #ff2a2a;

    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;

    /* Effects */
    --glow-cyan: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(0, 243, 255, 0.3);
    --glow-green: 0 0 10px rgba(10, 255, 0, 0.5), 0 0 20px rgba(10, 255, 0, 0.3);

    /* Tech Refresh Variables */
    --glass-bg: rgba(10, 10, 10, 0.7);
    --glass-border: 1px solid rgba(0, 243, 255, 0.1);
    --neon-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

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

body {
    background-color: var(--bg-dark);
    background: radial-gradient(circle at 10% 20%, #050505 0%, #000 100%);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    /* Responsive Font Sizing */
    font-size: clamp(14px, 1.5vw, 18px);
}

/* Global Tech Grid Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Background Effects */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.15;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, #000 120%);
    pointer-events: none;
    z-index: 9;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.neon-text {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

/* Layout Containers */
.container {
    max-width: 1440px;
    /* Wider for large screens */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section {
    padding: clamp(60px, 10vh, 100px) 0;
}

.section-title {
    margin-bottom: 40px;
    border-left: 5px solid var(--neon-green);
    padding-left: 20px;
}

/* Header & Nav */
.cyber-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
    z-index: 100;
    padding: 15px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.5));
    transition: 0.3s;
}

.desktop-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-code);
    font-size: 0.9rem;
    position: relative;
    transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.floaty {
    will-change: transform;
}

body.antigravity-on .floaty {
    animation: antiFloat 6s ease-in-out infinite alternate;
}

@keyframes antiFloat {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    40% {
        transform: translateY(-20px) rotate(1deg);
    }
    80% {
        transform: translateY(-60px) rotate(-1deg);
    }
    100% {
        transform: translateY(-80px) rotate(0.5deg);
    }
}

/* Mobile Nav Toggle */
.mobile-toggle {
    display: none;
    /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--neon-cyan);
    transition: 0.3s;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    font-family: var(--font-code);
}

/* Terminal Box */
.terminal-box {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 5px;
    width: 100%;
    max-width: 600px;
    /* Slightly wider */
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: var(--font-code);
    backdrop-filter: blur(5px);
    transition: 0.3s;
    overflow: hidden;
}

.terminal-box:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
}

.terminal-header {
    background: #111;
    padding: 10px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #333;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-body {
    padding: 20px;
    color: var(--neon-green);
    font-size: 0.9rem;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.input-line {
    display: flex;
    align-items: center;
    width: 100%;
}

.prompt {
    color: var(--neon-cyan);
    margin-right: 10px;
    white-space: nowrap;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-code);
    font-size: 0.9rem;
    flex-grow: 1;
    outline: none;
    min-width: 10px;
}

/* Glassmorphism Cards */
.tool-card,
.stat-card,
.project-card,
.blog-card,
.cyber-form,
.education-box,
.cert-item,
.service-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    backdrop-filter: blur(10px);
    /* Increased blur */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    padding: 20px;
    /* Consistent padding */
}

.tool-card:hover,
.stat-card:hover,
.project-card:hover,
.blog-card:hover,
.cert-item:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-shadow);
    border-color: var(--neon-cyan);
}

/* Inputs & Buttons */
input,
textarea,
select {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid #333 !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-code) !important;
    font-size: 1rem;
    /* Readable on mobile */
    border-radius: 4px;
    padding: 12px 15px;
    /* Comfortable touch target */
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.cyber-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    font-family: var(--font-code);
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: 0.3s;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    min-height: 48px;
    /* Accessible touch target */
}

.cyber-btn.primary {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    margin-right: 15px;
    margin-bottom: 10px;
}

.cyber-btn.primary:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: var(--glow-cyan);
}

.cyber-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #666;
    color: #ccc;
    margin-bottom: 10px;
}

.cyber-btn.secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Grids */
.services-grid,
.portfolio-grid,
.blog-grid,
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

/* Glitch Effect (Keep existing keyframes but optimize usage) */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(120px, 9999px, 140px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 80px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(120px, 9999px, 145px, 0);
    }

    20% {
        clip: rect(15px, 9999px, 30px, 0);
    }

    40% {
        clip: rect(70px, 9999px, 115px, 0);
    }

    60% {
        clip: rect(30px, 9999px, 100px, 0);
    }

    80% {
        clip: rect(85px, 9999px, 120px, 0);
    }

    100% {
        clip: rect(5px, 9999px, 60px, 0);
    }
}

/* ---------------------------------------------------- */
/* MEDIA QUERIES (Responsiveness)                       */
/* ---------------------------------------------------- */

@media (max-width: 1024px) {

    /* Tablet & Small Laptops */
    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        /* Stack columns */
    }
}

@media (max-width: 768px) {
    /* Mobile Devices */

    .mobile-toggle {
        display: flex;
        /* Show Hamburger */
        z-index: 101;
    }

    .desktop-nav {
        display: none;
        /* Hide default nav, verify toggle logic in JS */
        /* JS will toggle display: flex + absolute positioning */
    }

    .hero-content {
        padding: 0 10px;
        text-align: center;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .cyber-btn {
        width: 100%;
        /* Full width buttons on mobile */
        margin-right: 0;
    }

    .terminal-box {
        display: none;
        /* Hide terminal on really small screens if cluttered, or keep it */
        /* Let's keep it but simplified if needed. For now, keep visible but scaled. */
    }

    /* Table horizontal scroll wrapper */
    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }

    table {
        min-width: 600px;
        /* Ensure table doesn't squash */
    }
}

@media (min-width: 2000px) {

    /* TV / Ultra Wide */
    .container {
        max-width: 1800px;
    }

    body {
        font-size: 20px;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-family: var(--font-code);
}

/* Terminal Box */
.terminal-box {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 5px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: var(--font-code);
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.terminal-box:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
}

.terminal-header {
    background: #111;
    padding: 10px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #333;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-title {
    color: #666;
    font-size: 0.8rem;
    margin-left: 10px;
}

.terminal-body {
    padding: 20px;
    color: var(--neon-green);
    font-size: 0.9rem;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.terminal-body p {
    margin-bottom: 5px;
}

.input-line {
    display: flex;
    align-items: center;
    width: 100%;
}

.prompt {
    color: var(--neon-cyan);
    margin-right: 10px;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-code);
    font-size: 0.9rem;
    flex-grow: 1;
    outline: none;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Global Card/Panel Styling (Glassmorphism) */
.tool-card,
.stat-card,
.project-card,
.blog-card,
.cyber-form,
.education-box,
.cert-item {
    background: var(--glass-bg) !important;
    border: var(--glass-border) !important;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.tool-card:hover,
.stat-card:hover,
.project-card:hover,
.blog-card:hover,
.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--neon-shadow);
    border-color: rgba(0, 243, 255, 0.3) !important;
}

/* Global Input Styling */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid #333 !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-code) !important;
    transition: 0.3s;
    border-radius: 4px;
    padding: 10px 15px;
    /* global padding */
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

/* Buttons */
.cyber-btn {
    display: inline-block;
    padding: 15px 30px;
    font-family: var(--font-code);
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: 0.3s;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    /* Slight roundness */
}

.cyber-btn.primary {
    background: rgba(0, 243, 255, 0.05);
    /* Slight tint */
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    margin-right: 20px;
}

.cyber-btn.primary:hover {
    background: rgba(0, 243, 255, 0.15);
    box-shadow: var(--glow-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

.cyber-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #666;
    color: #ccc;
}

.cyber-btn.secondary:hover {
    border-color: #fff;
    background: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* About & Skills */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

.skills-list {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 5px 15px;
    font-family: var(--font-code);
    font-size: 0.8rem;
    border-radius: 3px;
}

.education-box {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid #222;
    padding: 30px;
}

.edu-item {
    margin-bottom: 25px;
    border-left: 2px solid #333;
    padding-left: 15px;
}

.edu-item h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.edu-school {
    color: var(--neon-green);
    font-size: 0.9rem;
}

.edu-date {
    color: #666;
    font-size: 0.8rem;
    font-family: var(--font-code);
}

/* Timeline (Experience) */
.timeline {
    position: relative;
    border-left: 2px solid #333;
    margin-left: 20px;
    padding-left: 40px;
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.timeline-date {
    font-family: var(--font-code);
    color: var(--neon-cyan);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.timeline-content h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.timeline-content h4 {
    color: var(--neon-green);
    margin-bottom: 10px;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0;
}

.timeline-content p {
    color: var(--text-muted);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: #000;
    border: 1px solid #333;
}

.project-image {
    height: 250px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-code {
    font-family: var(--font-code);
    color: rgba(0, 243, 255, 0.2);
    font-size: 2rem;
    transform: rotate(-45deg);
    user-select: none;
}

.project-info {
    padding: 25px;
    border-top: 1px solid #333;
}

.project-tag {
    color: var(--neon-purple);
    font-size: 0.8rem;
    font-family: var(--font-code);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.project-info h3 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.2rem;
}

.project-info p {
    color: #888;
    font-size: 0.9rem;
}

/* Certifications */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.cert-item {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid #333;
    padding: 20px;
    color: #fff;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cert-date {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--neon-green);
    font-family: var(--font-code);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.blog-card {
    background: #0a0a0a;
    border: 1px solid #222;
    transition: 0.3s;
    overflow: hidden;
}

.blog-card:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
}

.blog-image {
    height: 200px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.blog-category {
    background: var(--neon-cyan);
    color: #000;
    padding: 5px 10px;
    font-family: var(--font-code);
    font-weight: bold;
    font-size: 0.8rem;
}

.blog-content {
    padding: 25px;
}

.blog-date {
    display: block;
    color: #666;
    font-size: 0.8rem;
    font-family: var(--font-code);
    margin-bottom: 10px;
}

.blog-content h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.blog-content p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Contact Form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.cyber-form {
    background: rgba(10, 10, 10, 0.5);
    padding: 30px;
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--neon-cyan);
    font-family: var(--font-code);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    padding: 15px;
    color: #fff;
    font-family: var(--font-code);
    transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neon-green);
    outline: none;
    box-shadow: 0 0 10px rgba(10, 255, 0, 0.1);
}

.contact-info {
    border-left: 2px solid #222;
    padding-left: 30px;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: #fff;
}

.contact-info p {
    color: #888;
    font-family: var(--font-code);
    margin-bottom: 10px;
    word-break: break-all;
}

.social-links {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    font-family: var(--font-code);
    transition: 0.2s;
}

.social-links a:hover {
    color: var(--neon-cyan);
    padding-left: 10px;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(120px, 9999px, 140px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 80px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(60px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    40% {
        clip: rect(100px, 9999px, 120px, 0);
    }

    60% {
        clip: rect(30px, 9999px, 50px, 0);
    }

    80% {
        clip: rect(130px, 9999px, 150px, 0);
    }

    100% {
        clip: rect(80px, 9999px, 100px, 0);
    }
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        margin-left: 0;
        padding-left: 20px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-info {
        border-left: none;
        padding-left: 0;
        margin-top: 30px;
        border-top: 2px solid #222;
        padding-top: 30px;
    }
}

/* Chat Bot Widget */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--neon-cyan);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    z-index: 1000;
    transition: 0.3s;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chat-header {
    background: rgba(0, 255, 255, 0.1);
    padding: 15px;
    border-bottom: 1px solid var(--neon-cyan);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 0.9rem;
    font-family: var(--font-code);
}

.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
}

.chat-message.bot {
    align-self: flex-start;
    color: var(--neon-cyan);
}

.chat-message.user {
    align-self: flex-end;
    text-align: right;
    color: #fff;
    margin-left: auto;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

/* Utility Classes */
.d-none {
    display: none !important;
}

/* ============================================================
   RESPONSIVE OVERHAUL — Mobile + Laptop
   ============================================================ */

/* ── Hamburger Nav (Mobile) ──────────────────────────────── */
.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(0,243,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px 10px;
    flex-direction: column;
    gap: 5px;
    z-index: 201;
}
.mobile-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--neon-cyan);
    transition: all 0.3s;
    margin: 0;
}
.mobile-toggle.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active .bar:nth-child(2) { opacity: 0; }
.mobile-toggle.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav dropdown */
.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    background: rgba(5,5,5,0.98);
    border-bottom: 1px solid rgba(0,243,255,0.1);
    backdrop-filter: blur(16px);
    z-index: 200;
    padding: 16px 20px;
    flex-direction: column;
    gap: 4px;
}
.mobile-nav-menu.open { display: flex; }
.mobile-nav-menu a {
    color: #666;
    text-decoration: none;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    padding: 12px 16px;
    border-radius: 6px;
    letter-spacing: 2px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    color: var(--neon-cyan);
    border-color: rgba(0,243,255,0.15);
    background: rgba(0,243,255,0.04);
}

/* ── Global touch improvements ───────────────────────────── */
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-size: 16px !important; } /* Prevents iOS zoom */

/* ── Container padding ───────────────────────────────────── */
.container { padding: 0 clamp(14px, 4vw, 40px); }

/* ── 1024px — Tablet / Small Laptop ─────────────────────── */
@media (max-width: 1024px) {
    .about-grid,
    .contact-wrapper { grid-template-columns: 1fr; gap: 30px; }

    .profile-layout { grid-template-columns: 1fr !important; }

    .billing-grid { grid-template-columns: 1fr !important; }

    .stat-row { grid-template-columns: repeat(3,1fr); }

    .services-grid,
    .portfolio-grid,
    .blog-grid { grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; }
}

/* ── 768px — Mobile ──────────────────────────────────────── */
@media (max-width: 768px) {

    /* Nav */
    .mobile-toggle { display: flex; }
    .desktop-nav { display: none; }

    /* Typography */
    h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
    h2 { font-size: clamp(1.4rem, 6vw, 2rem); }
    h3 { font-size: clamp(1.1rem, 5vw, 1.6rem); }
    .hero-title { font-size: clamp(2rem, 8vw, 3rem); line-height: 1.2; }
    .hero-subtitle { font-size: 0.9rem; }

    /* Section spacing */
    .section { padding: 60px 0; }
    .section-title { font-size: 1.4rem; margin-bottom: 28px; }

    /* Buttons */
    .cyber-btn {
        width: 100%;
        margin-right: 0 !important;
        padding: 14px 20px;
        font-size: 0.82rem;
        justify-content: center;
    }
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Hero */
    .hero-content { text-align: center; padding: 0 4px; }
    .terminal-box { display: none; }

    /* Cards */
    .tool-card, .stat-card, .project-card,
    .blog-card, .cert-item, .service-card {
        padding: 16px;
    }

    /* Grids */
    .services-grid,
    .portfolio-grid,
    .blog-grid,
    .certs-grid { grid-template-columns: 1fr; gap: 16px; }

    /* About */
    .about-grid { grid-template-columns: 1fr; gap: 24px; }
    .timeline { margin-left: 0; padding-left: 24px; }
    .contact-wrapper { grid-template-columns: 1fr; gap: 24px; }
    .contact-info { border-left: none; padding-left: 0; border-top: 1px solid #222; padding-top: 24px; margin-top: 0; }

    /* Dashboard */
    .dashboard-grid { grid-template-columns: 1fr !important; }
    .stats-row { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }

    /* Profile page */
    .profile-layout { grid-template-columns: 1fr !important; gap: 18px !important; }
    .profile-card { position: static !important; }
    .stat-row { grid-template-columns: repeat(3,1fr); gap: 10px; }
    .stat-value { font-size: 1.3rem; }
    .edit-grid-2 { grid-template-columns: 1fr !important; }
    .edit-modal-box { padding: 20px 16px; margin: 0; border-radius: 0; min-height: 100dvh; }
    #edit-modal { padding: 0; }

    /* Billing */
    .billing-wrap { padding-top: 80px; }
    .pay-tabs { gap: 8px; }
    .pay-tab { padding: 12px 8px; font-size: 0.72rem; }
    .card-preview { padding: 18px; }
    .card-preview-number { font-size: 1rem; letter-spacing: 3px; }
    .f-row { grid-template-columns: 1fr; }

    /* Login */
    .login-wrap { padding: 12px !important; }
    .login-card { padding: 28px 20px !important; }
    .otp-boxes { gap: 6px !important; }
    .otp-box { width: 40px !important; height: 50px !important; font-size: 1.2rem !important; }

    /* OTP popup */
    #otp-popup > div { padding: 28px 20px !important; width: 92% !important; }
    #popup-otp-code { font-size: 38px !important; letter-spacing: 8px !important; }

    /* Support page */
    .support-grid { grid-template-columns: 1fr !important; }

    /* Blog */
    .blog-layout { grid-template-columns: 1fr !important; }

    /* Header: prevent overflow on app pages (profile/billing) */
    .header-content { flex-wrap: wrap; gap: 8px; }
    .header-content > div { gap: 8px !important; flex-wrap: wrap; }

    /* Tables */
    .inv-table { font-size: 0.78rem; }
    .inv-table th, .inv-table td { padding: 10px 8px; }
    .cyber-table { font-size: 0.8rem; }
    .cyber-table th, .cyber-table td { padding: 10px 10px; }

    /* Chat widget */
    .chatbot-window { width: calc(100vw - 24px); right: 12px; bottom: 84px; }

    /* Forms */
    .form-group input, .form-group textarea { padding: 12px; }

    /* Header height */
    .cyber-header { padding: 12px 0; }
}

/* ── 480px — Small phones ────────────────────────────────── */
@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }

    .stat-row { grid-template-columns: repeat(3,1fr); gap: 8px; }
    .stat-value { font-size: 1.1rem; }
    .stat-label { font-size: 0.58rem; }
    .stat-item { padding: 12px 8px; }

    .profile-name { font-size: 0.95rem; }
    .profile-role { font-size: 0.68rem; }

    .page-title { font-size: 1.3rem; }
    .bill-block { padding: 18px 14px; }

    .login-card { padding: 24px 14px !important; border-radius: 8px !important; }
    .otp-box { width: 36px !important; height: 46px !important; font-size: 1.1rem !important; }

    /* Section title */
    .section-title { font-size: 1.2rem; padding-left: 14px; }
    .section-title::before { width: 3px; }

    /* Admin banner on profile */
    #admin-banner { flex-wrap: wrap; gap: 8px; font-size: 0.7rem; }

    /* Edit modal actions stack */
    .edit-modal-actions { flex-direction: column-reverse; }
    .btn-cancel-edit { width: 100%; text-align: center; }
}

/* ── Horizontal scroll prevention ───────────────────────── */
html, body { max-width: 100vw; overflow-x: hidden; }

/* ── Smooth scrolling ────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Safe area (iPhone notch) ────────────────────────────── */
@supports (padding: env(safe-area-inset-left)) {
    .container { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
    .cyber-header { padding-top: max(12px, env(safe-area-inset-top)); }
}

