:root {
    --paper: #f4f0e8;
    --ink: #181716;
    --muted: #5e5a54;
    --teal: #0798ad;
    --coral: #e0715f;
    --moss: #63735d;
    --plum: #7a6177;
    --yellow: #e7c466;
    --line: rgba(24, 23, 22, 0.16);
    --white: #fffaf2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 5px;
}

.nav,
.footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px clamp(22px, 5vw, 76px);
}

.nav {
    flex-direction: column;
    gap: 12px;
}

.nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.mark {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-style: italic;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
    transition: text-decoration-color 180ms ease;
}

.mark:hover,
.mark:focus-visible {
    text-decoration-color: currentColor;
}

.nav-links {
    display: flex;
    gap: clamp(14px, 2.5vw, 34px);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links a {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
    transition: text-decoration-color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    text-decoration-color: currentColor;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal);
    font-weight: 400;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: text-shadow 180ms ease, transform 180ms ease;
}

.back-link::before {
    content: "<-";
    font-weight: 400;
}

.back-link:hover,
.back-link:focus-visible,
.back-link:hover::before,
.back-link:focus-visible::before {
    font-weight: 800;
}

.back-link:hover,
.back-link:focus-visible {
    text-shadow: 0 8px 18px rgba(7, 152, 173, 0.32);
    transform: translateX(-3px);
}

.project-hero {
    position: relative;
    display: grid;
    min-height: 72vh;
    place-items: center;
    margin: 0;
    overflow: hidden;
    isolation: isolate;
}

.project-bg,
.project-bg img,
.project-hero::before,
.project-hero::after {
    position: absolute;
    inset: 0;
}

.project-bg {
    z-index: -3;
    opacity: 0.6;
}

.project-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
}

.art-editorial {
    background: #dde6e0;
}

.art-editorial::before {
    position: absolute;
    inset: 12% 10%;
    border: 4px solid var(--ink);
    content: "";
    transform: rotate(2deg);
}

.art-editorial::after {
    position: absolute;
    inset: 22% 18%;
    background: repeating-linear-gradient(0deg, var(--plum) 0 16px, transparent 16px 36px);
    content: "";
    transform: rotate(-4deg);
}

.art-campaign {
    background: linear-gradient(160deg, #f8efe0, var(--yellow) 46%, #b95d51 46%);
}

.art-campaign::before {
    position: absolute;
    left: 50%;
    top: 12%;
    width: min(32vw, 260px);
    height: min(32vw, 260px);
    border: 3px solid rgba(24, 23, 22, 0.6);
    border-radius: 50%;
    content: "";
    transform: translateX(-50%);
}

.art-campaign::after {
    position: absolute;
    right: 9%;
    bottom: 10%;
    width: 44%;
    height: 22%;
    background: var(--white);
    clip-path: polygon(0 22%, 88% 0, 100% 76%, 8% 100%);
    content: "";
}

.art-system {
    background: linear-gradient(135deg, #171717 0 45%, #f5c45c 45% 70%, #f7efe4 70%);
}

.art-system::before {
    position: absolute;
    top: 12%;
    left: 10%;
    width: 64%;
    height: 64%;
    border: 4px solid var(--teal);
    content: "";
    transform: rotate(8deg);
}

.art-system::after {
    position: absolute;
    right: 11%;
    bottom: 10%;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: var(--coral);
    content: "";
}

.project-hero::before {
    z-index: -2;
    background: rgba(24, 23, 22, 0.28);
    content: "";
}

.project-hero::after {
    z-index: -1;
    border: 1px solid rgba(255, 250, 242, 0.42);
    content: "";
    pointer-events: none;
}

.project-kicker {
    margin: 0 0 14px;
    color: #8de4ef;
    font-size: clamp(0.9rem, 1.25vw, 1.08rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-align: center;
    text-transform: uppercase;
}

h1 {
    max-width: 1080px;
    margin: 0;
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4rem, 11vw, 10rem);
    font-style: italic;
    font-weight: 500;
    line-height: 0.92;
    text-align: center;
    text-shadow: 0 3px 30px rgba(24, 23, 22, 0.62);
}

.project-body {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: clamp(52px, 7vw, 92px) clamp(22px, 5vw, 76px) clamp(64px, 8vw, 110px);
}

.intro {
    width: 100%;
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.25rem, 2.4vw, 2.05rem);
    line-height: 1.36;
}

.video-embed {
    position: relative;
    width: min(100%, 1100px);
    aspect-ratio: 16 / 9;
    margin: clamp(36px, 5vw, 56px) auto 0;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-image {
    width: min(100%, 1100px);
    margin: clamp(36px, 5vw, 56px) auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
}

.project-image img {
    display: block;
    width: 100%;
    height: auto;
}

.videogloomy {
    width: min(100%, 1100px);
    margin: clamp(36px, 5vw, 56px) auto 0;
    display: flex;
    justify-content: center;
}

.videogloomy video {
    display: block;
    width: 100%;
    height: auto;
    background: #000;
    border: 1px solid var(--line);
}

.youtube-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(100%, 1100px);
    margin: 22px auto 0;
    padding: 16px 20px;
    border: 1px solid var(--line);
    background: var(--white);
}

.youtube-cta p {
    margin: 0;
    max-width: 52ch;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.4;
}

.youtube-button,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--white);
    font-weight: 800;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease;
}

