/* Fonts loaded via HTML for performance */
/* Critical CSS moved to index.html for performance */

/* --- Non-Critical Styles (Loaded Async) --- */

/* Glass Panel Utility (Keep if used outside critical path) */
.glass-panel {
    background: linear-gradient(var(--glass-bg), var(--glass-bg)) padding-box,
        var(--glass-border-gradient) border-box;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm), var(--glass-inner-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .glass-panel:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--color-primary);
    }
}

.activity-item {
    background: var(--color-surface);
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .activity-item:hover {
        transform: translateY(-3px);
        border-color: var(--color-secondary);
        box-shadow: var(--shadow-sm);
    }
}

/* News Cards Container */
.news-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.news-item {
    margin-bottom: 0px;
    height: 100%;
}

/* Footer Styles (Fat Footer) */
.site-footer {
    margin-top: 80px;
    padding: 60px 0 20px;
    background: linear-gradient(var(--glass-bg), var(--glass-bg)) padding-box,
        var(--glass-border-gradient) border-box;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid transparent;
    border: 1px solid transparent;
    /* Full border for consistency */
    box-shadow: var(--glass-inner-shadow);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.footer-column p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--color-text-secondary);
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
    text-decoration: none;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-socials a {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    transition: color 0.2s, border-color 0.2s, transform 0.2s, background-color 0.2s;
}

@media (hover: hover) {
    .footer-socials a:hover {
        border-color: var(--color-secondary);
        color: var(--color-secondary);
        transform: translateY(-2px);
        text-decoration: none;
    }
}

.cta-button-small {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

@media (hover: hover) {
    .cta-button-small:hover {
        opacity: 0.9;
        transform: translateY(-2px);
        text-decoration: none;
        color: white;
    }
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.news-item a {
    display: flex;
    flex-direction: column;
    background: linear-gradient(var(--glass-bg), var(--glass-bg)) padding-box,
        var(--glass-border-gradient) border-box;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-shadow: var(--shadow-sm), var(--glass-inner-shadow);
    height: 100%;
    padding: 0;
    overflow: hidden;
}

/* Enhanced Card Hover (Glow) */
/* Enhanced Card Hover (Glow) */
@media (hover: hover) {
    .news-item a:hover {
        transform: translateY(-8px) scale(1.02);
        border-color: var(--color-primary);
        color: var(--color-link);
        /* Soft colored shadow */
        box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.3), 0 10px 10px -5px rgba(59, 130, 246, 0.2), var(--glass-inner-shadow);
        /* Slightly more opaque on hover */
    }
}

/* Spotlight Effect */
.news-item a,
.topic-card,
.activity-item {
    position: relative;
    overflow: hidden;
}

.news-item a::before,
.topic-card::before,
.activity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(37, 99, 235, 0.4),
            /* Increased visibility */
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 20;
    /* Ensure it's on top */
}

@media (hover: hover) {

    .news-item a:hover::before,
    .topic-card:hover::before,
    .activity-item:hover::before {
        opacity: 1;
    }

    .news-item a:hover .news-image img {
        transform: scale(1.08);
    }
}

.news-image {
    height: 160px;
    width: 100%;
    overflow: hidden;
    background-color: #f3f4f6;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item a:hover .news-image img {
    transform: scale(1.08);
}

.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}


/* Restored Hero Section */
.hero {
    position: relative;
    display: block;
    /* Fix CLS: Block display supports padding hack reliably */
    padding: 0;
    margin-bottom: 30px;
}

/* Fix CLS: Reserve space for Navbar */
site-header {
    display: block;
    min-height: 72px;
    position: sticky;
    top: 0;
    z-index: 1001;
}

@media (max-width: 900px) {
    site-header {
        min-height: 64px;
        /* Increased to match potential content size */
    }
}

.hero-banner-wrapper {
    width: 100%;
    /* Bulletproof Aspect Ratio (4:1) */
    height: 0;
    padding-bottom: 25%;
    position: relative;
    background-color: var(--color-surface);
    overflow: hidden;
}

.hero-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    max-width: 960px;
    width: 100%;
    z-index: 2;
    /* Fix CLS: Set initial state to match animation start */
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out forwards;
    margin-top: -80px;
    padding: 0 40px;

    /* Mobile override to match Critical CSS and prevent loading shift */
    @media (max-width: 900px) {
        margin-top: -60px;
    }

    /* Center the content since parent is no longer flex center */
    margin-left: auto;
    margin-right: auto;

    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 30px;
}

