:root {
    --bg-primary: #000000;
    /* Deep Black Background */
    --bg-secondary: #2e3440;
    /* Nordic Dark Grey */
    --bg-tertiary: #3b4252;
    /* Nordic Base Grey */

    --text-primary: #d8dee9;
    /* Nordic Snow White */
    --text-secondary: #919aac;
    /* Nordic Polar Grey */

    /* Nordic Frost Palette (Cool Tones) */
    --color-keyword: #81a1c1;
    /* Ice Blue (Keywords, Links, Buttons) */
    --color-function: #88c0d0;
    /* Cyan (Functions, Headings) */
    --color-type: #5e81ac;
    /* Deep Blue (Types, Classes, Main Title) */
    --color-string: #a3be8c;
    /* Mint Green (Strings, Subtitles) */
    --color-constant: #b48ead;
    /* Muted Purple (Constants - kept subtle) */
    --color-argument: #8fbcbb;
    /* Teal (Arguments, Tags) */

    --accent: var(--color-keyword);
    /* Main Accent (Ice Blue) */
    --accent-tint: rgba(129, 161, 193, 0.1);
    --white: #d8dee9;

    --font-heading: 'Fira Code', monospace;
    --font-body: 'Fira Code', monospace;

    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-function);
    /* Cyan for Functions/Headings */
    font-weight: 600;
    line-height: 1.1;
}

h1 {
    color: var(--color-type);
    /* Deep Blue for Main Class/Type */
}

a {
    text-decoration: none;
    color: var(--color-keyword);
    /* Ice Blue for Links/Keywords */
    transition: var(--transition);
}

a:hover {
    color: var(--color-function);
    /* Cyan on Hover */
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

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

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent);
    /* Solid turquoise */
    color: var(--bg-primary);
    /* Dark text */
    border: 1px solid var(--accent);
    font-weight: 700;
    /* Bolder text */
    box-shadow: 0 4px 14px rgba(100, 255, 218, 0.4);
    /* Glow effect */
}

.btn-primary:hover {
    background-color: var(--accent-tint);
    color: var(--accent);
    /* Invert on hover */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--white);
    border: 1px solid var(--bg-tertiary);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.btn-white {
    background-color: var(--white);
    color: var(--bg-primary);
    border: 1px solid var(--white);
}

.btn-white:hover {
    background-color: transparent;
    color: var(--white);
}

/* Header */
.site-header {
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    height: 80px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    /* Increased max-width to give more room */
    padding: 0 20px;
    /* Ensure padding on sides */
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-keyword);
    /* Keyword style for Logo */
    letter-spacing: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav ul {
    display: flex;
    gap: 20px;
    /* Reduced gap to prevent overlap */
    align-items: center;
    /* Ensure vertical center */
}

.main-nav a {
    font-size: 13px;
    /* Slightly smaller for better fit */
    color: var(--text-secondary);
    /* Softer default color */
    font-family: var(--font-heading);
    position: relative;
    padding: 10px 0;
    /* Increased vertical padding for better hit area and centering */
    transition: color 0.3s ease;
    display: inline-block;
    /* Ensure transforms work well */
    line-height: 1.2;
    /* Tighter line height for multi-line if needed, though we want single line */
    white-space: nowrap;
    /* Prevent wrapping */
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 5px;
    /* Adjust position */
    left: 0;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(100, 255, 218, 0.4);
    /* Subtle glow */
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

/* Language Switch */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-family: var(--font-heading);
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 700;
    padding: 4px 8px;
    transition: var(--transition);
    border-radius: 4px;
}

.lang-btn.active {
    color: var(--bg-primary);
    background-color: var(--accent);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

.lang-btn:hover:not(.active) {
    color: var(--white);
}

.divider {
    opacity: 0.5;
    color: var(--text-secondary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

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

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 40px;
    /* Reduced from 60px to fit single line */
    margin-bottom: 10px;
    color: var(--white);
    white-space: nowrap;
    /* Force single line */
}

.hero-text h2 {
    font-size: 24px;
    color: var(--color-string);
    /* Mint Green for Strings/Subtitles */
    font-weight: 400;
    margin-bottom: 25px;
    font-family: var(--font-body);
    white-space: nowrap;
    /* Force single line */
}

.hero-text p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 40px;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-image-container {
    position: relative;
    overflow: hidden;
    /* Contain scanlines */
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(129, 161, 193, 0.2);
    /* Subtle Ice Blue Glow */
    transition: var(--transition);
    animation: pulse-glow 4s infinite alternate;
    /* Continuous Pulse */
    max-width: 350px;
    /* Reduced size */
    margin: 0 auto;
    /* Center it */
}

.hero-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-keyword);
    /* Ice Blue Border */
    border-radius: 8px;
    z-index: 2;
    transition: var(--transition);
    pointer-events: none;
}

