* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}


:root {
    --blue: #4A72D6;
    --cutout-bg: #747474;
}

body {
    font-family: 'Lato', sans-serif;
}

html,
body {
    background-color: #000;
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
    padding: 48px 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-self: start;
    gap: 7px;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #fff;
    transition: background-color 0.3s ease;
}

.hamburger:hover span {
    background-color: var(--blue);
}


.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.mobile-nav.open {
    transform: translateX(0);
}

.close-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--blue);
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin-bottom: 32px;
}

.mobile-nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    font-family: 'Lato', sans-serif;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--blue);
}

.logo img {
    height: 30px;
}


.contact-link {
    color: #fff;
    justify-self: end;
    text-decoration: underline;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--blue);
}

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-video,
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-content {
    position: absolute;
    bottom: 80px;
    left: max(40px, calc((100% - 1100px) / 2));
    color: #fff;
    z-index: 5;
}

.hero-tagline {
    font-size: 35px;
    font-style: italic;
    margin-bottom: 12px;
}

.hero-name {
    font-size: 20px;
    margin-bottom: 24px;
    opacity: 0.85;
}

.hero--project .hero-tagline {
    font-size: 55px;
    font-style: italic;
    margin-bottom: 12px;
}

.hero--project .hero-name {
    font-size: 30px;
    margin-bottom: 24px;
    opacity: 0.85;
}

.hero-view-work {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    letter-spacing: 1px;
    border-bottom: 1px solid #fff;
    padding-bottom: 4px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.hero-view-work:hover {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0) 100%);
    z-index: 3;
    pointer-events: none;
}

.hero-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.content {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer {
    background-color: #000;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-copyright {
    color: #fff;
    opacity: 0.6;
    font-size: 13px;
    font-family: 'Lato', sans-serif;
}

.footer-logo img {
    height: 30px;
    display: block;
}

.work {
    background-color: #000;
    padding: 100px 40px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.work-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
}

.work-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.work-img.base {
    opacity: 1;
}

.work-img.hover {
    opacity: 0;
}

.work-item:hover .work-img.base {
    opacity: 0;
}

.work-item:hover .work-img.hover {
    opacity: 1;
}


.project-content {
    background-color: #000;
    color: #fff;
    padding: 100px 0;
    position: relative;
}

.project-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

.project-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
}

.project-row.reverse .project-text {
    order: 2;
}

.project-text h3 {
    font-size: 40px;
    margin-bottom: 16px;
}

.project-text p {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 12px;
}

.project-media img {
    display: block;
    width: 100%;
    border-radius: 24px;
}

.project-media.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.back-to-top {
    position: fixed;
    right: 40px;
    bottom: 40px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: #fff;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--blue);
    color: #fff;
}

.project-intro {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 60px;
}

.project-img {
    display: block;
    width: 100%;
    border-radius: 24px;
    margin-bottom: 40px;
}

.logo,
.footer-logo {
    position: relative;
    justify-self: center;
    display: block;
}

.logo img,
.footer-logo img {
    display: block;
    transition: opacity 0.4s ease;
}

.logo .hover,
.footer-logo .hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 30px;
    width: auto;
    opacity: 0;
}

.logo:hover .base,
.footer-logo:hover .base {
    opacity: 0;
}

.logo:hover .hover,
.footer-logo:hover .hover {
    opacity: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    background: #111;
    color: #fff;
    width: 100%;
    max-width: 500px;
    padding: 48px 40px 40px;
    border-radius: 24px;
}

.modal h2 {
    font-size: 28px;
    margin-bottom: 28px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}

.contact-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--blue);
}

.contact-form textarea {
    resize: vertical;
}

.contact-submit {
    width: 100%;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 16px;
    cursor: pointer;
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    width: 100%;
    margin-bottom: 100px;
}

.gallery-col {
    height: 100vh;
    overflow: hidden;
}

.gallery-col--split {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    height: 100vh;
}

.gallery-col img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    background-color: #000;
    color: #fff;
    padding: 160px 40px 100px;
}

.about-content h1 {
    font-size: 48px;
    margin-bottom: 24px;
}