.hero-main-row {
    display: flex;
    flex-direction: row;
    /* Changed from flex-end to center to prevent jumps if height varies slightly */
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    width: 100%;
}

.hero-photo-wrapper {
    flex-shrink: 0;
}

.hero-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    /* box-shadow: removed to avoid repaint */
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 0;
    transition: transform 0.3s ease;
    background-color: var(--color-surface);
}

/* GPU-Accelerated Glow */
.hero-photo::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    z-index: -1;
    animation: pulse-glow-gpu 3s infinite ease-in-out;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
}

.hero-photo:hover {
    transform: scale(1.05);
}

.hero-photo:hover::before {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Optimizing Pulse to use Opacity/Transform instead of Box-Shadow */
@keyframes pulse-glow-gpu {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.hero-text-content {
    flex-grow: 1;
    text-align: left;
    padding-bottom: 0;
    margin-top: 85px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}


.hero-title-row {
    margin-bottom: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    /* Liquid Gradient Effect - GPU Optimized */
    background: linear-gradient(to right,
            var(--color-primary),
            var(--color-secondary),
            var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: hue-cycle 10s linear infinite;
    display: inline-block;
    white-space: nowrap;
    /* Fix CLS: Prevent wrapping on desktop */
    will-change: filter;
    /* Fix Hover Shift: Ensure stable width and height */
    line-height: 1.2;
    height: 1.2em;
    /* Lock height to line-height */
    /* FIXED WIDTH to prevent any shift of elements on the right */
    width: 13ch;
    overflow: visible;
}

/* Text Scramble Dud Characters */
.dud {
    color: var(--color-link);
    opacity: 0.5;
    font-family: 'Space Mono', monospace;
    /* Monospace for stable width during scramble */
    font-weight: 400;
}

@keyframes hue-cycle {
    from {
        filter: hue-rotate(0deg);
    }

    to {
        filter: hue-rotate(360deg);
    }
}

.typing-wrapper {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    min-height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0;
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s ease-in-out infinite;
    color: var(--color-link);
    margin-left: 2px;
    font-weight: 200;
}

.hero-socials {
    margin-top: -8px;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

/* Fix for Huge Icons */
.hero-socials .icon-svg,
.hero-socials svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
    fill: var(--color-text-secondary);
    /* Ensure visibility */
}

.hero-socials a:hover .icon-svg,
.hero-socials a:hover svg {
    transform: translateY(-3px);
    fill: var(--color-link);
}


/* Footer & Bottom Links */
footer {
    padding-top: 0;
    margin-top: 60px;
    border-top: none;
}

.footer-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 20px;
    color: var(--color-text-secondary);
}

.footer-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-brand {
    font-family: var(--font-header);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 5px;
    display: block;
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
}

.footer-heading {
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links-list a {
    color: var(--color-text-secondary);
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.footer-links-list a:hover {
    color: var(--color-link);
    transform: translateX(3px);
    text-decoration: none;
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.footer-socials .icon-svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(150, 150, 150, 0.1);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-links-list a:hover {
        transform: none;
    }
}

/* Responsive Design */
/* Responsive Design - Increased Breakpoint for safety */
@media (max-width: 900px) {
    .container {
        padding: 0;
        width: 100%;
        margin-top: 0;
        overflow-x: hidden;
    }

    .content-wrapper {
        margin: 0;
        padding: 20px 10px;
        width: 100%;
    }

    .theme-toggle-wrapper {
        top: 15px;
        right: 15px;
    }

    .hero-title {
        font-size: 2rem;
        word-wrap: break-word;
        white-space: normal;
        /* Force wrapping on mobile */
        /* Fix CLS: Reserve height for 2 lines if needed or lock line-height */
        line-height: 1.3;
        min-height: 2.6em;
        /* Increased slightly for safety */
        /* Reserve space for 2 lines if wrapping occurs */
        display: block;
        /* Ensure block layout */
        margin-bottom: 20px;
    }

    .typing-wrapper {
        min-height: 32px;
        /* Increased lock height in pixels for stability */
    }

    .hero-content {
        margin-top: -60px;
        padding: 0 10px;
        width: 100%;
        overflow-x: hidden;
    }

    .hero-photo {
        width: 140px;
        height: 140px;
        border-width: 3px;
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    }

    .hero-main-row {
        display: flex !important;
        flex-direction: column !important;
        /* FORCE VERTICAL STACK */
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 15px;
        width: 100% !important;
    }

    .hero-text-content {
        margin-top: 10px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        gap: 0px !important;
        /* Minimal gap */
    }


    .hero-socials {
        justify-content: center !important;
        /* Force Center */
        margin-top: 15px;
        width: 100%;
    }


    .section {
        flex-direction: column;
        gap: 15px;
    }

    .section-label {
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
        font-size: 1.25rem;
        color: var(--color-text-primary);
        padding-right: 0;
    }

    .section-content {
        padding-left: 0;
    }

    .news-cards-container {
        grid-template-columns: 1fr;
        /* Single column on mobile */
    }

    /* Fix Mobile Layout Shift: Disable entrance animations on hero elements */
    .hero-text-content,
    .hero-title,
    .hero-subtitle,
    .typing-wrapper,
    .hero-photo,
    .hero-socials {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Roles List Styling */
.roles-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 30px;
}

.roles-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.roles-list li strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.roles-list li::before {
    content: "";
    /* Custom Bullet: Square */
    position: absolute;
    left: 0;
    top: 10px;
    /* Center vertically with first line */
    width: 8px;
    height: 8px;
    background-color: var(--color-link);
    /* Use brand color */
    border-radius: 2px;
    /* Slight rounding */
    transform: translateY(-50%);
}

/* --- Futuristic Upgrades --- */

/* Neon Glows (Dark Mode Only) */
[data-theme="dark"] .news-item a:hover .news-content,
[data-theme="dark"] .news-item:hover,
[data-theme="dark"] .skill-tag:hover,
[data-theme="dark"] #theme-toggle:hover,
[data-theme="dark"] #scroll-top:hover {
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    border-color: var(--color-link);
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

[data-theme="dark"] .hero-photo {
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
    border-color: var(--color-link);
}

/* Glitch Effect Keyframes (Subtle Shake) */
@keyframes glitch-anim {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

.hero-title:hover {
    animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both;
    color: var(--color-link);
    text-shadow: 2px 2px var(--color-surface), -2px -2px #ff00de;
    cursor: default;
}

/* Typewriter Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--color-link);
    animation: blink 1s step-end infinite;
}

/* Navbar Styles */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
    margin-bottom: 0px;
    /* Reduced from 20px */
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-top: none;
    /* Blend with top */
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.navbar-brand {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text-primary);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.navbar-link {
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color 0.2s;
    position: relative;
    padding: 5px 0;
}

.navbar-link:hover {
    color: var(--color-link);
    text-decoration: none;
}

.navbar-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0px;
    left: 0;
    background-color: var(--color-link);
    transition: width 0.3s;
}

.navbar-link:hover::after {
    width: 100%;
}

/* Navbar Theme Toggle */
.nav-theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    transition: transform 0.2s;
}

.nav-theme-toggle:hover {
    transform: scale(1.1);
}

/* Hamburger Menu Toggle */
.navbar-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    position: relative;
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: all 0.3s ease-in-out;
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(8px);
}

/* Hamburger Active State */
.navbar-toggle.active .hamburger {
    background-color: transparent;
}

.navbar-toggle.active .hamburger::before {
    transform: rotate(45deg);
}

.navbar-toggle.active .hamburger::after {
    transform: rotate(-45deg);
}


/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-surface);
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 20px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        /* Hidden by default */
        transition: clip-path 0.4s ease-in-out;
        opacity: 0;
    }

    .navbar-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 1;
    }

    .navbar-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 15px;
    }

    .navbar-link {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .nav-theme-toggle {
        margin-top: 10px;
        font-size: 1.5rem;
        background-color: var(--color-bg);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        box-shadow: var(--shadow-sm);
    }
}



