/* Base reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --velvet-red: #6b0f1a;
    --velvet-red-light: #8c1724;
    --velvet-red-dark: #4a0a12;
    --dark-bg: #ac2323fa;
    --light-bg: rgb(163, 32, 32);
    /* --light-bg: rgb(12, 6, 10); */
    --text-color: #f2eeee;
    --secondary-text-color: #dbd1d1;
    --accent-color: #c9a7a77f;
    --black: #000000; 
}

@font-face {
  font-family: 'regular';
  src: url('fonts/InputMono-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'black';
  src: url('fonts/InputSerif-Black.ttf') format('truetype');
}

@font-face {
  font-family: 'medium';
  src: url('fonts/InputMono-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'italic';
    src: url('fonts/InputMono-ThinItalic.ttf') format('truetype');
  }

body, html {
    font-family: 'regular', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
    letter-spacing: 0.05em;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3 {
    font-weight: 400;
    letter-spacing: -0.02em;
    font-style: normal;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    pointer-events: auto;
    background-color: var(--dark-bg);
}

nav::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 2px;
    background-color: var(--accent-color);
    opacity: 0.4;
}

.nav-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.logo {
	font-family: 'black', sans-serif;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    letter-spacing: -0.3rem;
    font-weight: 500;
    transition: color 0.3s ease;
    /* Add the line below */
    display: block; /* Make it take full width */
    padding-bottom: 1.5rem; /* Space between text and line, matches parent padding */
    margin-bottom: 2rem; /* Space below the line, matches container gap */
    position: relative; /* Needed for the pseudo-element */

     /* === ADD THIS === */
    /* Set a specific background for the logo area */
    background-color: var(--logo-bg-color, rgba(46, 42, 69, 0.09)); /* Example: white or define --logo-bg-color */
    /* Optional: Add padding to visually contain the text better */
    padding-top: 1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem; /* Adjust padding as needed */
    /* Adjust margins if needed due to added padding */
    margin-left: -1.5rem; /* Counteract added left padding if needed */
    margin-right: -1.5rem; /* Counteract added right padding if needed */
    margin-top: -1.5rem; /* Counteract added top padding if needed */
    /* ================ */
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -1.5rem; /* Extend to the left edge of nav padding */
    right: calc(2px);
    height: 2px;
    background-color: var(--accent-color);
    opacity: 0.4;
}


.logo:hover {
    color: var(--black);
}   

.logo-subtitle {
    font-family: 'italic', sans-serif;
    display: block;
    letter-spacing: 0rem;
    font-size: 0.7rem;    /* Smaller text */
    font-weight: 400;     /* Lighter weight */
    color: var(--sub-text, rgba(224, 218, 218, 0.942)); /* Dimmer color */
    margin-top: 0.05rem;   /* Space below main logo text */
    line-height: 0.5;       /* Compact line height */
  }

.nav-links {
	font-family: 'medium', sans-serif;
    display: flex;
    flex-direction: column;
    list-style: none; /* Ensure main nav links also have no bullets */
    gap: 1rem;
    margin-top: -2rem;
}

.nav-links a {
    color: var(--secondary-text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--black);
}

/* Dropdown styling */
.dropdown {
	font-family: 'regular', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-content {
	font-family: 'italic', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 0rem;
    padding-left: 1rem;
    min-width: 160px;
    z-index: 1;
    list-style: none; /* Add this if dropdown-content is the UL/OL */
}

/* ADD THIS RULE to target list items if they exist inside .dropdown-content */
.dropdown-content li {
    list-style: none;
}

.dropdown-content a {
    color: var(--secondary-text-color);
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #c6212f0d;
}

/* Main content */
main {
    margin-left: 160px;
    width: calc(100% - 160px);
    position: relative;
}

/* Hero section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
}

.hero-frame {
    width: 60%; /* Adjust as needed for two images + potential gap */
    position: relative;
    overflow: visible;
    border: 2px solid var(--accent-color);
    line-height: 0;
    display: flex; /* ADDED: Make frame a flex container */
    /* gap: 1rem; */ /* Optional: Add space between images */
}

.hero-frame:hover {
    box-shadow: 0 0 25px rgba(107, 15, 26, 0.25);
}

/* Target images specifically within the hero frame */
.hero-frame img {
    width: 50%; /* Each image takes half the frame width */
    /* width: calc(50% - 0.5rem); */ /* Use if adding gap */
    height: auto;
    display: block;
    object-fit: contain;
    transition: filter 0.5s ease;
}

.hero-frame img:nth-child(2) {
    transform: scale(1.05); /* Adjust the value (e.g., 1.05 = 5% zoom) */
    /* Optional: Adjust transform origin if needed */
    /* transform-origin: center; */ /* This is the default */

}

.hero-frame img:hover {
    filter: brightness(0.95) sepia(0);
}

/* NEW: Wrapper for the second image */
.image-zoom-wrapper {
    width: 50%;        /* Takes up the second half */
    overflow: hidden;  /* CRUCIAL: This clips the scaled image */
    display: block;    /* Treat as a block */
    position: relative; /* Optional, but can be useful */
}

/* NEW: The second image INSIDE the wrapper */
.image-zoom-wrapper img {
    display: block;     /* Prevents bottom space */
    width: 100%;        /* Fill the wrapper width */
    height: 100%;       /* Fill the wrapper height */
    object-fit: cover;  /* Cover the area, maintaining aspect ratio (will crop) */
    transform: scale(1.1); /* Apply the zoom (e.g., 1.1 = 10% zoom) */
    transform-origin: center; /* Zoom from the center */
    transition: transform 0.5s ease, filter 0.5s ease; /* Smooth transitions */
}

/* Optional: Hover effect for the second image */
.image-zoom-wrapper img:hover {
    filter: brightness(0.95) sepia(0);
    /* transform: scale(1.15); */ /* Example: Zoom slightly more on hover */
}

.image-caption {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
    padding-top: -1rem;
    text-align: center;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-top: -0.8rem;
}

.hero-content {
    max-width: 850px;
    text-align: center;
    position: static;
    transform: none;
}

.hero-content h1 {
	font-family: 'black', sans-serif;
    font-size: clamp(4rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
    font-weight: 1000;
    line-height: 1.2;
    color: var(--text-color);
    letter-spacing: 1em;
}

.hero-content h1::after {
    content: '';
    display: block;
    width: 850px;
    height: 2px;
    background-color: var(--accent-color);
    opacity: 0.4;
    margin-top: 0.75rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-content h2 {
	font-family: 'black', sans-serif;
    font-size: clamp(4rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
    font-weight: 1000;
    line-height: 1.2;
    color: var(--text-color);
    letter-spacing: 0.5rem;
}

.hero-content p1 {
    font-size: clamp(1.25rem, 1.5vw, 1rem);
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 0.02em;
    color: var(--secondary-text-color);
}

.hero-content p1::after {
    content: '';
    display: block;
}

.hero-content p2 {
    font-family: 'italic', sans-serif;
    font-size: clamp(1.25rem, 1.5vw, 1rem);
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 0.02em;
}

/* Video section */
.videos {
    padding: 8rem 0;
    width: 100%;
}

.video-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.video-item {
    margin-bottom: 6rem;
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: 6rem;
    border-bottom: 1px solid var(--accent-color);
    scroll-margin-top: 100px;
}

.video-item:last-child {
    border-bottom: none;
}

.video-content-wrapper {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.video-text {
    width: 100%;
    margin-bottom: 2rem;
}

.video-text h2 {
	font-family: 'black', sans-serif;
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-color);
    letter-spacing: 0.1rem;
}

.video-text p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.2rem);
    letter-spacing: 0.01em;
    max-width: 100%;
    color: var(--secondary-text-color);
}

.video-meta {
    font-size: 0.9rem;
    opacity: 0.6;
}

.video-frame {
    aspect-ratio: 16/9;
    width: 100%;
    border: 4px solid var(--accent-color);
    overflow: hidden;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.works-heading {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 1000;
    color: var(--text-color);
    margin-bottom: 3rem;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.04em;
}

/* About section */
.about {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    width: 100%;
}

/* Footer */
footer {
    padding: 2rem;
    /* Remove border-top and opacity from here */
    margin-top: 3rem;
    margin-left: 160px;
    width: calc(100% - 160px);
    width: auto; /* Allow margin to take effect */
    position: relative; /* Needed for the pseudo-element */
}

/* Create the line using a pseudo-element */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
    opacity: 0.4;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
    position: relative; /* Ensure content is above the pseudo-element if needed, though usually not required */
    z-index: 1;
}

.footer-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    opacity: 0.8; /* Keep opacity here for links */
    transition: opacity 0.3s ease, color 0.3s ease;
    font-size: 1rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--velvet-red-light);
}

.copyright {
    font-size: 1rem;
    opacity: 0.8; /* Keep opacity here for copyright */
}

/* Page transition (unchanged) */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--velvet-red-dark), var(--velvet-red-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 1000;
}