.project-fullbleed {
    width: 100%;
    height: 50vh;
    overflow: hidden;
    margin-bottom: 100px;
}

.project-fullbleed img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-media a {
    display: block;
}

.project-link {
    display: inline-block;
    margin-top: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    border-bottom: 1px solid #fff;
    padding-bottom: 4px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.project-link:hover {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.project-media a img {
    transition: opacity 0.3s ease;
}

.project-media a:hover img {
    opacity: 0.85;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.category-grid img {
    display: block;
    width: 100%;
    border-radius: 24px;
}

.video-frame {
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background-color: #111;
}

.video-frame video,
.video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.project-text--intro {
    max-width: 800px;
    margin-bottom: 60px;
}

.compare {
    --pos: 50%;
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 40px;
    background-color: #111;
}

.compare-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-after {
    background-color: var(--cutout-bg);
    clip-path: inset(0 0 0 var(--pos));
}

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    background-color: #fff;
    transform: translateX(-1px);
    pointer-events: none;
}

.compare-handle::after {
    content: "↔";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.compare-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
}

.compare-label {
    position: absolute;
    top: 20px;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #f2f2f2;
    font-size: 12px;
    letter-spacing: 1px;
    pointer-events: none;
}

.compare-label--before {
    left: 20px;
}

.compare-label--after {
    right: 20px;
}

.cutout-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    width: 100%;
}

.cutout {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    background-color: var(--cutout-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    cursor: zoom-in;
    transition: background-color 0.3s ease;
}

.cutout:hover {
    background-color: color-mix(in srgb, var(--cutout-bg), white 12%);
}

.cutout img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.cutout:hover img {
    transform: scale(1.06);
}

.cutout:hover img {
    transform: scale(1.06);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: min(1100px, 78vw);
    max-height: 80vh;
    object-fit: contain;
    background-color: var(--cutout-bg);
    border-radius: 24px;
    padding: 24px;
}

.lightbox-close {
    position: absolute;
    top: 32px;
    right: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--blue);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: #fff;
    color: #000;
    font-size: 32px;
    line-height: 1;
    padding-bottom: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lightbox-arrow:hover {
    background-color: var(--blue);
    color: #fff;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.grid-title {
    color: #fff;
    font-size: 14px;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 24px;
}

.cutout-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 80px;
}

.handout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.compare--handout {
    aspect-ratio: 8 / 5;
    --pos: 90%;
    margin-bottom: 0;
    background-color: #111;
}

.compare--handout .compare-img {
    object-fit: contain;
}

.compare--handout .compare-after {
    background-color: #111;
}

.cutout--light {
    background-color: #fff;
}

.cutout--light:hover {
    background-color: #f2f2f2;
}

.cutout--dark {
    background-color: #383838;
    outline: 1px solid #333;
    outline-offset: -1px;
}

.cutout--dark:hover {
    background-color: #111;
}

.icon-card {
    background-color: #fff;
    border-radius: 24px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.project-media .icon-card img {
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.next-section {
    background-color: #000;
    padding: 100px 40px;
}

.next-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.next-label {
    display: block;
    color: #fff;
    text-align: center;
    font-size: 14px;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 24px;
}

.next-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #fff;
    text-decoration: underline;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--blue);
}

.video-frame--feature {
    margin-bottom: 80px;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.skill h4 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 8px;
}

.skill p {
    color: #fff;
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.85;
}

.coming-soon {
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    border: 1px solid #333;
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    letter-spacing: 2px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.tag-row span {
    padding: 8px 16px;
    border: 1px solid #333;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.85;
}

.photo-masonry {
    column-count: 3;
    column-gap: 16px;
    margin-bottom: 100px;
}

.photo {
    position: relative;
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
}

.photo img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.photo:hover img {
    transform: scale(1.04);
}

.photo figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.photo:hover figcaption {
    opacity: 1;
}

.lightbox--photo img {
    padding: 0;
    background: none;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 100px;
}

.photo-grid .photo {
    margin-bottom: 0;
    aspect-ratio: 3 / 2;
}

.photo-grid .photo img {
    height: 100%;
    object-fit: cover;
}

.photo-grid .photo--wide {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
}
.feature-card {
    border: 1px solid #333;
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 60px;
}

.feature-label {
    color: #fff;
    font-size: 14px;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 12px;
}

.feature-text {
    color: #fff;
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 16px;
}

.photo-grid--slides .photo {
    aspect-ratio: 16 / 9;
}

.text-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--blue);
}

