/* Custom Fonts */
@font-face {
    font-family: 'Punktype02';
    src: url('Fonts/HitMePunk/Hitmepunk02.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Punktype03';
    src: url('Fonts/HitMePunk/Hitmepunk03.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
body {
    margin: 0;
    padding: 0;
    color: rgb(0, 0, 0);
    font-family: "aktiv-grotesk", sans-serif;            
    font-weight: 500;
    font-style: normal;
    font-size: 16px;
    scroll-behavior: smooth;
    background-image: url("Images/background_texture_lowOpacity.png");
}

/* Typography */
h1, h2 {
    font-weight: 700;
}

h2 {
    font-size: 3rem;
    font-family: "owners-wide", sans-serif;
    font-weight: 700;
    font-style: normal;
    margin-top: 0;
    margin-bottom: 0;
}

h3 {
    font-size: 1.5rem;
    font-family: "owners-wide", sans-serif;
    font-weight: 600;
    font-style: normal;
}

p {
    font-weight: 400;
    font-size: 1.2rem;
    font-family: "aktiv-grotesk", sans-serif;
}

h5 {
    font-weight: 400;
    font-family: "pf-fuel-grime", sans-serif;
    font-style: normal;
    font-size: 2rem;
    margin: auto;
}

.section-title {
    font-family: 'Punktype02';
    font-size: 10rem;
    margin-top: 0;
    margin-bottom: 2%;
    font-kerning: 5rem;
    text-align: center;
    padding: 0 20px;
     grid-column-start: 1;
    grid-column-end: 1;
    grid-row-start: 1;
    grid-row-end:1;
}

/* white heading stacked underneath */
.section-title-under {
    font-family: 'Punktype03';
    color: #FFFFFF;
    font-size: 10rem;
    margin-top: 0;
    margin-bottom: 2%;
    font-kerning: 5rem;
    text-align: center;
    padding: 0 20px;
    z-index: -3rem;
    grid-row-start: 1;
    grid-row-end:1;
    grid-column-start: 1;
    grid-column-end: 1;
}

.section-title-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

/* Navigation - Base styles with white paper rip background */
.topnav {
    position: fixed;
    top: -35px;
    width: 100%;
    height: 130.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url("Images/white_paper_rip - edit.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: 1000;
}

.topnav a {
    font-family: "pf-fuel-grime", sans-serif;
    font-weight: 400;
    font-style: normal;
    display: block;
    color: #000000;
    text-align: center;
    padding: 14px 35px;
    text-decoration: none;
    font-size: 1.6rem;
}

.topnav a:hover {
    color: black;
    background-image: url('Images/on_hover_scribble.png'); 
    background-repeat: no-repeat;
    background-size: 6rem;
    background-position-y: 3rem;
    background-position-x: center;
    background-color: transparent;
}

/* Active nav states with section colors */
.topnav a.active {
    background-image: url('Images/on_hover_scribble.png'); 
    background-repeat: no-repeat;
    background-size: 6rem;
    background-position-y: 3rem;
    background-position-x: center;
    background-color: transparent;
    font-family: 'Punktype02';
    color: black;
}

.topnav .icon {
    display: none;
}

/* Dual navbar title structure for mobile */
.navbar-titles {
    display: none; /* Hidden by default on desktop */
    font-family: "pf-fuel-grime", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: #000000;
    font-size: 2rem;
    text-align: left;
    padding: 14px 0;
    align-items: center; /* Ensure vertical alignment */
    min-width: 0; /* Allow flex shrinking */
}

.navbar-title-fixed {
    font-family: 'Punktype02'; /* Always use the bold font for LoremIpsum */
    cursor: pointer; /* Make it clickable */
    margin-right: 15px; /* Space before the section title */
}

.navbar-title-section {
    font-family: "pf-fuel-grime", sans-serif; /* Use regular font for section name */
    opacity: 0.7; /* Slightly dimmed to show it's secondary */
    white-space: nowrap; /* Prevent text wrapping */
    flex-shrink: 0; /* Don't shrink this element */
    font-size: 2rem; /* Ensure font size matches */
    line-height: 1.2; /* Proper line height */
    padding: 14px 0; /* Same padding as parent */
    display: inline-block; /* Force proper display */
}

/* Active state for section title */
.navbar-title-section.active {
    font-family: 'Punktype02';
    opacity: 1;
}

/* Hover effect for the fixed title (LoremIpsum) */
.navbar-title-fixed:hover {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* Sections */
section {
    min-height: 65vw;
    padding: 80px 10% 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#home {
    background-image: url("Images/background_img_lowOpacity.png");
    background-repeat: no-repeat;
    background-size: cover;
}

.white-rip-divider {
    background-color:#FF03F7;
    background-image: url("Images/background_texture_lowOpacity.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    mix-blend-mode: multiply;
}

#students {
    background-color: #FF03F7;
    background-image: url("Images/background_texture_lowOpacity.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.pink-rip-divider {
    background-color: #1CF1FF;
    background-image: url("Images/background_texture_lowOpacity.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    mix-blend-mode: multiply;
}

#projects {
    background-color: #1CF1FF;
    background-image: url("Images/background_texture_lowOpacity.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.cyan-rip-divider {
    background-color: #FFF602;
    background-image: url("Images/background_texture_lowOpacity.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    mix-blend-mode: multiply;
}

#contact {
    background-color: #FFF602;
    background-image: url("Images/background_texture_lowOpacity.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding-top: 40px;
}

#contact .section-title {
    margin-top: 0;
}

/* Content Layout */
.content-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.content-wrapper {
    display: grid;
    grid-column-gap: 5rem;
    margin-top: 40px;
    align-items: center;
}

.img-wrapper {
    max-width: 100%;
}

.img-wrapper img {
    width: 100%;
    height: auto;
}

.img-radius {
    transform:rotate(-7deg);
}

/* Students Section */
.flex-student-rows {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-around;
    margin-top: 40px;
}

.flex-student {
    position: relative;
    text-align: center;
    display: block;
    margin-top: 6%;
    padding: 0;
    width: 32%;
}

.flex-student a {
    position: relative;
    display: inline-block;
    width: 80%;
}

.placeholder-student {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1/1;
    transition: opacity 0.3s ease;
}

.flex-student a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.flex-student a:hover .placeholder-student {
    opacity: 0;
}

.flex-student a:hover::before {
    opacity: 1;
}

/* Random rotations for each student photo - 9 rotation pattern for all 53 students */
.flex-student:nth-child(9n+1) .placeholder-student {
    transform: rotate(-3deg);
}

.flex-student:nth-child(9n+2) .placeholder-student {
    transform: rotate(5deg);
}

.flex-student:nth-child(9n+3) .placeholder-student {
    transform: rotate(-6deg);
}

.flex-student:nth-child(9n+4) .placeholder-student {
    transform: rotate(2deg);
}

.flex-student:nth-child(9n+5) .placeholder-student {
    transform: rotate(-4deg);
}

.flex-student:nth-child(9n+6) .placeholder-student {
    transform: rotate(7deg);
}

.flex-student:nth-child(9n+7) .placeholder-student {
    transform: rotate(-1deg);
}

.flex-student:nth-child(9n+8) .placeholder-student {
    transform: rotate(4deg);
}

.flex-student:nth-child(9n) .placeholder-student {
    transform: rotate(-5deg);
}

/* Projects Section */
.flex-project-rows {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
}

.flex-project {
    position: relative;
    text-align: center;
    display: block;
    margin: 0;
    padding: 0;
    width: 48%;
    margin-bottom: 3%;
}

.flex-project h5 {
    padding-top: 5px; /* Add padding to top of project titles */
}

.flex-project p {
    padding-top: 5px; /* Reduced padding on "By [Student Name]" lines */
    margin-top: -5px; /* Pull the student names closer to project titles */
}

.placeholder-img {
    width: 95%;
    height: auto;
}

/* Contact Section */
.contact-info {
    margin-top: 5%;
    text-align: center;
}

/* Student page photo sizing */
.content-wrapper-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
    grid-column-gap: 50px;
    grid-row-gap: 0px;
    align-items: start;
    padding-top: 60px;
}

.content-wrapper-grid + p {
    margin-top: 80px !important;
}

/* Add spacing before the project section (which starts with .content-container h2) */
.content-container h2 {
    margin-top: 80px;
}

/* Carousel styles for student pages */
.carousel {
    position: relative;
    max-width: 100%;
    margin: 40px 0;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.3s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 400px; /* Fixed height instead of aspect ratio */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Changed from cover to contain */
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.carousel-slide img:hover {
    opacity: 0.9;
}

/* Video support in carousel */
.carousel-slide video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    cursor: pointer;
}

/* YouTube iframe support in carousel */
.carousel-slide iframe {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    display: block;
    margin: 0 auto;
}

/* Carousel navigation buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-family: "pf-fuel-grime", sans-serif;
    font-size: 24px;
    font-weight: 400;
    font-style: normal;
    border-radius: 0;
    transition: background-color 0.3s ease;
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background: #FF03F7;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Carousel dots/indicators */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background: rgba(0, 0, 0, 0.8);
}

/* Mobile carousel adjustments */
@media screen and (max-width: 600px) {
    .carousel-slide {
        height: 300px; /* Smaller height for mobile */
    }
    
    .carousel-nav {
        padding: 10px;
        font-size: 20px;
        width: 40px;
        height: 40px;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
}

/* Shadowbox/Lightbox Styles */
.shadowbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shadowbox.active {
    display: flex;
    opacity: 1;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.shadowbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.shadowbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 calc((100vw - 97vw) / 2 + 20px) 20px calc((100vw - 97vw) / 2 + 20px);
    background: transparent;
}

.shadowbox-title {
    color: white;
    font-family: "owners-wide", sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.shadowbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: background-color 0.3s ease;
    position: fixed;
    right: 20px;
    top: 20px;
}

.shadowbox-close:hover {
    color: #FF03F7;
    background: none;
}

/* Shadowbox media container - supports images, videos, and YouTube */
.shadowbox-media-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    max-height: 80vh;
    min-height: 400px;
}

.shadowbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.shadowbox-media-container video {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
}

.shadowbox-media-container iframe {
    aspect-ratio: 16/9;
    width: 90vw;
    max-width: 1200px;
    height: auto;
    max-height: 80vh;
}

/* Fix shadowbox navigation to edges of viewport */
.shadowbox-nav {
    position: fixed;
    top: 50%;
width: calc(100vw - 40px) !important;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: space-between;
    padding: 0 0;
    pointer-events: none;
}

.shadowbox-prev,
.shadowbox-next {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-family: "pf-fuel-grime", sans-serif;
    font-size: 28px;
    font-weight: 400;
    font-style: normal;
    border-radius: 0;
    transition: background-color 0.3s ease;
    pointer-events: auto;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shadowbox-prev:hover,
.shadowbox-next:hover {
    background: #FF03F7;
}

/* Mobile adjustments for shadowbox */
@media screen and (max-width: 600px) {
    .shadowbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .shadowbox-title {
        font-size: 1.5rem;
    }
    
    .shadowbox-close {
        font-size: 2rem;
        width: 30px;
        height: 30px;
    }
    
    .shadowbox-prev,
    .shadowbox-next {
        padding: 10px 15px;
        font-size: 24px;
        width: 50px;
        height: 50px;
    }
    
    .shadowbox-nav {
        padding: 0 10px;
    }
    
    .shadowbox-header {
        padding: 0 10px 15px 10px;
    }
}

/* Student page buttons for external links */
.student-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
    padding-left: 5px;
    justify-content: left;
}

.student-btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    font-family: "pf-fuel-grime", sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #000000;
    background-color: transparent;
    border: 2px solid #000000;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 140px;
}

.student-btn:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translateY(-2px);
}

.student-btn.portfolio {
    border-color: #FF03F7;
    color: #FF03F7;
}

.student-btn.portfolio:hover {
    background-color: #FF03F7;
    color: #ffffff;
}

.student-btn.prototype {
    border-color: #1CF1FF;
    color: #1CF1FF;
}

.student-btn.prototype:hover {
    background-color: #1CF1FF;
    color: #000000;
}

/* Mobile button adjustments */
@media screen and (max-width: 600px) {
    .student-buttons {
        flex-direction: column;
        gap: 15px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .student-btn {
        width: calc(100% - 10px);
        min-width: auto;
        margin: 0 5px;
        box-sizing: border-box;
    }
}

.content-wrapper-grid .img-wrapper {
    min-width: 200px;
    max-width: 300px;
    width: 40vw;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.content-wrapper-grid .img-wrapper img {
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.content-wrapper-grid .img-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.content-wrapper-grid .img-wrapper:hover img {
    opacity: 0;
}

.content-wrapper-grid .img-wrapper:hover::before {
    opacity: 1;
}

/* Hero Image Styling */
.section-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

#hero-img {
    max-width: 750px !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

#pink-rip {
    width: 100%;
    z-index: -1;
    mix-blend-mode: normal;
}

#white-rip {
    width: 100%;
    z-index: -1;
    mix-blend-mode: hard-light;
}

#cyan-rip {
    width: 100%;
    z-index: -1;
    mix-blend-mode: normal;
}

/* Footer Container */
.footer_img {
    background-color: #FFF602;
    background-image: url("Images/background_texture_lowOpacity.png");
    background-position: center;
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    margin-top: -80px;
    z-index: 10;
    min-height: calc(50vh - 0px);
}

.footer_img.background-white {
    background-color: #ffffff;
}

/* Footer */
footer {
    padding: 120px 40px 80px 40px; 
    background-image: url("Images/footer_rip_shadow_4_resized.png");
    max-width: 100vw;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-size: contain;
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: flex-end;
}

.uni-logo {
    width: 10%;
    min-width: 80px;
    max-width: 120px;
    flex-shrink: 0;
}

.footerLinkHover {
    flex: 1; 
    text-align: center;
    padding: 0 20px; 
}

.footerLinkHover p {
    margin: 8px 0;
    color: #000;
}

.footerLinkHover a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.footerLinkHover a:hover {
    color: #555;
}

.footerLinkHover span{
    font-weight: bold;
}

#cr {
    margin-top: 20px;
}

.year {
    width: 5%;
    min-width: 40px;
    max-width: 80px;
    flex-shrink: 0; 
}

/* Tablet/medium screen adjustments */
@media screen and (max-width: 992px) {
    .topnav a {
        padding: 14px 35px;
        font-size: 1.6rem;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        grid-column-gap: 0;
        grid-row-gap: 2rem;
    }

    .section-title {
        font-size: 5rem;
    }

    .flex-student {
        width: 30%;
    }

    .flex-project {
        width: 48%;
    }
    
    .uni-logo {
        width: 12%;
        min-width: 70px;
    }
    
    .year {
        width: 8%;
        min-width: 35px;
    }
    
    .footerLinkHover {
        padding: 0 15px;
    }
}

/* Medium tablet adjustments - 922px to 600px */
@media screen and (max-width: 922px) and (min-width: 601px) {
    .contact-info {
        margin-bottom: 25px;
    }
}

/* Small tablet adjustments */
@media screen and (max-width: 768px) {
    .topnav a {
        padding: 14px 35px; /* Use larger spacing like desktop */
        font-size: 1.6rem; /* Use larger font size like desktop */
    }
}

/* Make student page single column below 900px */
@media screen and (max-width: 899px) {
    .content-wrapper-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        grid-column-gap: 0;
        grid-row-gap: 30px;
        align-items: center;
        justify-items: center;
        min-height: auto;
    }
    
    .content-wrapper-grid .img-wrapper {
        align-self: center;
        justify-self: center;
        max-width: 250px;
    }
    
    .content-wrapper-grid .copy {
        text-align: center;
        align-self: start;
    }
    
    .content-wrapper-grid + p {
        margin-top: 40px !important;
        text-align: left;
    }
}

/* Reduce spacing for very small screens */
@media screen and (max-width: 500px) {
    .content-wrapper-grid {
        grid-row-gap: 15px;
    }
    
    .content-wrapper-grid + p {
        margin-top: 20px !important;
    }
}

/* Keep two columns above 900px */
@media screen and (min-width: 900px) {
    .content-wrapper-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 1fr;
        align-items: start;
    }
    
    .content-wrapper-grid .img-wrapper {
        align-self: center;
    }
    
    .content-wrapper-grid + p {
        margin-top: 80px !important;
    }
}

