:root {
    --bg-dark: #020617;
    --bg-light: #0f172a;
    --text-main: #fcfcfc;
    --text-muted: #94a3b8;

    /* Navy and Blue Theme */
    --accent-1: #38bdf8;
    /* Sky Blue */
    --accent-2: #2563eb;
    /* Blue */
    --accent-3: #1e3a8a;
    /* Deep Navy */

    --glass-bg: rgba(15, 15, 15, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    --card-hover-bg: rgba(30, 30, 30, 0.5);
    --transition-snappy: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for the sticky nav */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Outfit', sans-serif;
}

/* --- Background Effects --- */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, var(--bg-light) 0%, var(--bg-dark) 80%);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: drift 25s infinite alternate ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-2);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-1);
    bottom: -100px;
    right: -200px;
    animation-delay: -5s;
    opacity: 0.3;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-3);
    top: 30%;
    left: 70%;
    transform: translate(-50%, -50%);
    animation-delay: -12s;
    opacity: 0.25;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(150px, 80px) scale(1.1);
    }
}

/* --- Glassmorphism --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 20px;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.interactive-panel {
    transition: transform var(--transition-snappy),
        background var(--transition-smooth),
        border-color var(--transition-smooth),
        box-shadow var(--transition-smooth);
}

.interactive-panel:hover {
    transform: translateY(-8px);
    background: var(--card-hover-bg);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6),
        0 0 40px -10px rgba(37, 99, 235, 0.15);
}

/* --- Navigation --- */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.25rem 0;
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.brand-icon {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 3px rgba(37, 99, 235, 0.8));
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Main Layout --- */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

/* --- Typography Utilities --- */
.gradient-text {
    background: linear-gradient(to right, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradient-flow 5s linear infinite;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% center;
    }

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

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    letter-spacing: -1px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.section-header .section-title {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin: 2rem 0 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subsection-title::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--accent-2);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.glitch {
    position: relative;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-1);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-3);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

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

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

    10% {
        clip: rect(32px, 9999px, 41px, 0);
    }

    15% {
        clip: rect(74px, 9999px, 12px, 0);
    }

    20% {
        clip: rect(81px, 9999px, 62px, 0);
    }

    25% {
        clip: rect(48px, 9999px, 2px, 0);
    }

    30% {
        clip: rect(32px, 9999px, 99px, 0);
    }

    35% {
        clip: rect(98px, 9999px, 57px, 0);
    }

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

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

    50% {
        clip: rect(91px, 9999px, 11px, 0);
    }

    55% {
        clip: rect(10px, 9999px, 23px, 0);
    }

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

    65% {
        clip: rect(1px, 9999px, 49px, 0);
    }

    70% {
        clip: rect(78px, 9999px, 94px, 0);
    }

    75% {
        clip: rect(13px, 9999px, 51px, 0);
    }

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

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

    90% {
        clip: rect(26px, 9999px, 32px, 0);
    }

    95% {
        clip: rect(92px, 9999px, 83px, 0);
    }

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

@keyframes glitch-anim2 {
    0% {
        clip: rect(69px, 9999px, 68px, 0);
    }

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

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

    15% {
        clip: rect(86px, 9999px, 3px, 0);
    }

    20% {
        clip: rect(7px, 9999px, 49px, 0);
    }

    25% {
        clip: rect(9px, 9999px, 97px, 0);
    }

    30% {
        clip: rect(96px, 9999px, 7px, 0);
    }

    35% {
        clip: rect(1px, 9999px, 9px, 0);
    }

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

    45% {
        clip: rect(20px, 9999px, 84px, 0);
    }

    50% {
        clip: rect(76px, 9999px, 31px, 0);
    }

    55% {
        clip: rect(44px, 9999px, 87px, 0);
    }

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

    65% {
        clip: rect(18px, 9999px, 13px, 0);
    }

    70% {
        clip: rect(31px, 9999px, 74px, 0);
    }

    75% {
        clip: rect(63px, 9999px, 73px, 0);
    }

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

    85% {
        clip: rect(58px, 9999px, 36px, 0);
    }

    90% {
        clip: rect(76px, 9999px, 32px, 0);
    }

    95% {
        clip: rect(42px, 9999px, 44px, 0);
    }

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

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--accent-1);
    border-radius: 50%;
    display: inline-block;
}

