/*
  Adaptive styles
  - Keep desktop & tablet typography as-is
  - Apply tweaks only on small screens (mobile)
*/


/* Mobile (≤ 767px) */
@media (max-width: 767px) {

    /* Use dynamic viewport units for the hero only so it fits the visible area below browser toolbars */
    .hero .main,
    .main-image,
    .main-content {
        min-height: 100dvh;
        height: auto;
    }

    /* Fallback for older browsers that don't support dvh */
    @supports (height: 100svh) {

        .hero .main,
        .main-image,
        .main-content {
            min-height: 100svh;
        }
    }

    /* Global spacing */
    .section-container,
    .projects-container,
    .reviews-container,
    .calender-container,
    .contact-container,
    .bio-container {
        margin: 32px;
        /* center horizontally, reduce vertical spacing */
    }



    /* Vertical section label */
    .section-label {
        font-size: 2.4rem;
        /* was 4rem */
        min-width: 44px;
        /* slimmer rail */
        margin-right: 24px;
        /* tighter gap to content */
    }






    /* Hero: bottom banner with top fade on mobile */
    .hero .main {
        position: relative;
    }

    .main-title {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 4;
        margin: 0;
        padding: 16px 16px 20px;
        text-align: start;
        color: #fff;
        /* Opaque banner that fades out at its top */
        background: linear-gradient(to top,
                rgba(255, 255, 255, 1) 0%,
                rgba(255, 255, 255, 1) 20%,
                rgba(255, 255, 255, 1) 40%,
                rgba(255, 255, 255, 1) 70%,
                rgb(255, 255, 255, 0.0) 100%);
    }

    .main-title .name {
        font-size: clamp(1.6rem, 7vw, 2rem);
        font-weight: 400;
        color: #000000;
    }

    .main-title .subtitle {
        font-size: clamp(1rem, 5vw, 1.4rem);
        font-weight: 300;
        color: #2e2e2e;
    }

    /* Biography layout → column */
    .bio-content {
        flex-direction: column-reverse;
        gap: 24px;
    }

    .bio-text {
        max-width: none;
        font-size: 0.95rem;
    }

    .bio-photo img {
        max-width: none;
        width: 100%;
        height: auto;
    }








    /* Projects — keep as-is (optional: reduce hover growth on small screens) */
    .projects-gallery img {
        height: 110px;
        transition: height 0.35s ease;
    }

    .projects-gallery img:hover {
        height: 170px;
    }

    /* Disable hover effects on touch (mobile) + make title fill image */
    .projects-gallery img:hover {
        height: 110px;
        /* keep fixed height on mobile */
    }

    /* Ensure anchor and container are positioned correctly */
    .project-image,
    .project-image a {
        position: relative;
        display: block;
    }

    /* Title covers full image on mobile */
    .project-title {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 12px;
        font-size: clamp(1.25rem, 6vw, 2rem);
        line-height: 1.1;
        letter-spacing: 0.08em;
        opacity: 1;
        /* always visible on mobile */
        /* subtle readable overlay */
        background: linear-gradient(to top,
                rgba(0, 0, 0, 0.55),
                rgba(0, 0, 0, 0.25) 40%,
                rgba(0, 0, 0, 0) 70%);
    }

    /* Hover should not change title visibility on mobile */
    .project-image:hover .project-title {
        opacity: 1;
    }








    /* Calendar layout → column */
    .calender-content {
        flex-direction: column;
        gap: 24px;
    }

    .calender-list {
        gap: 28px;
    }

    .calender-event {
        gap: 16px;
    }

    .calender-image-placeholder {
        width: 100%;
        height: 220px;
        margin: 16px 0 0 0;
        /* remove left margin from desktop */
    }







    /* Contact layout → column */
    .contact-content {
        display: flex;
        flex-direction: column;
        /* stack on mobile */
        gap: 24px;
    }

    /* Ensure text first, image below */
    .contact-info {
        order: 1;
        margin-top: 0;
    }

    .contact-image-placeholder,
    .contact-image {
        order: 2;
        width: 100%;
        height: auto;
        margin: 16px 0 0 0;
        /* remove desktop left margin */
    }

    /* If you later swap the placeholder for a real image, keep it contained */
    .contact-image-placeholder img,
    .contact-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 2px;
    }

    /* Type scale trim for body copy */
    .review-title {
        font-size: 1rem;
    }

    .review-text {
        font-size: 0.95rem;
    }

    .event-title {
        font-size: 1rem;
    }

    .event-location {
        font-size: 0.92rem;
    }

    .contact-name {
        font-size: 1.05rem;
    }

    .contact-role,
    .contact-details,
    .contact-rep {
        font-size: 0.95rem;
    }

    /* Menu button nudge */
    .menu-btn {
        top: 16px;
        right: 16px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        width: 32px;
        height: 22px;
        padding: 0;
        gap: 0;
        z-index: 1002;
    }

    .menu-btn .menu-label {
        display: none;
    }

    .menu-btn .bar {
        display: block;
        width: 100%;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
        transform-origin: center;
        z-index: 1002;
    }

    .menu-btn.open {
        display: flex;
    }

    .menu-btn.open .bar:nth-child(2) {
        /* top bar */
        transform: translateY(9px) rotate(45deg);
    }

    .menu-btn.open .bar:nth-child(3) {
        /* middle bar */
        opacity: 0;
    }

    .menu-btn.open .bar:nth-child(4) {
        /* bottom bar */
        transform: translateY(-10px) rotate(-45deg);
    }

    .close-btn {
        display: none;
    }

    .drawer {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        width: 100vw;
        height: 100dvh;
        /* use dynamic viewport height on mobile */
        background: #111;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(calc(-100% - env(safe-area-inset-top)));
        /* fully offscreen */
        transition: transform 0.35s ease-in-out;
        z-index: 1000;
        outline: none !important;
        /* avoid debug outline peeking */
    }

    .drawer.open {
        transform: translateY(0);
    }

    .drawer-nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        font-size: 1rem;
        text-align: center;
        height: 100%;
        width: 100%;
    }

    .drawer-nav a {
        text-decoration: none;
        color: #fff;
        font-weight: 400;
        letter-spacing: 0.1em;
    }

    .close-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        color: #fff;
        background: none;
        padding: 8px 24px;
        border-radius: 2px;
        font-size: 1.2rem;
        font-weight: 400;
        letter-spacing: 0.12em;
        cursor: pointer;
        z-index: 1001;
        pointer-events: auto;
        transition: background 0.2s;
        border: none;
        text-transform: uppercase;
        font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    }

    body.no-scroll {
        overflow: hidden;
        height: 100dvh;
        touch-action: none;
    }

    .footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .footer-copyright {
        text-align: right;
    }
}