@keyframes blink {

    from,
    to {
        opacity: 1
    }

    50% {
        opacity: 0
    }
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Footer Styles (Fat Footer) */
.site-footer {
    margin-top: 80px;
    padding: 60px 0 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.footer-column p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--color-text-secondary);
    transition: color 0.2s, transform 0.2s;
    /* Use transform instead of padding */
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
    text-decoration: none;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-socials a {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    transition: transform 0.2s, color 0.2s, border-color 0.2s, background-color 0.2s;
}

.footer-socials a:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-2px);
    text-decoration: none;
}

.cta-button-small {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.cta-button-small:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* --- Command Palette Styles --- */
.cmd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cmd-overlay.active {
    opacity: 1;
}

.cmd-modal {
    width: 100%;
    max-width: 600px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 80vh;
}

.cmd-modal.active {
    transform: scale(1);
}

.cmd-input {
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
    border: none;
    background: transparent;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
    outline: none;
    font-family: var(--font-primary);
}

.cmd-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    overflow-y: auto;
    max-height: 400px;
}

.cmd-section-header {
    padding: 8px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    font-weight: 600;
    margin-top: 5px;
}

.cmd-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.1s ease;
    color: var(--color-text-primary);
    font-weight: 500;
}

.cmd-item.selected,
.cmd-item:hover {
    background: rgba(var(--color-primary), 0.1);
    background-color: var(--color-bg);
    /* Fallback or contrast */
    border-left: 3px solid var(--color-primary);
}

