:root {
    --ink: #14150f;
    --paper: #f7f6f0;
    --olive: #4b5a34;
    --olive-line: rgba(75, 90, 52, 0.35);
    --muted: #6f6f66;
    --sage: rgb(202, 215, 207);
    --sage-dim: rgba(202, 215, 207, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #0e1712;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@font-face {
    font-family: 'Font';
    src: url('fonts/product_sans.ttf') format('truetype');
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html {
    scroll-behavior: smooth;
}

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
    background-image: url(pics/grass.gif);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

@media (max-width: 720px) {
    #hero {
        background-attachment: scroll;
    }
}

.glass-container {
    padding: 30px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.2);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-bottom: 40px;

    text-align: center;
    font-family: "Font", sans-serif;
    color: var(--sage);
}

.glass-container img.avatar {
    height: 240px;
    width: 240px;
    border-radius: 20px;
    object-fit: cover;
    display: block;
}

.glass-container h1 {
    margin: 0;
    font-size: 2.4rem;
    letter-spacing: 0.02em;
}

.tagline {
    margin: -10px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
    color: var(--sage-dim);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.social-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(0.8);
    opacity: 0.9;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.social-btn:hover .social-icon {
    opacity: 1;
    transform: translateY(-3px);
}

.scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--sage);
    opacity: 0.75;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
}

.scroll-cue svg {
    animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.hero-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    z-index: 1;
    pointer-events: none;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 80%);
    mask-image: linear-gradient(to bottom, transparent, black 80%);
}

.hero-fade::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(8, 12, 6, 0.9));
}

@media (max-width: 720px) {
    .hero-fade {
        height: 140px;
    }
}

/* ========================================================= */

.backdrop {
    position: relative;
    background-image:
        linear-gradient(180deg, rgba(8, 12, 6, 0.72), rgba(8, 12, 6, 0.82)),
        url(pics/grass.gif);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 28px 20px 60px;
}

@media (max-width: 720px) {
    .backdrop {
        background-attachment: scroll;
    }
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel {
    background: var(--paper);
    border-radius: 28px;
    padding: 36px;
    color: var(--ink);
}

.display {
    font-family: 'Bebas Neue', 'Font', sans-serif;
    text-transform: uppercase;
    line-height: 0.94;
    letter-spacing: 0.01em;
    margin: 0;
}

.eyebrow-num {
    display: inline-block;
    font-family: 'Bebas Neue', sans-serif;
    color: var(--olive);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.panel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--olive-line);
}

.panel-nav .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.1em;
}

.panel-nav .links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.panel-nav .links a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.panel-nav .links a:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    .panel-nav .links {
        gap: 16px;
    }
    .panel-nav .links a {
        font-size: 0.62rem;
    }
}

.about-media {
    position: relative;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}

.media-tile {
    border-radius: 18px;
    min-height: 220px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--t-a, #5c6b3f), var(--t-b, #2b3220));
}

.media-photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.media-note {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(75, 90, 52, 0.06);
    border: 1px solid var(--olive-line);
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}

.media-note .media-photo {
    min-height: 100%;
}

.about-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.about-foot .display {
    font-size: 3rem;
}

.about-foot p {
    max-width: 380px;
    color: #55564d;
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 700px) {
    .about-media {
        grid-template-columns: 1fr;
    }
    .about-foot .display {
        font-size: 2.2rem;
    }
}

/* ========================================================= */
/* SERVICES panel — mixed grid of photo + numbered text tiles   */
/* ========================================================= */

.services-head {
    font-size: 2.4rem;
    margin-bottom: 26px;
    max-width: 520px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 150px;
    gap: 14px;
}

.tile {
    border-radius: 16px;
    padding: 18px;
    overflow: hidden;
}

.tile.photo {
    background: linear-gradient(150deg, var(--t-a, #5c6b3f), var(--t-b, #23291a));
}

.tile.text {
    background: rgba(75, 90, 52, 0.05);
    border: 1px solid var(--olive-line);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tile.text p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--ink);
    line-height: 1.45;
}

.tile.tall {
    grid-row: span 2;
}

@media (max-width: 700px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 130px;
    }
    .tile.tall {
        grid-row: span 1;
    }
    .services-head {
        font-size: 1.9rem;
    }
}

