@font-face {
  font-family: "YT Allura";
  src: url("assets/fonts/allura-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "YT Lora";
  src: url("assets/fonts/lora-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --white: #fff;
  --ink: #343737;
  --muted: #716c67;
  --blue: #6f7871;
  --pink: #a97f7c;
  --yellow: #c7b9a5;
  --aqua: #c8cec7;
  --lilac: #e6e0dc;
  --line: #dedbd7;
  --page: min(1100px, calc(100vw - 48px));
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --display: Optima, "Gill Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  --hand: "YT Allura", "Snell Roundhand", cursive;
  --italic: "YT Lora", "Iowan Old Style", Baskerville, Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.62 var(--sans); text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration-color: rgba(111,120,113,.4); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover, a:focus-visible { color: var(--pink); text-decoration-color: currentColor; }
img { display: block; width: 100%; }
::selection { color: var(--ink); background: var(--yellow); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .65rem .9rem; color: #fff; background: var(--blue); }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 50; width: 100%; height: 67px; padding: 0 max(24px, calc((100vw - 1100px) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(111,120,113,.25); backdrop-filter: blur(14px); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(169,127,124,.4) 6px 10px); }
.wordmark { color: var(--pink); font: 400 2.12rem/1 var(--hand); letter-spacing: 0; text-decoration: none; }
.desktop-nav { display: flex; gap: 1.42rem; }
.desktop-nav a { position: relative; font-size: .86rem; font-weight: 700; letter-spacing: .025em; text-decoration: none; }
.desktop-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -.25rem; height: 2px; background: var(--pink); transition: right .2s ease; }
.desktop-nav a:hover::after { right: 0; }
.menu-button, .mobile-menu { display: none; }

.hero { position: relative; width: var(--page); margin: 0 auto; padding: 88px 0 58px; display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(390px, .76fr); gap: 42px; align-items: center; }
.hero::before { content: ""; position: absolute; z-index: -1; left: -8vw; top: 48px; width: 26vw; height: 26vw; max-width: 360px; max-height: 360px; border-radius: 50%; background: radial-gradient(circle at center, rgba(200,206,199,.3), rgba(200,206,199,0) 67%); }
.hero h1 { max-width: 700px; margin: 0 0 2rem; font-family: var(--sans); font-weight: 500; line-height: 1; letter-spacing: -.052em; }
.explore-line { display: block; white-space: nowrap; font-size: clamp(2.75rem, 4.15vw, 3.55rem); }
.creation-line { display: flex; align-items: center; gap: .82rem; margin-top: .12em; font-size: clamp(3.25rem, 5.25vw, 4.65rem); }
.hero h1 em { color: var(--pink); font-family: var(--italic); font-style: italic; font-weight: 400; letter-spacing: -.035em; }
.hero-film-icon { flex: 0 0 auto; width: .68em; height: .68em; padding: .11em; color: var(--pink); background: rgba(230,224,220,.66); border-radius: 50%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transform: rotate(7deg); }
.hero-copy > p:not(.eyebrow) { max-width: 60ch; margin: 0 0 1.15rem; color: var(--muted); }
.hero-copy .hero-intro { max-width: 44ch; color: var(--ink); font-size: .95rem; line-height: 1.7; text-wrap: pretty; }
.hero-copy .hero-intro strong { font-weight: 700; }
.bio-tail { white-space: nowrap; }
.hero-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.hero-links a { padding: .66rem 1.06rem; color: var(--blue); background: var(--white); border: 1px solid var(--blue); border-radius: 999px; font-size: .92rem; font-weight: 700; text-decoration: none; transition: color .2s, background .2s, transform .2s; }
.hero-links a span { margin-left: .4rem; color: var(--pink); }
.hero-links a:hover { color: #fff; background: var(--blue); transform: translateY(-2px); }

.portrait-stage { position: relative; width: 100%; min-height: 490px; display: grid; place-items: center; isolation: isolate; }
.portrait-halo { position: absolute; z-index: -3; width: 355px; height: 415px; background: var(--aqua); border-radius: 48% 52% 45% 55% / 55% 41% 59% 45%; transform: rotate(5deg); }
.portrait { position: relative; z-index: -1; width: 305px; height: 410px; margin: 0; overflow: hidden; background: var(--lilac); border-radius: 48% 52% 44% 56% / 57% 43% 57% 43%; box-shadow: 13px 16px 0 var(--lilac); transform: rotate(-2deg); }
.portrait img { height: 100%; object-fit: cover; object-position: 50% 18%; filter: saturate(.9) contrast(.98); transform: rotate(2deg) scale(1.06); }
.orbit { position: absolute; z-index: -2; width: 455px; height: 455px; overflow: visible; fill: none; pointer-events: none; }
.orbit path { vector-effect: non-scaling-stroke; }
.orbit-one { transform: rotate(-7deg); }
.orbit-one path { stroke: var(--pink); stroke-width: 1.5; stroke-dasharray: 7 8; }
.orbit-two { transform: rotate(15deg); }
.orbit-two path { stroke: var(--blue); stroke-width: 1; }
.portrait-badge { position: absolute; z-index: 2; display: flex; align-items: center; gap: .48rem; padding: .52rem .76rem; color: var(--blue); background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 10px 25px rgba(69,65,61,.12); font: 700 .76rem/1 var(--sans); letter-spacing: .02em; animation: badge-float 6s ease-in-out infinite; }
.portrait-badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.badge-screenwriting { left: -15px; top: 100px; background: #f8f1ef; transform: rotate(-7deg); }
.badge-cinema { right: -11px; top: 59px; color: var(--pink); background: #f1f4f1; transform: rotate(7deg); animation-delay: -1.5s; }
.badge-media { right: -18px; bottom: 99px; background: #f5f1e9; transform: rotate(-5deg); animation-delay: -3s; }
.badge-design { left: -2px; bottom: 47px; color: var(--pink); background: #f3eff0; transform: rotate(6deg); animation-delay: -4.5s; }
@keyframes badge-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.research-line { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 2.2rem; margin: 37px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--blue); }
.research-line li { position: relative; flex: 0 0 auto; padding-left: 1.3rem; color: var(--blue); font: 700 1rem/1.35 var(--sans); letter-spacing: .01em; }
.research-line li::before { content: "✦"; position: absolute; left: 0; color: var(--pink); }

.section { width: var(--page); margin: 0 auto; padding: 92px 0; border-top: 1px solid var(--blue); }
.section-title { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: baseline; gap: 16px; margin-bottom: 42px; }
.section-title > span:first-child { color: var(--pink); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.section-title h2 { margin: 0; font: 600 clamp(2.45rem, 4.7vw, 4.15rem)/.98 var(--display); letter-spacing: -.05em; }
.title-mark { color: var(--yellow); font-size: 2.2rem; }

.news { display: grid; grid-template-columns: .8fr 1.5fr; gap: 0 72px; }
.news .section-title { grid-column: 1; display: grid; grid-template-columns: 36px 1fr; align-content: start; margin: 0; }
.news .section-title h2 { font-size: clamp(2.5rem, 4.4vw, 4rem); }
.news .title-mark { grid-column: 2; margin-top: 1rem; }
.news > .news-scroll { grid-column: 2; grid-row: 1; }
.news-scroll { max-height: 390px; overflow-y: auto; padding-right: 18px; scrollbar-color: var(--pink) #f2f0ed; scrollbar-width: thin; overscroll-behavior: contain; }
.news-scroll:focus-visible { outline: 2px solid var(--pink); outline-offset: 5px; }
.news-scroll::-webkit-scrollbar { width: 7px; }
.news-scroll::-webkit-scrollbar-track { background: #f2f0ed; }
.news-scroll::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 999px; }
.news-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.news-list li { display: grid; grid-template-columns: 92px 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px dotted var(--line); }
.news-list time { color: var(--pink); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.news-list p { margin: 0; }
.news-list em { font-family: var(--display); font-size: 1.02rem; }
.publication-heading { grid-template-columns: 48px 1fr auto; }
.publication-heading p { max-width: 270px; margin: 0; color: var(--muted); font-size: .74rem; text-align: right; }
.publication-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -8px 0 18px; }
.publication-filters { display: inline-flex; gap: 5px; padding: 4px; background: #f3f1ef; border-radius: 999px; }
.filter-button { min-height: 38px; padding: .52rem .86rem; color: var(--muted); background: transparent; border: 0; border-radius: 999px; cursor: pointer; font: 700 .78rem/1 var(--sans); transition: color .2s, background .2s, box-shadow .2s; }
.filter-button span { margin-left: .28rem; color: var(--pink); font-size: .68rem; }
.filter-button:hover, .filter-button:focus-visible { color: var(--ink); }
.filter-button:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.filter-button.active { color: var(--white); background: var(--blue); box-shadow: 0 5px 14px rgba(69,65,61,.14); }
.filter-button.active span { color: var(--white); opacity: .76; }
.publication-toolbar p { margin: 0; color: var(--muted); font-size: .75rem; }
.publication-list { border-top: 1px solid var(--ink); }
.publication[hidden] { display: none; }
.publication { position: relative; z-index: 1; display: grid; grid-template-columns: 268px 1fr; gap: 35px; margin: 0 -16px; padding: 31px 16px; background: var(--white); border-bottom: 1px dotted var(--line); transform-origin: center; transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.publication:hover, .publication:focus-within { z-index: 3; border-color: transparent; box-shadow: 0 18px 45px rgba(69,65,61,.14); transform: scale(1.025); }
.publication-image { position: relative; align-self: start; aspect-ratio: 16 / 9; overflow: hidden; background: #f3f2ee; border: 1px solid var(--line); border-radius: 2px; box-shadow: 6px 6px 0 var(--lilac); }
.publication-image::after { content: ""; position: absolute; inset: 0; border: 3px solid transparent; transition: border-color .2s; }
.publication-image:hover::after { border-color: var(--pink); }
.publication-image img { height: 100%; object-fit: cover; transition: transform .35s ease; }
.publication-image:hover img { transform: scale(1.025); }
.publication-copy { min-width: 0; }
.publication-meta { display: flex; justify-content: space-between; margin: 0 0 .75rem; color: var(--pink) !important; font-size: .74rem !important; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.publication-meta span:last-child { color: var(--blue); }
.publication h3 { max-width: 700px; margin: 0 0 .72rem; font: 600 clamp(1.18rem, 2vw, 1.48rem)/1.2 var(--display); letter-spacing: -.02em; }
.publication h3 a { text-decoration: none; }
.publication-copy > p:not(.publication-meta) { margin: 0 0 .8rem; color: var(--muted); font-size: .78rem; line-height: 1.48; }
.publication-copy strong { color: var(--ink); }
.paper-link { color: var(--blue); font-size: .74rem; font-weight: 800; text-decoration: none; }

.background-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 75px; }
.background-column > h3, .community-grid > div > h3 { margin: 0 0 25px; color: var(--pink); font: italic 600 1.35rem/1.2 var(--display); }
.timeline { margin: 0; padding: 0 0 0 19px; list-style: none; border-left: 1px solid var(--blue); }
.timeline li { position: relative; padding: 0 0 31px 25px; }
.timeline li.with-logo { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 17px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: .3rem; width: 10px; height: 10px; background: var(--paper); border: 2px solid var(--pink); border-radius: 50%; transform: translateX(-50%); }
.school-mark { position: relative; width: 70px; height: 70px; display: grid; place-items: center; padding: 7px; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 5px 14px rgba(69,65,61,.06); }
.school-mark img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-hkust { padding: 15px 22px; }
.logo-hkust img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; object-position: center; }
.logo-imperial, .logo-ual { padding: 6px 3px; }
.logo-polimi { padding: 0; }
.logo-polimi img { position: absolute; left: 2px; top: 24px; width: 142px; height: 142px; max-width: none; max-height: none; }
.school-mark-stack { display: grid; grid-template-columns: 70px; gap: 8px; align-content: start; }
.timeline-copy { min-width: 0; }
.timeline time { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.timeline h4 { margin: .26rem 0 .38rem; font: 600 1.03rem/1.28 var(--display); }
.timeline p { margin: .16rem 0 0; color: var(--muted); font-size: .77rem; line-height: 1.52; }

.community-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 75px; }
#service, #talks { scroll-margin-top: 92px; }
.service-list, .talk-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.service-list li { padding: 16px 0; border-bottom: 1px dotted var(--line); }
.service-list span { display: block; margin-bottom: .25rem; color: var(--pink); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.service-list strong, .talk-list strong { font: 600 .95rem/1.3 var(--display); }
.talk-list li { display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px dotted var(--line); }
.talk-list time { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.talk-list p { margin: .22rem 0 0; color: var(--muted); font-size: .76rem; }

.site-footer { width: var(--page); margin: 0 auto; padding: 28px 0 50px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; color: var(--muted); border-top: 1px solid var(--blue); font-size: .74rem; }
.site-footer p { margin: 0; }
.site-footer p:last-child { text-align: right; }
.footer-name { color: var(--pink); font: 400 1.58rem/1 var(--hand); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .desktop-nav { display: none; }
  .menu-button { display: block; padding: .45rem .7rem; color: var(--blue); background: transparent; border: 1px solid var(--blue); border-radius: 999px; font: 700 .68rem/1 var(--sans); }
  .mobile-menu { position: absolute; top: 67px; left: 0; right: 0; display: grid; padding: 10px max(24px, calc((100vw - 1100px) / 2)); background: var(--paper); border-bottom: 1px solid var(--blue); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s; }
  .mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-menu a { padding: .75rem 0; border-bottom: 1px dotted var(--line); font-size: .82rem; font-weight: 700; text-decoration: none; }
  .hero { grid-template-columns: 1fr; gap: 25px; padding-top: 70px; }
  .portrait-stage { grid-row: 1; min-height: 470px; }
  .hero-copy { grid-row: 2; }
  .research-line { grid-row: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 30px; }
  .news { grid-template-columns: 1fr; gap: 35px; }
  .news .section-title, .news > .news-scroll { grid-column: 1; }
  .news > .news-scroll { grid-row: auto; }
  .news .section-title { margin-bottom: 0; }
  .background-grid, .community-grid { gap: 45px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer p:nth-child(2) { display: none; }
}

@media (max-width: 600px) {
  :root { --page: calc(100vw - 32px); }
  body { font-size: 15px; }
  .site-header { height: 61px; padding: 0 16px; }
  .wordmark { font-size: 1.9rem; }
  .mobile-menu { top: 61px; padding: 10px 16px; }
  .hero { padding: 50px 0 42px; }
  .explore-line { font-size: clamp(1.7rem, 8.9vw, 3rem); }
  .creation-line { font-size: clamp(2.75rem, 13vw, 4rem); }
  .portrait-stage { min-height: 410px; }
  .portrait-halo { width: 292px; height: 345px; }
  .portrait { width: 250px; height: 335px; }
  .orbit { width: 365px; height: 365px; }
  .portrait-badge { padding: .43rem .62rem; font-size: .68rem; }
  .portrait-badge svg { width: 17px; height: 17px; }
  .badge-screenwriting { left: -5px; top: 84px; }
  .badge-cinema { right: -3px; top: 48px; }
  .badge-media { right: -7px; bottom: 80px; }
  .badge-design { left: 0; bottom: 35px; }
  .research-line { grid-template-columns: 1fr; }
  .section { padding: 67px 0; }
  .section-title, .publication-heading { grid-template-columns: 35px 1fr auto; gap: 9px; margin-bottom: 30px; }
  .publication-heading p { display: none; }
  .news-list li { grid-template-columns: 76px 1fr; gap: 13px; }
  .publication-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .publication { grid-template-columns: 1fr; gap: 20px; margin: 0; padding: 28px 0; }
  .publication:hover, .publication:focus-within { box-shadow: none; transform: none; }
  .publication-image { width: 100%; }
  .background-grid, .community-grid { grid-template-columns: 1fr; gap: 55px; }
  .talk-list li { grid-template-columns: 76px 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer p:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
