/* Loaded after styles.css. Your original styles.css is untouched. */

/* FONTS: Playfair Display for titles only, Space Grotesk for everything else */

body,
.time-label { font-family: 'Space Grotesk', Arial, sans-serif; }

.content-section.rich { font-family: 'Space Grotesk', Arial, sans-serif; }

.inner h2,
.project-text h3,
.panel h3 { font-weight: 700; }

/* Projects and About titles use Playfair Display. Contact stays Space Grotesk. */
#projects h2,
#about h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
}

/* Text under the contact panel */
.wip,
.footer {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
}


/* HERO SCROLL CUE */

.hero { position: relative; }

.scroll-cue {
    position: absolute;
    bottom: 40px;
    left: 50%;
    padding-bottom: 30px;
    color: #20242a;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.85);

    /* Hidden for 2s, then pops up */
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.88);
    animation: scrollCuePop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 2s forwards;
}

.scroll-cue::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 22px;
    background: #20242a;
    transform-origin: top;
    animation: cue 2s ease-in-out 2.4s infinite;
}

@keyframes scrollCuePop {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px) scale(0.88);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

@keyframes cue {
    0% { transform: translateX(-50%) scaleY(0); }
    60% { transform: translateX(-50%) scaleY(1); opacity: 1; }
    100% { transform: translateX(-50%) scaleY(1); opacity: 0; }
}

body.scrolled .scroll-cue {
    animation: none;
    opacity: 0;
    transform: translate(-50%, 10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* RICH SECTIONS */

.content-section.rich {
    font-size: 16px;
    padding: 130px clamp(24px, 7vw, 110px) 100px;
}

.inner {
    width: 100%;
    max-width: 1050px;
}

.inner h2 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: 16px;
}

.intro, .lead {
    max-width: 620px;
    line-height: 1.6;
}

.intro { font-size: 1.1rem; margin-bottom: 70px; }
.lead { font-size: 1.3rem; margin-bottom: 48px; }

h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
}


/* PROJECTS */

.project {
    font-family: 'Space Grotesk', Arial, sans-serif;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    margin-bottom: 110px;
}

.project:nth-of-type(even) { grid-template-columns: 1fr 1.3fr; }
.project:nth-of-type(even) .project-media { order: 2; }
.project:last-of-type { margin-bottom: 0; }

.project-media {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Wastewater Treatment Scraper Tank (5th project) 1:1 square */
.project:nth-of-type(5) .project-media {
    aspect-ratio: 1 / 1;
}

.project-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-text h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 6px; }
.project-text p { line-height: 1.65; margin-top: 14px; }
.project-text .context { margin-top: 0; opacity: 0.65; font-size: 14px; }
.project-text .tools { font-size: 14px; opacity: 0.65; }


/* ABOUT */

.panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 44px clamp(28px, 5vw, 70px);
    padding: clamp(28px, 4vw, 52px);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
}

.panel h3 { font-size: 1.5rem; margin-bottom: 14px; }
.panel p { line-height: 1.6; margin-bottom: 14px; font-size: 15px; }


/* ABOUT PHOTO */

.about-intro {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    margin-bottom: 48px;
}

.about-intro .lead { margin-bottom: 0; max-width: none; }

.portrait {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* CONTACT */

.contact-panel { grid-template-columns: 1.2fr 1fr; align-items: center; }

.panel .contact-lead {
    font-weight: 500;
    font-size: 30px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin: 0;
}

.contact-list { display: grid; gap: 24px; }
.contact-list dt { font-size: 13px; opacity: 0.6; margin-bottom: 4px; }
.contact-list dd { font-size: 1.05rem; overflow-wrap: anywhere; }

.contact-list a {
    color: #20242a;
    text-decoration: none;
    border-bottom: 1px solid rgba(32, 36, 42, 0.3);
    transition: border-color 0.25s ease;
}

.contact-list a:hover { border-color: #20242a; }

.wip { margin-top: 36px; max-width: 700px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; opacity: 0.9; }
.footer { margin-top: 40px; font-size: clamp(1.3rem, 2vw, 1.6rem); opacity: 0.85; }


/* PROJECT REVEAL */

.js .project {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .project.visible { opacity: 1; transform: none; }


/* WHITE SCROLL PILL (replaces the cloud) */

#scrollbar { width: 80px; right: 14px; }

#scroll-thumb {
    top: 10px;
    right: 0;
    width: 16px;
    height: 96px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(32, 36, 42, 0.16);
    filter: none;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#scroll-thumb::before { content: none; }

#scroll-thumb:hover,
#scroll-thumb.dragging {
    width: 64px;
    height: 200px;
}

#scroll-thumb.dragging { cursor: grabbing; }

.scroll-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 200px;
    padding: 18px 0;
    align-items: center;
    justify-content: space-between;
}

#scroll-thumb:hover .scroll-content,
#scroll-thumb.dragging .scroll-content {
    opacity: 1;
    transition-delay: 0.12s;
}


/* MOBILE */

@media (max-width: 800px) {
    .project,
    .project:nth-of-type(even) { grid-template-columns: 1fr; margin-bottom: 80px; }
    .project:nth-of-type(even) .project-media { order: 0; }
    .panel { grid-template-columns: 1fr; }
    .about-intro { grid-template-columns: 1fr; }
    .portrait { max-width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
    .js .project { transform: none; transition: opacity 0.3s ease; }
    .scroll-cue::after { animation: none; }
}
