@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* Base Styles & Variables */
:root {
    --highlight: #35CE8D;
    --dark: #181D27;
    --background: #254D32;
    --background-overlay: rgba(37, 77, 50, 0.9);
    --spacing: 20px;
    --border-radius: 12px;
    --transition: all 0.2s ease;
    --light: #FFFDD0;
    --social-bg: rgba(53, 206, 141, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Akaya Kanadaka', sans-serif;
}

p {
    font-family: 'Lexend', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--light);
    overflow-x: hidden;
}

/* Cascading Background */
#cascading-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 30px;
    padding: 0 15px;
}

#cascading-background.home-active {
    animation: fadeInBackground 2s ease-in-out 1s forwards;
}

#cascading-background.fade-out {
    opacity: 0;
}

@keyframes fadeInBackground {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.cascade-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
}

.cascade-item {
    width: 24vw;
    height: 18vw;
    background: var(--background-overlay);
    overflow: hidden;
    position: relative;
    max-width: 460px;
    max-height: 345px;
}

.cascade-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 77, 50, 0.95);
    pointer-events: none;
    z-index: 1;
}

.cascade-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 0;
}

.cascade-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 0;
}

/* Cascading animations */
@keyframes cascade-slow {
    0% { transform: translateY(-200px); }
    100% { transform: translateY(calc(100vh + 200px)); }
}

@keyframes cascade-medium {
    0% { transform: translateY(-200px); }
    100% { transform: translateY(calc(100vh + 200px)); }
}

@keyframes cascade-fast {
    0% { transform: translateY(-200px); }
    100% { transform: translateY(calc(100vh + 200px)); }
}

.cascade-column:nth-child(1) .cascade-item { animation: cascade-slow 60s linear infinite; }
.cascade-column:nth-child(2) .cascade-item { animation: cascade-medium 45s linear infinite; }
.cascade-column:nth-child(3) .cascade-item { animation: cascade-fast 30s linear infinite; }
.cascade-column:nth-child(4) .cascade-item { animation: cascade-slow 55s linear infinite; }
.cascade-column:nth-child(5) .cascade-item { animation: cascade-medium 40s linear infinite; }
.cascade-column:nth-child(6) .cascade-item { animation: cascade-fast 35s linear infinite; }

/* Responsive image sizes for cascading background */
@media (max-width: 768px) {
    /* Phones - 2 columns */
    .cascade-item {
        width: 40vw;
        height: 30vw;
        max-width: 180px;
        max-height: 135px;
    }
}

@media (min-width: 2560px) {
    /* 2K displays - 5 columns */
    .cascade-item {
        width: 20vw;
        height: 15vw;
        max-width: 480px;
        max-height: 360px;
    }
}

@media (min-width: 5120px) {
    /* 5K displays - 6 columns */
    .cascade-item {
        width: 18vw;
        height: 13.5vw;
        max-width: 550px;
        max-height: 412px;
    }
}

/* Navigation */
nav {
    background-color: var(--dark);
    padding: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
}

nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fdfbd5, #febf75, #fdfbd5);
    background-size: 200% 100%;
    animation: gradientShift 6s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--light);
    margin: 3px 0;
    transition: var(--transition);
    transform-origin: center;
}

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

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

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--highlight);
    text-decoration: none;
    display: flex;
    align-items: center;
    user-select: none;
}

.logo i {
    margin-right: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.logo span {
    display: inline-block;
}

@keyframes jump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

.logo.animate span:nth-child(2) { animation: jump 0.3s ease 0s; }
.logo.animate span:nth-child(3) { animation: jump 0.31s ease 0.05s; }
.logo.animate span:nth-child(4) { animation: jump 0.32s ease 0.10s; }
.logo.animate span:nth-child(5) { animation: jump 0.33s ease 0.15s; }
.logo.animate span:nth-child(6) { animation: jump 0.34s ease 0.20s; }
.logo.animate span:nth-child(7) { animation: jump 0.35s ease 0.25s; }
.logo.animate span:nth-child(8) { animation: jump 0.36s ease 0.30s; }
.logo.animate span:nth-child(9) { animation: jump 0.37s ease 0.35s; }
.logo.animate span:nth-child(10) { animation: jump 0.38s ease 0.40s; }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
    font-family: 'Lexend', cursive;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--highlight);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--highlight);
    transition: var(--transition);
}

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

