:root {
    --bg-dark: #0a0a0a;
    --neon-purple: #b026ff;
    --neon-cyan: #00f0ff;
    --acid-green: #39ff14;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Navigation */
.glass-dock {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    z-index: 100;
}

.glass-dock ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.glass-dock a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.glass-dock a:hover,
.glass-dock a.active {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

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

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    pointer-events: none;
    /* Let clicks pass through to canvas if needed */
}

h1.liquid-text {
    font-size: 8vw;
    font-weight: 800;
    line-height: 0.9;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.8);
    position: relative;
    display: block;
}

h1.liquid-text .sub-text {
    display: block;
    font-size: 2vw;
    color: var(--neon-purple);
    -webkit-text-stroke: 0;
    letter-spacing: 0.5rem;
    margin-top: 1rem;
    text-shadow: 0 0 20px rgba(176, 38, 255, 0.5);
}

.scroll-ind {
    position: absolute;
    bottom: -15vh;
    left: 50%;
    transform: translateX(-50%);
    height: 60px;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.scroll-ind .line {
    width: 100%;
    height: 0%;
    background: var(--neon-cyan);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% {
        height: 0;
        top: 0;
    }

    50% {
        height: 100%;
        top: 0;
    }

    51% {
        height: 100%;
        bottom: 0;
        top: auto;
    }

    100% {
        height: 0;
        bottom: 0;
        top: auto;
    }
}

/* Portfolio Section */
.work-section {
    position: relative;
    z-index: 2;
    padding: 10rem 5%;
    min-height: 100vh;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-transform: uppercase;
    font-weight: 300;
    border-left: 5px solid var(--acid-green);
    padding-left: 20px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.tilt-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    cursor: pointer;
    transition: border-color 0.3s ease;
    overflow: hidden;
    /* Added to clip image */
}

.tilt-card:hover {
    border-color: var(--neon-purple);
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    object-fit: cover;
    z-index: 1;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    transition: transform 0.5s ease;
}

.tilt-card:hover .card-image {
    transform: scale(1.1);
}

.card-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    transform: translateZ(20px);
    z-index: 2;
}

.tilt-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tilt-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tags span {
    display: inline-block;
    font-size: 0.8rem;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    margin-right: 0.5rem;
}

/* About Section */
.about-section {
    padding: 10rem 5%;
    position: relative;
    z-index: 2;
}

.about-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4rem;
}

.about-text {
    flex: 1;
    min-width: 250px;
    /* Reduced to prevent squeezing */
}

.bio-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--neon-purple);
    font-weight: 600;
}

.skills-cloud {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    /* Changed from flex-end for better visibility */
}

.skill-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: default;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;

    /* Grid Layout Enforcement */
    flex: 1 1 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
    text-align: center;
}

.skill-tag:hover {
    background: var(--neon-purple);
    color: #000;
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.6);
    transform: translateY(-5px);
}

/* Contact Section */
.contact-section {
    padding: 10rem 5% 15rem;
    /* Extra padding bottom for nav overlap */
    position: relative;
    z-index: 2;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: var(--font-main);
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.input-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.input-group .line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: width 0.4s ease;
}

.input-group input:focus~.line,
.input-group input:valid~.line,
.input-group textarea:focus~.line,
.input-group textarea:valid~.line {
    width: 100%;
}

.input-group input:focus~label,
.input-group input:valid~label,
.input-group textarea:focus~label,
.input-group textarea:valid~label {
    top: -1.5rem;
    font-size: 0.8rem;
    color: var(--neon-cyan);
}

.cyber-btn {
    align-self: flex-start;
    padding: 1.5rem 4rem;
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--neon-cyan);
    transition: left 0.4s ease;
    z-index: 1;
}

.cyber-btn:hover {
    color: #000;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}

.cyber-btn:hover::before {
    left: 0;
}

/* --- Mobile Optimization --- */
@media screen and (max-width: 768px) {

    /* Navigation - Bottom Bar Compact */
    .glass-dock {
        bottom: 1rem;
        width: 90%;
        padding: 0.8rem 1.5rem;
        display: flex;
        justify-content: center;
    }

    .glass-dock ul {
        gap: 1.5rem;
        padding: 0;
        margin: 0;
        justify-content: space-between;
        width: 100%;
    }

    .glass-dock a {
        font-size: 0.7rem;
        /* Smaller text */
    }

    /* Hero Section */
    h1.liquid-text {
        font-size: 15vw;
        /* Larger relative to screen width */
    }

    h1.liquid-text .sub-text {
        font-size: 4vw;
        letter-spacing: 0.2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        padding: 0 1rem;
    }

    /* Section Spacing */
    .work-section,
    .about-section,
    .contact-section {
        padding: 6rem 5%;
        /* Reduced padding */
    }

    .section-title {
        font-size: 2rem;
        /* Smaller titles */
        margin-bottom: 2.5rem;
    }

    /* Services Grid - Stacked */
    .portfolio-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 2rem;
    }

    .tilt-card {
        height: 350px;
        /* Slightly shorter cards */
    }

    /* About Section - Stacked */
    .about-container {
        flex-direction: column;
        gap: 3rem;
    }

    .about-text {
        text-align: left;
    }

    .skills-cloud {
        justify-content: center;
        /* Ensure centering */
    }

    .skill-tag {
        padding: 0.6rem 0.5rem;
        /* Reduced horizontal padding */
        font-size: 0.9rem;
        text-align: center;
    }

    /* Contact Section */
    .cyber-form {
        gap: 2rem;
    }

    .cyber-btn {
        width: 100%;
        /* Full width button */
        padding: 1.2rem;
        display: flex;
        justify-content: center;
    }
}/* --- GDPR Checkbox Style --- */
.gdpr-group {
    margin-bottom: 1rem;
}

.cyber-checkbox {
    display: flex;
    align-items: center;
    /* Align checkbox with first line of text */
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
    gap: 1rem;
}

.cyber-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.cyber-checkbox:hover input~.checkmark {
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.cyber-checkbox input:checked~.checkmark {
    background-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.cyber-checkbox input:checked~.checkmark:after {
    display: block;
}

.cyber-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cyber-checkbox a {
    color: var(--neon-cyan);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cyber-checkbox a:hover {
    color: var(--text-primary);
}