/* ==========================================================================
   Layout: header, navigation, social icons, footer and lightbox (loaded on every page)
   ========================================================================== */

/* ==========================================================================
   Header, logo and hamburger
   ========================================================================== */

.logo img {
    padding-top: 12px;
    padding-left: 12px;
    padding-right: 12px;
    width: 125px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo a {
    display: inline-block;
}

.logo a:hover img,
.logo a:focus-visible img {
    transform: scale(1.08) rotate(-4deg);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 10px var(--accent));
}

.hamburger {
    display: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: auto;
    }

/* ==========================================================================
   Social icons
   ========================================================================== */

    .social-icon {
        font-size: 40px;
        padding: 10px;
    }

    .social-icon svg {
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    }

    .social-icon a {
        display: inline-block;
        color: white;
        transition: color 0.3s, transform 0.2s ease;
    }

    .social-icon a:hover {
    color: var(--accent);
    transform: translateY(-2px) scale(1.1);
    }

    /* The Resume link's own hover is cancelled (so the "Resume" note + arrow pseudo-elements,
       which live in the link's box, stay put) and replayed on just the icon glyph instead, so
       the icon itself still lifts/scales/recolors exactly like the other social icons.
       Font Awesome's kit script swaps the <i> for an inline <svg> once it loads, so both
       selectors are covered in case the swap hasn't happened yet. */
    .social-icon a[aria-label="Resume"]:hover {
    color: white;
    transform: none;
    }

    .social-icon a[aria-label="Resume"] i,
    .social-icon a[aria-label="Resume"] svg {
        display: inline-block;
        transition: color 0.3s, transform 0.2s ease;
    }

    .social-icon a[aria-label="Resume"]:hover i,
    .social-icon a[aria-label="Resume"]:hover svg {
        color: var(--accent);
        transform: translateY(-2px) scale(1.1);
    }

    /* A little idle life for the "Resume" note and its arrow: the note rocks gently around its
       bottom-left corner (like a tag swinging), the arrow gives a small vertical nudge, as if
       tapping the icon to get attention. Shared by the header and footer versions. */
    @keyframes resume-text-wiggle {
        0%, 100% { transform: rotate(-12deg); }
        50% { transform: rotate(-7deg); }
    }

    @keyframes resume-arrow-nudge {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }

    /* Resume icon: a permanent hand-drawn "Resume" note with a squiggly arrow pointing up at the icon.
       Positioned below the icon (not inline) so it never wraps the icon row; .social's padding-bottom
       and --header-h are both sized to leave it room without overlapping the content below. */
    .social-icon a[aria-label="Resume"] {
        position: relative;
    }

    .social-icon a[aria-label="Resume"]::before {
        content: "Resume";
        position: absolute;
        top: 100%;
        right: 122px;
        margin-top: 38px;
        font-family: 'Kalam', cursive;
        font-size: 33px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
        color: white;
        text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.55);
        transform: rotate(-12deg);
        transform-origin: left bottom;
        pointer-events: none;
    }

    /* The arrow: starts right where "Resume" ends, loops on itself, and points up into the icon. */
    .social-icon a[aria-label="Resume"]::after {
        content: "";
        position: absolute;
        top: 100%;
        right: -38px;
        width: 195px;
        height: 73px;
        margin-top: -10px;
        background: url("../Images/site/Resume_Arrow.png") no-repeat;
        background-size: 100% 100%;
        filter: drop-shadow(2px 5px 6px rgba(0, 0, 0, 0.5));
        pointer-events: none;
    }

    @media (prefers-reduced-motion: no-preference) {
        .social-icon a[aria-label="Resume"]::before {
            animation: resume-text-wiggle 3.2s ease-in-out infinite;
        }

        .social-icon a[aria-label="Resume"]::after {
            animation: resume-arrow-nudge 3.2s ease-in-out infinite;
        }
    }

    .social ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0px;
    }

    .social {
    margin-left: auto;
    padding-right: 20px;
    padding-bottom: 68px;
    }