.project-content.about-page {
    padding-top: 260px;
}

@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: page-out 0.3s ease both;
}

::view-transition-new(root) {
    animation: page-in 0.5s ease both;
}

@keyframes page-out {
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.pager {
    background-color: #000;
    padding: 100px 40px;
}

.pager:empty {
    display: none;
}

.pager-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.pager-label {
    display: block;
    color: #fff;
    font-size: 14px;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 16px;
}

.pager-col:last-child .pager-label {
    text-align: right;
}

.pager-home {
    background-color: #000;
    border: 1px solid #333;
}

.pager-home .work-img {
    object-fit: contain;
    padding: 30%;
}

.cover-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    max-width: 800px;
    margin: 0 auto 100px;
}

.cover-pair .photo {
    margin-bottom: 0;
}

.yearbook {
    margin-bottom: 80px;
}

.yb-pages {
    display: flex;
    background-color: #111;
    border-radius: 16px;
    overflow: hidden;
}

.yb-pages img {
    display: block;
    width: 50%;
    height: auto;
}

.yb-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

.yb-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: #fff;
    color: #000;
    font-size: 28px;
    line-height: 1;
    padding-bottom: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.yb-btn:hover {
    background-color: var(--blue);
    color: #fff;
}

.yb-btn:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.yb-count {
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    min-width: 160px;
    text-align: center;
}

.yb-jump {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #fff;
    font-size: 14px;
    opacity: 0.8;
}

.yb-jump input {
    width: 72px;
    margin-left: 8px;
    padding: 6px 10px;
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    text-align: center;
}

.compare--logo,
.compare--merch {
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
}

.compare--logo .compare-img {
    object-fit: contain;
    padding: 10%;
    background-color: #fff;
}

.compare--merch .compare-img {
    object-fit: cover;
}

.compare--merch .compare-after {
    background-color: #111;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 100px;
}

.post-grid .photo {
    margin-bottom: 0;
    aspect-ratio: 3 / 4;
}

.post-grid .photo img {
    height: 100%;
    object-fit: cover;
}

.tag-row a {
    padding: 8px 16px;
    border: 1px solid #333;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    text-decoration: none;
    opacity: 0.85;
    transition: color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.tag-row a:hover {
    color: var(--blue);
    border-color: var(--blue);
    opacity: 1;
}

.coming-soon--wide {
    aspect-ratio: 21 / 9;
    margin-bottom: 40px;
}

.work-grid .work-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc(50% - 20px);
    justify-self: center;
}

.learned-title {
    margin-top: 24px;
}

.project-text .learned-title {
    font-size: 14px;
    letter-spacing: 2px;
    opacity: 0.7;
}

.learned {
    list-style: disc;
    padding-left: 22px;
    margin-top: 8px;
}

.learned li {
    color: #fff;
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 8px;
}

.photo-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compare--frames {
    aspect-ratio: 3 / 2;
    margin-bottom: 0;
}

.grid-title--hint {
    opacity: 1;
    color: rgba(255, 255, 255, 0.7);
}

.flip-all {
    margin-left: 16px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.flip-all:hover {
    color: var(--blue);
}

.flip {
    display: block;
    width: 100%;
    aspect-ratio: 8 / 5;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    perspective: 1200px;
}

.flip-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
}

.flip.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 24px;
    background-color: #111;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flip-back {
    transform: rotateY(180deg);
}

.flip {
    transition: transform 0.3s ease;
}

.flip:hover {
    transform: translateY(-4px);
}

.flip:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
    border-radius: 24px;
}

