/* ADD CUSTOM FONT-FACE DECLARATION AT THE TOP */
@font-face {
    font-family: 'ftnk';
    src: url('fonts/NeueHaasDisplayBold.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; 
}

/* COLOR PALETTE (Strict B&W) */
:root {
    --color-primary: #ffffff;         /* White text */
    --color-background: #000000;      /* Pure Black background */
    --color-border: rgba(255, 255, 255, 0.1); /* Subtle white border */
    --nav-bg: rgba(0, 0, 0, 0.95);    /* Semi-transparent Black */
}

/* GLOBAL STYLES */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding-top: 60px; /* Padding to compensate for fixed header */
    background-color: var(--color-background);
    color: var(--color-primary);
    line-height: 1.6;
}

/* --- HEADER AND NAVIGATION (Taskbar) --- */

header {
    background-color: var(--nav-bg); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px 0;
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-100%); /* Initially hide header */
    transition: transform 0.4s ease-out;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

.header-visible {
    transform: translateY(0); /* Show header on scroll top */
}

nav {
    display: grid; 
    grid-template-columns: 1fr auto 1fr; /* Links (Left), Title (Center), Hamburger (Right) */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.center-title {
    font-family: 'ftnk', sans-serif; /* Custom Font Applied */
    font-size: 1.6em; 
    font-weight: normal; 
    letter-spacing: 6px; 
    text-transform: uppercase;
    text-align: center;
    grid-column: 2; 
    margin: 0;
}

/* DESKTOP LINKS STYLING (Left side) */
.desktop-links {
    grid-column: 1; 
    display: flex;
    gap: 30px;
    justify-content: start;
    font-weight: 300;
}

.desktop-links a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9em;
}

.desktop-links a:hover,
.desktop-links a.active {
    color: #888;
}

/* HAMBURGER ICON STYLES */
.menu-icon {
    grid-column: 3; 
    justify-self: end;
    cursor: pointer;
    width: 25px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 5px;
}

.menu-icon div {
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transition: background-color 0.3s;
}

.menu-icon:hover div {
    background-color: #888;
}


/* SIDE MENU (Off-Canvas Navigation) */
.side-menu {
    height: 100%; 
    width: 0; 
    position: fixed; 
    z-index: 2000; 
    top: 0;
    right: 0; 
    background-color: var(--color-background);
    overflow-x: hidden; 
    transition: 0.5s; 
    padding-top: 60px; 
    box-shadow: -5px 0 15px rgba(255, 255, 255, 0.1);
}

.side-menu a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 1.8em;
    color: var(--color-primary);
    display: block;
    transition: 0.3s;
    font-weight: 300;
    letter-spacing: 2px;
}

.side-menu a:hover, .side-menu a.active {
    color: #888;
}

.side-menu .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 3em;
    margin-left: 50px;
}

/* --- VIDEO PORTFOLIO STYLES (index.html) --- */

.video-stack {
    max-width: 1000px; 
    margin: 0 auto;
    padding: 0; 
}

.video-container {
    margin-bottom: 5px; /* Tight spacing */
    text-align: center;
    padding: 0; 
    position: relative;
    cursor: pointer;
}

.video-content-wrapper {
    position: relative;
    display: block; /* Use display block */
    width: 100%;
    /* Add padding-top to maintain a 16:9 aspect ratio */
    padding-top: 56.25%; /* 9 / 16 = 0.5625 */
    overflow: hidden; /* Hide the Vimeo iframe padding/borders */
}

.video-container video {
    width: 100%;
    max-height: 90vh; 
    display: block;
    object-fit: cover; 
    border-radius: 0; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* CAPTION OVERLAY STYLES (Flexbox for stacking) */
.caption-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: rgba(0, 0, 0, 0.5); 
    
    display: flex;
    flex-direction: column; /* Stacks text above button */
    justify-content: center; 
    align-items: center; 
    
    opacity: 0; 
    transition: opacity 0.3s ease-in-out;
    cursor: pointer;
    z-index: 15; 
    padding: 20px; 
    box-sizing: border-box;
}

.caption-overlay p {
    color: var(--color-primary);
    font-size: 2em; 
    font-weight: 300;
    text-align: center;
    line-height: 1.2;
    margin: 0 0 10px 0; /* Space between text and button */
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); 
}

/* PLAY/PAUSE BUTTON STYLES (Controlled by Flexbox) */
.play-pause-btn {
    position: relative; 
    
    background: none; 
    border: none;     
    padding: 0;       
    color: var(--color-primary); 
    font-size: 1.5em; /* Smaller than text */
    cursor: pointer;
    
    z-index: 20; /* Highest Z-index for clickability */
    
    transition: transform 0.3s;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8), 0 0 15px var(--color-primary); 
}

/* Show both the caption and button on hover */
.video-container:hover .caption-overlay {
    opacity: 1;
}

/* Button hover state */
.video-container:hover .play-pause-btn {
    transform: scale(1.1); 
    opacity: 1; 
}


/* --- CONTACT PAGE STYLES (contact.html) --- */

.contact-content {
    max-width: 600px;
    margin: 100px auto;
    padding: 40px;
    text-align: center;
}

.contact-content h2 {
    font-size: 2.5em;
    font-weight: 300;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.contact-details p {
    font-size: 1.2em;
    margin: 20px 0;
}

.contact-details a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--color-primary);
    transition: color 0.3s, border-color 0.3s;
}

.contact-details a:hover {
    color: #888;
    border-color: #888;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
    font-size: 0.8em;
    color: #888;
}

/* --- MOBILE ADJUSTMENTS --- */

@media (max-width: 768px) {
    
    /* Hide the desktop links on mobile */
    .desktop-links {
        display: none;
    }
    
    /* Ensure title and menu icon align correctly */
    nav {
        grid-template-columns: 1fr auto 1fr; /* Reset to 3 columns for layout control */
    }
    
    .center-title {
        grid-column: 2; 
        font-size: 1.2em;
        letter-spacing: 4px;
        text-align: center;
    }

    .menu-icon {
        grid-column: 3;
    }

    /* Reduce font size for caption on small screens */
    .caption-overlay p {
        font-size: 1.5em;
    }
}