/* ==========================================================================
   Site navigation
   ========================================================================== */

    .site-nav {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--accent);
    background: var(--glass);
    padding-bottom: 8px;
    position: sticky;
    z-index: 100;
    top: 0;
    }

    .nav-link {
        font-family: Video-light, sans-serif;
        text-transform: uppercase;
        font-weight: bold;
        font-size: 34px;
        text-align: center;
        letter-spacing: 1px;
        overflow: hidden;
    }

    .nav-link a {
        text-decoration: none;
    }

    .nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    align-items: center;
    }

    /* Nav hover (header and footer): a frosted pill fades in, the text turns cyan and a cyan bar grows out from the centre */
    .nav ul li a,
    .footer-nav ul li a {
        position: relative;
        z-index: 0;
        color: rgb(255, 255, 255);
        white-space: nowrap;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        transition: color 0.25s ease, text-shadow 0.25s ease;
    }

    .nav ul li a::before,
    .footer-nav ul li a::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: 8px;
        background: rgba(0, 30, 38, 0.45);
        box-shadow: inset 0 0 0 1px rgba(146, 241, 255, 0.4);
        opacity: 0;
        transform: scale(0.92);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .nav ul li a::after,
    .footer-nav ul li a::after {
        content: '';
        position: absolute;
        left: 15px;
        right: 15px;
        bottom: 8px;
        height: 3px;
        border-radius: 2px;
        background: var(--accent);
        transform: scaleX(0);
        transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    /* The lift lives on the <li> (which owns overflow: hidden) so the whole clipped box moves
       as one unit instead of the link poking out past its own clip */
    .nav-link {
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .nav-link:hover,
    .nav-link:focus-within {
        transform: translateY(-2px) scale(1.05);
    }

    .nav-link:active {
        transform: translateY(0) scale(0.97);
    }

    .nav ul li a:hover,
    .nav ul li a:focus-visible,
    .footer-nav ul li a:hover,
    .footer-nav ul li a:focus-visible {
        color: var(--accent);
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(146, 241, 255, 0.8);
    }

    .nav ul li a:hover::before,
    .nav ul li a:focus-visible::before,
    .footer-nav ul li a:hover::before,
    .footer-nav ul li a:focus-visible::before {
        opacity: 1;
        transform: scale(1);
    }

    .nav ul li a:hover::after,
    .nav ul li a:focus-visible::after,
    .footer-nav ul li a:hover::after,
    .footer-nav ul li a:focus-visible::after {
        transform: scaleX(1);
    }

    /* Current page: the bar stays showing, so it isn't marked by colour alone */
    .nav ul li a[aria-current]::after,
    .footer-nav ul li a[aria-current]::after {
        transform: scaleX(1);
    }

    /* Inset ring so it isn't clipped by .nav-link's overflow: hidden */
    .nav-link a:focus-visible {
        outline-offset: -4px;
        box-shadow: none;
    }

    .nav-link a {
        height: 100%;
        display: block;
        border-radius: 5px;
        padding: 17px;
        /* Without this the link is taller than its clipped <li>, which cuts off the hover pill and bar */
        box-sizing: border-box;
    }

/* ==========================================================================
   Lightbox (image viewer used by the About and project pages)
   ========================================================================== */

    .lightbox {
        display: flex;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.8);
        z-index: 9999;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    }

    .lightbox.open {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transition: opacity 0.3s ease, visibility 0s;
    }

    .lightbox:focus {
        outline: none;
    }

    .lightbox-img {
        max-width: 90%;
        max-height: 90vh;
        border-radius: 10px;
        border: 5px solid #ffffff;
        box-shadow: 0 0 30px rgba(0,0,0,0.5);
        transform: scale(0.8);
        transition: transform 0.3s ease;
    }

    .lightbox.open .lightbox-img {
        transform: scale(1);
    }

/* ==========================================================================
   Footer
   ========================================================================== */

    .line-break-footer {
        border: 2px solid var(--accent);
        border-radius: 5px;
        color: var(--accent);
        margin: 20px 0;
    }
    footer {
    background: var(--glass);
    border-top: 2px solid var(--accent);
    }

    .footer-logo {
        display: flex;
        justify-content: center;
        max-width: 200px;
    }

    .footer-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0px;
    }

    .footer-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    align-items: center;
    }

    .footer-nav ul li a {
        font-size: 30px;
    }


    .footer-name {
        font-size: 24px;
        font-weight: 700;
        padding-top: 5px;
    }

    .footer-role {
        font-size: 18px;
        font-weight: 600;
    }

    /* Redesigned lower footer: brand column + contact column, filled out with a blurb and CTA */
    .footer-grid {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        padding-top: 20px;
    }

    .footer-brand, .footer-contact {
        width: 50%;
    }

    .footer-brand p, .footer-contact p {
        text-align: left;
        font-family: Montserrat, sans-serif;
        line-height: 1.5;
    }

    .footer-brand {
        padding-right: 20px;
        padding-left: 10px;
        padding-bottom: 25px;
    }

    .footer-logo-link {
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .footer-logo-link:hover,
    .footer-logo-link:focus-visible {
        transform: scale(1.08) rotate(-4deg);
    }

    .footer-brand img {
        width: 70%;
        padding-bottom: 5px;
        filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.5));
    }

    .footer-blurb {
        margin-top: 8px;
        font-size: 15px;
        max-width: 34ch;
        opacity: 0.85;
    }

    .footer-contact {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 25px;
        overflow: hidden;
        word-break: break-word;
    }

    .footer-heading {
        display: inline-block;
        font-family: video-light, sans-serif;
        font-size: 22px;
        font-weight: bold;
        letter-spacing: 0.5px;
        padding-bottom: 6px;
        margin-bottom: 12px;
        border-bottom: 2px solid var(--accent);
    }

    .footer-italic {
        font-size: 24px;
        font-style: italic;
    }

    .footer-italic a {
        color: white;

    }

    .footer-cta {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 14px 0 4px;
        padding: 10px 20px;
        color: white;
        background: rgba(0, 0, 0, 0.15);
        border: 2px solid var(--accent);
        border-radius: 999px;
        text-decoration: none;
        font-family: Montserrat, sans-serif;
        font-weight: 600;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .footer-cta:hover,
    .footer-cta:focus-visible {
        background: rgba(0, 0, 0, 0.3);
        transform: translateY(-2px);
    }

    .footer-bottom-line {
        margin-top: 0;
    }

    .footer-copyright {
        text-align: center;
        font-family: Montserrat, sans-serif;
        font-size: 14px;
        opacity: 0.7;
        padding-bottom: 20px;
    }

    .footer-social ul {
    display: flex;
    list-style: none;
    padding-top: 10px;
    padding-bottom: 68px;
    }

    .footer-social-icon svg {
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    }

    .footer-social-icon {
        font-size: 40px;
        padding: 5px;
    }

    .footer-social-icon a {
        display: inline-block;
        color: white;
        transition: color 0.3s, transform 0.2s ease;
    }

    .footer-social-icon a:hover {
    color: var(--accent);
    transform: translateY(-2px) scale(1.1);
    }

    /* The Resume link's own hover is cancelled (so the "Resume" note + arrow pseudo-elements,
       which live in the link's box, stay put) and replayed on just the icon glyph instead, so
       the icon itself still lifts/scales/recolors exactly like the other social icons.
       Font Awesome's kit script swaps the <i> for an inline <svg> once it loads, so both
       selectors are covered in case the swap hasn't happened yet. */
    .footer-social-icon a[aria-label="Resume"]:hover {
    color: white;
    transform: none;
    }

    .footer-social-icon a[aria-label="Resume"] i,
    .footer-social-icon a[aria-label="Resume"] svg {
        display: inline-block;
        transition: color 0.3s, transform 0.2s ease;
    }

    .footer-social-icon a[aria-label="Resume"]:hover i,
    .footer-social-icon a[aria-label="Resume"]:hover svg {
        color: var(--accent);
        transform: translateY(-2px) scale(1.1);
    }

    /* Resume icon: a permanent hand-drawn "Resume" note with a squiggly arrow pointing up at the icon.
       Positioned below the icon (not inline) so it never wraps the icon row; footer-social ul's
       padding-bottom is sized to leave it room without overlapping the content below. */
    .footer-social-icon a[aria-label="Resume"] {
        position: relative;
    }

    .footer-social-icon a[aria-label="Resume"]::before {
        content: "Resume";
        position: absolute;
        top: 100%;
        right: 122px;
        margin-top: 38px;
        font-family: 'Kalam', cursive;
        font-size: 33px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
        color: white;
        text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.55);
        transform: rotate(-12deg);
        transform-origin: left bottom;
        pointer-events: none;
    }

    /* The arrow: starts right where "Resume" ends, loops on itself, and points up into the icon. */
    .footer-social-icon a[aria-label="Resume"]::after {
        content: "";
        position: absolute;
        top: 100%;
        right: -38px;
        width: 195px;
        height: 73px;
        margin-top: -10px;
        background: url("../Images/site/Resume_Arrow.png") no-repeat;
        background-size: 100% 100%;
        filter: drop-shadow(2px 5px 6px rgba(0, 0, 0, 0.5));
        pointer-events: none;
    }

    @media (prefers-reduced-motion: no-preference) {
        .footer-social-icon a[aria-label="Resume"]::before {
            animation: resume-text-wiggle 3.2s ease-in-out infinite;
        }

        .footer-social-icon a[aria-label="Resume"]::after {
            animation: resume-arrow-nudge 3.2s ease-in-out infinite;
        }
    }

