:root {
    --bg-color: #050505;
    --text-color: #eaeaea;
    /* Slightly softer white */
    --accent-color: #8c00ff;
    /* Deep Neon Purple */
    --secondary-accent: #00f3ff;
    --card-bg: rgba(255, 255, 255, 0.03);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --cursor-size: 20px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* GRAIN OVERLAY */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 150px;
    opacity: 0.07;
    mix-blend-mode: overlay;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 4px;
    height: 4px;
    background-color: #fff;
}

.cursor-outline {
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 3rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 400;
    opacity: 0.7;
    position: relative;
    transition: opacity 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover {
    opacity: 1;
}

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

/* Hero Section */
#hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
}

.hero-content {
    z-index: 10;
    max-width: 800px;
    mix-blend-mode: difference;
    /* Makes text visible over bright 3D elements */
}

h1 {
    font-family: var(--font-heading);
    font-size: 8rem;
    line-height: 0.85;
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: -2px;
    overflow: hidden;
    /* For reveal animation */
}

/* For animating separate lines */
.line-wrapper {
    overflow: hidden;
    display: block;
}

.line-inner {
    display: block;
    transform: translateY(100%);
    /* Start hidden */
}

.glitch-text {
    /* Base color, animation handles visibility */
    color: #fff;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border-radius: 50px;
    /* Pill shape */
}

.cta-button:hover {
    background: #fff;
    color: #000;
    transform: scale(1.05);
    /* Magnetic feel */
}

/* 3D Container */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Let clicks pass through to content */
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 5%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    opacity: 0.4;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.scroll-indicator .line {
    width: 60px;
    height: 1px;
    background: #fff;
}

/* Work Section (Bento Grid) */
#work {
    padding: 15vh 5% 10vh;
    position: relative;
    z-index: 5;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 5rem;
    letter-spacing: -1px;
    opacity: 0.9;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 350px;
    gap: 2rem;
}

.bento-item {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    /* Brutalist/Sharp */
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    backdrop-filter: blur(10px);
}

.bento-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.span-2-col {
    grid-column: span 2;
}

.span-2-row {
    grid-row: span 2;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transform: translateY(0);
    transition: transform 0.3s;
}

.card-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s;
}

.bento-item:hover .card-content p {
    transform: translateY(0);
    opacity: 1;
}

.bento-item:hover .card-content h3 {
    transform: translateY(-5px);
}

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

.tags span {
    font-size: 0.7rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}

/* About Card Special Style */
.about-card {
    background: #e0e0e0;
    color: #000;
}

.about-card h3,
.about-card p {
    color: #000;
    opacity: 1 !important;
    transform: none !important;
}

.socials {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
}

.socials a {
    color: #000;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Services Section */
#services {
    padding: 10vh 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.services-list {
    display: flex;
    flex-direction: column;
}

.service-item {
    display: flex;
    align-items: baseline;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.service-item:hover {
    padding-left: 2rem;
    border-color: var(--accent-color);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent);
}

.service-num {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-right: 3rem;
    opacity: 0.7;
}

.service-name {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 300;
    margin-right: 2rem;
    white-space: nowrap;
    /* Keep title on one line if possible */
    transition: color 0.3s;
}

.service-item:hover .service-name {
    color: #fff;
    font-style: italic;
    /* Editorial touch */
}

.service-desc {
    font-size: 0.9rem;
    opacity: 0.5;
    text-transform: none;
    /* easier to read long text */
    letter-spacing: 0.5px;
    max-width: 400px;
    line-height: 1.5;
    margin-left: auto;
    /* Push to right */
    text-align: right;
}

/* Experience Section */
#experience {
    padding: 10vh 5%;
}

.experience-list {
    max-width: 900px;
    margin-left: auto;
}

.exp-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: flex-start;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.exp-item:hover {
    opacity: 1;
}

.exp-year {
    font-family: var(--font-body);
    color: var(--secondary-accent);
    font-size: 0.9rem;
    padding-top: 0.5rem;
}

.exp-details {
    display: flex;
    flex-direction: column;
}

.exp-role {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 0.2rem;
}

.exp-company {
    font-style: italic;
    opacity: 0.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.exp-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    max-width: 600px;
}


/* Giant Footer */
#contact {
    padding: 15vh 5% 5vh;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    /* Changed from center */
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
}

.footer-content {
    width: 100%;
}

.footer-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.giant-email {
    display: block;
    font-family: var(--font-heading);
    font-size: 10vw;
    /* Responsive massive text */
    line-height: 0.9;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 4rem;
    transition: color 0.3s;
    letter-spacing: -4px;
}

.giant-email:hover {
    color: var(--accent-color);
    /* Just color change, no line */
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.3;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: block;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    #canvas-container {
        opacity: 0.6;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .span-2-col,
    .span-2-row {
        grid-column: span 1;
        grid-row: span 1;
    }

    .service-item {
        flex-direction: column;
        padding: 2rem 0;
    }

    .service-num {
        margin-bottom: 1rem;
    }

    .service-name {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .exp-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .exp-company {
        text-align: left;
    }

    .giant-email {
        font-size: 15vw;
    }
}