.about-card {
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-2), var(--accent-3));
}

.about-card h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.about-card p {
    color: #d4d4d8;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-visual {
    position: relative;
    width: 450px;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-placeholder {
    width: 350px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.4), rgba(15, 15, 15, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(37, 99, 235, 0.5));
}

.visual-accent {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.ring-1 {
    width: 450px;
    height: 450px;
    animation: spin-slow 20s linear infinite;
    border-top-color: var(--accent-1);
    border-right-color: transparent;
}

.ring-2 {
    width: 380px;
    height: 380px;
    animation: spin-slow 15s linear infinite reverse;
    border-bottom-color: var(--accent-3);
    border-left-color: transparent;
}

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

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

.floating {
    animation: float-slow 6s infinite ease-in-out;
}

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

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

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

/* --- Stream Section --- */
.online-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: -0.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.twitch-container {
    padding: 1rem;
    height: 600px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.twitch-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 90%, var(--glass-bg) 100%);
    pointer-events: none;
    z-index: 10;
}

#twitch-embed {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

#twitch-embed iframe {
    border-radius: 12px;
}

/* --- Socials Section --- */
.socials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 1.5rem;
    transition: background 0.3s ease, color 0.3s ease;
}

.arrow-icon {
    margin-left: auto;
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.social-card:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

.social-card.twitter .social-icon {
    color: #1DA1F2;
}

.social-card.twitter:hover .social-icon {
    background: rgba(29, 161, 242, 0.1);
}

.social-card.twitter:hover {
    border-color: rgba(29, 161, 242, 0.3);
}

.social-card.twitch .social-icon {
    color: #9146FF;
}

.social-card.twitch:hover .social-icon {
    background: rgba(145, 70, 255, 0.1);
}

.social-card.twitch:hover {
    border-color: rgba(145, 70, 255, 0.3);
}

.social-card.kick .social-icon {
    color: #53FC18;
}

.social-card.kick:hover .social-icon {
    background: rgba(83, 252, 24, 0.1);
}

.social-card.kick:hover {
    border-color: rgba(83, 252, 24, 0.3);
}

.social-card.discord .social-icon {
    color: #5865F2;
}

.social-card.discord:hover .social-icon {
    background: rgba(88, 101, 242, 0.1);
}

.social-card.discord:hover {
    border-color: rgba(88, 101, 242, 0.3);
}

.social-card.youtube .social-icon {
    color: #FF0000;
}

.social-card.youtube:hover .social-icon {
    background: rgba(255, 0, 0, 0.1);
}

.social-card.youtube:hover {
    border-color: rgba(255, 0, 0, 0.3);
}

.social-card.github .social-icon {
    color: #ffffff;
}

.social-card.github:hover .social-icon {
    background: rgba(255, 255, 255, 0.1);
}

.social-card.github:hover {
    border-color: rgba(255, 255, 255, 0.3);
}


/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
    opacity: 0.5;
}

.project-card:hover .project-glow {
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
    opacity: 1;
    box-shadow: 0 0 20px var(--accent-2);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-header h4 {
    font-size: 1.6rem;
    font-weight: 700;
}

.status {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.5px;
}

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

.status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status.active .status-dot {
    background-color: #34d399;
}

.status.completed {
    background: rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.status.completed .status-dot {
    background-color: #1e3a8a;
}

.project-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 1.05rem;
}

.project-tech {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 2rem;
    text-transform: uppercase;
}

.project-footer {
    display: flex;
    justify-content: flex-start;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
    filter: brightness(1.1);
}

.outline-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.outline-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- Footer --- */
footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.2rem;
    opacity: 0.5;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        margin-top: 2rem;
    }

    .hero-visual {
        width: 100%;
        height: auto;
        min-height: 400px;
    }

    .hero-image-placeholder {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }

    .ring-1,
    .ring-2 {
        display: none;
    }

    .subtitle {
        justify-content: center;
    }
}

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

    main {
        padding-top: 100px;
        gap: 5rem;
    }

    .socials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .section-title {
        font-size: 2.2rem;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .twitch-container {
        height: 250px;
    }

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

    .project-card {
        padding: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}