/* Scanline Effect */
.hero-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    transition: var(--transition);
    /* Radar Sweep Effect */
    background: linear-gradient(to bottom,
            transparent,
            rgba(136, 192, 208, 0.8) 50%,
            /* Bright Cyan Line */
            transparent);
    background-size: 100% 50px;
    /* Height of the sweep bar */
    background-repeat: no-repeat;
    animation: radar-sweep 3s linear infinite;
    /* Fast sweep */
}

.hero-image-container:hover {
    box-shadow: 0 0 30px rgba(136, 192, 208, 0.4);
    /* Stronger Cyan Glow */
    transform: scale(1.02);
}

.hero-image-container:hover::after {
    opacity: 0;
    /* Remove scanlines on hover */
}

.hero-img {
    border-radius: 8px;
    /* Holographic Filter: Sepia + Blue Hue + Saturation */
    filter: sepia(1) hue-rotate(180deg) saturate(2) opacity(0.9);
    transition: var(--transition);
    display: block;
    width: 100%;
    /* Ensure it fills container */
}

.hero-image-container:hover .hero-img {
    filter: none;
    /* Full color on hover */
    opacity: 1;
}

/* About Section */
.bg-dark-alt {
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.about-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--accent);
    margin-top: 10px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 18px;
}

.academic-profiles {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.academic-profiles img {
    height: 60px;
    /* Increased size */
    width: auto;
    opacity: 0.8;
    transition: var(--transition);
    border-radius: 4px;
    /* Slight rounding for better look */
}

.academic-profiles img:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* About Image Tech Frame */
.about-image-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.tech-frame {
    position: relative;
    padding: 4px;
    /* Space for the border */
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary));
    /* Cover the center */
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
}

/* Rotating Energy Border */
.tech-frame::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            var(--color-keyword),
            transparent 30%);
    animation: rotate-border 4s linear infinite;
    z-index: -1;
}

/* Inner Background to hide the center of the conic gradient */
.tech-frame::after {
    content: '';
    position: absolute;
    inset: 4px;
    /* Match padding */
    background: var(--bg-secondary);
    border-radius: 6px;
    z-index: -1;
}

.about-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    /* Match inner radius */
    filter: grayscale(20%) contrast(1.1);
    transition: var(--transition);
    position: relative;
    z-index: 2;
    /* Above the background */
}

.tech-frame:hover .about-img {
    filter: none;
}

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

.card {
    background-color: rgba(255, 255, 255, 0.03);
    /* Lighter, semi-transparent background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border */
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Base shadow */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    /* Enhanced hover shadow */
    border-color: var(--accent);
    /* Highlight border on hover */
    background-color: rgba(255, 255, 255, 0.05);
    /* Slightly lighter on hover */
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tag {
    font-family: var(--font-heading);
    color: var(--color-argument);
    /* Teal for Tags/Arguments */
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--white);
}

.card p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    text-decoration: underline;
}

/* AI Section */
.ai-section {
    position: relative;
    overflow: hidden;
}