/* ==========================================================================
   Small screen / mobile
   ========================================================================== */

@media (max-width: 1080px) {
    /*Hamburger & Animation*/

        .hamburger {
            display: flex;
            flex-direction: column;
            gap: 5px;
            padding: 10px;
            position: fixed;
            top: 30px;
            right: 30px;
            z-index: 999;
            background: var(--panel);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border: 2px solid var(--accent);
        }

        .hamburger span {
            display: block;
            width: 25px;
            height: 3px;
            background: white;
            border-radius: 3px;
            transition: transform 0.3s ease, opacity 0.3s ease;
        }

        .hamburger.open span:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }

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

        .hamburger.open span:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }

    /*Hamburger & Animation End*/

    .nav-link {
        font-size: 28px;
    }

    .social {
        display: none;
        margin-left: 0; /* 👈 remove the auto margin on mobile */
    }

    .social-icon {
        font-size: 50px;
        padding: 0px 15px;
    }

    .social.open {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 10px 0;
    }

    .social-icon svg {
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    }

    .footer-social-icon svg {
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    }

    /* visibility keeps the collapsed menu's links out of the keyboard tab order */
    .nav {
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0.3s ease, visibility 0s linear 0.3s;
        width: 100%;
    }

    .nav.open {
        max-height: 500px;
        visibility: visible;
        transition: max-height 0.3s ease, visibility 0s;
    }

    .nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    .site-nav {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .logo img {
        width: 165px;
    }

    .footer-italic {
        font-style: italic;
        word-break: break-all;
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .footer-grid {
    flex-direction: column;
    }

    .footer-brand, .footer-contact {
        width: 90%;
        padding: 10px;
    }

    .footer-contact {
        padding-left: 10px;
    }

    .footer-blurb {
        max-width: none;
    }

    .footer-social-icon {
    font-size: 32px;
    padding: 5px;
    }

    .footer-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* ==========================================================================
   Link buttons (project pages and the home page)
   ========================================================================== */

    .project-links {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin: 20px 0;
    }

    .project-link-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: white;
        background: var(--glass);
        text-decoration: none;
        font-family: video-light, sans-serif;
        font-size: 20px;
        font-weight: bold;
        padding: 12px 24px;
        border: 2px solid white;
        border-radius: 10px;
        transition: background 0.3s, border-color 0.3s, transform 0.2s ease;
    }

    .project-link-btn:hover,
    .project-link-btn:focus-visible {
        background: rgba(0, 45, 52, 0.85);
        border-color: var(--accent);
        transform: translateY(-2px);
    }

/* Five nav links plus the social icons don't fit at full size just above the hamburger breakpoint */
@media (min-width: 1081px) and (max-width: 1200px) {
    .nav-link {
        font-size: 27px;
    }
}

/* Credits for teammates whose work appears in a project's renders or clips */
    .project-credits {
        margin-top: 30px;
        padding: 16px 20px;
        max-width: 75ch;
        font-family: Montserrat, sans-serif;
        font-size: 15px;
        line-height: 1.7;
        background: rgba(0, 0, 0, 0.15);
        border: 2px solid var(--accent);
        border-radius: 10px;
    }

    .project-credits a {
        color: var(--accent);
        text-decoration: underline;
    }

    .project-credits a:hover,
    .project-credits a:focus-visible {
        color: white;
    }

/* Icon-only version of the link button (social links on the home cards) */
    .project-link-icon {
        justify-content: center;
        padding: 12px 16px;
        font-size: 24px;
        line-height: 1;
    }