/* Student page photo centering between 750px and 600px */
@media screen and (max-width: 750px) and (min-width: 601px) {
    .content-wrapper-grid {
        align-items: center;
    }
}

/* MOBILE DRAWER MENU */
@media screen and (max-width: 600px) {
    /* Navigation - DRAWER VERSION */
    .topnav {
        justify-content: space-between;
        padding-left: 15px;
        padding-right: 15px;
        /* Keep original nav height */
        height: 130.5px;
        background-size: cover;
        background-position: center;
        /* Add transition for smooth drawer animation */
        transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: visible;
        position: fixed;
        /* Normal collapsed position */
        top: -35px;
        z-index: 1000;
    }

    /* Hidden white background when collapsed */
    .topnav::before {
        content: '';
        position: fixed;
        top: -35vh;
        left: 0;
        right: 0;
        height: 35vh;
        background-color: white;
        z-index: -1;
        transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Show ONLY the dual titles and hamburger icon when collapsed */
    .topnav .navbar-titles {
        display: flex !important; /* Force display override */
        align-items: center;
        text-align: left;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    /* Hide ALL regular nav links when collapsed */
    .topnav a:not(.icon) {
        display: none;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }
    
    .topnav a.icon {
        display: block;
        background-image: none;
        z-index: 1001;
    }
    
    /* DRAWER EXPANDED STATE - slides down by moving position */
    .topnav.responsive {
        /* Move drawer down to show menu content */
        top: calc(35vh);
        
        /* Keep the same ripped paper texture and size */
        background-image: url("Images/white_paper_rip - edit.png");
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        
        /* Maintain fixed positioning and smooth transition */
        position: fixed;
        flex-direction: column-reverse;
        /* Keep the original justify-content to maintain hamburger position */
        justify-content: space-between;
        align-items: flex-start;
        padding-left: 15px;
        padding-right: 15px;
        transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    /* White background slides down to position when drawer opens */
    .topnav.responsive::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 35vh;
        background-color: white;
        z-index: -1;
        transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* When expanded: fade out the dual titles */
    .topnav.responsive .navbar-titles {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    /* When expanded: show nav links sliding down with the drawer */
    .topnav.responsive a:not(.icon) {
        display: block;
        opacity: 1;
        transform: translateY(0);
        text-align: left;
        padding: 14px 15px;
        font-size: 2rem;
        /* Position links relative to the drawer, not fixed to viewport */
        position: relative;
        background: transparent;
        z-index: 1002;
        transition: all 0.3s ease;
    }

    /* Use CSS order to control the visual stacking order - working upwards */
    .topnav.responsive a:nth-child(3) { /* LoremIpsum link (moved from 2nd to 3rd child due to dual title structure) */
        order: 1;
        transition-delay: 0.25s;
    }
    .topnav.responsive a:nth-child(4) { /* Students link */
        order: 2;
        transition-delay: 0.2s;
    }
    .topnav.responsive a:nth-child(5) { /* Projects link */
        order: 3;
        transition-delay: 0.15s;
    }
    .topnav.responsive a:nth-child(6) { /* Contact link */
        order: 4;
        transition-delay: 0.1s;
    }
    
    /* Hamburger icon maintains same position when menu is open */
    .topnav.responsive .icon {
        position: absolute;
        right: 15px;
        top: 45px;
        background-image: none;
        z-index: 1001;
        /* Ensure it stays in the same horizontal position */
        left: auto;
    }

    .section-title {
        font-size: 4rem;
    }

    .section-title-under {
        font-size: 4rem;
    }

    .flex-student {
        width: 48%;
        margin-top: 8%;
    }

    h5 {
        font-size: 1.5rem;
    }

    /* Make projects section single column on mobile */
    .flex-project {
        width: 100%;
        margin-bottom: 8%;
    }
    
    .placeholder-img {
        width: 100%;
    }

    section {
        padding: 80px 5% 40px;
    }

    .section-image{
        height: 55vw;
        transform: scale(1);
    }

    #home {
        background-position: center top;
        background-size: 100%;
    }

    #hero-img{
        height: 100%;
        width: auto;
        max-width: none;
        transform: scale(1);
    }

    .content-wrapper-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, 1fr);
        align-items: center;
        justify-items: center;
        padding-top: 0;
        grid-row-gap: 0;
    }
    
    /* Ensure photo stays below text with explicit z-index */
    .content-wrapper-grid .img-wrapper {
        justify-self: center;
        position: relative;
        z-index: 1;
    }
    
    /* Ensure text content stays above photo */
    .content-wrapper-grid .copy,
    .content-wrapper-grid .student-buttons,
    #bio-paragraphs {
        position: relative;
        z-index: 10;
    }
    
    /* Mobile spacing adjustment classes for individual control */
    .mobile-photo-spacing {
        margin-top: -150px !important;
        z-index: 1;
    }
    
    /* More specific selector to override existing rules */
    .mobile-paragraph-spacing {
        margin-top: -110px !important;
        position: relative;
        z-index: 10;
    }

    footer {
        flex-direction: column;
        gap: 80px;
        padding: 80px 20px 60px 20px; 
        min-height: 50vh;
        background-size: contain; 
        background-image: none;
    }
    
    .uni-logo, .year {
        width: 20%;
        min-width: 60px;
        max-width: 100px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footerLinkHover {
        padding: 0;
        order: -1; 
        margin-left: auto;
        margin-right: auto;
        display:none;
    }
    
    .footer_img {
        margin-top: -60px;
        min-height: calc(100vh - 60px); 
    }
    
/* Hide navbar title section on index page only to prevent layout shifts */
body[data-page="index"] .navbar-title-section {
    visibility: visible !important;
    width: 105px;
    height: 40px;
    display: inline-block !important;
}
    
    .student-buttons {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
         margin-top: 65px !important; /* Add this line */
    }
    
    .student-btn {
        width: 100% !important;
        min-width: auto !important;
        margin: 0 !important;
        padding: 12px 24px !important;
        box-sizing: border-box !important;

    }
    .content-wrapper-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, 1fr);
        align-items: center;
        justify-items: center;
        padding-top: 0;
        grid-row-gap: 0 !important; /* Force this to 0 */
    }
    
    .content-wrapper-grid .student-buttons {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }
    
}

