/* ========================================
   ROOT VARIABLES
======================================== */
:root {
    --primary: #0f172a;
    --accent: #2563eb;
    --light: #f8fafc;
    --gray: #64748b;
    --bg1: #060708;
    --bg2: #132229;
    --pbg1: #1D3540;
    --pbg2: #080F12;
    --card: #F5F5F5;
    --resbtn: #1E1E24;
}

/* ========================================
   GLOBAL RESET
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--primary);
    background: linear-gradient( to bottom, var(--bg1) 40%, var(--bg2) 100% );
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   NAVIGATION
======================================== */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px; /* fixed height */
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* IMPORTANT */
    padding: 0 2rem; /* horizontal padding only */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center; /* ensures perfect vertical centering */
    font-weight: bold;
    font-size: 1.2rem;
}

/* Container for right-side links (if you have one) */
.nav-links {
    display: flex;
}

/* Nav buttons */
nav a {
    display: flex;
    align-items: center; /* center text vertically */
    padding: 0 1.5rem; /* horizontal spacing */
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

    /* Full-height hover effect */
    nav a:hover {
        background: rgba(0,0,0,0.7);
        color: white;
    }

@media (max-width: 768px) {

    /* Hide logo */
    .logo {
        display: none;
    }

    /* Center the nav links */
    nav {
        justify-content: center;
        padding: 0; /* optional: removes side spacing */
    }

    .nav-links {
        justify-content: center;
        width: 100%;
    }
}


/* Make dropdown a flex item like other nav links */
.dropdown {
    display: flex; /* become a flex child */
    align-items: stretch; /* stretch to full nav height */
    position: relative; /* for dropdown positioning */
}

    /* Make the main Projects link fill the container height */
    .dropdown > a {
        display: flex;
        align-items: center; /* vertically center text */
        padding: 0 1.5rem; /* same horizontal spacing as other links */
        height: 100%; /* fill nav height */
        text-decoration: none;
        color: var(--primary);
        font-weight: 500;
        transition: background 0.2s, color 0.2s;
    }

    /* Hover effect matches other nav links */
    .dropdown:hover > a {
        background: rgba(0,0,0,0.7);
        color: white;
    }

/* Dropdown content (keep your existing styles) */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 140px;
    border-radius: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 999;
    flex-direction: column;
}

.dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
}

.dropdown-content a {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    display: block;
    transition: background 0.2s, color 0.2s;
}

    .dropdown-content a:hover {
        background: rgba(0,0,0,0.7);
        color: white;
    }

/* ========================================
   SECTIONS
======================================== */
section {
    
    padding: clamp(30px, 6vh, 100px) clamp(5%, 6vw, 10%);
}

    section + section {
        border-top: 2px solid rgba(0,0,0,0.07);
    }

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

/* ========================================
   HERO
======================================== */
/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light);
    background-image: url('resources/mainRender.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
}

    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.25);
        z-index: 0; /* behind text */
    }

/* Overlay container */
.hero-text-overlay {
    position: absolute;
    bottom: 12%;
    width: 100%;
    display: flex;
    flex-direction: column; /* stack text + button vertically */
    align-items: center; /* center horizontally */
    gap: clamp(1rem, 1vw, 2rem); /* spacing between title and button */
    background: rgba(0,0,0,0.5);
    padding: clamp(1rem, 5vw, 2rem) clamp(2%, 5vw, 10%);
    
    box-sizing: border-box;
    z-index: 1; /* above overlay */
}

/* Title wrapper to shrink-wrap h1 */
.hero-title-wrapper {
    display: inline-block; /* shrink-wrap width of h1 */
    text-align: center;
}

/* Main title */s
.hero h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    line-height: 1.1;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.55);
    margin: 0;
}

