/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    /* Dark Theme (Default) */
    --bg-color: #0b1015;
    /* Slightly bluer black */
    --card-bg: rgba(20, 30, 40, 0.7);
    --text-main: #e6f1ff;
    --text-muted: #8892b0;
    --accent-primary: #00e5ff;
    /* Cyber Cyan (Defender) */
    --accent-secondary: #0077ff;
    /* Royal Blue */
    --accent-alert: #ffae00;
    /* Warning Orange (Alert) instead of Red (Breach) */
    --border-color: rgba(0, 229, 255, 0.2);
    --navbar-bg: rgba(11, 16, 21, 0.9);
    --terminal-head: #1a1a1a;
    --font-heading: 'Fira Code', monospace;
    --font-body: 'Inter', sans-serif;
    --scan-line-opacity: 0.03;
}

[data-theme="light"] {
    /* Light Theme (Secure Lab) - Clean & Bright */
    --bg-color: #ffffff;
    /* Pure White background */
    --card-bg: rgba(240, 249, 255, 0.9);
    /* Very subtle blue tint */
    --text-main: #0a1929;
    /* Darker Navy for contrast */
    --text-muted: #50657e;
    --accent-primary: #0066cc;
    /* Stronger Blue */
    --accent-secondary: #00ccff;
    /* Bright Cyan highlights */
    --accent-alert: #d64545;
    --border-color: rgba(0, 102, 204, 0.15);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --terminal-head: #f0f0f0;
    --scan-line-opacity: 0;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

/* =========================================
   UTILITIES & ANIMATIONS
   ========================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px;
}

.hash {
    color: var(--accent-primary);
}

.bracket {
    color: var(--accent-secondary);
}

/* Glitch Effect */
.glitch {
    position: relative;
    font-family: var(--font-heading);
    color: var(--text-main);
}

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

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

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

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

    5% {
        clip: rect(70px, 9999px, 71px, 0);
    }

    10% {
        clip: rect(29px, 9999px, 83px, 0);
    }

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

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

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

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

/* Blink */
.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* =========================================
   COMPONENTS
   ========================================= */
/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.primary-btn {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

.primary-btn:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

.secondary-btn {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.secondary-btn:hover {
    background: var(--accent-secondary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

/* Card Glass */
.card-glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 2px;
    /* Inner spacing */
    position: relative;
    overflow: hidden;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
    /* CSS Fallback: Force fade out after 5s if JS fails */
    animation: fadeOutLoader 1s ease-in-out 4s forwards;
    pointer-events: none;
    /* Allows clicking through even if opacity is 0 but display is block */
}

@keyframes fadeOutLoader {
    0% {
        opacity: 1;
    }

    99% {
        opacity: 0;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

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

.terminal-loader {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: #333;
    margin: 0 auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    width: 0;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--navbar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 2px;
}

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

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

.nav-item:hover {
    color: var(--accent-primary);
}

.nav-item::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--accent-primary);
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover::before {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #333;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    font-size: 12px;
}

.slider.round {
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-secondary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* =========================================
   SECTIONS
   ========================================= */

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 60px;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 20px;
}

.profile-frame {
    position: relative;
    width: 280px;
    height: 280px;
    padding: 10px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.profile-img {
    display: none;
    /* Hide image if present */
}

.profile-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-color);
    /* Adaptive bg */
    border: 1px solid var(--border-color);
    font-size: 7rem;
    color: var(--text-muted);
    transition: all 0.5s ease;
}

.profile-frame:hover .profile-avatar {
    color: var(--accent-primary);
    text-shadow: 0 0 25px var(--accent-primary);
    transform: scale(1.05);
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    animation: scan 3s infinite linear;
    z-index: 5;
    opacity: 0.7;
}

@keyframes scan {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

.corner-decor {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    transition: all 0.3s;
}

.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.hero-text {
    max-width: 600px;
}

.role-badge {
    font-family: var(--font-heading);
    color: var(--accent-secondary);
    font-size: 1rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
    font-weight: 700;
}

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

.cta-group {
    display: flex;
    gap: 20px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    opacity: 0.7;
}

.mouse {
    width: 20px;
    height: 35px;
    border: 1px solid var(--text-muted);
    border-radius: 10px;
    display: block;
    margin: 0 auto 5px;
    position: relative;
}

.wheel {
    width: 2px;
    height: 6px;
    background: var(--text-muted);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* About (Terminal) */
.section-header {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-main);
}

.terminal-window {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid #333;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: var(--font-heading);
    overflow: hidden;
}

.terminal-header {
    background: var(--terminal-head);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-header .buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.terminal-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.close {
    background: #ff5f56;
}

.minimize {
    background: #ffbd2e;
}

.maximize {
    background: #27c93f;
}

.terminal-header .title {
    color: #888;
    font-size: 0.8rem;
}

.terminal-body {
    padding: 20px;
    color: #ccc;
    min-height: 200px;
}

.command {
    margin-bottom: 15px;
}

.prompt {
    color: var(--accent-primary);
    margin-right: 10px;
}

.highlight {
    color: var(--accent-secondary);
    font-weight: 600;
}

/* Experience (Timeline) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

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

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 2;
    transition: background 0.3s;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-primary);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 10px;
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 5px;
    border-left: 3px solid var(--accent-primary);
}

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

.timeline-content h4 {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.job-details {
    list-style: none;
}

.job-details li {
    font-size: 0.95rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
}

.job-details li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.job-details strong {
    color: var(--text-main);
    font-weight: 600;
}

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

.skill-category {
    padding: 25px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
}

/* Featured Project (AEGIS) */
.project-featured {
    grid-column: 1 / -1;
    border: 1px solid var(--accent-primary);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.05) 0%, var(--card-bg) 50%, rgba(0, 119, 255, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.project-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    animation: featured-scan 4s linear infinite;
}

@keyframes featured-scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.project-featured:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.15), 0 10px 40px rgba(0, 0, 0, 0.3);
}

.project-featured .cat-header i {
    font-size: 2.5rem;
}

.project-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--accent-primary);
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.project-featured-badge i {
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

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

.project-role {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent-secondary);
    letter-spacing: 1px;
    display: block;
    margin-top: 2px;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 20px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
}

.project-link-btn:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.project-live-dot {
    width: 8px;
    height: 8px;
    background: #27c93f;
    border-radius: 50%;
    display: inline-block;
    animation: live-blink 1.5s infinite;
    box-shadow: 0 0 6px #27c93f;
}

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

/* Project Preview Thumbnails */
.project-card {
    padding: 0;
    overflow: hidden;
}

.project-card .cat-header,
.project-card p,
.project-card .skill-tags {
    padding-left: 25px;
    padding-right: 25px;
}

.project-card .cat-header {
    padding-top: 20px;
}

.project-card .skill-tags {
    padding-bottom: 25px;
}

.project-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px) brightness(0.7);
    transition: transform 0.5s ease, filter 0.4s ease;
}

.project-preview:hover img {
    transform: scale(1.05);
    filter: blur(4px) brightness(0.3);
}

.project-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.project-preview::after {
    content: '[ CLASSIFIED ]';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 4px;
    color: rgba(0, 229, 255, 0.35);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-preview:hover::after {
    opacity: 0;
}

.project-preview:hover .project-preview-overlay {
    opacity: 1;
}

.project-preview-overlay i {
    font-size: 2rem;
    color: var(--accent-primary);
    text-shadow: 0 0 15px var(--accent-primary);
}

.project-preview-overlay span {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent-primary);
    letter-spacing: 2px;
    border: 1px solid var(--accent-primary);
    padding: 4px 14px;
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.08);
}

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