/* ========================================================= */
/* WORKS panel                                                  */
/* ========================================================= */

.works-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 26px;
    gap: 16px;
    flex-wrap: wrap;
}

.works-head .display {
    font-size: 2.4rem;
}

.works-head .display .accent {
    color: var(--olive);
    display: block;
}

.works-head a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
}

.works-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.work-card {
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
}

.work-thumb {
    border-radius: 16px;
    height: 240px;
    width: 100%;
    margin-bottom: 12px;
    object-fit: cover;
    display: block;
    background: linear-gradient(150deg, #6b7d47, #23291a);
}

.work-date {
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.work-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* ========================================================= */
/* CONTACT panel                                                */
/* ========================================================= */

.contact-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-panel .display {
    font-size: 2.4rem;
}

.contact-panel .email {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 3px;
    font-size: 1rem;
}

.contact-socials {
    display: flex;
    gap: 18px;
}

.contact-socials .social-icon {
    width: 22px;
    height: 22px;
    filter: none;
    opacity: 0.75;
}

.contact-socials a:hover .social-icon {
    opacity: 1;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--sage-dim);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

/* ========================================================= */
/* PORTFOLIO                                                  */
/* ========================================================= */

.portfolio-page {
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(8, 12, 6, 0.72), rgba(8, 12, 6, 0.88)),
        url(pics/grass.gif) center / cover fixed;
}

.portfolio-shell {
    max-width: 1120px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.portfolio-nav,
.portfolio-head,
.portfolio-grid {
    background: var(--paper);
    border-radius: 28px;
}

.portfolio-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    margin-bottom: 20px;
}

.portfolio-nav .logo,
.back-link {
    color: var(--ink);
    text-decoration: none;
}

.portfolio-nav .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
}

.back-link {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portfolio-head {
    padding: 42px 36px;
    margin-bottom: 20px;
}

.portfolio-head .display {
    font-size: clamp(3.5rem, 10vw, 7.5rem);
}

.portfolio-head .accent {
    color: var(--olive);
    display: block;
}

.portfolio-head p {
    max-width: 360px;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 14px;
}

.portfolio-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 9px;
    min-width: 0;
    padding: 0 0 16px;
    overflow: hidden;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    border: 0;
    border-radius: 18px;
    background: rgba(75, 90, 52, 0.06);
    font: inherit;
    transition: transform 0.25s ease, background 0.25s ease;
}

.portfolio-card:hover,
.portfolio-card:focus-visible {
    transform: translateY(-5px);
    background: rgba(75, 90, 52, 0.12);
    outline: none;
}

.portfolio-card:focus-visible {
    box-shadow: 0 0 0 2px var(--olive);
}

.portfolio-card img {
    grid-row: 2;
    width: 100%;
    height: auto;
    align-self: start;
}

.portfolio-number,
.portfolio-category,
.portfolio-title {
    margin: 0 16px;
}

