:root {
    --bg-black: #080c0c; /* Deepest midnight green */
    --bg-dark-grey: #0f1817; /* Deep forest teal */
    --bg-medium-grey: #152221; /* Muted arctic anthracite */
    --text-primary: #f2f5f4; /* Neutral cold white */
    --text-secondary: #a0b0af; /* Muted teal grey */
    --accent-neutral: #ffffff; /* White for accents */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-black);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(8, 12, 12, 0.9), transparent);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 0;
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 300;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* MOBILE MENU TOGGLE */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 14px;
    cursor: pointer;
    z-index: 1100;
    position: relative;
}

.menu-toggle .bar {
    height: 1.5px;
    width: 100%;
    background-color: #ffffff;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle .bar {
        height: 1.5px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%; /* Full width for better experience */
        height: 100vh;
        background-color: var(--bg-black);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: 0.6s cubic-bezier(0.19, 1, 0.22, 1);
        z-index: 1000;
        backdrop-filter: blur(20px);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.4rem;
        letter-spacing: 6px;
        color: #ffffff;
    }

    /* Toggle Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 17, 17, 0.4) 0%, rgba(13, 17, 17, 0.1) 50%, rgba(13, 17, 17, 0.9) 100%);
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 100; /* Extra fine as requested */
    margin-bottom: 1.5rem;
    letter-spacing: 0.8rem; /* Increased breathing space */
    line-height: 1.1;
    color: #ffffff; /* Neutral white for hero */
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero-content .subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem); /* Slightly larger than original */
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3.5rem;
    font-weight: 300;
    letter-spacing: 6px; /* High spacing for clean look */
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: block;
}

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

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem; /* Slightly more horizontal padding for the pill shape */
    text-decoration: none;
    font-weight: 400;
    font-size: 0.75rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px; /* Pill shape */
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: #ddd;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-demoreel {
    background-color: #ffffff;
    color: #080c0c;
    border: 1px solid #ffffff;
    font-weight: 600;
}

.btn-demoreel:hover {
    background-color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.85);
    color: #080c0c;
}

.section {
    padding: 14rem 0;
}

@media (max-width: 768px) {
    .section {
        padding: 6rem 0;
    }
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    font-weight: 300;
    margin-bottom: 5rem;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .section-title {
        margin-bottom: 3rem;
    }
}

/* SECTION BACKGROUNDS */
.about-section {
    background-color: var(--bg-dark-grey);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.skills-section {
    background-color: var(--bg-medium-grey);
}

/* FULL-WIDTH HORIZONTAL ABOUT SECTION */
.about-flex-horizontal {
    display: flex;
    align-items: center;
    gap: 6rem;
}

.about-image-large {
    flex: 1;
    max-width: 500px;
}

.about-image-large img {
    width: 100%;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.about-image-large img:hover {
    border-color: var(--text-primary);
    transform: scale(1.02);
}

.about-text-large {
    flex: 1.5;
}

.section-title-left {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 300;
    margin-bottom: 2.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    position: relative;
}

@media (max-width: 1024px) {
    .section-title-left {
        text-align: center;
        margin-bottom: 3.5rem;
    }
    
    .section-title-left::after {
        left: 50% !important;
        transform: translateX(-50%);
    }
}

.section-title-left::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 60px;
    height: 1px;
    background-color: var(--text-secondary);
}

.about-text-large p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-cta {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

@media (max-width: 1024px) {
    .about-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* WIDE SKILLS GRID */
.skills-grid-wide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-card-wide {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-subtle);
    padding: 4rem;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .skill-card-wide {
        padding: 2.5rem 1.5rem;
    }
}

.skill-card-wide:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-8px);
}

.skill-card-wide h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-card-wide ul {
    list-style: none;
}

.skill-card-wide li {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.skill-card-wide li::before {
    content: "";
    width: 10px;
    height: 1px;
    background-color: var(--text-secondary);
    margin-right: 15px;
    opacity: 0.4;
}

@media (max-width: 1024px) {
    .about-flex-horizontal {
        flex-direction: column;
        text-align: center;
        gap: 4rem;
    }
    
    .skills-grid-wide {
        grid-template-columns: 1fr;
    }
    
    .section-title-left {
        text-align: center;
    }
}

/* CV */
.cv-preview {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 5rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cv-placeholder p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
}

/* FOOTER */
footer {
    padding: 8rem 0 3rem;
    border-top: 1px solid var(--card-border);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5rem;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-info h3 {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-contact p {
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}

.footer-contact a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.footer-contact a:hover {
    color: var(--text-secondary);
    border-bottom-color: var(--text-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* REVEAL ANIMATION */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* REMOVE OLD MEDIA QUERIES IF THEY OVERLAP */
@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .footer-contact {
        order: -1;
    }

    .hero-content .subtitle {
        margin-bottom: 2.5rem;
        letter-spacing: 3px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 320px;
    }
}