.cat-header i {
    font-size: 2rem;
    color: var(--accent-secondary);
}

.cat-header h3 {
    font-family: var(--font-heading);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.3s;
}

[data-theme="light"] .skill-tags span {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.skill-tags span:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 255, 65, 0.05);
}

/* Tech Stack Showcase */
.tech-stack-showcase {
    margin-top: 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.tech-stack-title {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--accent-primary);
    margin-bottom: 25px;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 20px;
    justify-items: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    width: 100%;
}

[data-theme="light"] .tech-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.tech-item i, .tech-item img {
    font-size: 3rem;
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    color: #8892b0;
    transition: all 0.4s ease;
    filter: grayscale(100%) opacity(0.7);
}

[data-theme="light"] .tech-item i {
    color: #64748b;
}

.tech-item .tech-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.4s ease;
}

.tech-item:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glow-color);
    box-shadow: 0 10px 20px -5px var(--glow-color);
}

[data-theme="light"] .tech-item:hover {
    background: #ffffff;
}

.tech-item:hover i, .tech-item:hover img {
    color: var(--glow-color);
    filter: grayscale(0%) opacity(1) drop-shadow(0 0 8px var(--glow-color));
}

.tech-item:hover .tech-name {
    color: var(--text-primary);
}

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

.cert-card {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.cert-card:hover {
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
    border-color: var(--accent-primary);
}

.cert-icon {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    min-width: 40px;
    height: 40px;
    background: rgba(0, 243, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.cert-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cert-info .issuer {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cert-info .year {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-family: var(--font-heading);
    display: block;
    margin-top: 5px;
}

/* Contact */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

.contact-info,
.contact-form-mock {
    flex: 1;
    padding: 40px;
    min-width: 300px;
}

.contact-info {
    background: var(--bg-color);
    /* Adaptive background */
    border-right: 1px solid var(--border-color);
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateX(10px);
    color: var(--accent-secondary);
}

.contact-item i {
    font-size: 1.2rem;
}

.contact-form-mock {
    background: transparent;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-heading);
}

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

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: var(--bg-color);
    /* Adaptive input bg */
    border: 1px solid var(--border-color);
    /* Adaptive border */
    padding: 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    border-radius: 4px;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.full-width {
    width: 100%;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 50px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
        /* simple generic mobile hide for now, enhanced via JS/CSS if needed but keeping SIMPLE */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--navbar-bg);
        flex-direction: column;
        padding: 20px;
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links.active {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .profile-frame {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    .cta-group {
        justify-content: center;
    }

    .contact-wrapper {
        flex-direction: column;
    }
}

/* =========================================
   SECURITY MODAL
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeInOverlay 0.4s forwards;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.modal-content {
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
    background: var(--bg-color);
    /* Updated to adaptive var */
    text-align: center;
    border-radius: 12px;

    /* Initial State */
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition-delay: 0.1s;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.modal-header h3 {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    letter-spacing: 2px;
}

.modal-body p {
    color: var(--accent-alert);
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.status-msg {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    margin: 15px 0;
    min-height: 20px;
    color: var(--text-muted);
}

.status-msg.success {
    color: var(--accent-primary);
}

.status-msg.error {
    color: var(--accent-alert);
}

.modal-footer {
    margin-top: 15px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--accent-alert);
}

/* Button Scan Animation */
@keyframes scan-sweep {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.btn-scanning {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.5), transparent) !important;
    background-size: 200% 100% !important;
    background-color: var(--bg-color) !important;
    color: var(--accent-primary) !important;
    animation: scan-sweep 1.5s linear infinite;
    pointer-events: none;
    border-color: var(--accent-primary) !important;
    text-shadow: 0 0 5px var(--accent-primary);
}

/* =========================================
   CERT CARD - CLICKABLE ENHANCEMENTS
   ========================================= */
.cert-card[data-cert-img] {
    cursor: pointer;
    position: relative;
}

.cert-view-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.cert-card:hover .cert-view-hint {
    opacity: 1;
    transform: scale(1);
    color: var(--accent-primary);
    text-shadow: 0 0 8px var(--accent-primary);
}

.cert-card[data-cert-img]:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15), 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* =========================================
   CERTIFICATE LIGHTBOX
   ========================================= */
.cert-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cert-lightbox-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeInOverlay 0.4s forwards;
}

.cert-lightbox-content {
    width: 95%;
    max-width: 900px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.12), 0 0 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cert-lightbox-overlay.active .cert-lightbox-content {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition-delay: 0.1s;
}

/* Header */
.cert-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
}