/* Main Content Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Sections */
.page-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-top: 0px;
}

.page-section.active {
    display: block;
    opacity: 1;
    padding-top: 0px;
}

/* Non-home pages positioning - padding removed */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home Page */
#home {
    min-height: 80vh;
    text-align: center;
    padding: 8vh 2rem 2rem 2rem;
}

.hero-title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: transparent;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.01rem;
    max-width: 50vw;
    transition: opacity 0.3s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--highlight);
    max-width: 700px;
    transition: opacity 0.3s ease;
}

.random-button {
    position: relative;
    background: var(--highlight);
    color: var(--dark);
    border: none;
    border-radius: 50px;
    padding: 1rem;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: var(--transition);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(53, 206, 141, 0.5);
}

.random-button:hover {
    /* Keep the button size; use a subtle scale for hover feedback */
    transform: scale(1.14);
}


.random-button .text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: top 0.3s cubic-bezier(.2,.8,.2,1), opacity 0.05s ease;
    white-space: normal;
    text-align: center;
    font-size: 0.9rem;
    color: var(--light);
    pointer-events: none;
    z-index: -1; /* start behind the button */
}

.random-button:hover .text {
    top: 150%; /* float down from behind the button */
    opacity: 1;
    z-index: 12; /* rise above when fully visible */
}

.random-container {
    position: fixed;
    top: 80px;
    right: 40px;
    z-index: 100;
    will-change: transform;
    animation: float 8s ease-in-out infinite;
}

/* Slow the floating animation to ~5% speed on hover (8s -> 160s) */
.random-container:hover {
    animation-duration: 160s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-20px, -10px); }
    50% { transform: translate(0, 0); }
    75% { transform: translate(20px, 10px); }
    100% { transform: translate(0, 0); }
}

/* About & Contact Sections */
.section {
    padding: 1rem 1rem;
    max-width: 900px;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.about-contact-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.about-contact-container .section {
    flex: 1;
    max-width: none;
    margin: 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--highlight);
    text-align: center;
}

