/* =========================
   Base
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #020617;
    color: #f5f5f7;
    line-height: 1.5;
}

/* Containers and sections */

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

/* =========================
   Preloader
   ========================= */

#page-preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #020617, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#page-preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

/* Modern single-circle loader */
.loader-ring {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(34, 197, 94, 0.15);
    border-top-color: #22c55e;
    animation: loader-spin 0.8s linear infinite;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.65);
}

/* Optional subtle inner glow */
.loader-ring::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(34, 197, 94, 0.45), transparent 65%);
    opacity: 0.7;
}

/* Replace old spin keyframes if you like, or reuse the same name */
@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 0.75rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #9ca3af;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================
   Custom cursor
   ========================= */

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    margin-left: -6px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.7);
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 999;
    opacity: 0;
    transition:
        transform 0.1s ease-out,
        opacity 0.25s ease,
        width 0.15s ease,
        height 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease,
        border 0.15s ease,
        margin 0.15s ease;
}

.custom-cursor-active .cursor-dot {
    opacity: 1;
}

.cursor-dot.cursor-active {
    width: 32px;
    height: 32px;
    margin-top: -16px;
    margin-left: -16px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 26px rgba(34, 197, 94, 0.85);
}

/* =========================
   Navigation
   ========================= */

.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 40;
    transition:
        background 0.25s ease,
        box-shadow 0.25s ease,
        backdrop-filter 0.25s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.nav-scrolled {
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.95);
}

.logo {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.9rem;
    text-decoration: none;
    color: #f9fafb;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 0.8rem;
    text-decoration: none;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    position: relative;
    padding-bottom: 0.1rem;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.nav-link:hover {
    color: #f9fafb;
}

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

.nav-toggle {
    display: none;
}

/* =========================
   Hero
   ========================= */

.hero-carousel {
    position: relative;
    height: 100vh;
    min-height: 560px;
    max-height: 900px;
    overflow: hidden;
    background: #020617;
}

.carousel-track {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-media img,
.carousel-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(34, 197, 94, 0.15), transparent 60%),
        linear-gradient(to top, #020617, transparent 55%);
    mix-blend-mode: multiply;
}

/* Hero content */

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: clamp(2.8rem, 5.4vw, 3.9rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 0.9rem;
}

.hero-title .accent {
    color: #22c55e;
}

.typewriter-cursor {
    color: #22c55e;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-subtitle {
    max-width: 420px;
    color: #e5e7eb;
    font-size: 1rem;
    margin-bottom: 1.75rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.hero-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Hero carousel controls */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.78);
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: #22c55e;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.95);
    transform: translateY(-50%) scale(1.03);
}

.carousel-prev {
    left: 1.5rem;
}

.carousel-next {
    right: 1.5rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(148, 163, 184, 0.6);
    cursor: pointer;
    transition:
        background 0.2s ease,
        width 0.2s ease;
}

.carousel-dot.active {
    width: 18px;
    background: #22c55e;
}

/* Progress bar */

.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(15, 23, 42, 0.9);
    overflow: hidden;
    z-index: 3;
}

.carousel-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

/* Scroll indicator */

.scroll-indicator {
    position: absolute;
    bottom: 5rem;
    right: 2rem;
    z-index: 3;
}

.scroll-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(148, 163, 184, 0.25), rgba(148, 163, 184, 0.6));
    position: relative;
    overflow: hidden;
}

.scroll-line::before {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 16px;
    background: #22c55e;
    animation: scrollDown 1.6s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* =========================
   Buttons
   ========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.8rem 1.7rem;
    font-size: 0.8rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.12s ease,
        border-color 0.2s ease;
}

.btn-primary {
    background: linear-gradient(120deg, #22c55e, #4ade80);
    color: #020617;
    box-shadow: 0 18px 48px rgba(34, 197, 94, 0.6);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 60px rgba(34, 197, 94, 0.8);
}

.btn-outline {
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.5);
}

.btn-outline:hover {
    border-color: #22c55e;
    background: rgba(15, 23, 42, 0.98);
}

.btn-sm {
    padding: 0.6rem 1.3rem;
    font-size: 0.75rem;
}

/* =========================
   Section headers
   ========================= */

.section-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.section-number {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.26em;
    color: #6b7280;
}

.section-title {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 1.9rem;
    margin: 0;
}

/* =========================
   Reel
   ========================= */

.reel-player .video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 1.1rem;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.95);
}

.reel-player iframe {
    position: absolute;
    inset: 0;
    border: none;
}