/* Subtitle aligned with h1 edges via JS */
.hero h2 {
    font-size: clamp(1.5rem, 4vw, 2.7rem); /* starting size, will be adjusted by JS */
    line-height: 1.1;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.55);
    margin: 0.2rem 0 0 0;
    display: inline-block; /* shrink-wrap for JS */
    width: auto; /* allow JS to adjust width */
    text-align: center;
}

/* Optional hero paragraph */
.hero p {
    margin-top: 0rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    text-align: center;
}

/* ========================================
   SVG Styling
======================================== */
.hero-svg {
   
    width: 80vw; /* responsive width */
    max-width: 1000px; /* optional max width */
    
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 0;
}


    .hero-svg text {
        fill: var(--light);
        text-shadow: 1px 1px 3px rgba(0,0,0,0.55);
        font-family: Arial, Helvetica, sans-serif; /* or monospace if you want perfect letters */
    }

    .hero-svg .hero-main {
        font-size: 120px; /*font-size: 4.7vw;*/ /* responsive size */
        font-weight: bold;
    }

    .hero-svg .hero-sub {
        font-size: 72.5px;
        /*font-size: 2.839vw;*/ /* smaller, perfectly aligned */
        font-weight: bold;
    }

/* ========================================
   MAIN CONTENT CARD
======================================== */
.main-content {
    background-color: var(--card);
    color: var(--primary);
    max-width: min(1200px, 92%);
    margin: -60px auto 60px auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
    padding: 0;
}

    .main-content p {
        line-height: 1.8;
    }

#about p {
    line-height: 2.2;
}

/* ========================================
   SKILLS
======================================== */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill {
    background: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ========================================
   PROJECTS GRID
======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(20px, 2vw, 30px);
}

.project-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

    .project-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }

    .project-card h3 {
        font-size: 1.5rem;
        margin-bottom: 0.6rem;
    }

    .project-card p {
        font-size: 1.05rem;
        color: #262626;
        margin-bottom: 1.2rem;
        line-height: 1.6;
    }

    /* Image inside card */
    .project-card img {
        margin-top: auto;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.75rem;
    border: 2px solid var(--resbtn);
    border-radius: 999px;
    background-color: white;
    color: var(--resbtn);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.25s ease;
}

    .btn:hover {
        background-color: var(--resbtn);
        color: white;
        transform: translateY(-4px);
    }

.resume-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.75rem;
    border: 2px solid var(--resbtn);
    border-radius: 999px;
    background-color: white;
    color: var(--resbtn);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.25s ease;
}

    .resume-btn:hover {
        background-color: var(--resbtn);
        color: white;
        transform: translateY(-4px);
    }

/* ========================================
   SCALING ARROW BUTTON (WORKING)
======================================== */
.custom-btn {
    display: inline-block;
    width: clamp(60px, 8vw, 100px);
    height: clamp(60px, 8vw, 100px);
    position: relative;
    margin-top: 0rem;
    cursor: pointer;
    animation: bounce 2s infinite;
    
}

    .custom-btn::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 0;
        height: 0;
        background: var(--light);
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        transition: width 0.3s ease, height 0.3s ease, transform 0.3s ease;
        z-index: 0;
    }

    .custom-btn:hover::before {
        width: 80%;
        height: 80%;
        transform: translate(-50%, -50%) scale(1);
    }

    .custom-btn .arrow {
        display: block;
        position: absolute;
        left: 50%;
        top: 18%;
        width: clamp(28px, 4vw, 45px);
        height: clamp(28px, 4vw, 45px);
        border-bottom: 5px solid var(--light);
        border-right: 5px solid var(--light);
        transform: translateX(-50%) rotate(45deg);
        transition: border-color 0.3s ease;
        z-index: 1;
    }

    .custom-btn:hover .arrow {
        border-color: var(--bg1);
    }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(10px);
    }

    60% {
        transform: translateY(5px);
    }
}

/* ========================================
   CONTACT
======================================== */

#contact {
    padding-top: clamp(60px, 8vh, 100px);
    padding-bottom: clamp(60px, 8vh, 100px);
}