/* Tablet range breakpoint - fix photo overlap between 600px and 475px */
@media screen and (max-width: 600px) and (min-width: 476px) {
    /* Override the aggressive negative margins for tablet range */
    .mobile-photo-spacing {
        margin-top: -25px !important;
        z-index: 1;
    }
    
    .mobile-paragraph-spacing {
        margin-top: 20px !important;
        z-index: 10;
    }
    
    /* Ensure proper grid spacing for this range */
    .content-wrapper-grid {
        grid-row-gap: 0;
        margin-top: -30px;
    }
}

@media screen and (max-width: 475px) {
    .mobile-photo-spacing {
        margin-top: -78px !important;
        z-index: 1;
    }
    
    .mobile-paragraph-spacing {
        margin-top: -25px !important;
        z-index: 10;
    }
    
    /* Override when portfolio button is visible */
    .content-wrapper-grid:has(.student-buttons:not([style*="display: none"])) ~ #bio-paragraphs .mobile-paragraph-spacing {
        margin-top: 5px !important;
    }
    
    .content-wrapper-grid .student-buttons {
        margin-top: -80px !important;
        z-index: 10;
    }
}

/* Punk Mode Easter Egg Styles - Add to end of Stylesheet.css */

/* Glitch animation for Punktype fonts */
.punk-glitch {
    animation: glitch 0.3s infinite;
    position: relative;
}

