/* --- CSS VARIABLES & RESET (Dark Mode) --- */
:root {
    --bg-color: #040714; /* Deep Dark Blue */
    --text-light: #e1e2e4; 
    --glass-bg-base: rgba(30, 42, 74, 0.6); /* Base dark glass color */
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    /* --- ADJUSTABLE SPACING VARIABLES (NOW SUPPORTS OVERLAP) --- */
    --hero-content-spacing: -300px; /* NEGATIVE VALUE FOR OVERLAP! Adjust as needed */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Open Sans", "boldonse", sans-serif; 
}

.fancy-text{
    font-family: "boldonse";
}

body {
    background-color: var(--bg-color);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
}

/* --- Dsiables the textarea resize option -- */
textarea {
    resize: none;
}

/* --- VIGNETTE PATTERN (Cubes) - FIXED --- */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    
    background-image: 
        radial-gradient(circle at center, transparent 0%, rgba(20, 30, 60, 0.8) 80%), 
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 0L0 10l10 10 10-10L10 0z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E"); 
    background-size: cover, 20px 20px;
}


/* --- REAL GLASSMORPHISM (Refined for corners) --- */
.glass-panel {
    background: linear-gradient(135deg, rgba(40, 50, 80, 0.6), rgba(20, 25, 40, 0.7));
    backdrop-filter: blur(2px); 
    -webkit-backdrop-filter: blur(40px);
    
    box-shadow: inset 0.3px 1px 2px rgba(255, 255, 255, 0.4), var(--shadow-glass);
    border-radius: 40px;
}

.thank-you-glass-panel {
    background: linear-gradient(135deg, rgba(40, 50, 80, 0.6), rgba(20, 25, 40, 0.7));
    backdrop-filter: blur(2px); 
    -webkit-backdrop-filter: blur(40px);
    
    box-shadow: inset 0.3px 1px 2px rgba(255, 255, 255, 0.4), var(--shadow-glass);
    border-radius: 40px;
}

/* --- NAVIGATION BAR --- */
nav {
    position: fixed;
    top: -120px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    height: 70px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    transition: top 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); 
}

nav.active {
    top: 25px; 
}

.nav-logo {
    font-weight: bold;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links a {
    margin-left: 30px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover, .nav-links a.active-link {
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* --- HERO SECTION (VIDEO & TEXT) --- */
.hero-container { 
    margin-top: -50px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* REMOVED padding-bottom as negative values don't work with padding */
}

/* --- HERO VIDEO RESPONSIVE STYLING (FIXED) --- */
#hero-video { 
    width: auto;
    max-width: 100%;
    height: auto;
    z-index: 1;
    transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
    
    /* Default to cover for desktop */
    object-fit: cover; 
}

/* --- DESKTOP STYLING (Larger Video) --- */
@media (min-width: 769px) {
    #hero-video {
        width: auto;
        max-width: 2600px; /* Force full viewport width */
        height: auto; /* Let it scale naturally based on aspect ratio */
        
        /* Optional: If you want to fill height exactly, uncomment below and adjust object-fit */
        /* max-height: 85vh; */ 
    }
}

/* --- MOBILE STYLING (No Cuts) --- */
@media (max-width: 768px) {
    #hero-video {
        width: 100%;
        height: auto;
        
        /* FIX: Use contain to prevent cutting edges of portrait video */
        object-fit: contain; 
        padding-top: 20px; /* Add some breathing room at top if needed */
    }
}

#hero-video.fade-out {
    opacity: 0.5 !important; 
    transform: scale(1.05); 
}

.intro-section {
    text-align: center;
    position: absolute; 
    z-index: 2;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(30px); 
}

.intro-section.visible {
    opacity: 1;
    transform: translateY(0); 
}

h1.big-text {
    font-size: clamp(2rem,4vw,4rem); 
    color: #fbf8eb; 
    margin-bottom: 1rem;
    text-shadow: 4px 4px 7px #000000;
}

/* --- CONTENT WRAPPER (Glassmorphic) - NOW OVERLAPS HERO VIA MARGIN --- */
.content-wrapper {
    /* Use negative margin for overlap! */
    margin-top: var(--hero-content-spacing); 
    padding: 80px 20px;
    position: relative;
    z-index: 10;
    padding-bottom: 150px; 
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 60px auto; 
    gap: 10px;
    
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out; 
}

