* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: "Photograph Signature";
    src:
        local("Photograph Signature"),
        url("/assets/fonts/photograph-signature.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(209, 75, 75, 0.24), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(200, 216, 90, 0.13), transparent 28%),
        linear-gradient(135deg, #0b0d08 0%, #12100f 52%, #1a1413 100%);
    color: #f5f5ef;
    font-family: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(90deg, rgba(209, 75, 75, 0.02), rgba(209, 75, 75, 0.02) 1px, transparent 1px, transparent 2px),
        repeating-linear-gradient(0deg, rgba(209, 75, 75, 0.02), rgba(209, 75, 75, 0.02) 1px, transparent 1px, transparent 2px);
    opacity: 0.45;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 3px solid rgba(255, 182, 174, 0.92);
    outline-offset: 4px;
    border-radius: 12px;
}

.portfolio-page {
    position: relative;
    z-index: 1;
}

.profile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: clamp(172px, 20vw, 286px);
    text-decoration: none;
}

.brand-signature {
    display: inline-block;
    color: #ff6f6f;
    font-family: "Photograph Signature", "Great Vibes", "Brush Script MT", cursive;
    font-size: clamp(38px, 4.2vw, 58px);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 0.82;
    white-space: nowrap;
    text-shadow:
        0 0 1px #ffd1d1,
        0 0 7px rgba(255, 65, 65, 0.92),
        0 0 18px rgba(255, 28, 28, 0.66),
        0 0 42px rgba(255, 28, 28, 0.34);
    -webkit-text-stroke: 0.35px rgba(255, 216, 216, 0.72);
}

.brand-text {
    font-family: "Syne", sans-serif;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
}

.back-link {
    border: 1px solid rgba(255, 182, 174, 0.28);
    border-radius: 999px;
    color: #ffb6ae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 10px 14px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.24s ease, border-color 0.24s ease, color 0.24s ease;
}

.back-link:hover {
    background: #f5f5ef;
    border-color: #f5f5ef;
    color: #0b0d08;
}

.profile-hero,
.profile-section {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.profile-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
    gap: 44px;
    align-items: center;
    min-height: calc(100vh - 92px);
    padding: 34px 0 72px;
    isolation: isolate;
}

.profile-hero::before {
    content: "";
    position: absolute;
    left: clamp(-22px, -2vw, -8px);
    top: clamp(74px, 12vh, 124px);
    width: min(58vw, 620px);
    aspect-ratio: 1;
    background: url("/assets/logos/crazy-logo-symbol-hq.png") center / contain no-repeat;
    opacity: 0.1;
    filter: drop-shadow(0 0 42px rgba(255, 182, 174, 0.22));
    transform: rotate(-9deg);
    pointer-events: none;
    z-index: -1;
}

.portfolio-edu .profile-hero::before {
    background-image: url("/assets/team/edu/logo-swiss.png");
    opacity: 0.12;
    transform: rotate(-7deg);
}

.profile-hero > * {
    position: relative;
    z-index: 1;
}

.profile-kicker {
    display: inline-flex;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 182, 174, 0.26);
    border-radius: 999px;
    color: #ffb6ae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 8px 12px;
    text-transform: uppercase;
}

h1 {
    max-width: 860px;
    font-family: "Syne", sans-serif;
    font-size: clamp(46px, 8vw, 102px);
    letter-spacing: 0;
    line-height: 0.95;
}

.profile-role {
    margin-top: 18px;
    color: #ffb6ae;
    font-size: clamp(17px, 2vw, 22px);
    font-weight: 800;
}

.profile-intro {
    max-width: 720px;
    margin-top: 24px;
    color: #d8d5c8;
    font-size: 18px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid rgba(255, 182, 174, 0.32);
    border-radius: 999px;
    color: #f5f5ef;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 12px 18px;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.24s ease, background 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.profile-button:hover {
    transform: translateY(-2px);
    background: #f5f5ef;
    border-color: #f5f5ef;
    color: #0b0d08;
}

.profile-button.primary {
    background: #f5f5ef;
    border-color: #f5f5ef;
    color: #0b0d08;
}

.profile-portrait {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 182, 174, 0.2);
    border-radius: 28px;
    aspect-ratio: 4 / 5;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32), 0 0 42px rgba(209, 75, 75, 0.2);
}

.profile-portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.72));
}

.profile-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.profile-portrait img.is-switching {
    opacity: 0;
    transform: scale(1.035);
}

.portrait-caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    z-index: 1;
    color: #ffb6ae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-section {
    padding: 72px 0;
    border-top: 1px solid rgba(255, 182, 174, 0.14);
}