@keyframes glitch {
    0% {
        transform: translate(0);
        text-shadow: 2px 2px #FF03F7, -2px -2px #1CF1FF;
    }
    20% {
        transform: translate(-2px, 2px);
        text-shadow: -2px -2px #FF03F7, 2px 2px #1CF1FF;
    }
    40% {
        transform: translate(-2px, -2px);
        text-shadow: 2px -2px #FFF602, -2px 2px #FF03F7;
    }
    60% {
        transform: translate(2px, 2px);
        text-shadow: -2px 2px #1CF1FF, 2px -2px #FFF602;
    }
    80% {
        transform: translate(2px, -2px);
        text-shadow: 2px 2px #FF03F7, -2px -2px #1CF1FF;
    }
    100% {
        transform: translate(0);
        text-shadow: -2px -2px #1CF1FF, 2px 2px #FF03F7;
    }
}

/* Fade animation for punk message */
@keyframes punkFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(0.95);
    }
    60% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Add these additional animations to your existing Punk Mode CSS */

/* Shake animation for all text */
.punk-shake {
    animation: textShake 0.2s infinite;
}

@keyframes textShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-2px, 2px) rotate(-1deg); }
    50% { transform: translate(2px, -2px) rotate(1deg); }
    75% { transform: translate(-1px, -1px) rotate(-0.5deg); }
}