.form-status {
    margin-top: 16px;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

/* ===== Tablet and phone ===== */
@media (max-width: 900px) {

    /* Header and menu */
    .site-header { padding: 28px 24px; }
    .logo img,
    .logo .hover { height: 22px; }
    .footer-logo img,
    .footer-logo .hover { height: 26px; }
    .contact-link { font-size: 14px; }
    .close-btn { top: 24px; right: 24px; }
    .mobile-nav-links a { font-size: 26px; }

    /* Hero */
    .hero { height: 100vh; height: 100svh; }
    .hero-content { left: 24px; right: 24px; bottom: 56px; }
    .hero-gradient { height: 240px; }
    .hero-tagline { font-size: 30px; }
    .hero--project .hero-tagline { font-size: 38px; }
    .hero-name { font-size: 18px; }
    .hero--project .hero-name { font-size: 20px; }
    .hero-view-work { font-size: 15px; }
    .hero-links { flex-wrap: wrap; gap: 14px 24px; }

    /* Home grid */
    .work { padding: 64px 24px; }
    .work-grid { grid-template-columns: 1fr; gap: 24px; }
    .work-grid .work-item:last-child:nth-child(odd) { width: 100%; }

    /* Project page layout */
    .project-content { padding: 64px 0; }
    .project-inner { padding: 0 24px; }
    .project-content.about-page { padding-top: 140px; }
    .project-row { grid-template-columns: 1fr; gap: 24px; margin-bottom: 64px; }
    .project-row .project-media { order: -1; }
    .project-row.reverse .project-text { order: 0; }
    .project-text h3 { font-size: 30px; }
    .project-text p { font-size: 18px; }
    .project-text--intro { margin-bottom: 40px; }
    .project-fullbleed { height: 36vh; margin-bottom: 64px; }
    .project-gallery { grid-template-columns: 1fr; margin-bottom: 64px; }
    .gallery-col,
    .gallery-col--split { height: 60vh; }
    .icon-card { padding: 28px; }
    .feature-card { padding: 24px; margin-bottom: 40px; }
    .feature-text { font-size: 18px; }

    /* Photo and image grids */
    .photo-masonry { column-count: 2; column-gap: 10px; margin-bottom: 64px; }
    .photo { margin-bottom: 10px; border-radius: 12px; }
    .photo-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 64px; }
    .photo-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 64px; }
    .cutout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cutout-grid--two { grid-template-columns: 1fr; margin-bottom: 48px; }
    .cutout { padding: 12px; }
    .handout-grid { grid-template-columns: 1fr; gap: 20px; }
    .category-grid { grid-template-columns: 1fr; gap: 20px; }
    .skill-grid { grid-template-columns: 1fr; gap: 28px; }
    .cover-pair { gap: 16px; margin-bottom: 64px; }
    .yb-count { min-width: 120px; font-size: 13px; }

    /* Previous and next tiles */
    .pager { padding: 64px 24px; }
    .pager-inner { grid-template-columns: 1fr; gap: 32px; }
    .pager-col:empty { display: none; }
    .pager-col:last-child .pager-label { text-align: left; }

    /* Footer, form, buttons */
    .site-footer { padding: 32px 24px; }
    .modal { padding: 44px 24px 28px; }
    .modal h2 { font-size: 24px; }
    .modal-close { top: 12px; right: 16px; }
    .back-to-top { right: 20px; bottom: 20px; width: 48px; height: 48px; }

    /* Enlarge popup */
    .lightbox { padding: 16px; }
    .lightbox img { max-width: 94vw; max-height: 68vh; padding: 12px; border-radius: 16px; }
    .lightbox--photo img { padding: 0; }
    .lightbox-close { top: 12px; right: 18px; font-size: 36px; }
    .lightbox-arrow { top: auto; bottom: 28px; transform: none; width: 48px; height: 48px; font-size: 28px; }
    .lightbox-prev { left: calc(50% - 60px); }
    .lightbox-next { right: calc(50% - 60px); }
}

@media (max-width: 560px) {
    .site-header { padding: 22px 18px; }
    .contact-link { font-size: 13px; }
    .hero-tagline { font-size: 26px; }
    .hero--project .hero-tagline { font-size: 32px; }
    .hero--project .hero-name { font-size: 17px; }
    .hero-view-work { font-size: 14px; }
    .project-text h3 { font-size: 26px; }
    .project-text p { font-size: 17px; }
}