/* ===== SITE: one scrolling page, models lead, details on demand =====
   Loaded after main.css, which still provides the card / media / lightbox styles. */
html, body { height: auto; overflow: visible; }
body { overflow-x: hidden; }
body.focus-open { overflow: hidden; }

#scene {
    position: fixed; inset: 0; width: 100%; height: 100%;
    z-index: 5; pointer-events: none;
}

/* ---- top bar ---- */
.bar {
    position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; padding: 0 48px;
    transition: background 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}
.bar.solid { background: rgba(245, 240, 235, 0.9); border-color: var(--border); }
.bar-home { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.5px; opacity: 0; transition: opacity 0.3s; }
.bar.solid .bar-home { opacity: 1; }
.bar-links { display: flex; gap: 28px; }
.bar-links a { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); transition: color 0.2s; }
.bar-links a:hover { color: var(--text); }

#page { transition: opacity 0.45s ease; }
body.focus-open #page { opacity: 0; pointer-events: none; }

/* ---- hero: the name and the models, nothing else ---- */
.hero { position: relative; height: 100vh; min-height: 620px; overflow: hidden; }
.hero-kicker { position: absolute; top: 96px; left: 48px; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }
.hero-place { position: absolute; top: 96px; right: 48px; font-size: 0.9rem; color: var(--text-secondary); }
.hero-name {
    position: absolute; left: 44px; bottom: 96px; margin: 0;
    font-size: clamp(3.4rem, 12.5vw, 13rem); font-weight: 700; line-height: 0.86; letter-spacing: -0.045em;
}
.hero-scroll { position: absolute; left: 50px; bottom: 40px; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.hero-kicker, .hero-place, .hero-name, .hero-scroll { z-index: 7; }   /* text always in front of the models */
.hero-belt { position: absolute; left: 0; right: 0; top: 16%; height: 50%; pointer-events: none; }

/* ---- sections ---- */
.sec { position: relative; max-width: 1240px; margin: 0 auto; padding: 120px 48px 40px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px; }
.sec-head span { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.sec-head h2 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
    display: block; cursor: pointer; border: 1px solid var(--border); border-radius: 10px;
    background: rgba(240, 236, 230, 0.55); padding: 18px 20px 20px;
    transition: border-color 0.2s, transform 0.3s ease;
}
.tile:hover { border-color: var(--text); transform: translateY(-3px); }
.tile-stage { height: 44vh; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.tile-stage img { max-width: 62%; max-height: 38%; object-fit: contain; }
.tile-stage img.dark { filter: brightness(0); }
.tile h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.tile-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 0.82rem; color: var(--text-secondary); }
.tile-meta b { font-weight: 600; color: var(--text); white-space: nowrap; }
.tiles--text { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.tiles--text .tile { padding: 26px 24px; }
.tile--logo .tile-stage { height: 26vh; min-height: 190px; }
.tile--logo .tile-stage img { max-width: 72%; max-height: 34%; }
.tile--logo .tile-stage img.tall { max-height: 62%; }
.tile--logo .tile-meta { margin-top: 0; }

.sec .edu-content { max-width: none; flex-direction: row; gap: 20px; }
.sec .edu-block { flex: 1; opacity: 1; }
.sec .contact-content { opacity: 1; margin: 0; max-width: 640px; }
.sec--last { padding-bottom: 120px; }
.contact-row { display: flex; align-items: center; gap: 48px; }
.contact-row .contact-content { flex: 1 1 auto; }
.contact-photo { flex: 0 0 auto; width: clamp(180px, 22vw, 300px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; filter: grayscale(1); }

/* ---- focus: one project or job, zoomed in. Model first, details as you scroll ---- */
#focus-layer {
    position: fixed; inset: 0; z-index: 4; overflow-y: auto; -webkit-overflow-scrolling: touch;
    opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0.45s;
}
body.focus-open #focus-layer { opacity: 1; visibility: visible; z-index: 6; }
#focus-back {
    position: fixed; top: 76px; left: 48px; z-index: 21; display: none;
    background: rgba(245, 240, 235, 0.9); border: 1px solid var(--border); border-radius: 4px;
    padding: 8px 20px; font: inherit; font-size: 0.9rem; cursor: pointer;
}
body.focus-open #focus-back { display: block; }
#focus-back:hover { border-color: var(--text); }
.focus { display: none; max-width: 1000px; margin: 0 auto; padding: 60px 48px 120px; }
.focus.on { display: block; }
.focus-stage { height: 62vh; min-height: 340px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: pan-y; }
.focus-stage img { max-width: 420px; width: 60%; max-height: 40%; object-fit: contain; cursor: default; }
.focus-stage img.dark { filter: brightness(0); }
.focus--plain { padding-top: 130px; }
.focus-body > h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; margin-bottom: 10px; }
.focus-body > .detail-date { display: block; margin-bottom: 14px; }
.focus-hint { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); margin: 0 0 6px 4px; }
.focus-body > h2.focus-logo { margin-bottom: 14px; line-height: 0; }
.focus-logo img { height: clamp(40px, 6vw, 72px); width: auto; max-width: min(380px, 80%); object-fit: contain; object-position: left; display: block; }
.focus-logo img.tall { height: clamp(80px, 13vw, 150px); }
.focus-logo img.dark { filter: brightness(0); }
.focus-body .project-detail-institution-logo { justify-content: flex-start; height: auto; min-height: 0; margin-bottom: 28px; }

@media (max-width: 768px) {
    .bar { padding: 0 16px; height: 52px; }
    .bar-links { gap: 14px; }
    .bar-links a { font-size: 0.78rem; }
    .hero-kicker { left: 18px; top: 76px; }
    .hero-place { display: none; }
    .hero-name { left: 16px; bottom: 84px; }
    .hero-scroll { left: 18px; bottom: 32px; }
    .hero-belt { top: 14%; height: 40%; }
    .sec { padding: 80px 16px 24px; }
    .tiles, .tiles--text { grid-template-columns: 1fr; }
    .tile-stage { height: 36vh; min-height: 230px; }
    .sec .edu-content { flex-direction: column; }
    .contact-row { flex-direction: column-reverse; align-items: flex-start; gap: 24px; }
    .contact-photo { width: 140px; }
    #focus-back { left: 16px; top: 64px; }
    .focus { padding: 52px 16px 90px; }
    .focus-stage { height: 46vh; min-height: 260px; }
}