.cert-lightbox-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.cert-lightbox-title i {
    font-size: 1.1rem;
}

.cert-lightbox-controls {
    display: flex;
    gap: 8px;
}

.cert-ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.cert-ctrl-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.cert-close-btn:hover {
    background: rgba(255, 69, 58, 0.15);
    border-color: #ff453a;
    color: #ff453a;
}

/* Body */
.cert-lightbox-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    min-height: 0;
    overflow: hidden;
}

.cert-lightbox-img-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-height: calc(92vh - 120px);
    overflow: auto;
}

#cert-lightbox-img {
    max-width: 100%;
    max-height: calc(92vh - 140px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

#cert-lightbox-img.loaded {
    opacity: 1;
}

/* Loading */
.cert-lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
}

.cert-lightbox-loading i {
    font-size: 2rem;
}

.cert-lightbox-loading.hidden {
    display: none;
}

/* Nav Buttons */
.cert-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    flex-shrink: 0;
    margin: 0 8px;
}

.cert-nav-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    transform: scale(1.1);
}

/* Footer */
.cert-lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
}

#cert-lightbox-counter {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.cert-lightbox-hint {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Lightbox Responsive */
@media (max-width: 768px) {
    .cert-lightbox-content {
        width: 98%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .cert-lightbox-body {
        padding: 10px;
    }

    .cert-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        margin: 0 4px;
    }

    .cert-lightbox-header {
        padding: 10px 14px;
    }

    .cert-lightbox-title span {
        font-size: 0.7rem;
    }

    .cert-lightbox-hint {
        display: none;
    }

    #cert-lightbox-img {
        max-height: calc(95vh - 130px);
    }
}