body.transitioning .page-transition {
    transform: scaleX(1);
}

.gradient-squares-container {
    position: fixed; /* Keep it at the top */
    top: 0;
    left: 0;
    width: 100%;
    height: 20px; /* Height of the squares */
    display: flex; /* Arrange squares horizontally */
    z-index: 90; /* Ensure it's above other fixed elements like nav */
    pointer-events: none; /* Allow clicks to pass through */
    opacity: 0.93; 
}

.gradient-square {
    flex-grow: 1; /* Make each square take equal width */
    height: 100%;
    /* Background color will be set by JavaScript */
}

/* Remove border from the very last square */
.gradient-square:last-child {
    border-right: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--velvet-red-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--velvet-red-light);
}

/* Media Queries */
@media (max-width: 768px) {
    nav {
        width: 100%;
        height: auto;
        padding: 1rem;
        position: relative; /* Changed from fixed for mobile */
        background-color: var(--dark-bg);
        z-index: 100;
    }

    nav::after {
        display: none; /* Hide vertical line */
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-links {
        flex-direction: row;
        gap: 1.5rem;
    }

    .dropdown-content {
        position: static;
        padding-left: 0;
    }

    /* === ADD/MODIFY THESE RULES === */
    main,
    footer {
      margin-left: 0; /* Reset margin for mobile */
      width: 100%;   /* Take full available width */
    }

    main {
        /* Add horizontal padding to prevent content touching edges */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    footer {
        /* Ensure footer also has padding */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        /* Keep original top/bottom padding if desired */
        /* padding: 2rem 1.5rem; */ /* Example if original was padding: 2rem */
    }
    /* =============================== */

    .hero-frame {
        width: 90%;
    }

    .hero-content h1::after {
        width: 90%;
    }

    .video-content-wrapper {
        width: 100%; /* Use full width within main's padding */
        padding: 0;  /* Remove specific padding if main handles it */
    }

    .works-heading {
        width: 100%; /* Use full width within main's padding */
        padding: 0;  /* Remove specific padding if main handles it */
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        /* Width is now controlled by the footer element */
    }

    .footer-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-links a {
        margin-left: 0;
    }
}