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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 2rem;
}

html {
    scroll-behavior: smooth;
}

/* roots */
:root {
    /* colors */
    /* --cl-background:#191B1A; 
    --cl-primary:#EAEAEA;
    --cl-secodary: ;
    --cl-highlight:#791316; */
    --cl-background: #0a0a0a;
    --cl-primary: #EAEAEA;
    --cl-secondary: #888888;
    --cl-highlight: #8B0000; 

    /* fonts */
    --ff-main:'Special Elite', system-ui;
    /* --ff-content:'Courier Prime', monospace;
    --ff-content: 
    --ff-buttons:'Inter', sans-serif;  */
}

body {
    /* background-color: var(--cl-background); */
    background-color: var(--cl-background);
    color: var(--cl-primary);
    font-family: var(--ff-body);
    line-height: 1.6;
}

/* navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    
    /* glass effect */
    background: rgba(25, 27, 26, 0.1); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--ff-main);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cl-primary);
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.7;
}

/* desktop links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    font-family: var(--ff-main);
    font-size: 0.85rem;
    color: var(--cl-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    transition: color 0.3s ease;
}

/* underline effect */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--cl-highlight);
    transition: width 0.3s ease;
}

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

/* hamburger menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--cl-primary);
    transition: all 0.3s ease;
}

/* mobile resposiveness */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--cl-background);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        transform: translateY(-150%); 
        transition: transform 0.4s ease-in-out;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        transform: translateY(0);
    }
}

section {
    scroll-margin-top: 80px;
}

#home {
    scroll-margin-top: 0px;
}

/* home page */
.hero {
    position: relative;
    min-height: 100dvh; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
    background: url('../assets/images/hero-bg.jpg') center/cover no-repeat;
    background-color: var(--cl-background);
}

.hero-overlay {
    position: absolute;
    inset: 0; /* Shorthand for top:0, left:0, right:0, bottom:0 */
    background: linear-gradient(
        to bottom, 
        rgba(5, 5, 5, 0.5) 0%, 
        rgba(5, 5, 5, 0.95) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    padding: 0 1.5rem;
    
    opacity: 0;
    animation: fadeUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

.hero-headline {
    font-family: var(--ff-main);
    /* fluid sizing */
    font-size: clamp(2.0rem, 6vw, 5rem); 
    line-height: 1.05;
    color: var(--cl-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-headline .accent {
    color: var(--cl-highlight);
    display: block;
}

.accent {
    overflow: hidden; /* Ensures text isn't shown before typing */
    border-right: 0.15em solid var(--cl-highlight); /* The blinking cursor */
    white-space: nowrap; /* Keeps text on a single line */
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: 
    typing 3.5s steps(40, end),
    blink-caret 0.75s step-end infinite;

    @keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--cl-highlight); }
}
}

.hero-subheadline {
    font-family: var(--ff-main);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #A0A0A0;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 1rem 2rem;
    font-family: var(--ff-main);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border-radius: 10px;
    
    width: 100%; 
    max-width: 280px;
}

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

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

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

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

/* mobile resposiveness */
@media (min-width: 768px) {
    .hero-content {
        padding: 0 3rem;
    }

    .hero-headline .accent {
        display: inline;
    }

    .hero-cta {
        width: auto; 
    }

    .btn {
        width: auto; 
        max-width: none;
    }
}

@media (min-width: 1024px) {
    .hero-headline {
        letter-spacing: 4px; 
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* portfolio page - card*/
.portfolio-section {
    padding: 6rem 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--ff-main);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--cl-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-family: var(--ff-main);
    color: #888;
    margin-bottom: 4rem;
    font-size: 1rem;
}

.card-info {
    font-family: var(--ff-main);
    padding-top: 0.5rem;
}

/* video cards */
.projects-grid {
    display: grid;
    /* 280px vertical poster */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
}

.project-card {
    cursor: pointer;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    /* film poster aspect ratio (2:3) */
    aspect-ratio: 2 / 3; 
    overflow: hidden;
    border-radius: 4px;
    background-color: #1a1a1a;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); 
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* no stretching */
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
    opacity: 0.9;
}

.project-card:hover .card-image-wrapper {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.project-card:hover .card-image {
    transform: scale(1.05);
    filter: brightness(0.5);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cl-highlight);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    color: white;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
}

.project-card:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-btn svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
}

/* video modal */
/* full-screen overlay */
#video-modal {
    position: fixed;
    inset: 0; /* top:0, right:0, bottom:0, left:0 */
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    
    /* hidden by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#video-modal.active {
    opacity: 1;
    visibility: visible;
}

/* dark blurred backdrop */
#video-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
}