.about-content, .contact-content {
    background: rgba(24, 29, 39, 0.8);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-text {
    line-height: 1.2;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: 300;
}

.highlight {
    color: var(--highlight);
    font-weight: bold;
    font-size: 1.5rem;

}

.highlight{
    text-decoration: none !important;
}

.highlight:hover {
    text-decoration: underline !important;
    cursor: pointer;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    justify-content: center;
}

.email-link {
    color: var(--light);
    font-size: 2rem;
    transition: var(--transition);
    text-decoration: none;
}

.email-link:hover {
    color: var(--highlight);
    text-shadow: 0 0 10px rgba(53, 206, 141, 0.5);
    text-decoration: underline;
}

.contact-rectangle {
    width: 100%;
    height: auto;
    margin-top: 1rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--dark);
    object-fit: cover;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-buttons a {
    display: inline-block;
    background: var(--social-bg);
    border-radius: 50%;
    padding: 10px;
    transition: var(--transition);
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-buttons a:hover {
    transform: scale(1.1);
    background: var(--highlight);
}

.social-buttons img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* Image Grid for Art Pages */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.art-item {
    background: var(--dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--highlight);
}

.art-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.art-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Video container and styling */
.video-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #000;
}

.art-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-play-icon {
    color: var(--light);
    font-size: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

.video-container:hover .video-play-icon {
    opacity: 0;
}

.art-info {
    padding: 1.5rem;
}

.art-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.art-year {
    color: var(--highlight);
    font-weight: 500;
}

/* Projects Page */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}


.project-card {
    background: var(--dark);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
    border: 3px solid var(--highlight);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: 1.95rem;
    color: var(--light);
}

.project-tag {
    background: var(--highlight);
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: .05rem;
    text-transform: uppercase;
}

.project-description {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.project-images {
    display: flex;
    gap: 1rem;
    transition: var(--transition);
}

.project-main-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.project-main-image:hover {
    transform: scale(1.02);
}

.project-secondary-images {
    display: flex;
    gap: 1rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

.project-card:hover .project-secondary-images {
    opacity: 1;
    max-height: 120px;
    margin-top: 1rem;
}

.project-secondary-image {
    width: 30%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.project-secondary-image:hover {
    transform: scale(1.05);
}

.project-hover-text {
    position: absolute;
    bottom: -0.875rem;
    right: 1rem;
    color: var(--light);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.project-secondary-image {
    width: 30%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid var(--dark);
}

.awards {
    background: linear-gradient(100deg, #FFD700 0%, #fff3ad 7%, #FFD700 14%, #FFA500 100%);
    color: var(--dark);
    padding: 0.8rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.company-logo {
    height: 30px;
    margin-left: 10px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 29, 39, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--background);
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    position: relative;
    border: 5px solid var(--dark);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 3px solid var(--dark);
}

.modal-image[id*="Video"] {
    height: auto;
    max-height: 70vh;
}

.modal-image-container {
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.modal-year {
    color: var(--highlight);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.modal-button {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 2rem;
}

.modal-button.another {
    background: var(--highlight);
    color: var(--dark);
}

.modal-button.close {
    background:  var(--light);
    color: var(--dark);
}

.modal-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Project Modal Styles */
.project-modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    flex-direction: column;
}

.project-modal-content .modal-image {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
}

.project-modal-content .modal-image-container {
    margin-left: 70px;
    margin-right: 70px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(53, 206, 141, 0.9);
    color: var(--light);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.modal-arrow:hover {
    background: var(--highlight);
    color: var(--light);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.modal-arrow-left {
    left: 10px;
}

.modal-arrow-right {
    right: 10px;
}

.modal-caption {
    background: rgba(24, 29, 39, 0.9);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid var(--highlight);
}

.modal-caption .modal-title {
    margin-bottom: 0.5rem;
    color: var(--light);
}

.modal-caption .modal-year {
    color: var(--highlight);
    margin-bottom: 0;
}

/* Responsive styles for project modal */
@media (max-width: 768px) {
    .project-modal-content .modal-image {
        max-width: 90vw;
        max-height: 70vh;
    }
    
    .project-modal-content .modal-image-container {
        margin-left: 50px;
        margin-right: 50px;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .modal-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        color: var(--light);
        opacity: 1;
    }
    
    .modal-arrow-left {
        left: 5px;
    }
    
    .modal-arrow-right {
        right: 5px;
    }
    
    .modal-caption {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Footer */
footer {
    background-color: var(--dark);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-text {
    color: #ccc;
}

.subtle-light {
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Lexend', sans-serif;
}

@media (max-width: 1150px) {
    .about-text {
        font-size: 1.2rem;
    }
}

/* Responsive Design */
@media (max-width: 1050px) {
    body {
        padding-top: 80px; /* Adjust for fixed nav height */
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        width: 100%;
    }

    .hero-title {
        max-width: 80vw;
    }
    
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .logo {
        flex: 1;
        text-align: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--dark);
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-active .random-container {
        display: none;
    }

    .section{
        max-width: 90vw;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
    }
    
    .about-contact-container {
        flex-direction: column;
        gap: 0;
        align-items: center;
    }

    .contact-content{
        width: 90vw;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 auto;
        transform-origin: top center;
        transform: none; 
        transition: width 180ms ease, transform 180ms ease;
    }

    .email-link {
        font-size: 1.5rem;
    }

    .social-buttons {
   
        width: auto;
        height: auto;
        margin: 0 auto;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        align-self: center;
    }




    .social-buttons a {
        flex: 0 0 60px; 
        width: 60px;
        height: 60px;
        padding: 5px;
        border-radius: 50%;
        display: inline-flex; 
        align-items: center;
        justify-content: center;
    }

    .social-buttons a:hover {
        transform: none;
    }

    .social-buttons img {
        width: 30px;
        height: 30px;
    }

    
    .gallery-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .about-text {
        font-size: 1.2rem;
    }
}