/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(-45deg, #0F363D, #1a4f5a, #0004f4, #2a5f6f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite, slideInDown 0.6s ease-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    height: var(--header-height);
    box-shadow: 0 4px 30px rgba(0, 4, 244, 0.1);
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    gap: var(--spacing-md);
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: auto;
}

.logo {
    height: 45px;
    width: auto;
    transition: all var(--transition-normal);
    filter: drop-shadow(0 0 10px rgba(0, 4, 244, 0.3));
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(0, 4, 244, 0.6));
}

/* Navigation */
.nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav a {
    color: var(--color-text);
    text-decoration: none;
    text-transform: capitalize;
    font-weight: var(--font-weight-light);
    font-size: var(--font-size-base);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary-blue), var(--color-secondary));
    transition: width var(--transition-normal);
}

.nav a:hover::before,
.nav a.active::before {
    width: 100%;
}

.nav a:hover,
.nav a.active {
    transform: translateY(-2px);
    color: var(--color-cream);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 28px;
    cursor: pointer;
    padding: var(--spacing-xs);
    line-height: 1;
    transition: color var(--transition-normal);
}

.menu-toggle:hover {
    color: var(--color-primary-blue);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: var(--spacing-xs);
    width: 100%;
    overflow-x: hidden;
}

.hero h1 {
    margin-bottom: var(--spacing-sm);
    font-size: clamp(18px, 5vw, 60px);
    color: var(--color-cream); /* Fallback for browsers without background-clip support */
    background: linear-gradient(135deg, #e8e1ce, #0004f4, #6E969E, #e8e1ce);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite, fadeInUp 1s ease-out;
    text-shadow: 0 0 30px rgba(0, 4, 244, 0.3);
}

.hero-tagline {
    font-size: clamp(16px, 3vw, 24px);
    font-weight: var(--font-weight-light);
    color: var(--color-cream);
    margin-bottom: var(--spacing-lg);
    max-width: 100%;
    word-wrap: break-word;
    animation: fadeInUp 1.2s ease-out 0.3s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.hero-images {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
}

/* Image overlay effect for home page on mobile */
@media (max-width: 1023px) {
    body.home-page {
        overflow: hidden;
        height: 100vh;
    }

    .home-page .content-section {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
    }

    .home-page .content-section .container {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .home-page .content-section .container > h1,
    .home-page .content-section .container > .hero-tagline {
        flex-shrink: 0;
        text-align: center;
        margin-bottom: 0;
    }

    .home-page .hero-images {
        position: relative;
        flex: 1;
        margin-top: 0;
        overflow: hidden;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 30px;
    }

    .home-page .hero-images .hero-image {
        position: absolute;
        width: 100%;
        left: 0;
        top: 0;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        animation: none !important;
    }

    .home-page .hero-images .hero-image img {
        max-width: 100%;
        max-height: calc(100vh - var(--header-height) - 150px);
        height: auto;
        width: auto;
        object-fit: contain;
        display: block;
    }

    .home-page .hero-images .hero-image:first-child {
        z-index: 1;
    }

    .home-page .hero-images .hero-image:last-child {
        z-index: 2;
    }

    .home-page .hero-images .hero-image img:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

.hero-images .hero-image {
    animation: fadeInUp 1.4s ease-out 0.6s both;
}

.hero-images .hero-image:first-child {
    animation: fadeInLeft 1.4s ease-out 0.6s both;
}

.hero-images .hero-image:last-child {
    animation: fadeInRight 1.4s ease-out 0.8s both;
}

.hero-images .hero-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 4, 244, 0.3),
                0 0 40px rgba(110, 150, 158, 0.2);
    transition: all 0.5s ease;
}

.hero-images .hero-image img:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 4, 244, 0.5),
                0 0 60px rgba(110, 150, 158, 0.4);
}

/* Ensure images don't overflow on larger screens */
@media (min-width: 481px) {
    .hero-images .hero-image img {
        max-width: 600px;
    }
}

.hero-image img {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-image-small {
    text-align: center;
}

.hero-image-small img {
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

/* Display images side by side on larger screens */
@media (min-width: 1024px) {
    .hero-images {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .hero-image {
        flex: 0 1 auto;
    }

    .hero-images .hero-image img {
        height: 500px;
        width: auto;
        max-width: none;
        object-fit: cover;
    }
}

/* Content Section */
.content-section {
    padding-top: var(--spacing-lg);
    padding-right: 0;
    padding-bottom: var(--spacing-xl);
    padding-left: 0;
}

.content-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

/* Essay Grid */
.essay-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 4, 244, 0.1);
}

.essay-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 4, 244, 0.1), rgba(110, 150, 158, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.essay-item:hover::before {
    opacity: 1;
}

.essay-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 4, 244, 0.3),
                0 0 40px rgba(110, 150, 158, 0.2);
    border-color: rgba(0, 4, 244, 0.5);
}

.essay-item .essay-image,
.essay-item .essay-title {
    position: relative;
    z-index: 1;
}

.essay-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.essay-title {
    padding: var(--spacing-sm);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-light);
    color: var(--color-text);
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* Button */
.btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--color-primary-blue), #0003cc);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-base);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 4, 244, 0.4);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background: linear-gradient(135deg, var(--color-secondary), #5a8891);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 4, 244, 0.6),
                0 0 20px rgba(110, 150, 158, 0.4);
    animation: pulse 2s infinite;
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(-45deg, #0F363D, #1a4f5a, #0004f4, #2a5f6f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: var(--spacing-xs) 0;
    border-top: 1px solid rgba(110, 150, 158, 0.3);
    z-index: 100;
    box-shadow: 0 -4px 30px rgba(0, 4, 244, 0.1);
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer p {
    margin: 0;
    font-size: 12px;
    color: var(--color-text);
}

.footer-link {
    color: var(--color-cream);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-normal);
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary-blue), var(--color-secondary));
    transition: width var(--transition-normal);
}

.footer-link:hover {
    color: var(--color-primary-blue);
    transform: translateX(3px);
}

.footer-link:hover::after {
    width: 100%;
}

/* Subsection */
.subsection {
    margin: var(--spacing-xl) 0;
}

.subsection h3 {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.subsection p {
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
    text-align: center;
}

/* Bio Section */
.bio-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Project Content */
.project-content {
    max-width: 800px;
    margin: 0 auto;
}

.project-content p {
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    text-align: justify;
}
