:root {
    --white: #FFFFFF;
    --soft-white: #FAFBFC;
    --dark-navy: #1A1B3E;
    --soft-purple: #8B5FBF;
    --deep-purple: #6B46C1;
    --soft-turquoise: #4DD0E1;
    --turquoise: #26C6DA;
    --dark-turquoise: #00ACC1;
    --lavender: #E1D7F0;
    --mint: #B2F5EA;
    --gray-light: #F7FAFC;
    --gray-medium: #A0AEC0;
    --gray-dark: #4A5568;
    --gradient-primary: linear-gradient(135deg, var(--soft-turquoise), var(--soft-purple));
    --gradient-secondary: linear-gradient(135deg, var(--turquoise), var(--deep-purple));
    --shadow-soft: 0 10px 25px rgba(139, 95, 191, 0.15);
    --shadow-medium: 0 15px 35px rgba(77, 208, 225, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* font-family: "Patrick Hand SC", cursive; */
    font-family: "Comic Relief", system-ui;
    /* font-family: "Delius", cursive; */
    font-weight: 400;
    font-style: normal;
    font-size: large;
}


body {
    line-height: 1.6;
    color: var(--gray-dark);
    /* Background image is rendered via a positioned <img> in the markup for better
       responsive control (object-fit/object-position). Use a soft gradient fallback. */
    background: linear-gradient(135deg, var(--soft-white) 0%, var(--lavender) 50%, var(--mint) 100%);
    min-height: 100vh;
}

/* Responsive tweaks: avoid excessive cropping/zoom on narrower viewports */
/* media queries for background handled via .bg-image rules below */

/* Responsive background element (inserted in HTML to get better object-position control) */
.bg-image {
    position: fixed;
    inset: 0;
    z-index: -100; /* behind page content */
    pointer-events: none;
    overflow: hidden;
}
.bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* maintain cover behavior but with controllable object-position */
    object-position: center center;
    display: block;
}

/* Tweak focal point on medium screens (show slightly higher part of image) */
@media (max-width: 1024px) {
    .bg-image img { object-position: center 20%; }
}

/* On small phones prefer top-focused crop so faces/content near top aren't cut off */
@media (max-width: 480px) {
    .bg-image img { object-position: center 28%; }
}

/* Smooth in-page scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Header Styles */
header {
    /* stronger translucent white so the header is more visible over background images */
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 95, 191, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    position: relative;
}

/* Generic page container to provide consistent horizontal padding and max width
   so content (like project cards) doesn't touch the viewport edges. */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    position: absolute;
    left: 2rem;
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--gray-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    display: inline-block;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    /* use a darker, high-contrast color so links are legible over a bright header or image */
    color: var(--dark-navy);
    transform: translateY(-1px);
    background: none;
    /* keep transparent background but stronger text color for readability */
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

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

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(26, 27, 62, 0.98);
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .header-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* Mobile header changes when hamburger is active */
    .nav-menu.active ~ header,
    header:has(.nav-menu.active) {
        background-color: rgba(10, 25, 47, 0.98);
        backdrop-filter: blur(15px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    /* Alternative approach - add class to header via JavaScript */
    header.menu-active {
        background-color: rgba(10, 25, 47, 0.98);
        backdrop-filter: blur(15px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        border-bottom: 2px solid var(--soft-turquoise);
    }
}


/* Footer Styles */
footer {
    background: var(--dark-navy);
    color: var(--white);
    padding: 2rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Top row in footer: left name, centered socials, right contact */
.footer-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0 0 1rem;
}
.footer-left {
    text-align: left;
    color: var(--white);
    font-weight: 600;
    font-size: 1.05rem;
}
/* style the footer logo text to match the header branding */
.footer-logo {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.8rem; /* slightly larger than footer baseline */
    line-height: 1;
}
.footer-center {
    justify-self: center;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.footer-right {
    text-align: right;
    color: var(--white);
    font-weight: 400;
    font-size: 0.95rem;
}
.footer-social {
    color: var(--white);
    text-decoration: none;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
}
.footer-social:hover { background: rgba(255,255,255,0.12); color: var(--soft-turquoise); }

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--gray-medium);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--soft-turquoise);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    color: var(--gray-medium);
    font-size: 0.9rem;
    position: relative;
}



@media (max-width: 480px) {
    .footer-bottom::before {
        width: 140px;
        max-width: 70%;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
    }

    /* Stack footer top row on small screens */
    .footer-top { grid-template-columns: 1fr; text-align: center; padding-bottom: 0.5rem; }
    .footer-left, .footer-right { text-align: center; }
    .footer-right { margin-top: 6px; }
}