/* Image shake animation */
.punk-image-shake {
    animation: imageShake 0.3s infinite;
}

@keyframes imageShake {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg) scale(1); 
    }
    10% { 
        transform: translate(-5px, -5px) rotate(-2deg) scale(1.02); 
    }
    20% { 
        transform: translate(5px, 5px) rotate(2deg) scale(0.98); 
    }
    30% { 
        transform: translate(-5px, 5px) rotate(-1deg) scale(1.01); 
    }
    40% { 
        transform: translate(5px, -5px) rotate(1deg) scale(0.99); 
    }
    50% { 
        transform: translate(-3px, 3px) rotate(-2deg) scale(1.02); 
    }
    60% { 
        transform: translate(3px, -3px) rotate(2deg) scale(0.98); 
    }
    70% { 
        transform: translate(-4px, -2px) rotate(-1deg) scale(1.01); 
    }
    80% { 
        transform: translate(4px, 2px) rotate(1deg) scale(0.99); 
    }
    90% { 
        transform: translate(-2px, 4px) rotate(-1.5deg) scale(1.01); 
    }
}

/* Screen shake - apply to body */
.punk-body-shake {
    animation: screenShake 0.15s infinite;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-3px, 2px); }
    20% { transform: translate(3px, -2px); }
    30% { transform: translate(-2px, -3px); }
    40% { transform: translate(2px, 3px); }
    50% { transform: translate(-3px, -2px); }
    60% { transform: translate(3px, 2px); }
    70% { transform: translate(-2px, 3px); }
    80% { transform: translate(2px, -3px); }
    90% { transform: translate(-1px, 2px); }
}