.contact-links {
    display: flex;
    justify-content: space-between; /* THIS is the key */
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%; /* ensure full width */
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    margin-top: 0;
}

    .contact-links span,
    .contact-links a {
        color: var(--bg2);
        text-decoration: none;
        font-weight: 500;
    }

        .contact-links a:hover {
            color: var(--accent);
        }

.separator {
    user-select: none;
}

@media (max-width: 768px) {
    .contact-links {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .separator {
        display: none;
    }
}

/* ========================================
   FOOTER
======================================== */
footer {
    text-align: center;
    padding: 2rem;
    background: white;
    color: var(--gray);
    font-size: 0.9rem;
}


/* ========================================
   PROJECT PAGE STYLING
======================================== */


.project-body {
    background: var(--bg1);
}

.project-hero {
    padding: 140px 5% 80px 5%;
    background: linear-gradient( 135deg, #050B0D 0%, /* slightly darker */
    #132229 60%, /* your base */
    #1b3139 100% /* slightly lighter / richer teal */
    );
    color: var(--light);
}

.project-hero-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.project-meta {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.project-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.project-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    max-width: 750px;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-divider {
    width: 200px;
    height: 2px;
    background: var(--light);
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.project-tagline {
    max-width: 800px;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main container */
.project-container {
    background: var(--card);
    max-width: min(1200px, 92%); /* same as home */
    margin: -60px auto 80px auto;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}



/* Project facts row */
.project-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 0.95rem;
}

/* Content sections */
.content-section {
    margin-bottom: 3rem;
}

    .content-section h2 {
        margin-bottom: 1rem;

    }

    .content-section p {
        margin-bottom: 0rem;
    }

/* Split layout */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

    .split-section img {
        width: 100%;
        border-radius: 15px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    }

/* Image grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    
}

    .media-grid img {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        width: 100%;
        height: auto;
        display: block;
    }

/* Results list */
.results-list {
    list-style: disc;
    padding-left: 1.5rem;
    line-height: 1.8;
}

/* Back button */
.back-btn {
    margin-top: 0rem;
    display: inline-block;
    
}

/* =============
   Featured Media Slideshow
=============== */
.featured-media {
    position: relative;
    width: 100%;
    max-width: 950px; /* max width of the slideshow */
    aspect-ratio: 5 / 4; /* keeps width:height = 5:4 */
    margin: 0rem auto;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--card);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    margin-bottom: 4rem;
}

.media-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* fill container fully */
    opacity: 0;
    transition: opacity 1s ease;
    text-align: center;
}

    .media-slide.active {
        opacity: 1;
        position: relative;
    }

    .media-slide.fade-in {
        opacity: 1;
    }

    .media-slide img,
    .media-slide video {
        width: 100%;
        height: 100%; /* fill container */
        border-radius: 1rem;
        object-fit: cover; /* scale media without stretching */
    }

    .media-slide figcaption {
        position: absolute;
        bottom: 10px;
        left: 10px;
        color: #fff;
        font-size: 0.9rem;
        background: transparent; /* remove black background */
        margin: 0;
        padding: 0;
    }
    

.iteration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    
   
}

.iteration-item {
    text-align: center;
    margin-top: 1.5rem;
}

    .iteration-item img {
        width: 100%;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .iteration-item figcaption {
        margin-top: 0.5rem;
        font-size: 0.95rem;
        color: var(--gray);
        font-style: italic;
        
    }

    .iteration-item video {
        display: block; /* important */
        width: 100%;
        max-height: 500px;
        object-fit: cover;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

/* Responsive adjustments */
@media (max-width: 768px) {

    .project-container {
        padding: 2rem;
        
    }

    .split-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


.results-list + p {
    margin-top: 1rem;
}


.project-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
}

    .project-nav .btn {
        padding: 0.8rem 1.5rem;
    }

.prev-btn {
    text-align: left;
}

.next-btn {
    text-align: right;
    margin-left: auto;
}