.reel-info {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

/* =========================
   Filmography & Projects
   ========================= */

.filmography {
    background: radial-gradient(circle at top, rgba(34, 197, 94, 0.18), transparent 60%);
}

/* Outer scrollable wrapper */
.film-carousel-loop {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: none;
}

.film-carousel-loop::-webkit-scrollbar {
    display: none;
}

.film-carousel-loop.dragging {
    cursor: grabbing;
    user-select: none;
}

/* Inner track row */
.film-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding-inline: 1rem;
}

/* Cards */

.film-card {
    flex: 0 0 auto;
    text-decoration: none;
    color: inherit;
}

.film-poster {
    position: relative;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #020617;
    width: 220px;
    aspect-ratio: 2 / 3;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        outline 0.18s ease;
}

@media (min-width: 768px) {
    .film-poster {
        width: 260px;
    }
}

.film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.film-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: 0.9rem 1rem;
}

.film-info h3 {
    font-size: 0.95rem;
    margin: 0 0 0.1rem;
}

.film-info p {
    font-size: 0.8rem;
    margin: 0;
    color: #9ca3af;
}

.film-card:hover .film-poster {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.98);
}

/* =========================
   About
   ========================= */

.about {
    background: #020617;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
    gap: 3rem;
    align-items: center;
}

.lead {
    font-size: 1rem;
    color: #e5e7eb;
    margin-bottom: 1rem;
}

/* Highlighted role in About */
.highlight-role {
    position: relative;
    display: inline-block;
    padding-bottom: 0.1rem;
}

.highlight-role::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0.25rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.9), rgba(74, 222, 128, 0.9));
    opacity: 0.8;
    transform-origin: left center;
}

/* About stats */

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-number {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 1.7rem;
    display: block;
    color: #22c55e;
}

.stat-number::after {
    content: "+";
    margin-left: 0.08em;
    font-size: 1rem;
    vertical-align: super;
}

.stat-label {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* About photo */

.about-image {
    display: flex;
    justify-content: center;
}

.about-image img.about-photo {
    width: 260px;
    height: 260px;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    object-fit: cover;
    display: block;
}

/* =========================
   Skills
   ========================= */

.skills {
    background: #020617;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}

.skill-category h3 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #9ca3af;
}

.skill-list-sleek {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.skill-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.45rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid transparent;
}

.skill-icon {
    font-size: 1rem;
}

.skill-name-sleek {
    font-size: 0.9rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.skill-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.95);
}

/* Houdini easter egg */

.skill-row.houdini-skill {
    position: relative;
    overflow: visible;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.skill-row.houdini-skill:hover {
    background: radial-gradient(circle at top, rgba(34, 197, 94, 0.3), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(34, 197, 94, 0.8);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.8);
}

.confetti-bit {
    position: absolute;
    width: 4px;
    height: 8px;
    border-radius: 1px;
    background: #22c55e;
    pointer-events: none;
    opacity: 0.9;
    animation: confetti-fall 600ms ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) rotate(180deg);
        opacity: 0;
    }
}

/* =========================
   Contact
   ========================= */

.contact {
    background: radial-gradient(circle at top, rgba(34, 197, 94, 0.16), transparent 60%);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr);
    gap: 3rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.55rem;
    text-decoration: none;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.55);
    font-size: 0.85rem;
}

.contact-link:hover {
    border-color: #22c55e;
    background: rgba(15, 23, 42, 0.98);
}

.contact-icon svg {
    width: 16px;
    height: 16px;
}

/* Contact form */

.contact-form-wrapper {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 1rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 0.25rem;
    color: #9ca3af;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: #020617;
    color: #e5e7eb;
    font-size: 0.9rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #22c55e;
}

.btn-full {
    width: 100%;
}

.contact-email-btn.revealed {
    border-color: #22c55e;
}

/* =========================
   Footer
   ========================= */

.footer {
    background: #020617;
    border-top: 1px solid rgba(31, 41, 55, 0.95);
    padding: 1.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        inset: 60px 1rem auto 1rem;
        background: rgba(15, 23, 42, 0.98);
        border-radius: 0.9rem;
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        transform: translateY(-16px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 0.18rem;
        border: none;
        background: transparent;
        cursor: pointer;
    }

    .nav-toggle span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #e5e7eb;
    }

    .about-grid,
    .contact-grid,
    .skills-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-carousel {
        max-height: none;
    }

    .carousel-btn {
        display: none;
    }

    .reel-player .video-wrapper {
        box-shadow: 0 16px 45px rgba(15, 23, 42, 0.9);
    }
}