video{
border-bottom-width: 40px !important;
    margin-bottom: 40px;
}

/* Cyan background when projects are hidden */
#contact.cyan-background {
    background-color: #1CF1FF;
}

.footer_img.cyan-background {
    background-color: #1CF1FF;
}

/* Tooltip for student image - using native title attribute */
.content-wrapper-grid .img-wrapper img[title] {
    cursor: help !important;
}

/* Alternative: Custom tooltip using data attribute */
.content-wrapper-grid .img-wrapper {
    position: relative;
}

.content-wrapper-grid .img-wrapper img[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FF03F7;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: 'Punktype02', sans-serif;
    font-size: 1.2rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Year Easter Egg Animations */
@keyframes swirlFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(0deg) scale(0);
    }
    20% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
        transform: translate(calc(var(--tx, 50px)), calc(var(--ty, -50px))) rotate(180deg) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--tx, 100px)), calc(var(--ty, -100px))) rotate(360deg) scale(0.5);
    }
}

@keyframes yearMessageFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }
    40% {
        transform: translate(-50%, -50%) scale(0.95) rotate(-3deg);
    }
    60% {
        transform: translate(-50%, -50%) scale(1.05) rotate(2deg);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(5deg);
    }
}

/* Add transition to year SVG */
.year {
    transition: transform 0.1s ease;
}

/* Kiss emoji pop-in animation */
@keyframes kissPopIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(-20deg);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(10deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.9) rotate(-5deg);
    }
    70% {
        transform: translate(-50%, -50%) scale(1.1) rotate(3deg);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotate(5deg);
    }
}

/* Heart float animation */
@keyframes heartFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -60%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(0.5);
    }
}