/* ==========================================
   CSS CUSTOM PROPERTIES
   ========================================== */
:root {
    --bg-color: #0b0b0b;
    --text-color: #ffffff;
    --accent-color: #00f3ff;
    --font-main: 'Inter', sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
    /* custom cursor active */
}

/* Accessibility: reduces animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Screen‑reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================
   CUSTOM CURSOR
   ========================================== */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    will-change: width, height, background;
}

/* ==========================================
   LOADER
   ========================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-logo {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -2px;
}

.loader-progress {
    margin-top: 20px;
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* ==========================================
   BACKGROUND CANVAS (Three.js)
   ========================================== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================
   TYPOGRAPHY & LAYOUT HELPERS
   ========================================== */
.section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 50px;
    font-weight: 600;
}

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

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(11, 11, 11, 0.5);
    backdrop-filter: blur(10px);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 30px;
    font-size: 1rem;
    transition: color 0.3s;
}

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

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    display: inline-block;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

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

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

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 6rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

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

/* ==========================================
   ABOUT SECTION (Split Layout)
   ========================================== */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    filter: grayscale(50%);
    transition: filter 0.5s;
    will-change: filter;
}

.about-image img:hover {
    filter: grayscale(0%);
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #aaa;
    margin-bottom: 30px;
}

.stats {
    display: flex;
    gap: 40px;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--accent-color);
}

/* ==========================================
   GLASS EFFECTS (reusable)
   ========================================== */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
}

/* ==========================================
   TECH ARSENAL (Skills)
   ========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
    transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
    will-change: transform;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.skill-card ul {
    list-style: none;
    color: #ccc;
    line-height: 2;
}

.skill-card ul li i {
    margin-right: 12px;
    font-size: 1.1em;
    width: 24px;
    text-align: center;
    color: var(--accent-color);
    vertical-align: middle;
}

/* ==========================================
   PORTFOLIO GRID & CARDS
   ========================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.project-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

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

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    padding: 20px 0;
}

.project-info h3 {
    font-size: 1.5rem;
}

.project-info span {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Dynamic thumbnail placeholder */
.thumb-dynamic {
    background: rgba(255, 255, 255, 0.05);
    transition: opacity 0.3s;
}

/* ==========================================
   WORK CATEGORY SECTIONS (VFX / Web)
   ========================================== */
.work-category {
    margin-bottom: 80px;
}

.category-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Subtle tint for each category */
.work-category:nth-child(1) {
    background: rgba(0, 243, 255, 0.02);
    border-radius: 20px;
    padding: 30px;
}

.work-category:nth-child(2) {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 30px;
}

/* ==========================================
   MORE CARD (VFX section)
   ========================================== */
.more-card .more-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 15px;
    border: 2px dashed var(--accent-color);
    transition: background 0.3s;
}

.more-card:hover .more-placeholder {
    background: rgba(0, 243, 255, 0.1);
}

.more-card .project-info h3 {
    color: var(--accent-color);
}

.more-card .project-img {
    aspect-ratio: 16/9;
}

/* ==========================================
   VIDEO WRAPPER (unused but kept for future)
   ========================================== */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.video-wrapper:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ==========================================
   PROCESS TIMELINE
   ========================================== */
.timeline {
    border-left: 2px solid var(--glass-border);
    padding-left: 30px;
    margin-left: 20px;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-item h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.timeline-item p {
    color: #aaa;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-panel {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-family: var(--font-main);
    outline: none;
    transition: border 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
}

.social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

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

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

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    padding: 20px 5%;
    background: rgba(11, 11, 11, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.footer button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

/* ==========================================
   CINEMATIC VIDEO MODAL
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(11, 11, 11, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
}

.modal-video-wrapper iframe,
.modal-video-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.modal-info h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 800;
}

#modal-category {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 15px;
}

#modal-desc {
    color: #bbb;
    line-height: 1.6;
    font-size: 1.05rem;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3.5rem;
    color: #fff;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    z-index: 10002;
    background: none;
    border: none;
}

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

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .navbar {
        padding: 15px 5%;
    }

    .nav-links a {
        margin-left: 15px;
        font-size: 0.9rem;
    }

    .category-title {
        font-size: 1.8rem;
    }
}