.portfolio-number,
.portfolio-category {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portfolio-number {
    grid-row: 1;
    padding-top: 14px;
    color: var(--olive);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
}

.portfolio-category {
    grid-row: 3;
    color: var(--muted);
}

.portfolio-title {
    grid-row: 4;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.portfolio-arrow {
    position: absolute;
    right: 16px;
    bottom: 14px;
    color: var(--olive);
    font-size: 1.25rem;
}

.project-modal {
    position: fixed;
    z-index: 10;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    background: rgba(8, 12, 6, 0.72);
    backdrop-filter: blur(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.modal-open {
    overflow: hidden;
}

.modal-content {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    width: min(920px, 100%);
    max-height: min(760px, calc(100svh - 48px));
    overflow: auto;
    border-radius: 24px;
    background: var(--paper);
}

.modal-image-wrap {
    min-height: 440px;
    background: #dfe2d7;
}

.modal-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px;
}

.modal-meta,
.modal-note {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-copy .display {
    margin: 12px 0 22px;
    font-size: 3rem;
}

.modal-description {
    margin: 0;
    color: #55564d;
    font-size: 0.96rem;
    line-height: 1.65;
}

.modal-note {
    margin: 28px 0 0;
}

.modal-close {
    position: fixed;
    z-index: 1;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
    cursor: pointer;
    border: 0;
    border-radius: 50%;
    color: var(--paper);
    background: rgba(247, 246, 240, 0.18);
    font-size: 2rem;
    line-height: 1;
}

/* ========================================================= */
/* MOBILE                                                     */
/* ========================================================= */

@media (max-width: 600px) {
    #hero {
        min-height: 100svh;
        padding: 24px 16px;
    }

    .glass-container {
        width: auto;
        padding: 30px;
        padding-bottom: 40px;
        border-radius: 40px;
    }

    .glass-container img.avatar {
        width: min(62vw, 220px);
        height: min(62vw, 220px);
    }

    .glass-container h1 {
        font-size: 2rem;
    }

    .social-buttons {
        gap: 24px;
    }

    .social-icon {
        width: 42px;
        height: 42px;
    }

    .scroll-cue {
        bottom: 18px;
    }

    .backdrop {
        padding: 14px 12px 36px;
    }

    .wrap {
        gap: 12px;
    }

    .panel {
        border-radius: 22px;
        padding: 22px;
    }

    .panel-nav {
        padding-bottom: 16px;
        margin-bottom: 18px;
    }

    .panel-nav .links {
        gap: 12px;
    }

    .panel-nav .links a {
        font-size: 0.6rem;
        letter-spacing: 0.06em;
    }

    .about-media {
        gap: 12px;
        margin-bottom: 18px;
    }

    .media-tile,
    .media-photo {
        min-height: 250px;
    }

    .about-foot {
        align-items: flex-start;
        gap: 12px;
    }

    .about-foot .display,
    .works-head .display,
    .contact-panel .display {
        font-size: 2.1rem;
    }

    .about-foot p {
        max-width: none;
        font-size: 0.94rem;
    }

    .works-head {
        margin-bottom: 18px;
    }

    .works-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .work-card {
        width: 100%;
    }

    .work-thumb {
        height: auto;
        margin-bottom: 10px;
    }

    .work-title {
        font-size: 0.96rem;
    }

    .contact-panel {
        align-items: flex-start;
        gap: 28px;
    }

    .contact-panel .email {
        font-size: 0.94rem;
    }

    .contact-socials .social-icon {
        width: 28px;
        height: 28px;
    }

    footer {
        padding: 16px;
    }

    .portfolio-page {
        background-attachment: scroll;
    }

    .portfolio-shell {
        padding: 14px 12px 36px;
    }

    .portfolio-nav,
    .portfolio-head,
    .portfolio-grid {
        border-radius: 22px;
    }

    .portfolio-nav {
        padding: 17px 20px;
        margin-bottom: 12px;
    }

    .portfolio-head {
        padding: 30px 22px;
        margin-bottom: 12px;
    }

    .portfolio-head .display {
        font-size: 4rem;
    }

    .portfolio-head p {
        margin-top: 16px;
        font-size: 0.9rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .portfolio-card {
        grid-template-columns: 1fr;
    }

    .project-modal {
        padding: 12px;
    }

    .modal-content {
        grid-template-columns: 1fr;
        max-height: calc(100svh - 24px);
        border-radius: 20px;
    }

    .modal-image-wrap {
        min-height: 0;
    }

    .modal-image {
        height: auto;
    }

    .modal-copy {
        padding: 26px 22px 30px;
    }

    .modal-copy .display {
        font-size: 2.35rem;
        margin: 10px 0 16px;
    }

    .modal-close {
        top: 20px;
        right: 20px;
        width: 38px;
        height: 38px;
        color: var(--ink);
        background: var(--paper);
    }
}

@media (max-width: 380px) {
    .panel {
        padding: 18px;
    }

    .panel-nav .logo {
        display: none;
    }

    .panel-nav .links {
        width: 100%;
        justify-content: space-between;
    }
}