/* Dark mode adjustment for selection */
[data-theme="dark"] .cmd-item.selected,
[data-theme="dark"] .cmd-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.cmd-icon {
    margin-right: 15px;
    font-size: 1.2rem;
    opacity: 0.8;
}

.cmd-hints {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--color-border);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.cmd-hints kbd {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 2px 5px;
    font-family: monospace;
    font-size: 0.7rem;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.cmd-empty {
    padding: 30px;
    text-align: center;
    color: var(--color-text-secondary);
}

/* --- Command Palette Hints --- */
.nav-cmd-badge {
    display: none;
    /* Hidden on mobile by default */
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    margin-right: 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .nav-cmd-badge {
        display: flex;
    }
}

.nav-cmd-badge:hover {
    background: rgba(var(--color-primary), 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.hero-cmd-hint {
    margin-top: 15px;
    font-family: 'Space Mono', monospace;
    /* Tech font */
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-block;

    @media (max-width: 900px) {
        display: none;
    }
}

.hero-cmd-hint:hover {
    opacity: 1;
    color: var(--color-primary);
}

.hero-cmd-hint kbd {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-family: inherit;
}

[data-theme="dark"] .hero-cmd-hint kbd {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Status Bar Capsule --- */
.status-capsule {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 999px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    font-family: 'Space Mono', monospace;
    /* Tech vibe */
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(100px);
    /* Hidden initially for animation */
    opacity: 0;
    animation: slideUp 0.8s 1s forwards;
    /* Delay for boot effect */
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.status-capsule:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-separator {
    width: 1px;
    height: 12px;
    background: var(--color-border);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    /* Green 500 */
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.status-text {
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-icon {
    font-size: 0.9rem;
}

/* Specific mono font import if needed, or fallback */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

/* Mobile adjustment — layout handled by status-bar.js inline styles */
@media (max-width: 640px) {
    .status-capsule {
        /* Only the animation differs on mobile — JS handles position/size */
        animation: slideUpMobile 0.8s 1s forwards;
    }

    .status-capsule .status-separator {
        display: none;
        /* Remove separators on mobile */
    }

    @keyframes slideUpMobile {
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* --- Smart Cursor --- */
/* Hide default cursor only on non-touch devices */
@media (hover: hover) and (pointer: fine) {

    body,
    a,
    button,
    input,
    textarea,
    .card-hover {
        cursor: none !important;
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    /* Centered */
    border-radius: 50%;
    z-index: 10001;
    /* Above Command Palette overlay */
    pointer-events: none;
    /* Pass through clicks */
    display: none;
    /* Hidden on touch by default */
}

@media (hover: hover) and (pointer: fine) {

    .cursor-dot,
    .cursor-outline {
        display: block;
    }
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(var(--color-primary), 0.5);
    /* Try to map hex to rgba if var is hex, or just use a fixed color closely matching */
    border-color: var(--color-primary);
    opacity: 0.5;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    /* Transformation is handled by JS for position */
    margin-left: -20px;
    /* Offset to center relative to Top/Left 0 */
    margin-top: -20px;
}

/* JS sets transform: translate(x, y). The margin above attempts to center it, 
   but since we use translate in JS, we should handle centering there or here. 
   JS sets top/left to 0 and translates to x,y. 
   If width is 40, to center on x,y we need translate(x - 20, y - 20).
   The JS currently does `translate(x, y)`.
   So we need `left: -20px; top: -20px;` in CSS? 
   No, let's fix JS logic OR adjust CSS. 
   My JS logic was: `translate(${this.mouse.x}px, ${this.mouse.y}px)`.
   If I want center, I should do `translate(${this.mouse.x - width/2}px...)`.
   Easiest is to keep JS simple and use `transform: translate(-50%, -50%)`?
   BUT JS overwrites `transform`.
   So I will use `margin-left: -20px` etc.
   Wait, JS writes `transform: translate(...)`.
   So `transform: translate(-50%, -50%)` in CSS is overwritten.
   I will remove `margin` here and assumes JS *should* handle offset, OR I rely on `margin` to offset the origin!
   Yes, `top: 0; left: 0; margin-left: -20px; margin-top: -20px;` combined with `transform: translate(x, y)` works.
*/

.cursor-dot {
    margin-left: -4px;
    margin-top: -4px;
}

.cursor-outline.hovering {
    width: 60px;
    height: 60px;
    background-color: rgba(37, 99, 235, 0.1);
    /* Light blue tint */
    border-color: transparent;
    margin-left: -30px;
    margin-top: -30px;
}

[data-theme="dark"] .cursor-outline.hovering {
    background-color: rgba(124, 58, 237, 0.1);
    /* Violet tint */
}

/* --- Text Scramble Effect --- */
.dud {
    color: var(--color-text-secondary);
    opacity: 0.7;
    font-family: 'Space Mono', monospace;
    /* Tech vibe for scrambled chars */
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    /* Neutral gray opacity */
    border-radius: 4px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
    /* Brand color on hover */
}

/* --- System Boot Loader --- */
#boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--color-primary);
    font-family: 'Space Mono', monospace;
    transition: opacity 0.5s ease-out;
}

.boot-container {
    width: 300px;
    text-align: center;
}

#boot-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: blink-text 0.1s infinite;
}

.boot-bar {
    width: 100%;
    height: 4px;
    background: #111;
    border-radius: 2px;
    overflow: hidden;
}

.boot-progress {
    width: 0%;
    height: 100%;
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}

@keyframes blink-text {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* --- Glitch Button Effect --- */
.cta-button-small {
    display: inline-block;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-header);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.cta-button-small:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Glitch Animation */
.cta-button-small::before,
.cta-button-small::after {
    content: 'Get in Touch';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    opacity: 0.8;
    display: flex;
    /* Center text */
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    /* Match parent */
}

.cta-button-small::before {
    color: #0ff;
    z-index: -1;
    left: 2px;
}

.cta-button-small::after {
    color: #f0f;
    z-index: -2;
    left: -2px;
}

.cta-button-small:hover::before {
    animation: glitch-anim-1 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

.cta-button-small:hover::after {
    animation: glitch-anim-2 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
        transform: translate(-2px, 0);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(2px, 0);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
        transform: translate(-2px, 0);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(2px, 0);
    }

    80% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-2px, 0);
    }

    100% {
        clip-path: inset(30% 0 30% 0);
        transform: translate(2px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(2px, 0);
    }

    20% {
        clip-path: inset(30% 0 20% 0);
        transform: translate(-2px, 0);
    }

    40% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(2px, 0);
    }

    60% {
        clip-path: inset(20% 0 50% 0);
        transform: translate(-2px, 0);
    }

    80% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(2px, 0);
    }

    100% {
        clip-path: inset(0 0 80% 0);
        transform: translate(-2px, 0);
    }
}

/* --- PERFORMANCE OVERRIDES --- */
/* Force GPU-only transitions to eliminate "Non-composited animations" warnings */
.skill-tag,
.activity-item,
.hero-photo,
.news-item a,
.footer-socials a,
.navbar-link,
button,
.cta-button-small {
    transition-property: transform, opacity, filter !important;
    /* Disable border-color, color, box-shadow transitions */
}

/* Static SEO nav - minimal footer navigation for crawlers */
.seo-nav {
    text-align: center;
    padding: 10px 0;
    font-size: 0.85rem;
}

.seo-nav a {
    color: var(--color-link);
    margin: 0 8px;
}