.section-heading {
    max-width: 720px;
    font-family: "Syne", sans-serif;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1;
}

.section-copy {
    max-width: 760px;
    margin-top: 18px;
    color: #a8a89f;
    font-size: 17px;
}

.tag-grid,
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.tag-card,
.project-card,
.placeholder-card {
    border: 1px solid rgba(255, 182, 174, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    padding: 22px;
}

.tag-card strong,
.project-card strong,
.placeholder-card strong {
    display: block;
    color: #f5f5ef;
    font-size: 18px;
    margin-bottom: 8px;
}

.tag-card span,
.project-card span,
.placeholder-card span {
    color: #a8a89f;
    font-size: 14px;
}

.project-card {
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.66) 100%),
        radial-gradient(circle at 24% 18%, rgba(209, 75, 75, 0.24), transparent 36%),
        rgba(255, 255, 255, 0.035);
}

.placeholder-card {
    margin-top: 34px;
}

.session-folder-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.session-folder {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border: 1px solid rgba(255, 182, 174, 0.16);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 182, 174, 0.08), transparent 42%),
        rgba(255, 255, 255, 0.035);
    color: inherit;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.session-folder img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(0.96);
    transition: transform 0.55s ease, filter 0.55s ease;
}

.session-folder::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.08) 28%, rgba(0, 0, 0, 0.78) 100%),
        radial-gradient(circle at top right, rgba(209, 75, 75, 0.12), transparent 46%);
}

.session-folder span,
.session-folder strong {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 1;
}

.session-folder span {
    bottom: 62px;
    color: #ffb6ae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.session-folder strong {
    bottom: 20px;
    color: #f5f5ef;
    font-size: 20px;
    line-height: 1.05;
}

.session-folder:hover img,
.session-folder.is-active img {
    filter: saturate(1.14) contrast(1.06);
    transform: scale(1);
}

.session-folder.is-active {
    border-color: rgba(255, 182, 174, 0.48);
}

.session-viewer {
    margin-top: 28px;
    border: 1px solid rgba(255, 182, 174, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.035);
    padding: 22px;
}

.session-viewer-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.session-viewer-heading span {
    color: #ffb6ae;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.session-viewer-heading h3 {
    color: #f5f5ef;
    font-family: "Syne", sans-serif;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1;
}

.session-image-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.session-image-grid figure {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    animation: sessionImageIn 0.52s ease both;
}

.session-image-grid figure:first-child {
    grid-column: span 2;
}

.session-image-grid img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.session-image-grid[data-layout="vertical"] {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.session-image-grid[data-layout="vertical"] figure,
.session-image-grid[data-layout="vertical"] figure:first-child {
    grid-column: auto;
    aspect-ratio: 2 / 3;
}

.session-image-grid[data-layout="vertical"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes sessionImageIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.48fr);
    gap: 34px;
    align-items: center;
}

.identity-logo-card {
    display: grid;
    min-height: 220px;
    place-items: center;
    border: 1px solid rgba(255, 182, 174, 0.16);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 32%, rgba(255, 182, 174, 0.14), transparent 50%),
        rgba(255, 255, 255, 0.035);
    padding: 28px;
}

.identity-logo-card img {
    display: block;
    width: min(100%, 260px);
    height: auto;
    max-height: 220px;
    object-fit: contain;
}

.work-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(220px, auto);
    gap: 16px;
    margin-top: 34px;
}

.work-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid rgba(255, 182, 174, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.work-card-large {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 456px;
}

.work-card img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.work-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.78));
    pointer-events: none;
}

.work-card figcaption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
}

.work-card strong,
.work-card span {
    display: block;
}

.work-card strong {
    color: #f5f5ef;
    font-size: 17px;
}

.work-card span {
    color: #d8d5c8;
    font-size: 13px;
}

@media (max-width: 860px) {
    .profile-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 22px;
    }

    .profile-hero::before {
        left: 50%;
        top: 18px;
        width: min(92vw, 440px);
        opacity: 0.09;
        transform: translateX(-50%) rotate(-7deg);
    }

    .profile-portrait {
        max-width: 430px;
    }

    .tag-grid,
    .project-grid,
    .work-gallery,
    .logo-section,
    .session-folder-grid,
    .session-image-grid {
        grid-template-columns: 1fr;
    }

    .session-image-grid figure:first-child {
        grid-column: auto;
        grid-row: auto;
        min-height: 280px;
    }

    .work-card-large {
        grid-column: auto;
        grid-row: auto;
        min-height: 280px;
    }
}