.ai-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    background-image:
        linear-gradient(rgba(64, 224, 208, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(64, 224, 208, 0.3) 1px, transparent 1px),
        linear-gradient(rgba(100, 255, 218, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(64, 224, 208, 0.25) 0%, transparent 70%);
    background-size:
        40px 40px,
        40px 40px,
        60px 60px,
        60px 60px,
        100% 100%;
    background-position:
        0 0,
        0 0,
        0 0,
        0 0,
        center;
    opacity: 1;
    z-index: 0;
    animation: grid-move 15s linear infinite;
}

@keyframes grid-move {
    0% {
        background-position:
            0 0,
            0 0,
            0 0,
            0 0,
            center;
    }

    100% {
        background-position:
            40px 40px,
            40px 40px,
            -60px -60px,
            -60px -60px,
            center;
    }
}

.relative {
    position: relative;
}

.z-10 {
    z-index: 10;
}

.split-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.split-content {
    max-width: 700px;
}

.split-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.split-content p {
    font-size: 20px;
    margin-bottom: 40px;
    color: var(--text-primary);
}

/* Analysis Section */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.analysis-featured {
    max-width: 900px;
    margin: 0 auto 60px;
}

.featured-card {
    flex-direction: row;
    align-items: center;
}

.featured-card .card-image-large {
    width: 50%;
    height: 350px;
    overflow: hidden;
}

.featured-card .card-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card .card-content {
    width: 50%;
    padding: 40px;
}

.media-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.media-item {
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.media-item:hover img {
    transform: scale(1.05);
}

.logos-img {
    max-width: 100%;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: var(--transition);
}

.logos-img:hover {
    opacity: 1;
    filter: none;
}

/* Contact Section */
.bg-primary {
    background-color: var(--accent);
}

.text-white {
    color: var(--bg-primary) !important;
}

.text-white h2 {
    color: var(--bg-primary);
}

.text-white p {
    color: var(--bg-secondary);
}

.section-title.text-white::after {
    background-color: var(--bg-primary);
}

/* Contact Form */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

.btn-block {
    width: 100%;
    display: block;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--accent);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: var(--transition);
    animation: pulse-btn 2s infinite;
}

.floating-btn:hover {
    transform: scale(1.1);
    background-color: var(--white);
}

@keyframes pulse-btn {
    0% {
        box-shadow: 0 0 0 0 rgba(100, 255, 218, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(100, 255, 218, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(100, 255, 218, 0);
    }
}

/* Footer */
.site-footer {
    background-color: var(--bg-primary);
    padding: 40px 0;
    border-top: 1px solid var(--bg-tertiary);
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.social-links a:hover {
    color: var(--accent);
}

.copyright {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
        /* Ensure padding from edges */
        box-sizing: border-box;
        margin: 0 auto;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 30px;
        /* Center horizontally */
        padding: 0;
    }

    .hero-text h1,
    .hero-text h2,
    .section-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }

    .hero-roles {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .role-separator {
        display: none;
    }

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

    .about-image-container {
        order: -1;
        /* Image first on mobile */
        margin-bottom: 30px;
    }

    .hero-text p {
        margin: 0 auto 40px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-section {
        height: auto;
        min-height: 100vh;
        padding-top: 140px;
        /* Increased from 120px to prevent cutoff */
        padding-bottom: 60px;
        align-items: flex-start;
        /* Start from top to avoid cutoff */
    }

    .hero-image-container {
        max-width: 250px;
        /* Smaller image for mobile */
        margin: 30px auto 0;
        width: 80%;
    }

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

    .featured-card {
        flex-direction: column;
    }

    .featured-card .card-image-large,
    .featured-card .card-content {
        width: 100%;
    }

    .split-layout {
        flex-direction: column;
    }

    .hero-text {
        text-align: center;
        margin-bottom: 40px;
    }

    /* AI Page Mobile Fixes */
    .glass-panel {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px !important;
        margin: 40px auto 0;
        /* Center horizontally */
        width: 90%;
        /* Use percentage width */
        max-width: 400px;
        /* Cap max width */
        box-sizing: border-box;
    }

    .hero-text {
        padding: 0;
        width: 100%;
    }

    #hero-canvas {
        position: absolute;
        /* Ensure canvas stays behind */
    }

    .split-content {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .main-nav,
    .lang-switch .divider {
        display: none;
    }

    .main-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        /* Fixed to viewport */
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        /* Full height minus header */
        background-color: var(--bg-secondary);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        z-index: 100;
        gap: 0;
        /* Remove gap for border separation */
        overflow-y: auto;
        /* Allow scrolling */
        padding: 0;
    }

    .main-nav.mobile-open ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .main-nav.mobile-open li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        opacity: 0;
        animation: slideInRight 0.3s forwards;
    }

    /* Staggered animation delay */
    .main-nav.mobile-open li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .main-nav.mobile-open li:nth-child(2) {
        animation-delay: 0.15s;
    }

    .main-nav.mobile-open li:nth-child(3) {
        animation-delay: 0.2s;
    }

    .main-nav.mobile-open li:nth-child(4) {
        animation-delay: 0.25s;
    }

    .main-nav.mobile-open li:nth-child(5) {
        animation-delay: 0.3s;
    }

    .main-nav.mobile-open a {
        display: block;
        padding: 20px;
        font-size: 18px;
        color: var(--white);
    }

    .main-nav.mobile-open a:hover {
        background-color: rgba(255, 255, 255, 0.05);
        padding-left: 25px;
        /* Slide effect on hover */
    }

    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(20px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-container {
        padding: 0 20px;
    }

    .hero-text h1 {
        font-size: 24px;
        margin-top: 20px;
        line-height: 1.3;
        /* Improve readability */
        /* Add margin to separate from header */
    }

    .section-title {
        font-size: 22px;
        line-height: 1.3;
        /* Reduced from 28px to fit long titles */
        word-wrap: break-word;
        /* Ensure long words break */
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .subscribe-form {
        flex-direction: column;
    }
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Animations */
@keyframes radar-sweep {
    0% {
        background-position: 0 -50px;
    }

    100% {
        background-position: 0 120%;
        /* Move past the bottom */
    }
}

@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 15px rgba(129, 161, 193, 0.1);
    }

    100% {
        box-shadow: 0 0 30px rgba(136, 192, 208, 0.4);
    }
}

/* Episode List */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.episode-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.episode-card:hover {
    transform: translateY(-5px);
}

.episode-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.episode-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.btn-play-small {
    font-size: 12px;
    padding: 5px 10px;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

@keyframes corner-breathe {
    0% {
        width: 15px;
        height: 15px;
        opacity: 0.7;
    }

    100% {
        width: 25px;
        height: 25px;
        opacity: 1;
    }
}

/* Collaborations Section Redesign (Text Grid) */
.media-logos {
    margin-top: 60px;
    position: relative;
}

.collab-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.collab-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 50px;
    /* Pill shape */
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: default;
    backdrop-filter: blur(5px);
    animation: float 6s ease-in-out infinite;
}

.collab-item:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(136, 192, 208, 0.3);
    border-color: var(--accent);
    animation-play-state: paused;
}

/* Varied animation for organic feel */
.collab-item:nth-child(odd) {
    animation-duration: 7s;
    animation-delay: 0.5s;
}

.collab-item:nth-child(even) {
    animation-duration: 5s;
    animation-delay: 1s;
}

.collab-item:nth-child(3n) {
    animation-duration: 8s;
    animation-delay: 0s;
}

.collab-item:nth-child(3n+1) {
    animation-duration: 6.5s;
    animation-delay: 1.5s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--accent);
    color: var(--bg-primary);
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    right: 30px;
    bottom: 30px;
    font-family: var(--font-heading);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    transition: transform 0.3s ease, visibility 0.3s;
}

.toast.show {
    visibility: visible;
    transform: translateY(0);
}

/* Podcast Page Fix */
.podcast-container {
    position: relative;
    z-index: 2;
}

/* Banorte Images Hover */
.banorte-link:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3) !important;
}

