:root {
    --bg-color: #050505;
    --surface-color: #0a0a0a;
    --surface-light: #151515;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-dim: #666666;
    
    --accent-blue: #00f2ff;
    --accent-purple: #7000ff;
    --accent-glow-blue: rgba(0, 242, 255, 0.3);
    --accent-glow-purple: rgba(112, 0, 255, 0.3);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --container-width: 1200px;
    --section-padding: 100px 0;
    --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: initial; /* Lenis handles smooth scroll */
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* --- Preloader --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* --- Mobile Nav Styles --- */
@media (max-width: 768px) {
    header nav {
        padding: 20px 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.5s cubic-bezier(0.7, 0, 0.3, 1);
        z-index: 1000;
    }

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

    .nav-links li a {
        font-size: 28px;
        font-weight: 800;
    }

    .nav-links .nav-cta {
        margin-top: 20px;
    }

    /* Hamburger Animation */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }

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

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    width: 300px;
    text-align: center;
}

.loader-timeline {
    height: 2px;
    width: 100%;
    background: #222;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    box-shadow: 0 0 10px var(--accent-blue);
}

.loader-text {
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* --- Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -1px;
}

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

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.nav-cta {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
}

/* --- Hero Section --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

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

.hero-bg-img, .hero-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-bg-img {
    z-index: -2;
    opacity: 0.6;
}

.hero-bg-video {
    z-index: -1;
    opacity: 0.4;
    mix-blend-mode: overlay;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%);
}

.hero-content {
    text-align: center;
}

.hero-tagline {
    font-size: 12px;
    letter-spacing: 6px;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

#hero h1 {
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.1;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* --- Button Styles --- */
.btn {
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

.btn.primary:hover {
    background: var(--accent-blue);
    box-shadow: 0 0 20px var(--accent-glow-blue);
}

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

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

.btn.outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn.outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn.full {
    width: 100%;
}

/* --- UI Elements Overlays --- */
.ui-element {
    position: absolute;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.ui-element.tl { top: 120px; left: 40px; }
.ui-element.tr { top: 120px; right: 40px; color: #ff3333; }
.ui-element.bl { bottom: 40px; left: 40px; }
.ui-element.br { bottom: 40px; right: 40px; }

/* --- Portfolio --- */
#work {
    padding: var(--section-padding);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 40px;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 242, 255, 0.05);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.work-card {
    display: block;
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-blue);
    border-radius: 50%;
    position: relative;
}

.play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent var(--bg-color);
}

.work-card:hover img {
    transform: scale(1.1);
}

.work-card:hover .play-overlay {
    opacity: 1;
}

.work-info {
    padding: 20px;
}

.work-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.work-info span {
    font-size: 14px;
    color: var(--text-dim);
}

.view-more {
    text-align: center;
    margin-top: 60px;
}

/* --- About Section --- */
#about {
    padding: var(--section-padding);
    background: var(--surface-color);
}

.visual-box {
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #111, #222);
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: brightness(0.9) contrast(1.1);
    transition: var(--transition);
}

.profile-img:hover {
    filter: brightness(1) contrast(1.1);
    transform: scale(1.02);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent-purple);
    padding: 20px 30px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 24px;
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.4);
}

.skills-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Experience Timeline --- */
#experience {
    padding: var(--section-padding);
}

.timeline {
    max-width: 800px;
    margin: 60px auto 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-item .time {
    width: 45%;
    font-weight: 800;
    color: var(--accent-blue);
    text-align: right;
}

.timeline-item:nth-child(even) .time {
    text-align: left;
}

.timeline-item .content {
    width: 45%;
    background: var(--surface-color);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-blue);
    z-index: 1;
}

/* --- Why Me --- */
#why-me {
    padding: var(--section-padding);
}

.perks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.perk-card {
    background: var(--surface-color);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.perk-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-10px);
}

.perk-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

/* --- Contact --- */
#contact {
    padding: var(--section-padding);
    background: linear-gradient(0deg, #050505 0%, #0a0a0a 100%);
}

.contact-details {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-details a {
    font-size: 24px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.contact-details a:hover {
    color: var(--accent-blue);
}

.contact-form-container {
    background: var(--surface-light);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

/* Form Success State */
.contact-form-container {
    position: relative;
    overflow: hidden;
}

.form-status {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface-light);
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    padding: 40px;
}

.status-content h3 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--accent-blue);
}

.status-icon {
    font-size: 60px;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

input, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 15px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.5);
}

/* --- Footer --- */
footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    color: var(--text-dim);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 20px;
}

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

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    :root {
        --section-padding: 80px 0;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: row-reverse !important;
        justify-content: flex-end;
    }
    
    .timeline-item .time, .timeline-item .content {
        width: calc(100% - 60px);
        text-align: left !important;
    }
    
    .timeline-item::after {
        left: 20px;
    }
    
    .perks-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Hero */
    #hero h1 {
        font-size: 42px;
        line-height: 1.1;
    }

    .hero-tagline {
        font-size: 12px;
        letter-spacing: 4px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hero-btns .btn {
        width: 100%;
        text-align: center;
    }

    /* Portfolio */
    .filters {
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        padding-bottom: 10px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    /* Skills */
    .skills-mini {
        justify-content: center;
    }

    /* Lightbox */
    .lightbox-container {
        width: 95%;
    }

    .lightbox-close {
        top: -40px;
        right: 10px;
        font-size: 30px;
    }

    /* Footer */
    .footer-wrap {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 34px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .perk-card {
        padding: 30px;
    }
}

/* --- Video Lightbox --- */
#video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
}

.lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 1;
    transform: scale(0.9);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 40px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--accent-blue);
    transform: rotate(90deg);
}

.lightbox-video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.lightbox-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.lightbox-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    background: #000;
}

#preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.preview-overlay-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.play-btn-large {
    width: 100px;
    height: 100px;
    background: var(--accent-blue);
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 0 30px var(--accent-glow-blue);
    transition: 0.3s;
}

.play-btn-large::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent var(--bg-color);
}

.preview-overlay-btn span {
    font-weight: 800;
    letter-spacing: 4px;
    font-size: 14px;
    color: var(--text-primary);
}

.lightbox-preview:hover .play-btn-large {
    transform: scale(1.1);
    background: #fff;
}

/* Vertical (Shorts/Reels) Mode */
.lightbox-container.vertical {
    max-width: 400px;
}

.lightbox-container.vertical .lightbox-video-wrapper {
    padding-top: 177.77%; /* 9:16 Aspect Ratio */
}
