/* ==========================================================================
   MC Visuals — Maarten Ceulemans
   Minimal black & white · Playfair Display + Inter · Bootstrap 5
   ========================================================================== */

:root {
  --ink: #0b0b0b;
  --paper: #ffffff;
  --surface: #f4f4f2;
  --line: #e2e2e0;
  --line-dark: #2a2a2a;
  --muted: #6b6b6b;
  --muted-dark: #9a9a9a;
  --accent: #d7261e;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5.5vw, 80px);
  --content: 1280px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Bootstrap overrides */
  --bs-body-font-family: var(--sans);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-emphasis-color: var(--ink);
  --bs-link-color: var(--ink);
  --bs-link-color-rgb: 11, 11, 11;
  --bs-link-hover-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-border-radius: 0;
  --bs-focus-ring-color: rgba(11, 11, 11, .25);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; margin: 0; }
h1 em, h2 em, h3 em { font-style: italic; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 9vw, 128px); }
.section-label { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: .14em; font-weight: 500; color: var(--muted); }
.section-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.on-dark .section-label, .bg-ink .section-label { color: var(--muted-dark); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-surface { background: var(--surface); }
.display-title { font-size: clamp(48px, 7vw, 104px); line-height: .98; letter-spacing: -.035em; }
.title-lg { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.06; }
.lead-muted { color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.65; max-width: 560px; }
.bg-ink .lead-muted { color: var(--muted-dark); }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 2000; background: var(--ink); color: var(--paper); padding: 10px 14px; }

