/*
Theme Name: Claudio Cantella
Theme URI: https://najsarchitects.it
Author: LB Consulting
Description: A monographic portfolio theme for architect Claudio Cantella.
Version: 3.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cantella
*/

:root {
  --cc-forest: #23372f;
  --cc-stone: #eeeae2;
  --cc-white: #faf9f6;
  --cc-muted: #626c64;
  --cc-line: #cfd3cc;
  --cc-display: Georgia, "Times New Roman", serif;
  --cc-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cc-max: 1280px;
  --cc-gutter: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cc-white); color: var(--cc-forest); font-family: var(--cc-body); font-size: 16px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--cc-muted); }
:focus-visible { outline: 3px solid var(--cc-forest); outline-offset: 4px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 1rem; left: 1rem; padding: .7rem 1rem; background: var(--cc-forest); color: var(--cc-white); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 10; width: min(100%, var(--cc-max)); margin: 0 auto; padding: 1.15rem var(--cc-gutter); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.site-brand { min-height: 44px; display: inline-flex; align-items: center; color: var(--cc-forest); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.75rem); list-style: none; margin: 0; padding: 0; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.nav-toggle { display: none; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--cc-forest); background: transparent; color: var(--cc-forest); font: inherit; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.container { width: min(calc(100% - 2 * var(--cc-gutter)), var(--cc-max)); margin-inline: auto; }
.eyebrow, .section-label, .project-kicker, .fact-label { margin: 0; color: var(--cc-muted); font-size: .75rem; line-height: 1.25; letter-spacing: .12em; text-transform: uppercase; }

/* The opening is a quiet, portrait-led thesis: one stable two-column composition. */
.personal-hero, .hero { width: min(calc(100% - 2 * var(--cc-gutter)), var(--cc-max)); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 0 clamp(3.5rem, 7vw, 6rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 44%); align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.hero-copy { min-width: 0; }
.personal-hero h1, .hero-title { max-width: 10ch; margin: .75rem 0 1.5rem; font-family: var(--cc-display); font-size: clamp(4.25rem, 8.8vw, 6.5rem); font-weight: 400; line-height: .93; letter-spacing: -.045em; }
.hero-intro, .hero-subtitle { max-width: 34ch; margin: 0 0 1.75rem; color: var(--cc-muted); font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.45; }
.text-link, .archive-link { display: inline-flex; min-height: 44px; align-items: center; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-portrait, .hero-media { margin: 0; }
.hero-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 18%; }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center center; }
.hero-portrait figcaption, .hero-media figcaption { margin-top: .7rem; color: var(--cc-muted); font-size: .8rem; }
.hero-media figure { margin: 0; }

.intro-band, .section { border-top: 1px solid var(--cc-line); }
.intro-band { padding: clamp(3.5rem, 7vw, 6rem) 0; background: var(--cc-stone); }
.intro-band .eyebrow { margin-bottom: 1.5rem; }
.big-statement { max-width: 27ch; margin: 0; font-family: var(--cc-display); font-size: clamp(2.25rem, 4.5vw, 4.5rem); font-weight: 400; line-height: 1.06; letter-spacing: -.025em; }
.big-statement span { color: var(--cc-muted); }
.intro-band > .container > span { display: block; margin-top: 1.25rem; color: var(--cc-muted); font-size: 1rem; }

.selected-section, .section { padding: clamp(3.75rem, 7vw, 6.5rem) 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-heading h2, .section-title { margin: 0; font-family: var(--cc-display); font-size: clamp(2.75rem, 5vw, 5rem); font-weight: 400; line-height: 1; letter-spacing: -.035em; }
.selected-list { border-top: 1px solid var(--cc-line); }
.selected-work { display: grid; grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(1.5rem, 3vw, 2.75rem) 0; border-bottom: 1px solid var(--cc-line); }
.selected-image { display: block; overflow: hidden; }
.selected-image img { width: 100%; aspect-ratio: 1.45 / 1; object-fit: cover; transition: transform .3s ease-out; }
.selected-image:hover img, .work-card:hover .work-image img { transform: scale(1.02); }
.selected-copy .eyebrow { margin-bottom: .8rem; }
.selected-copy h3 { margin: 0 0 .8rem; font-family: var(--cc-display); font-size: clamp(1.75rem, 3vw, 2.8rem); font-weight: 400; line-height: 1.05; }
.selected-copy p { max-width: 34ch; margin: 0 0 .9rem; color: var(--cc-muted); }
.archive-link.container { justify-content: flex-end; margin-top: 1.5rem; }

.thought-section { padding: clamp(4rem, 8vw, 7rem) 0; background: var(--cc-forest); color: var(--cc-white); }
.thought-grid { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 8vw, 8rem); align-items: center; }
.thought-grid figure { margin: 0; }
.thought-grid figure img { width: 100%; aspect-ratio: 1 / 1.08; object-fit: cover; }
.thought-copy .eyebrow { margin-bottom: 1.25rem; color: #bcc8c0; }
.thought-copy h2 { max-width: 11ch; margin: 0 0 1.25rem; font-family: var(--cc-display); font-size: clamp(2.75rem, 5.5vw, 5.5rem); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
.thought-copy p { max-width: 42ch; margin: 0; color: #e1e5e1; font-size: 1.05rem; }

.biography-section { padding: clamp(4rem, 8vw, 7rem) 0; border-top: 1px solid var(--cc-line); }
.biography-grid, .profile-grid { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(0, 2fr); gap: clamp(2.5rem, 8vw, 8rem); }
.biography-grid h2 { max-width: 8ch; margin: .4rem 0 0; font-family: var(--cc-display); font-size: clamp(2.75rem, 5vw, 5rem); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
.biography-copy, .profile-content { max-width: 62ch; }
.biography-copy p, .profile-content p { margin: 0 0 1.25rem; }
.biography-copy p:first-child, .profile-lead { font-size: clamp(1.25rem, 2vw, 1.8rem); line-height: 1.2; }
.timeline, .cv-list { margin: 2.5rem 0 0; border-top: 1px solid var(--cc-line); }
.timeline-row, .cv-row { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--cc-line); }
.timeline-row dt, .timeline-row dd { margin: 0; }
.timeline-row dt, .cv-year { color: var(--cc-muted); font-variant-numeric: tabular-nums; }
.profile-portrait { max-width: 18rem; margin-top: 2rem; }

.archive-header, .project-header { width: min(calc(100% - 2 * var(--cc-gutter)), var(--cc-max)); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.container > .archive-header { width: auto; }
.archive-header h1, .project-title { max-width: 12ch; margin: .75rem 0 0; font-family: var(--cc-display); font-size: clamp(3.5rem, 7vw, 7rem); font-weight: 400; line-height: .98; letter-spacing: -.04em; }
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 5rem) clamp(1.5rem, 3vw, 3rem); }
.work-card { display: block; text-decoration: none; }
.work-image { overflow: hidden; background: var(--cc-stone); }
.work-image img { width: 100%; aspect-ratio: 1.25 / 1; object-fit: cover; transition: transform .3s ease-out; }
.work-meta { display: flex; justify-content: space-between; gap: 1rem; padding-top: .75rem; color: var(--cc-muted); font-size: .8rem; }
.work-title { margin: .35rem 0 0; font-family: var(--cc-display); font-size: clamp(1.5rem, 2.4vw, 2.25rem); font-weight: 400; line-height: 1.05; }
.media-placeholder { min-height: 12rem; display: grid; place-items: center; color: var(--cc-muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.project-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr); gap: clamp(2rem, 8vw, 8rem); align-items: end; margin-top: 2.5rem; }
.project-description { max-width: 48ch; font-size: 1.15rem; line-height: 1.45; }
.project-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 0; }
.fact { padding-top: .6rem; border-top: 1px solid var(--cc-line); }
.fact dd { margin: 0; }
.project-gallery { display: grid; gap: clamp(2rem, 4vw, 4rem); padding-bottom: 5rem; }
.project-gallery figure { margin: 0; }
.project-gallery img { width: 100%; height: auto; object-fit: contain; }
.project-gallery figcaption { margin-top: .55rem; color: var(--cc-muted); font-size: .8rem; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 1.25rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.empty-state { min-height: 42vh; padding-top: clamp(3rem, 8vw, 7rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.empty-state h1 { margin: 0 0 1.25rem; font-family: var(--cc-display); font-size: clamp(2.75rem, 5vw, 5rem); font-weight: 400; line-height: 1; }

.site-footer { width: min(100%, var(--cc-max)); margin: 0 auto; padding: 2rem var(--cc-gutter) 3rem; display: flex; justify-content: space-between; gap: 2rem; color: var(--cc-muted); font-size: .78rem; }
.site-footer p { margin: 0; }

@media (max-width: 700px) {
  .site-header { align-items: flex-start; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: block; padding-top: .75rem; }
  .site-nav li { border-top: 1px solid var(--cc-line); }
  .site-nav a { width: 100%; }
  .site-header:has(.nav-toggle) { flex-wrap: wrap; }
  .personal-hero, .hero, .thought-grid, .biography-grid, .profile-grid, .project-intro { grid-template-columns: 1fr; gap: 2.5rem; }
  .personal-hero, .hero { padding-top: 1.5rem; }
  .personal-hero h1, .hero-title { font-size: clamp(3.35rem, 14vw, 4.25rem); }
  .hero-portrait, .hero-media { order: -1; }
  .hero-copy { order: 1; }
  .section-heading { display: block; }
  .section-heading h2, .section-title { margin-top: .7rem; }
  .selected-work { grid-template-columns: 1fr; gap: 1.5rem; }
  .selected-image img { aspect-ratio: 1.35 / 1; }
  .archive-link.container { justify-content: flex-start; }
  .thought-grid figure img { aspect-ratio: 1.35 / 1; }
  .biography-grid h2 { max-width: none; }
  .works-grid { grid-template-columns: 1fr; gap: 3rem; }
  .project-facts { grid-template-columns: repeat(2, 1fr); }
  .project-facts .fact:last-child { grid-column: 1 / -1; }
  .site-footer { display: block; }
  .site-footer p + p { margin-top: .5rem; }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .personal-hero, .hero { gap: 3rem; }
  .personal-hero h1, .hero-title { font-size: clamp(4rem, 8vw, 5.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Multilingual: native system CJK fonts, no remote font downloads. */
:lang(ja), :lang(zh), :lang(ko) { font-family: system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", "PingFang SC", "PingFang TC", "Microsoft YaHei", "Malgun Gothic", sans-serif; }
:lang(ja) h1, :lang(zh) h1, :lang(ko) h1, :lang(ja) h2, :lang(zh) h2, :lang(ko) h2 { font-family: inherit; line-height: 1.25; letter-spacing: 0; }
.hero-copy h1 { max-width: 9ch; overflow-wrap: anywhere; }
h1,h2,h3,.text-link,.work-title,.project-facts dd { overflow-wrap: anywhere; }
.site-header { flex-wrap:wrap; gap:1rem; }
.lb-language-switcher { display:flex; gap:1rem; flex-wrap:wrap; font-size: .875rem; }
.lb-language-switcher a { display:inline-flex; align-items:center; min-height:44px; }