/* --- GitHub Projects Page --- */
.terminal-title {
    font-family: 'Fira Code', monospace;
    color: var(--color-keyword);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.glass-text-box {
    background: rgba(17, 34, 64, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px 40px;
    border-radius: 12px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    display: inline-block;
    max-width: 800px;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    position: relative;
    z-index: 2;
}

.bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bg-canvas-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.section-fade-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, transparent 100%);
    z-index: 3;
    pointer-events: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.repo-card {
    background: rgba(17, 34, 64, 0.7);
    border: 1px solid var(--bg-tertiary);
    border-radius: 8px;
    padding: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.repo-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.repo-name {
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    margin: 0;
}

.repo-lang {
    color: var(--accent);
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

.repo-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    height: 60px;
    /* Fixed height for uniformity */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.repo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-repo {
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-repo:hover {
    background: rgba(100, 255, 218, 0.1);
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--white);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- Blog Interactions --- */
.blog-interactions {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.interaction-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.like-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 16px;
    transition: var(--transition);
}

.like-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.like-btn.liked {
    border-color: #ff4d4d;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.comments-section h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--color-function);
}

.comment-form {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 3px solid var(--accent);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: bold;
    color: var(--color-keyword);
}

.comment-date {
    color: var(--text-secondary);
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.5;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    color: var(--accent);
    font-family: 'Fira Code', monospace;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(100, 255, 218, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}