/* ---------- Buttons & links ---------- */
.btn-mc { --bs-btn-padding-x: 26px; --bs-btn-padding-y: 15px; --bs-btn-font-size: 14px; --bs-btn-font-weight: 500; --bs-btn-border-radius: 0; display: inline-flex; align-items: center; gap: 12px; position: relative; overflow: hidden; isolation: isolate; transition: color .35s var(--ease), border-color .35s var(--ease); }
.btn-mc::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); }
.btn-mc:hover::before, .btn-mc:focus-visible::before { transform: scaleY(1); }
.btn-mc svg { transition: transform .35s var(--ease); }
.btn-mc:hover svg { transform: translateX(4px); }
.btn-dark-mc { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-dark-mc::before { background: var(--accent); }
.btn-dark-mc:hover, .btn-dark-mc:focus-visible { color: var(--paper); border-color: var(--accent); }
.btn-outline-mc { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline-mc::before { background: var(--ink); }
.btn-outline-mc:hover, .btn-outline-mc:focus-visible { color: var(--paper); border-color: var(--ink); }
.btn-light-mc { background: var(--paper); color: var(--ink); border: 1px solid var(--paper); }
.btn-light-mc::before { background: var(--accent); }
.btn-light-mc:hover, .btn-light-mc:focus-visible { color: var(--paper); border-color: var(--accent); }
.btn-ghost-light { border: 1px solid #555; color: var(--paper); }
.btn-ghost-light::before { background: var(--paper); }
.btn-ghost-light:hover, .btn-ghost-light:focus-visible { color: var(--ink); border-color: var(--paper); }
.btn-mc small { opacity: .6; font-size: 11px; }

.text-link { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; padding-bottom: 6px; background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; transition: background-size .45s var(--ease); }
.text-link:hover { background-size: 0 1px; background-position: right bottom; }
.text-link svg { transition: transform .35s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

/* ---------- Header / navbar ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 1030; color: var(--ink); transition: transform .45s var(--ease), background-color .35s ease, color .35s ease, box-shadow .35s ease; }
.site-header .navbar { --bs-navbar-padding-y: 0; height: 88px; }
.site-header .navbar > .wrap { display: flex; align-items: center; justify-content: space-between; }
.header-overlay { color: var(--paper); }
.site-header.is-scrolled { background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.wordmark { display: flex; flex-direction: column; font-family: var(--serif); font-size: 19px; line-height: 1; letter-spacing: -.01em; color: inherit !important; padding: 0; margin: 0; }
.wordmark span + span { font-style: italic; }
.site-header .navbar-nav { gap: 36px; }
.site-header .nav-link { --bs-nav-link-padding-y: 8px; --bs-nav-link-padding-x: 0; position: relative; font-size: 14px; color: inherit !important; }
.site-header .nav-link::after { content: ""; position: absolute; left: 0; bottom: 2px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.site-header .nav-link:hover::after, .site-header .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.lang-toggle { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.lang-toggle button { border: 0; background: none; color: inherit; padding: 6px 3px; opacity: .45; transition: opacity .2s; }
.lang-toggle button:hover { opacity: .8; }
.lang-toggle button.active { opacity: 1; font-weight: 600; }
.menu-toggle { border: 0; background: none; color: inherit; padding: 8px 0; display: flex; flex-direction: column; gap: 7px; width: 30px; }
.menu-toggle span { display: block; height: 1.5px; background: currentColor; }
.menu-toggle span:last-child { width: 65%; margin-left: auto; }

.desktop-nav { align-items: center; gap: 36px; }
@media (max-width: 767.98px) { .site-header .navbar { height: 72px; } }

/* Mobile menu (Bootstrap offcanvas, full screen) */
.mobile-menu { --bs-offcanvas-width: 100vw; --bs-offcanvas-zindex: 1060; background: var(--ink); color: var(--paper); border: 0 !important; }
.mobile-menu .offcanvas-header { height: 72px; padding: 0 var(--gutter); justify-content: space-between; }
.mobile-menu .offcanvas-body { padding: 40px var(--gutter) 36px; display: flex; flex-direction: column; justify-content: space-between; }
.mobile-nav { gap: 4px; }
.mobile-nav .nav-link { --bs-nav-link-padding-y: 4px; font-family: var(--serif); font-size: clamp(44px, 13vw, 64px); line-height: 1.1; letter-spacing: -.03em; color: var(--paper); display: inline-block; }
.mobile-nav .nav-link:hover, .mobile-nav .nav-link:focus { color: var(--paper); font-style: italic; }
.mobile-nav .nav-link.active { font-style: italic; }
.mobile-nav .nav-link.active::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-right: 14px; vertical-align: middle; }
.mobile-nav .nav-item { opacity: 0; transform: translateY(28px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.mobile-menu.show .mobile-nav .nav-item, .mobile-menu.showing .mobile-nav .nav-item { opacity: 1; transform: none; }
.mobile-menu .nav-item:nth-child(2) { transition-delay: .06s; }
.mobile-menu .nav-item:nth-child(3) { transition-delay: .12s; }
.mobile-menu .nav-item:nth-child(4) { transition-delay: .18s; }
.offcanvas-note { color: var(--muted-dark); font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.mobile-menu .lang-toggle { font-size: 15px; }
.btn-close-mc { border: 0; background: none; color: var(--paper); padding: 8px 0; }

/* ---------- Hero slideshow ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; background: var(--ink); color: var(--paper); overflow: hidden; }
.hero-media { position: absolute; inset: 0; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; animation: kenburns 2.4s var(--ease) both; }
.hero-shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(0deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.1) 55%, rgba(0,0,0,.35) 100%); }
.hero-content { position: absolute; z-index: 3; inset: auto 0 clamp(40px, 9vh, 96px) 0; }
.hero-content .section-label { color: rgba(255,255,255,.75); }
.hero h1 { font-family: "Anton", "Arial Narrow", Impact, sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(38px, 6.6vw, 112px); line-height: .94; letter-spacing: .005em; max-width: none; margin: 22px 0 36px; }
.hero h1 em { display: block; font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--paper); }
@supports not (-webkit-text-stroke: 1px black) { .hero h1 em { color: var(--paper); } }
.hero-bottom { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.hero-link { display: inline-flex; align-items: center; gap: 12px; color: var(--paper); font-size: 15px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.55); }
.hero-link svg { animation: nudge 2.2s var(--ease) infinite; }
.hero-caption { font-size: 12px; letter-spacing: .04em; color: rgba(255,255,255,.7); }

@keyframes kenburns { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- Intro ---------- */
.intro-text { font-family: var(--serif); font-size: clamp(28px, 3.3vw, 48px); line-height: 1.25; letter-spacing: -.02em; }
.intro-text .word { opacity: .15; transition: opacity .4s ease; }
.intro-text .word.lit { opacity: 1; }

/* ---------- Project cards ---------- */
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 64px; }
.section-heading h2 { margin-top: 18px; }
.masonry { columns: 3; column-gap: 28px; }
.masonry .project-card { display: inline-block; width: 100%; break-inside: avoid; margin-bottom: 56px; }
.featured-grid { margin-bottom: 40px; }
@media (min-width: 768px) { .featured-grid > div:nth-child(2) { margin-top: 96px; } }
.project-card { display: block; text-align: left; color: inherit; }
.project-image { position: relative; overflow: hidden; background: var(--line); }
.project-image::after { content: ""; display: block; padding-top: 124%; }
.project-card.wide .project-image::after { padding-top: 75%; }
.project-card.medium .project-image::after { padding-top: 96%; }
.project-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transform: scale(1.01); transition: transform 1s var(--ease), filter .7s ease; }
.project-card:hover .project-image img, .project-card:focus-visible .project-image img { filter: grayscale(0); transform: scale(1.05); }
.project-info { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; padding-top: 18px; align-items: start; }
.project-number, .project-year { font-size: 11px; color: var(--muted); padding-top: 6px; font-variant-numeric: tabular-nums; }
.project-info h3 { font-size: 24px; line-height: 1.2; }
.project-cat { font-size: 13px; color: var(--muted); margin-top: 4px; }
.project-desc { margin-top: 12px; max-width: 38ch; font-size: 14px; line-height: 1.6; color: #3d3d3d; }
.masonry.is-filtering .project-card { opacity: 0; transform: translateY(16px); }
.masonry .project-card { transition: opacity .35s ease, transform .35s var(--ease); }
.empty-state { column-span: all; padding: 80px 0; text-align: center; color: var(--muted); }

/* Cursor that follows the pointer over project cards */
.cursor-view { position: fixed; top: 0; left: 0; z-index: 1500; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; transform: scale(0); transition: transform .35s var(--ease); }
.cursor-view.show { transform: scale(1); }

/* ---------- Disciplines ---------- */
.discipline-list { border-top: 1px solid var(--ink); }
.discipline { position: relative; display: grid; grid-template-columns: 70px 1fr 1fr 28px; gap: 24px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: color .45s var(--ease), padding .45s var(--ease); }
.discipline::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); }
.discipline:hover { color: var(--paper); padding-inline: 24px; }
.discipline:hover::before { transform: scaleY(1); }
.discipline > span { font-size: 11px; color: var(--muted); }
.discipline h3 { font-size: clamp(28px, 3vw, 42px); }
.discipline p { color: var(--muted); line-height: 1.55; max-width: 420px; transition: color .45s; }
.discipline:hover p, .discipline:hover > span { color: #bdbdbd; }
.discipline svg { transition: transform .45s var(--ease); }
.discipline:hover svg { transform: rotate(-45deg); }

/* ---------- CTA banner ---------- */
.cta-banner h2 { font-size: clamp(40px, 5.5vw, 80px); line-height: 1.02; letter-spacing: -.035em; }
.cta-banner p { color: var(--muted-dark); line-height: 1.65; max-width: 480px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); }
.footer-marquee { overflow: hidden; border-bottom: 1px solid var(--line-dark); padding: 36px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { font-family: var(--serif); font-size: clamp(40px, 6.5vw, 96px); line-height: 1; letter-spacing: -.035em; white-space: nowrap; padding-right: .6em; }
.marquee-track span:nth-child(even) { font-style: italic; color: #6f6f6f; }
.footer-marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.footer-main { padding-block: 72px 88px; }
.footer-mail { display: inline-flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); margin-top: 20px; padding-bottom: 8px; border-bottom: 1px solid #444; transition: border-color .3s; }
.footer-mail:hover { border-color: var(--paper); }
.footer-nav h4 { font-family: var(--sans); color: #777; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 18px; font-weight: 500; }
.footer-nav a { display: block; font-size: 14px; padding: 5px 0; color: #ddd; transition: color .2s, transform .3s var(--ease); }
.footer-nav a:hover { color: var(--paper); transform: translateX(4px); }
.footer-bottom { border-top: 1px solid var(--line-dark); padding-block: 24px 28px; color: #9a9a9a; font-size: 12px; }
.to-top { border: 0; background: none; color: inherit; font-size: 12px; display: inline-flex; gap: 8px; align-items: center; }
.to-top:hover { color: var(--paper); }

/* ---------- Inner page titles ---------- */
.page-top { padding-top: 88px; }
.page-title { padding-block: clamp(72px, 10vw, 140px) clamp(56px, 7vw, 96px); }
.page-title h1 { margin: 26px 0 32px; }

/* ---------- Work filter ---------- */
.filter-bar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-block: 1px solid var(--line); transition: top .45s var(--ease); }
body.header-visible .filter-bar { top: 88px; }
.filter-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.filter-pills { --bs-nav-pills-border-radius: 999px; --bs-nav-pills-link-active-bg: var(--ink); --bs-nav-link-color: var(--ink); --bs-nav-link-hover-color: var(--ink); --bs-nav-link-padding-x: 16px; --bs-nav-link-padding-y: 9px; --bs-nav-link-font-size: 13px; gap: 6px; flex-wrap: nowrap; }
.filter-pills .nav-link { border: 1px solid var(--line); transition: background .25s, color .25s, border-color .25s; white-space: nowrap; }
.filter-pills .nav-link:hover { border-color: var(--ink); }
.filter-pills .nav-link.active { border-color: var(--ink); }
.filter-pills .nav-link span { opacity: .55; margin-left: 6px; font-variant-numeric: tabular-nums; }
.result-count { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- Project detail ---------- */
.breadcrumb-mc { --bs-breadcrumb-divider: "/"; --bs-breadcrumb-font-size: 12px; --bs-breadcrumb-item-active-color: var(--ink); --bs-breadcrumb-divider-color: var(--muted); padding-top: 40px; margin: 0; }
.breadcrumb-mc a { color: var(--muted); }
.breadcrumb-mc a:hover { color: var(--ink); }
.project-header { padding-block: 72px 64px; }
.project-header .lead-muted { margin-left: auto; }
.detail-cover { position: relative; display: block; width: 100%; height: min(80vh, 880px); overflow: hidden; border: 0; padding: 0; background: var(--line); cursor: zoom-in; }
.detail-cover img, .about-image img { position: relative; top: -7.5%; }
.detail-cover img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.detail-cover .zoom-hint { position: absolute; right: 20px; bottom: 20px; background: var(--paper); color: var(--ink); display: flex; gap: 8px; align-items: center; padding: 12px 16px; font-size: 12px; }
.project-meta { border-top: 1px solid var(--ink); }
.project-meta > div { border-bottom: 1px solid var(--line); padding: 18px 0; }
.project-meta dt { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.project-meta dd { font-size: 14px; line-height: 1.5; margin: 0; }
.tag { display: inline-block; border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; font-size: 11px; margin: 0 4px 4px 0; }
.project-story h2 { font-size: clamp(32px, 4vw, 54px); line-height: 1.1; margin: 22px 0 40px; }
.project-story > p:not(.section-label) { font-size: 18px; line-height: 1.75; color: #333; margin-top: 22px; max-width: 700px; }
.quote { margin: 64px 0 0; padding-left: 28px; border-left: 2px solid var(--accent); }
.quote p { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.45; }
.quote cite { display: block; font-size: 12px; color: var(--muted); font-style: normal; margin-top: 16px; }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.gallery-grid button { border: 0; padding: 0; overflow: hidden; height: 72vh; max-height: 860px; background: var(--line); cursor: zoom-in; }
.gallery-grid button:first-child { grid-column: 1 / -1; height: 82vh; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery-grid button:hover img { transform: scale(1.03); }
.file-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center; border-top: 1px solid var(--line); padding: 18px 0; transition: padding .35s var(--ease); }
.file-row:last-child { border-bottom: 1px solid var(--line); }
.file-row:hover { padding-inline: 12px; }
.file-type { width: 48px; height: 48px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.file-row strong { display: block; font-size: 14px; font-weight: 500; }
.file-row small { color: var(--muted); }
.file-row .dl { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.project-pager { border-top: 1px solid var(--line); }
.project-pager a { display: block; padding-block: 56px; }
.project-pager small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.project-pager strong { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.6vw, 36px); transition: font-style .2s; }
.project-pager a:hover strong { font-style: italic; }

/* Lightbox (Bootstrap modal + carousel) */
.lightbox .modal-content { background: rgba(5,5,5,.97); color: var(--paper); border: 0; }
.lightbox .modal-header { border: 0; padding: 20px 28px; font-size: 11px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.lightbox .btn-close { filter: invert(1); opacity: .8; }
.lightbox .modal-body { display: flex; align-items: center; justify-content: center; padding: 0 80px 40px; }
.lightbox .carousel { width: 100%; }
.lightbox .carousel-item img { max-height: 76vh; width: auto; max-width: 100%; margin-inline: auto; object-fit: contain; }
.lightbox figcaption { text-align: center; font-size: 12px; color: #9a9a9a; margin-top: 16px; }
.lightbox .carousel-control-prev, .lightbox .carousel-control-next { width: 48px; height: 48px; top: 50%; transform: translateY(-50%); border: 1px solid #444; border-radius: 50%; opacity: 1; }
.lightbox .carousel-control-prev { left: -64px; }
.lightbox .carousel-control-next { right: -64px; }

/* ---------- About ---------- */
.about-image { position: relative; height: clamp(480px, 60vw, 760px); overflow: hidden; }
.about-image img { width: 100%; height: 115%; object-fit: cover; filter: grayscale(1); will-change: transform; }
.about-image figcaption { position: absolute; left: 16px; bottom: 16px; background: var(--paper); padding: 8px 12px; font-size: 11px; }
.about-copy h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.35; }
.about-copy p { margin-top: 28px; color: var(--muted); font-size: 17px; line-height: 1.75; max-width: 520px; }
.stats { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; }
.stats strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--muted); }
.skill-card { position: relative; height: 100%; min-height: 420px; padding: 34px; border: 1px solid var(--line-dark); display: flex; flex-direction: column; transition: border-color .4s, transform .5s var(--ease); }
.skill-card:hover { border-color: #8a8a8a; transform: translateY(-6px); }
.skill-card .num { color: var(--accent); font-size: 11px; letter-spacing: .12em; }
.skill-card h3 { font-size: 36px; margin: auto 0 18px; }
.skill-card p { color: #b5b5b5; line-height: 1.7; margin-bottom: 26px; }
.skill-card .tag { border-color: #3a3a3a; color: #d5d5d5; }
/* Experience timeline */
.xp-section { background: var(--surface); }
.xp-timeline { position: relative; margin-top: 16px; padding-bottom: 8px; }
.xp-timeline::before, .xp-timeline .timeline-progress { content: ""; position: absolute; top: 0; left: 50%; width: 1px; transform: translateX(-50%); }
.xp-timeline::before { bottom: 0; background: #d3d3d0; }
.xp-timeline .timeline-progress { height: 0; background: var(--ink); z-index: 1; }
.xp { position: relative; display: grid; grid-template-columns: 1fr 112px 1fr; align-items: start; }
.xp + .xp { margin-top: -56px; }
.xp-card { grid-column: 1; grid-row: 1; }
.xp.right .xp-card { grid-column: 3; }
.xp-marker { grid-column: 2; grid-row: 1; position: relative; z-index: 2; display: flex; justify-content: center; padding-top: 30px; }
.xp-marker::before { content: ""; position: absolute; top: 58px; width: 28px; height: 1px; background: var(--ink); transform: scaleX(0); transition: transform .6s var(--ease) .3s; }
.xp.left .xp-marker::before { right: calc(50% + 28px); transform-origin: right; }
.xp.right .xp-marker::before { left: calc(50% + 28px); transform-origin: left; }
.xp.is-visible .xp-marker::before { transform: scaleX(1); }
.xp-logo { position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); font-family: var(--serif); font-size: 17px; letter-spacing: .02em; transition: background .5s ease, color .5s ease; }
.xp.is-visible .xp-logo { background: var(--ink); color: var(--paper); }
.xp.current .xp-logo::after { content: ""; position: absolute; top: 0; right: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); animation: pulse 2s ease-out infinite; }

.xp-card { position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line); padding: 32px 32px 30px; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s ease, opacity 1s var(--ease), translate 1s var(--ease); }
.xp-card:hover { transform: translateY(-6px); border-color: var(--ink); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .3); }
.xp-card > * { position: relative; z-index: 1; }
.xp-card .xp-year { position: absolute; z-index: 0; right: -8px; bottom: -34px; font-family: var(--serif); font-size: 150px; line-height: 1; letter-spacing: -.05em; color: var(--surface); pointer-events: none; transition: transform .8s var(--ease); }
.xp-card:hover .xp-year { transform: translateY(-10px); }
.xp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.xp-date { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 500; font-variant-numeric: tabular-nums; }
.xp-duration { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.xp-badge { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font-size: 11px; font-weight: 500; color: var(--accent); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-out infinite; flex: none; }
.xp-card h3 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.15; }
.xp-company { font-size: 15px; font-weight: 500; margin-top: 8px; }
.xp-company span { color: var(--muted); font-weight: 400; }
.xp-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.xp-text { color: #3d3d3d; line-height: 1.65; margin: 18px 0 20px; max-width: 46ch; }
.xp-card .tag { background: var(--paper); }

.xp.featured .xp-card { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.xp.featured .xp-year { color: #1c1c1c; }
.xp.featured .xp-text { color: #c9c9c9; }
.xp.featured .xp-company span, .xp.featured .xp-meta { color: var(--muted-dark); }
.xp.featured .xp-duration, .xp.featured .tag { border-color: #3a3a3a; background: transparent; color: #ddd; }

.js .xp .xp-card { opacity: 0; translate: -56px 0; }
.js .xp.right .xp-card { translate: 56px 0; }
.js .xp.is-visible .xp-card { opacity: 1; translate: 0 0; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(215, 38, 30, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(215, 38, 30, 0); } }

/* Education timeline: same component on a white background */
.edu-section { background: var(--paper); }
.edu-section .xp-card { background: var(--surface); border-color: transparent; }
.edu-section .xp-card .xp-year { color: var(--paper); }
.edu-section .xp.featured .xp-card .xp-year { color: #1c1c1c; }
.edu-section .xp-card .tag { background: transparent; border-color: #d3d3d0; }
.edu-section .xp.current .xp-logo::after { border-color: var(--paper); }
.edu-section .info-card { background: var(--surface); border-color: transparent; }
.edu-section .info-card:hover { border-color: var(--ink); }

/* A timeline with a single entry: line on the left instead of alternating */
@media (min-width: 992px) {
  .xp-timeline.is-single::before, .xp-timeline.is-single .timeline-progress { left: 56px; }
  .xp-timeline.is-single .xp { grid-template-columns: 112px minmax(0, 720px); }
  .xp-timeline.is-single .xp-card, .xp-timeline.is-single .xp.right .xp-card { grid-column: 2; }
  .xp-timeline.is-single .xp-marker { grid-column: 1; }
  .xp-timeline.is-single .xp-marker::before { left: calc(50% + 28px); right: auto; transform-origin: left; }
  .js .xp-timeline.is-single .xp .xp-card { translate: 56px 0; }
  .js .xp-timeline.is-single .xp.is-visible .xp-card { translate: 0 0; }
}

/* Education / languages / skills */
.xp-extra { margin-top: 72px; }
.info-card { height: 100%; background: var(--paper); border: 1px solid var(--line); padding: 32px; transition: border-color .4s; }
.info-card:hover { border-color: var(--ink); }
.info-head { display: flex; align-items: center; gap: 16px; margin: 26px 0 18px; }
.info-head .xp-logo { background: var(--ink); color: var(--paper); }
.info-head h3 { font-size: 26px; line-height: 1.15; }
.info-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.info-status { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 500; }
.info-text { color: var(--muted); line-height: 1.65; margin-top: 16px; }
.lang-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 22px; }
.lang-list li > div { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.lang-list strong { font-family: var(--serif); font-weight: 400; font-size: 22px; }
.lang-list li > div span { font-size: 12px; color: var(--muted); }
.lang-list .bar { display: block; height: 2px; background: var(--line); }
.lang-list .bar span { display: block; height: 100%; width: var(--level); background: var(--ink); transform-origin: left; transition: transform 1.4s var(--ease) .3s; }
.js .reveal:not(.is-visible) .lang-list .bar span { transform: scaleX(0); }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.skill-cloud span { font-family: var(--serif); font-size: 20px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; transition: background .3s, color .3s, border-color .3s; }
.skill-cloud span:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

@media (max-width: 991.98px) {
  .xp-timeline::before, .xp-timeline .timeline-progress { left: 28px; }
  .xp { grid-template-columns: 56px 1fr; column-gap: 20px; }
  .xp + .xp { margin-top: 24px; }
  .xp-card, .xp.right .xp-card { grid-column: 2; }
  .xp-marker { grid-column: 1; padding-top: 28px; }
  .xp-marker::before { display: none; }
  .js .xp .xp-card, .js .xp.right .xp-card { translate: 40px 0; }
  .js .xp.is-visible .xp-card { translate: 0 0; }
}
@media (max-width: 575.98px) {
  .xp { grid-template-columns: 44px 1fr; column-gap: 14px; }
  .xp-timeline::before, .xp-timeline .timeline-progress { left: 22px; }
  .xp-logo { width: 44px; height: 44px; font-size: 14px; }
  .xp-card { padding: 24px 22px; }
  .xp-card .xp-year { font-size: 110px; bottom: -26px; }
  .xp-badge { margin-left: 0; }
}
.process-step { border-top: 1px solid var(--ink); padding-top: 22px; }
.process-step span { font-size: 11px; color: var(--muted); }
.process-step h3 { font-size: 32px; margin: 24px 0 14px; }
.process-step p { color: var(--muted); line-height: 1.65; }

/* ---------- Contact ---------- */
.contact-intro h2 { font-size: clamp(36px, 4vw, 58px); line-height: 1.06; margin: 22px 0 28px; }
.contact-intro p { color: var(--muted-dark); font-size: 17px; line-height: 1.65; max-width: 480px; }
.contact-mail { display: inline-flex; gap: 12px; align-items: center; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); margin-top: 36px; padding-bottom: 6px; border-bottom: 1px solid #555; }
.contact-mail:hover { border-color: var(--paper); }
.socials { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 56px; font-size: 13px; color: #aaa; }
.socials a:hover { color: var(--paper); }
.contact-form .form-label { display: flex; justify-content: space-between; font-size: 12px; color: #ddd; margin-bottom: 9px; }
.contact-form .form-label small { color: #777; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.contact-form .form-control, .contact-form .form-select { background-color: transparent; color: var(--paper); border: 0; border-bottom: 1px solid #444; border-radius: 0; padding: 12px 0; font-size: 16px; transition: border-color .3s; }
.contact-form .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-position: right 0 center; }
.contact-form .form-select option { color: var(--ink); }
.contact-form .form-control::placeholder { color: #666; }
.contact-form .form-control:focus, .contact-form .form-select:focus { box-shadow: none; border-color: var(--paper); background-color: transparent; color: var(--paper); }
.contact-form.was-validated .form-control:invalid, .contact-form.was-validated .form-select:invalid { border-color: #ff6b6b; background-image: none; }
.contact-form.was-validated .form-control:valid, .contact-form.was-validated .form-select:valid { border-color: #444; background-image: none; }
.contact-form.was-validated .form-select:valid { background-image: var(--bs-form-select-bg-img); }
.contact-form .invalid-feedback { color: #ff8c8c; }
.contact-form .mb-field { margin-bottom: 32px; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: #777; font-size: 11px; margin-top: 18px; }
.form-alert { border: 1px solid #ff6b6b; color: #ffb3b3; padding: 14px 16px; font-size: 14px; margin-bottom: 28px; }
.btn-mc .spinner-border { width: 16px; height: 16px; border-width: 2px; }
.success-card { border: 1px solid var(--line-dark); padding: 48px; }
.success-card .check { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--paper); color: var(--ink); margin-bottom: 36px; }
.success-card h3 { font-size: 34px; line-height: 1.2; margin: 16px 0; }
.success-card p:not(.section-label) { color: var(--muted-dark); line-height: 1.6; }

/* ---------- Animations (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--delay, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-img { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); transition-delay: var(--delay, 0s); }
.js .reveal-img.is-visible { clip-path: inset(0 0 0 0); }
.js .reveal-line { display: block; overflow: hidden; }
.js .reveal-line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: var(--delay, 0s); }
.js .is-visible .reveal-line > span, .js .reveal-line.is-visible > span { transform: none; }

/* Page transition curtain */
.page-curtain { position: fixed; inset: 0; z-index: 3000; background: var(--ink); pointer-events: none; transform: translateY(0); }
.js .page-curtain { animation: curtainOut .9s var(--ease) .05s forwards; }
.page-curtain.is-leaving { animation: curtainIn .5s var(--ease) forwards !important; transform-origin: bottom; }
@keyframes curtainOut { to { transform: translateY(-100%); } }
@keyframes curtainIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
html:not(.js) .page-curtain { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .masonry { columns: 2; column-gap: 20px; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .discipline { grid-template-columns: 50px 1fr 28px; }
  .discipline p { grid-column: 2 / 3; }
  .discipline svg { grid-row: 1; grid-column: 3; }
}
@media (max-width: 767.98px) {
  .page-top { padding-top: 72px; }
  body.header-visible .filter-bar { top: 72px; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
  .hero-caption { display: none; }
  .masonry { columns: 1; }
  .masonry .project-card { margin-bottom: 44px; }
  .discipline { grid-template-columns: 32px 1fr 22px; gap: 14px; padding: 26px 0; }
  .discipline:hover { padding-inline: 12px; }
  .filter-inner { overflow-x: auto; scrollbar-width: none; }
  .result-count { display: none; }
  .detail-cover { height: 62vh; }
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-grid button, .gallery-grid button:first-child { height: 64vh; }
  .file-row { grid-template-columns: 48px 1fr; }
  .file-row .dl { display: none; }
  .lightbox .modal-body { padding: 0 16px 90px; }
  .lightbox .carousel-control-prev, .lightbox .carousel-control-next { top: auto; bottom: -76px; transform: none; }
  .lightbox .carousel-control-prev { left: 0; }
  .lightbox .carousel-control-next { right: 0; }
  .success-card { padding: 32px; }
  .skill-card { min-height: 300px; }
  .cursor-view { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal, .js .reveal-img, .js .reveal-line > span { opacity: 1; transform: none; clip-path: none; }
  .intro-text .word { opacity: 1; }
}

/* ---------- Project logos (web projects): shown whole, centered ---------- */
.project-card.is-logo .project-image { background: var(--surface); }
.project-card.is-logo .project-image img { object-fit: contain; padding: 18%; filter: grayscale(1) contrast(1.05); }
.project-card.is-logo:hover .project-image img { transform: scale(1.04); }
.detail-cover.is-logo { height: min(56vh, 560px); background: var(--surface); cursor: default; }
.detail-cover.is-logo img { position: static; height: 100%; object-fit: contain; padding: clamp(40px, 10vw, 140px); }
.detail-cover.is-logo .zoom-hint { display: none; }

/* ---------- Large galleries (e.g. 38 photos): 3-column masonry ---------- */
.gallery-grid.gallery-many { display: block; columns: 3; column-gap: 16px; }
.gallery-grid.gallery-many button, .gallery-grid.gallery-many button:first-child { display: block; width: 100%; height: auto; max-height: none; margin: 0 0 16px; break-inside: avoid; }
.gallery-grid.gallery-many img { height: auto; }
@media (max-width: 991.98px) { .gallery-grid.gallery-many { columns: 2; } }
@media (max-width: 575.98px) { .gallery-grid.gallery-many { columns: 1; } }

/* Contact page: phone + location */
.contact-details { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 40px 0 0; max-width: 480px; }
.contact-details dt { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #777; font-weight: 500; margin-bottom: 6px; }
.contact-details dd { margin: 0; font-size: 15px; color: #ddd; }
.contact-details a:hover { color: var(--paper); }

/* About: portrait photo (tall), face kept in frame */
.about-image.is-portrait { height: auto; aspect-ratio: 4 / 5; }
.about-image.is-portrait img { object-position: center 30%; }