.row.visible {
    opacity: 1;
    transform: translateY(0);
}

.row.reverse {
    flex-direction: row-reverse;
}

.media-box, .text-box {
    flex: 1;
    min-width: 300px;
}

/* Image Hover Logic */
.image-container {
    width: 100%;
    border-radius: 25px; 
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.image-container img {
    width: 100%;
    display: block;
    transition: opacity 0.3s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; 
    transition: opacity 0.3s ease;
    
    will-change: opacity;
}

.image-container:hover .video-overlay {
    opacity: 1;
    z-index: 2;
}

.video-overlay img,
.video-overlay video {
    pointer-events: none;
}


.text-box h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.text-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cbd5e0; 
}

/* --- SPACER (Added to separate Contact from Projects) --- */
.spacer {
    height: 0px; 
}

/* --- FOOTER SECTION (Separated) --- */
footer {
    padding: 100px 20px;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 20; 
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: left;
    gap: 50px;
}

.footer-text h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

/* --- HERO VIDEO FALLBACK IMAGE STYLING --- */
#hero-fallback-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: none; /* Hidden by default */
}

/* --- FORM STYLING (Dark Mode Fixes) --- */
.contact-form {
    margin-right: 5%;
    width: 60%;
    min-width: 40%;
    padding: 30px; 
    color: var(--text-light);
}

.form-group, .form-row {
    margin-bottom: 5%;
}

.form-row {
    display: flex;
    gap: 2%;
}

.half-width {
    width: 50%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.5rem;
    color: #cbd5e1; 
}

/* Input Fields */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px; 
    background: rgba(255, 255, 255, 0.08); 
    color: white;
    font-size: 1rem;
    outline: none;
    border: 1px solid transparent; /* Removed default border */
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-light); 
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* --- DROPDOWN FIX (Issue #1) --- */
select.form-control {
    appearance: none; /* Remove default arrow styling */
    -webkit-appearance: none;
    
    background-color: rgba(40, 48, 80, 0.6); /* Darker glass color for dropdown box */
    border: 1px solid transparent; /* No border by default */
    cursor: pointer;
}

/* Custom arrow icon */
select.form-control {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px;
}

/* Dropdown Options Fix (Issue #1) */
select.form-control option {
    background-color: var(--bg-color); /* Dark background for options */
    color: white; /* White text for visibility */
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider between options */
}

button.submit-btn {
    background: linear-gradient(40deg, #afffb1, #6dbb6e); 
    color: var(--bg-color); 
    border: none;
    padding: 12px 30px;
    border-radius: 12px; 
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.submit-btn:hover {
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgb(87, 255, 10);
}

.container {
  display: flex;           /* Enables flexbox */
  justify-content: center; /* Centers horizontally */
  align-items: center;     /* Centers vertically */
  height: 15vh;           /* Forces the container to take full screen height */
}

.thankyoucontainer {
  display: flex;           /* Enables flexbox */
  justify-content: center; /* Centers horizontally */
  align-items: center;     /* Centers vertically */
  height: 100vh;
  padding: 10%;           /* Forces the container to take full screen height */
}

.svgcontainer {
  display: flex;           /* Enables flexbox */
  justify-content: center; /* Centers horizontally */
  align-items: center;     /* Centers vertically */
  height:clamp(5vh, 15vh, 15vh);           /* Forces the container to take full screen height */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .row, .row.reverse {
        flex-direction: column !important;
    }
    .footer-container {
        flex-direction: column;
        height: auto;
    }
    .contact-form {
        width: 100%;
    }
}

/* --- ENHANCED SCROLL ANIMATION FOR NAV LINKS --- */
html {
    scroll-behavior: smooth; 
}

/* Add subtle highlight when link is clicked */
.nav-links a.active-link {
    animation: navHighlight 0.5s ease-in-out;
}

@keyframes navHighlight {
    0% { text-shadow: none; }
    50% { text-shadow: 0 0 12px rgba(255, 255, 255, 0.8); }
    100% { text-shadow: none; }
}