/* centered video container */
#video-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    
    /* pop-in animation */
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#video-modal.active #video-container {
    transform: scale(1);
}

/* 16:9 responsive video wrapper */
#video-container iframe {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* close button */
.close-modal {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2001; /* Above the modal */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--cl-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#video-modal.active ~ .close-modal,
.close-modal.visible {
    opacity: 1;
    visibility: visible;
}

.close-modal:hover {
    background: var(--cl-highlight);
    color: var(--cl-primary);
    transform: rotate(90deg);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* mobile resposiveness */
@media (max-width: 768px) {
    #video-modal {
        padding: 0.75rem;
    }
    
    .close-modal {
        top: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
    }
}

/* video modal */
#video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#video-modal.active {
    opacity: 1;
    visibility: visible;
}

#video-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1090px;
    max-height: 90vh;
    overflow-y: auto;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transform: scale(0.92);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    /* custom scrollbar for dark theme */
    scrollbar-width: thin;
    scrollbar-color: var(--cl-highlight) #1a1a1a;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--cl-highlight);
    border-radius: 3px;
}

#video-modal.active .modal-content {
    transform: scale(1);
}

/* video container */
#video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* film Info Section */
.modal-info {
    padding: 2rem 2.5rem 2.5rem;
}

.modal-info-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
}

.modal-title {
    font-family: var(--ff-main);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--cl-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.modal-meta {
    font-family: var(--ff-main);
    font-size: 0.95rem;
    color: var(--cl-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.modal-role {
    color: var(--cl-primary);
}

.modal-divider {
    color: var(--cl-highlight);
    margin: 0 0.75rem;
}

.modal-description {
    font-family: var(--ff-main);
    font-size: 1rem;
    color: #B0B0B0;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ff-main);
    font-size: 0.9rem;
    color: var(--cl-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-link:hover {
    background: var(--cl-highlight);
    border-color: var(--cl-highlight);
    color: var(--cl-primary);
}

/* close button */
.close-modal {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--cl-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#video-modal.active ~ .close-modal,
.close-modal.visible {
    opacity: 1;
    visibility: visible;
}

.close-modal:hover {
    background: var(--cl-highlight);
    border-color: var(--cl-highlight);
    transform: rotate(90deg);
}

body.modal-open {
    overflow: hidden;
}

/* mobile resposiveness */
@media (max-width: 768px) {
    #video-modal {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 4rem;
    }
    
    .modal-content {
        max-height: calc(100vh - 5rem);
    }
    
    .modal-info {
        padding: 1.5rem;
    }
    
    .close-modal {
        top: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
    }
}

/* =========================================
   COMING SOON CARD OVERRIDES
   ========================================= */

/* 1. Remove the pointer cursor so it doesn't look clickable */
.project-card.coming-soon {
  cursor: default;
}

/* 2. Disable the hover lift and shadow change */
.project-card.coming-soon:hover .card-image-wrapper {
  transform: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* 3. Blur and darken the poster image, prevent zoom */
.project-card.coming-soon .card-image {
  filter: blur(6px) brightness(0.4);
  transform: none !important;
}

/* 4. Hide the play button completely */
.project-card.coming-soon .play-btn {
  display: none;
}

/* 5. Style the "Coming Soon" Badge */
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.coming-soon-overlay span {
  font-family: var(--ff-main);
  font-size: 0.9rem;
  color: var(--cl-primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  /* background: rgba(10, 10, 10, 0.7);
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--cl-highlight); 
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px); */
}

span:hover {
    font-size: 1.2rem;
    color: var(--cl-highlight);
}