.youtube-button:hover,
.youtube-button:focus-visible,
.cta-button:hover,
.cta-button:focus-visible {
    background: var(--white);
    color: var(--ink);
    outline: none;
}

.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--teal);
    background: var(--white);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background 180ms ease, color 180ms ease;
}

.button-outline:hover,
.button-outline:focus-visible {
    background: var(--teal);
    color: var(--white);
    outline: none;
}

.research-cta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    width: min(100%, 1100px);
    margin: clamp(48px, 6vw, 72px) auto 0;
}

.polaroids {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
}

.polaroid {
    margin: 0;
    padding: 12px 12px 30px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(24, 23, 22, 0.14);
}

.polaroid-left {
    transform: rotate(-4deg) translateY(-16px);
}

.polaroid-a {
    transform: rotate(3deg) translateY(-10px);
}

.polaroid-b {
    transform: rotate(-2deg) translateY(18px);
}

.polaroid img {
    display: block;
    width: 240px;
    height: 156px;
    object-fit: cover;
}

.polaroid-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 156px;
    padding: 8px;
    border: 1px dashed var(--line);
    background: var(--paper);
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

@media (max-width: 860px) {
    .polaroid-left,
    .polaroid-a,
    .polaroid-b {
        transform: none;
    }
}

@media (max-width: 640px) {
    .polaroid img,
    .polaroid-placeholder {
        width: 42vw;
        height: 27vw;
    }
}

.details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: clamp(44px, 6vw, 72px);
}

.detail {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.detail h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.detail p,
.footer {
    color: var(--muted);
}

.detail p {
    margin: 0;
}

.cv-section {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: clamp(52px, 7vw, 92px) clamp(22px, 5vw, 76px) clamp(64px, 8vw, 110px);
    display: grid;
    grid-template-columns: 300px 1fr 260px;
    grid-template-areas:
        "photo  header header"
        "photo  info   skills";
    gap: clamp(28px, 3.5vw, 48px) clamp(32px, 4vw, 56px);
    align-items: start;
}

.cv-photo {
    grid-area: photo;
    margin: 0;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid var(--line);
}

.cv-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-header {
    grid-area: header;
}

.cv-header h2 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-style: italic;
}

.cv-role {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 1.1rem;
}

.cv-bio {
    margin: 0;
    max-width: 72ch;
    color: var(--ink);
}

.cv-info {
    grid-area: info;
}

.cv-block {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.cv-block:first-of-type {
    margin-top: 0;
}

.cv-block h4 {
    margin: 20px 0 10px;
    color: var(--teal);
    font-size: 0.8rem;
}

.cv-block h3 {
    margin: 0 0 10px;
    color: var(--teal);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cv-block ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-block li {
    padding: 4px 0;
}

.cv-block p {
    margin: 0;
}

.cv-skills {
    grid-area: skills;
    padding-top: 17px;
    padding-left: clamp(24px, 3vw, 40px);
    border-left: 1px solid var(--line);
}

.cv-skills h3 {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cv-skills ul {
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.cv-skills ul:last-of-type {
    margin-bottom: 0;
}

.skill-tag {
    padding: 4px 0;
}

@media (max-width: 980px) {
    .cv-section {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "header"
            "info"
            "skills";
    }

    .cv-photo {
        max-width: 320px;
    }

    .cv-skills {
        padding-left: 0;
        padding-top: 24px;
        border-left: none;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .cv-section {
        grid-template-columns: minmax(96px, 34%) 1fr;
        grid-template-areas:
            "photo  header"
            "info   info"
            "skills skills";
        gap: 20px clamp(16px, 4vw, 24px);
    }

    .cv-photo {
        max-width: none;
    }

    .cv-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 820px) {
    .project-hero {
        min-height: 58vh;
    }

    h1 {
        font-size: clamp(3.2rem, 16vw, 6rem);
    }

    .details {
        grid-template-columns: 1fr;
    }

    .youtube-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav,
    .footer {
        flex-direction: column;
    }

    .nav-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
}
