/* Architectural portfolio — style sheet. Colours and type are set in :root. */
@font-face { font-family: "Open Sans"; src: url("../fonts/OpenSans-var.woff") format("woff"); font-weight: 300 800; font-stretch: 75% 100%; font-display: swap; }
:root {
  --bg: #FAFAF8; --paper: #FFFFFF; --ink: #2F2F2F; --ink2: #5C5C5C; --muted: #767676; --line: #E3E1DC; --tint: #F1EFEA;
  --accent: #A9705A; --c: var(--accent);
  --font: "Ebrima", "Open Sans", "Segoe UI", system-ui, sans-serif;
  --w: 1240px; --pad: clamp(20px, 5vw, 56px); --gap: clamp(16px, 2.2vw, 28px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--pad); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kicker, .tag, .label { font-size: .75rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; font-weight: 600; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink2); max-width: 46em; }
.big { font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.6; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
#site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,250,248,.92); backdrop-filter: blur(8px); transition: box-shadow .3s; }
#site-header.scrolled { box-shadow: 0 1px 0 var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { text-decoration: none; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .82rem; }
nav ul { list-style: none; display: flex; gap: clamp(18px, 3vw, 40px); margin: 0; padding: 0; }
nav a { text-decoration: none; font-size: .92rem; color: var(--ink2); padding: 10px 0; position: relative; }
nav a::after { content: ""; position: absolute; left: 0; bottom: 4px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s; }
nav a:hover, nav a[aria-current] { color: var(--ink); } nav a:hover::after, nav a[aria-current]::after { transform: scaleX(1); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 0; }
.menu-btn .lines, .menu-btn .lines::before, .menu-btn .lines::after { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 0 auto; position: relative; transition: transform .3s, opacity .3s; }
.menu-btn .lines::before, .menu-btn .lines::after { content: ""; position: absolute; left: 0; } .menu-btn .lines::before { top: -7px; } .menu-btn .lines::after { top: 7px; }
.nav-open .menu-btn .lines { background: transparent; } .nav-open .menu-btn .lines::before { transform: translateY(7px) rotate(45deg); } .nav-open .menu-btn .lines::after { transform: translateY(-7px) rotate(-45deg); }

/* Buttons & links */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-size: .9rem; letter-spacing: .04em; background: transparent; transition: background .25s, color .25s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; } .btn-dark:hover { background: var(--c); border-color: var(--c); }
.link { text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .25s; } .link:hover { border-color: var(--ink); }
.arrow { display: inline-block; transition: transform .25s; } a:hover .arrow { transform: translateX(4px); }

/* Hero */
.hero { padding-bottom: clamp(48px, 8vw, 96px); }
.hero-img { background: var(--tint); }
.hero-img img { width: 100%; max-height: 78vh; object-fit: contain; margin: 0 auto; }
.hero-text { padding-top: clamp(32px, 5vw, 64px); }
.hero-text h1 { margin-bottom: .25em; }
.hero-text .lead { font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--ink); }
.split { display: grid; grid-template-columns: 1fr 2.4fr; gap: var(--gap); padding-top: clamp(40px, 7vw, 90px); padding-bottom: clamp(40px, 7vw, 90px); border-top: 1px solid var(--line); }
section.wrap { padding-bottom: clamp(48px, 7vw, 96px); }
.sec-head { margin-bottom: clamp(24px, 4vw, 44px); max-width: 40em; }
.page-head { padding-top: clamp(40px, 7vw, 96px); }

