/* ROOT VARIABLES & THEME */
:root {
    --bg-dark: #0f1016;
    --bg-card: rgba(30, 32, 45, 0.4);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #f0f2f5;
    --text-muted: #9ba0af;

    /* Neons & Accents */
    --accent-cyan: #00f0ff;
    --accent-pink: #ff003c;
    --accent-purple: #8a2be2;
    --accent-godot: #478cbf;
    --accent-unity: #ffffff;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* BACKGROUND EFFECTS */
main {
    position: relative;
    z-index: 1;
}

/* Ambient glow in background */
main::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.05), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(0, 240, 255, 0.05), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
}

/* GLASSMORPHISM UTILITIES */
.glass-nav,
.glass-card,
.glass-footer {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
}

.glass-card {
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* NAVIGATION */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-glass);
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-main);
}

.logo-bracket {
    color: var(--accent-cyan);
    transition: color 0.3s ease;
}

.logo:hover .logo-bracket {
    color: var(--accent-pink);
}

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

.nav-link {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-bottom: 0.25rem;
}

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

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

/* REUSABLE SECTIONS */
.section {
    min-height: 100vh;
    padding: 100px 2rem 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

.section-intro-text {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 300;
    line-height: 1.8;
    max-width: 800px;
    margin-bottom: 4rem;
}

/* HERO SECTION */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

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

.greeting {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Glitch Effect on Title */
.glitch {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    color: #fff;
}

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

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

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

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

    20% {
        clip: rect(61px, 9999px, 98px, 0);
    }

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

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

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

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

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

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

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

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

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

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

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 0, 60, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 0, 60, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.2);
}

/* HERO SHAPES */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-purple);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-cyan);
    bottom: 10%;
    right: 15%;
    animation-delay: -3s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-pink);
    top: 40%;
    right: 30%;
    animation-delay: -6s;
    opacity: 0.3;
}

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

    100% {
        transform: translate(30px, -50px) scale(1.1);
    }
}

/* CV TIMELINE SECTION */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--bg-dark);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background-color: var(--accent-cyan);
    transform: scale(1.2);
}

.timeline-content {
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-glow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 1rem;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.tags span {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* DEVLOG SECTION */
.devlog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.devlog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.devlog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.4);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

.image-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.engine-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    border: 1px solid;
}

.engine-badge.godot {
    border-color: var(--accent-godot);
    color: var(--accent-godot);
}

.engine-badge.unity {
    border-color: var(--accent-unity);
    color: var(--accent-unity);
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--accent-purple);
    font-family: var(--font-mono);
    margin-bottom: 0.8rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--accent-cyan);
    font-weight: 600;
    gap: 0.5rem;
}

.read-more .arrow {
    transition: transform 0.3s ease;
}

.read-more:hover .arrow {
    transform: translateX(5px);
}

/* FOOTER */
.glass-footer {
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-glass);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

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

/* RESPONSIVE */
@media (max-width: 768px) {
    .glitch {
        font-size: 3.5rem;
    }

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

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

    .hero-cta {
        flex-direction: column;
    }

    .nav-links {
        display: none;
        /* In a full app, add a hamburger menu */
    }

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

/* CAROUSEL */
.carousel-auto {
    position: relative;
    cursor: pointer;
}

.carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-img.active {
    opacity: 1;
    position: relative;
}

/* CAROUSEL PIPS */
.carousel-pips {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.carousel-pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.carousel-pip:hover,
.carousel-pip.active {
    background: var(--accent-cyan);
    transform: scale(1.2);
}

/* CAROUSEL ARROWS */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 1.2rem;
    padding: 12px 14px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.carousel-nav:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

.carousel-nav.prev {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.carousel-nav.next {
    right: 0;
    border-radius: 8px 0 0 8px;
}