@font-face {
    font-family: 'Portfolio Editorial';
    src: url('/assets/fonts/instrument-serif-italic.ttf') format('truetype');
    font-style: italic;
    font-display: swap;
}

/* Only the down project's elevator is visible during loading. */
#loader {
    display: none !important;
}

body:not(.text-started) .topbar,
body:not(.text-started) .hero {
    visibility: hidden;
}

/* Begin only when the outer elevator has finished opening. Animate the
   children so the scene can still move the hero while scrolling. */
body.text-started .hero .lead,
body.text-started .hero .start,
body.text-started .hero .personal-name {
    animation: hero-text-arrive 1.15s cubic-bezier(.16, 1, .3, 1) both;
}
body.text-started .hero .lead { animation-delay: .08s; }
body.text-started .hero .start { animation-delay: .22s; }
body.text-started .hero .personal-name { animation-delay: .36s; }

@keyframes hero-text-arrive {
    from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
    body.text-started .hero .lead,
    body.text-started .hero .start,
    body.text-started .hero .personal-name {
        animation: none;
    }
}

.personal-name {
    display: block;
    font-family: 'Portfolio Editorial', 'Editorial Old Italic', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(80px, 18.5vw, 420px);
    line-height: .88;
    letter-spacing: -.035em;
    white-space: nowrap;
    padding-bottom: .04em;
}

.personal-mark {
    font-family: var(--sans);
    font-size: 32px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.04em;
}

#hud,
#now,
#seen {
    display: none !important;
}

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

::selection {
    background: var(--ink);
    color: var(--bg);
}

@media (max-width: 600px) {
    .personal-name {
        font-size: 19vw;
        line-height: 1.1;
    }
}

.personal-name {
    font-size: 10vw;
}

@media (max-width: 600px) {
    .personal-name {
        font-size: 21vw;
    }
}

.portrait-fallback #c {
    display: none;
}

.portrait-fallback .sig {
    opacity: .6;
}
/* Brighter ink and a luminous moving pen tip; the completed signature stays legible. */
.signature-stroke { opacity: .82; }
#sig-tip { stroke-width: 3.4; }
@media (max-width: 860px) { #sig-tip { stroke-width: 13; } }

/* Balance the personal portrait and signature without moving the name or navigation. */
 .sig { translate: none; left: 46vw; right: auto; top: 20vh; width: 57vw; }
@media (max-width: 860px) {
    .sig { left: 50%; right: auto; top: 12vh; width: 60vw; translate: -50% 0; }
}

/* Deep Ocean Blue + Cinematic Dark: cool ink over a blue-black portrait stage. */
:root {
    --accent: #68b5dc;
    --line: rgba(104, 181, 220, .24);
    color-scheme: dark;
    scrollbar-color: #68b5dc #050b12;
    caret-color: var(--accent);
}
:focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }
.col-nav button:hover, .col-nav a:hover, .menu-btn:hover, .menu-btn[aria-expanded="true"] { color: var(--accent); }
.start { border-color: var(--accent); }
.start i { border-color: var(--accent); color: var(--accent); }
.start:hover i { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.mnav { background: rgba(10, 25, 40, .94); border-color: var(--line); }
.mnav-lead { color: var(--ink); }

/* Keep the signature, introduction and personal name in the right-hand column. */
.hero { left: 51vw; right: var(--pad); }
.hero-row { flex-direction: column; align-items: flex-end; gap: 18px; }
.hero .lead { text-align: right; max-width: min(100%, 440px); }
.bigname { text-align: right; }
@media (max-width: 860px) {
    .hero-row { position: static; margin-bottom: 16px; gap: 12px; }
    .hero .lead { display: block; font-size: 12px; line-height: 1.45; max-width: 100%; }
    .personal-name { font-size: 9.7vw; line-height: 1.1; }
}

/* Share the parent cursor across the isolated top scene. */
html.shared-cursor, html.shared-cursor * { cursor: none !important; }
