:root {
    color-scheme: dark;
    --background: #080808;
    --foreground: rgba(240, 236, 227, 0.82);
    --muted: rgba(240, 236, 227, 0.46);
    --line: rgba(240, 236, 227, 0.18);
    --ease: cubic-bezier(.16, 1, .3, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--background);
}

body {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 100dvh;
    color: var(--foreground);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 400;
}

body * {
    font-weight: 400;
    font-style: normal;
}

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

p,
h1 {
    margin: 0;
}

.intro-curtain {
    position: fixed;
    z-index: 100;
    inset: 0;
    background: #11100f;
    pointer-events: none;
    transform-origin: top;
    animation: curtainLift 1.05s cubic-bezier(.76, 0, .24, 1) .1s forwards;
}

.mast {
    position: relative;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1960px, 100%);
    margin: 0 auto;
    padding: clamp(18px, 2.8vh, 34px) clamp(28px, 2.8vw, 52px) 0;
}

.mark {
    display: block;
    flex: none;
    width: 62px;
    opacity: 0;
    animation: fadeIn .9s ease .8s forwards;
}

.letter {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.12fr);
    align-items: center;
    column-gap: clamp(36px, 3.2vw, 64px);
    width: min(1960px, 100%);
    flex: 1;
    min-height: 0;
    margin: 0 auto;
    padding: clamp(12px, 2vh, 28px) clamp(28px, 2.8vw, 52px) clamp(28px, 4vh, 56px);
}

.mark img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.72;
    animation: markDrift 9s ease-in-out 2s infinite alternate;
}

.letter-body,
.letter-close {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 400;
}

h1,
h1 .name-line {
    font-family: "Cinzel", "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(52px, 6.4vw, 108px);
    line-height: 0.96;
}

.name-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
}

.name-line > span {
    display: block;
    color: transparent;
    background: linear-gradient(180deg, rgba(240, 236, 227, 0.9) 0%, rgba(240, 236, 227, 0.52) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    transform: translateY(112%);
    animation: titleReveal 1.05s var(--ease) forwards;
}

.name-line-second {
    margin-top: 0.12em;
}

.name-line-second > span {
    animation-delay: 1.12s;
}

.name-line:first-child > span {
    animation-delay: .98s;
}

.letter-body {
    margin-top: clamp(28px, 4vh, 44px);
    color: transparent;
    background: linear-gradient(90deg, rgba(240, 236, 227, 0.7), rgba(240, 236, 227, 0.32));
    -webkit-background-clip: text;
    background-clip: text;
    font-size: clamp(28px, 2.2vw, 36px);
    font-style: italic;
    line-height: 1.3;
    opacity: 0;
    animation: riseIn .9s var(--ease) 1.35s forwards;
}

.letter-close {
    margin-top: clamp(16px, 2.2vh, 26px);
    color: rgba(240, 236, 227, 0.62);
    font-size: 22px;
    line-height: 1.3;
    border-bottom: 1px solid transparent;
    background-image: linear-gradient(90deg, rgba(240, 236, 227, 0.42), rgba(240, 236, 227, 0));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 1px;
    opacity: 0;
    animation: riseIn .9s var(--ease) 1.5s forwards;
}

.letter-close:hover,
.letter-close:focus-visible {
    color: rgba(240, 236, 227, 0.88);
    background-image: linear-gradient(90deg, rgba(240, 236, 227, 0.7), rgba(240, 236, 227, 0.08));
}

.portrait {
    position: relative;
    height: min(78vh, 860px);
    justify-self: stretch;
    margin: 0;
    opacity: 0;
    animation: portraitIn 1.35s var(--ease) .55s forwards;
}

.portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 34%;
    opacity: 0.88;
    animation: portraitBreathe 16s ease-in-out 2.1s infinite alternate;
}

.portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, var(--background) 0%, transparent 7%, transparent 94%, var(--background) 100%),
        linear-gradient(180deg, var(--background) 0%, transparent 6%, transparent 82%, var(--background) 100%);
    pointer-events: none;
}

.ig {
    position: fixed;
    z-index: 20;
    right: clamp(24px, 4vw, 52px);
    bottom: clamp(22px, 4vh, 44px);
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(240, 236, 227, 0.58);
    opacity: 0;
    animation: fadeIn .9s var(--ease) 1.65s forwards;
    transition: color .45s var(--ease);
}

.ig-label {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 17px;
    font-style: italic;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.03em;
    color: rgba(240, 236, 227, 0.7);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.ig-glyph {
    display: block;
    width: 58px;
    height: 58px;
    overflow: visible;
}

.ig-ring,
.ig-glint,
.ig-cam {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ig-ring {
    stroke-width: 0.75;
    opacity: 0.28;
}

.ig-glint {
    stroke-width: 0.75;
    opacity: 0.45;
    stroke-dasharray: 8 92;
    animation: glint 11s linear infinite;
}

.ig-cam {
    stroke-width: 1.15;
}

.ig-dot {
    fill: currentColor;
    stroke: none;
}

.ig-photo {
    position: absolute;
    right: 0;
    bottom: calc(100% + 18px);
    width: 132px;
    height: 220px;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.ig-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 0.92;
}

.ig:hover,
.ig:focus-visible {
    color: rgba(240, 236, 227, 0.9);
}

.ig:hover .ig-label,
.ig:focus-visible .ig-label {
    opacity: 1;
    transform: translateX(0);
}

.ig:hover .ig-photo,
.ig:focus-visible .ig-photo {
    opacity: 1;
    transform: translateY(0);
}

.ig:hover .ig-ring,
.ig:focus-visible .ig-ring {
    opacity: 0.5;
}

@media (max-width: 800px) {
    .mast {
        padding: 18px 24px 0;
    }

    .mark {
        width: 52px;
    }

    .letter {
        grid-template-columns: 1fr;
        align-items: start;
        row-gap: 8px;
        padding: 18px 24px 48px;
    }

    .portrait {
        order: -1;
        height: 48vh;
        min-height: 300px;
    }

    .portrait::after {
        background:
            linear-gradient(180deg, var(--background) 0%, transparent 16%, transparent 58%, var(--background) 100%),
            linear-gradient(90deg, var(--background) 0%, transparent 14%, transparent 86%, var(--background) 100%);
    }

    h1 {
        font-size: clamp(38px, 11vw, 54px);
        letter-spacing: 0.05em;
    }

    .letter-body {
        margin-top: 28px;
    }

    .letter-close {
        margin-top: 36px;
    }

    .letter {
        padding-bottom: 88px;
    }

    .ig-label {
        font-size: 15px;
    }

    .ig-glyph {
        width: 52px;
        height: 52px;
    }

    .ig-photo {
        width: 96px;
        height: 160px;
    }
}

@keyframes curtainLift {
    to { transform: scaleY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes ruleIn {
    from { opacity: 0; transform: scaleX(0.35); }
    to { opacity: 1; transform: scaleX(1); }
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes titleReveal {
    to { transform: translateY(0); }
}

@keyframes portraitIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes portraitBreathe {
    to { transform: scale(1.045) translateY(-1.2%); }
}

@keyframes markDrift {
    to { transform: rotate(4deg) scale(1.04); }
}

@keyframes glint {
    to { stroke-dashoffset: -100; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .intro-curtain {
        display: none;
    }

    .mark,
    .letter-body,
    .letter-close,
    .portrait,
    .ig {
        opacity: 1;
        transform: none;
    }

    .ig-glint {
        animation: none;
    }

    .name-line > span {
        transform: none;
    }
}