/* Cards */
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-big { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px) var(--gap); margin-top: clamp(28px, 4vw, 48px); }
.card { display: block; text-decoration: none; color: inherit; }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding-top: 18px; }
.card h3 { font-size: 1.25rem; margin-bottom: .35em; }
.card-big h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.card-text { color: var(--ink2); }
.focus { font-size: .85rem; color: var(--muted); margin-bottom: .6em; }
.more { font-size: .85rem; border-bottom: 1px solid var(--c); padding-bottom: 2px; }
.tag { display: flex; align-items: center; gap: 10px; margin-bottom: .7rem; }
.dot { width: 10px; height: 10px; background: var(--c); display: inline-block; }
.timeline { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); padding: 0; margin: 0; border-top: 1px solid var(--line); }
.timeline li { border-top: 3px solid var(--c); margin-top: -2px; }
.timeline a { display: block; padding: 14px 12px 0 0; text-decoration: none; font-size: .85rem; color: var(--ink2); line-height: 1.35; }
.timeline a span { display: block; font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.timeline a:hover { color: var(--ink); }

/* Interests */
.interests { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.interest { border-top: 1px solid var(--ink); padding-top: 18px; }
.interest .num { font-size: .8rem; color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.interest h3 { margin-top: .6em; } .interest p { color: var(--ink2); font-size: .95rem; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(28px, 6vw, 88px); align-items: start; }
.about-art img { background: #fff; border: 1px solid var(--line); }
.about-text p { font-size: 1.05rem; }

/* CV */
.cv { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 6vw, 88px); }
.cv h2 { font-size: 1rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 2.2em 0 1em; } .cv-col > h2:first-child { margin-top: 0; }
.rows { list-style: none; padding: 0; margin: 0; }
.rows li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.rows strong { display: block; font-weight: 600; } .rows .when { color: var(--muted); font-size: .9rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); padding: 6px 14px; font-size: .9rem; background: var(--paper); }
.cv-preview img { max-width: min(560px, 100%); border: 1px solid var(--line); background: #fff; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 88px); align-items: center; padding-top: 20px; }
.contact .label { margin: 1.6rem 0 .3rem; } .contact .label:first-child { margin-top: 0; }
.contact .big { word-break: break-word; }

/* Project pages */
.project-hero .hero-img img { max-height: 72vh; }
.project-intro { padding-top: clamp(32px, 5vw, 64px); }
.back { display: inline-block; text-decoration: none; font-size: .85rem; color: var(--muted); margin-bottom: 1.6rem; } .back:hover { color: var(--ink); }
.intro-grid { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 72px); margin-top: 1.5rem; }
.meta { margin: 0; } .meta div { padding: 12px 0; border-top: 1px solid var(--line); }
.meta dt { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); } .meta dd { margin: 2px 0 0; font-size: .95rem; }
.video { margin-top: 1.8rem; padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); display: grid; gap: 10px; justify-items: start; }
.video p { margin: 0; font-size: .95rem; }
.toc { position: sticky; top: 72px; z-index: 20; background: rgba(250,250,248,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 0 !important; margin-bottom: clamp(32px, 5vw, 64px); }
.toc ul { list-style: none; display: flex; gap: 26px; overflow-x: auto; margin: 0; padding: 14px 0; scrollbar-width: none; }
.toc a { white-space: nowrap; text-decoration: none; font-size: .85rem; color: var(--ink2); } .toc a:hover { color: var(--ink); }
.block { scroll-margin-top: 130px; }
.block-text { max-width: 46em; margin-bottom: clamp(20px, 3vw, 36px); }
.block-text h2 { display: flex; align-items: center; gap: 14px; }
.block-text h2::before { content: ""; width: 12px; height: 12px; background: var(--c); flex: none; }
.block-text p { color: var(--ink2); }
.figs { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); align-items: start; }
.fig { margin: 0; grid-column: span 6; }
.fig-half { grid-column: span 3; } .fig-third { grid-column: span 2; }
.fig-full { grid-column: 1 / -1; margin: 0 calc(-1 * var(--pad)); }
.fig-full figcaption { padding: 0 var(--pad); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--paper); cursor: zoom-in; position: relative; }
.zoom img { width: 100%; }
.zoom-ico { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(47,47,47,.75); color: #fff; font-size: 1.2rem; opacity: 0; transition: opacity .25s; }
.zoom:hover .zoom-ico, .zoom:focus-visible .zoom-ico { opacity: 1; }
figcaption { font-size: .85rem; color: var(--muted); padding-top: 10px; line-height: 1.5; }
.badge { display: inline-block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 2px 8px; margin-right: 8px; vertical-align: 1px; }
.beyond { border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 80px); }
.reflection { border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 80px); }
blockquote { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.5; max-width: 36em; border-left: 3px solid var(--c); padding-left: clamp(18px, 3vw, 32px); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--gap); align-items: center; border-top: 1px solid var(--line); padding-top: 32px !important; }
.pager a { text-decoration: none; display: grid; gap: 4px; font-weight: 600; font-size: 1.05rem; }
.pager .muted { font-weight: 400; font-size: .8rem; letter-spacing: .08em; }
.pager .next { text-align: right; } .pager .all { font-weight: 400; font-size: .9rem; border: 1px solid var(--ink); padding: 10px 18px; }
.pager a:hover { color: var(--c); }

/* Footer */
#site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; margin-top: 40px; background: var(--paper); }
.foot { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; }
.foot-name { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; margin-bottom: .3em; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 0; }
.foot-links a { text-decoration: none; font-size: .9rem; color: var(--ink2); padding: 6px 0; display: inline-block; } .foot-links a:hover { color: var(--ink); }
.foot .small { grid-column: 1 / -1; margin: 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,20,20,.94); display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; height: 100vh; display: grid; grid-template-rows: 1fr auto; padding: 48px 0 18px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); margin: auto; object-fit: contain; background: #fff; }
.lightbox figcaption { color: #ccc; text-align: center; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; width: 56px; height: 56px; }
.lb-close { position: absolute; top: 6px; right: 10px; }
.lb-open { overflow: hidden; }

/* Motion */
main { opacity: 0; transition: opacity .35s ease; } .ready main { opacity: 1; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; } main, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .card-img img, .arrow, nav a::after { transition: none !important; }
}
noscript p { padding: 40px var(--pad); }

/* Responsive */
@media (max-width: 1000px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); } .interests { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .fig-third { grid-column: span 3; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .menu-btn { display: block; }
  #site-nav { position: fixed; inset: 72px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav-open #site-nav { display: block; }
  #site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--pad) 20px; }
  #site-nav a { display: block; padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); } #site-nav a::after { display: none; }
  .split, .about, .cv, .contact, .intro-grid, .grid-big, .foot { grid-template-columns: 1fr; }
  .grid-cards, .interests { grid-template-columns: 1fr; }
  .fig-half, .fig-third { grid-column: span 6; }
  .pager { grid-template-columns: 1fr 1fr; } .pager .all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
  .lightbox { grid-template-columns: 44px 1fr 44px; } .lightbox button { width: 44px; }
  .toc { top: 72px; }
}
