@font-face {
  font-family: 'concursoitalian-btn-wide';
  src: url('/static/fonts/concursoitalian-btn-wide.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #f0ebe2;
  --ink: #151412;
  --night: #11100f;
  --night-soft: #1b1916;
  --smoke: #aaa397;
  --rule: rgba(240, 235, 226, .18);
  --rule-strong: rgba(240, 235, 226, .42);
  --accent: #d9ccba;
  --danger: #e9a194;
  --page: clamp(18px, 4vw, 68px);
  --display: clamp(3.3rem, 9.3vw, 9rem);
  --image-radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: 'concursoitalian-btn-wide', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
::selection { background: var(--paper); color: var(--ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px var(--page);
  background: rgba(17, 16, 15, .9);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--rule-strong); border-radius: 50%; font-size: 10px; letter-spacing: -.08em; }
.brand__name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
nav a, .nav-button { border: 0; background: transparent; padding: 5px 0; color: var(--smoke); font-size: 10px; letter-spacing: .14em; text-decoration: none; text-transform: uppercase; }
nav a:hover, nav a:focus-visible, .nav-button:hover, .nav-button:focus-visible { color: var(--paper); }
nav form { margin: 0; }
.nav-admin { color: var(--paper); }

main { overflow: clip; }
.portfolio-intro { display: grid; min-height: min(840px, calc(100svh - 72px)); padding: clamp(72px, 14vh, 180px) var(--page) 42px; align-content: space-between; }
.eyebrow { margin: 0; color: var(--smoke); font-size: 10px; font-weight: 700; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.portfolio-intro h1 { max-width: 1260px; margin: clamp(30px, 7vh, 100px) 0; font-size: var(--display); font-weight: 400; letter-spacing: -.07em; line-height: .82; }
.intro-bottom { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-top: 18px; border-top: 1px solid var(--rule); }
.intro-bottom p { max-width: 390px; margin: 0; color: var(--smoke); font-size: 15px; line-height: 1.45; }
.scroll-link { display: inline-flex; align-items: center; gap: 22px; flex: 0 0 auto; padding-bottom: 4px; border-bottom: 1px solid var(--rule-strong); color: var(--paper); font-size: 10px; letter-spacing: .14em; text-decoration: none; text-transform: uppercase; }
.scroll-link span { font-size: 18px; line-height: .6; }

.about-me { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 2fr); gap: 40px; padding: clamp(72px, 10vw, 140px) var(--page); border-top: 1px solid var(--rule); background: var(--night-soft); }
.about-me__body { max-width: 820px; }
.about-me h2 { max-width: 690px; margin-bottom: 46px; font-size: clamp(2.15rem, 4.2vw, 4.5rem); font-weight: 400; letter-spacing: -.055em; line-height: .95; }
.about-me p:not(.eyebrow) { max-width: 620px; margin-bottom: 0; color: var(--smoke); font-size: clamp(1rem, 1.5vw, 1.35rem); line-height: 1.55; white-space: pre-line; }

.portfolio-masonry { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 22px; align-items: start; padding: clamp(22px, 3vw, 50px) var(--page) clamp(68px, 9vw, 130px); }
.portfolio-masonry.masonry-ready { display: flex; align-items: flex-start; gap: 22px; }
.masonry-column { display: flex; min-width: 0; flex: 1 1 0; flex-direction: column; gap: 22px; }
.masonry-column > .shoot-card { width: 100%; }
.shoot-card { display: block; position: relative; overflow: hidden; border-radius: var(--image-radius); background: #24211d; color: inherit; text-decoration: none; }
.shoot-card__image { background: #24211d; }
.shoot-card img { display: block; width: 100%; height: auto; transform: translateZ(0) scale(1.001); transition: transform .7s cubic-bezier(.18,.75,.22,1); }
.shoot-card__caption { position: absolute; right: 0; bottom: 0; left: 0; padding: clamp(18px, 2vw, 28px); background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, .78)); opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
.shoot-card__caption h2 { margin: 0 0 7px; font-size: clamp(1.35rem, 2vw, 2.15rem); font-weight: 400; letter-spacing: -.045em; line-height: .95; }
.shoot-card__caption p { margin: 0; color: rgba(240, 235, 226, .72); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.shoot-card:hover img, .shoot-card:focus-visible img { transform: translateZ(0) scale(1.025); }
.shoot-card:hover .shoot-card__caption, .shoot-card:focus-visible .shoot-card__caption { opacity: 1; transform: translateY(0); }
.placeholder, .empty { display: grid; min-height: 220px; place-items: center; border: 1px solid var(--rule); color: var(--smoke); font-size: 13px; }

.project { padding: clamp(48px, 8vw, 110px) var(--page) clamp(80px, 12vw, 160px); }
.project-header { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.7fr) minmax(230px, .8fr); gap: clamp(22px, 4vw, 70px); align-items: start; margin-bottom: clamp(70px, 12vw, 164px); }
.back { color: var(--smoke); font-size: 10px; letter-spacing: .15em; text-decoration: none; text-transform: uppercase; }
.back:hover, .back:focus-visible { color: var(--paper); }
.project-header__title .eyebrow { margin-bottom: 20px; }
.project-header h1 { margin-bottom: 0; font-size: clamp(3.3rem, 8vw, 8.4rem); font-weight: 400; letter-spacing: -.075em; line-height: .81; }
.project-header__detail { padding-top: 28px; }
.project-header__detail > p { margin-bottom: 36px; color: var(--smoke); font-size: 15px; line-height: 1.55; white-space: pre-line; }
.meta { display: flex; flex-wrap: wrap; gap: 9px 20px; padding-top: 15px; border-top: 1px solid var(--rule); color: var(--paper); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: clamp(14px, 2vw, 28px); align-items: start; }
.project-gallery.masonry-ready { display: flex; align-items: flex-start; gap: clamp(14px, 2vw, 28px); }
.project-gallery .masonry-column { gap: clamp(14px, 2vw, 28px); }
.masonry-column > .project-image { width: 100%; }
.project-image { position: relative; display: block; overflow: hidden; width: 100%; padding: 0; border: 0; border-radius: var(--image-radius); background: #24211d; color: inherit; text-align: left; }
.project-image img { display: block; width: 100%; height: auto; transition: transform .55s cubic-bezier(.18,.75,.22,1); }
.project-image__expand { position: absolute; right: 14px; bottom: 14px; padding: 8px 10px; background: rgba(17,16,15,.82); color: var(--paper); font-size: 9px; letter-spacing: .12em; opacity: 0; text-transform: uppercase; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.project-image:hover img, .project-image:focus-visible img { transform: scale(1.018); }
.project-image:hover .project-image__expand, .project-image:focus-visible .project-image__expand { opacity: 1; transform: translateY(0); }

.lightbox { width: min(96vw, 1600px); max-width: none; max-height: 94vh; padding: 0; border: 1px solid var(--rule); background: var(--night); color: var(--paper); }
.lightbox::backdrop { background: rgba(0,0,0,.88); backdrop-filter: blur(6px); }
.lightbox figure { display: grid; max-height: 94vh; margin: 0; place-items: center; }
.lightbox img { display: block; max-width: 100%; max-height: calc(94vh - 40px); object-fit: contain; }
.lightbox figcaption { position: absolute; bottom: 15px; left: 17px; color: var(--paper); font-size: 10px; letter-spacing: .13em; }
.lightbox button { position: absolute; z-index: 1; border: 0; background: rgba(17,16,15,.7); color: var(--paper); font-size: 20px; }
.lightbox__close { top: 0; right: 0; padding: 14px 16px; font-size: 10px !important; letter-spacing: .1em; text-transform: uppercase; }
.lightbox__previous, .lightbox__next { top: calc(50% - 24px); width: 48px; height: 48px; }
.lightbox__previous { left: 0; }
.lightbox__next { right: 0; }
.lightbox__hint { display: none; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px var(--page); border-top: 1px solid var(--rule); color: var(--smoke); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--smoke); }

.editorial-page { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: clamp(44px, 10vw, 160px); min-height: calc(100svh - 170px); padding: clamp(80px, 14vw, 190px) var(--page); }
.editorial-page__header h1 { max-width: 860px; margin: clamp(22px, 4vw, 48px) 0 0; font-size: clamp(3.7rem, 8.4vw, 9rem); font-weight: 400; letter-spacing: -.075em; line-height: .82; }
.editorial-page__body, .contact-page__body { align-self: end; max-width: 540px; padding-bottom: clamp(15px, 5vw, 80px); }
.editorial-page__body > p { margin-bottom: clamp(34px, 6vw, 74px); color: var(--smoke); font-size: clamp(1.2rem, 2.1vw, 1.85rem); line-height: 1.42; white-space: pre-line; }
.text-link { display: inline-flex; gap: 20px; padding-bottom: 6px; border-bottom: 1px solid var(--rule-strong); color: var(--paper); font-size: 10px; letter-spacing: .13em; text-decoration: none; text-transform: uppercase; }
.text-link:hover, .text-link:focus-visible { border-color: var(--paper); }
.contact-page__intro { margin-bottom: 26px; font-size: clamp(1.25rem, 2.15vw, 1.9rem); line-height: 1.35; }
.contact-page__note { margin-bottom: 42px; color: var(--smoke); font-size: 15px; line-height: 1.5; white-space: pre-line; }
.contact-links { display: grid; border-top: 1px solid var(--rule); }
.contact-links a { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--rule); color: var(--paper); text-decoration: none; }
.contact-links a:hover, .contact-links a:focus-visible { color: var(--smoke); }
.contact-links span { color: var(--smoke); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.contact-links strong { overflow: hidden; font-size: clamp(1rem, 1.6vw, 1.35rem); font-weight: 400; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.contact-links b { font-size: 16px; font-weight: 400; }
.contact-page__pending { margin: 0; padding: 22px 0; color: var(--smoke); font-size: 14px; }

/* Studio controls are deliberately quieter than the public portfolio. */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin-panel { max-width: 1050px; margin: 0 auto 22px; padding: clamp(22px, 4vw, 44px); border: 1px solid var(--rule); background: var(--night-soft); }
.admin-panel h1, .admin-list h2 { font-size: clamp(2.2rem, 5vw, 4.5rem); font-weight: 400; letter-spacing: -.06em; line-height: .9; }
.narrow { max-width: 500px; margin: 10vh auto; }
.form-stack { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: var(--smoke); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
input, textarea { width: 100%; border: 1px solid var(--rule); border-radius: 0; padding: 13px 14px; background: var(--night); color: var(--paper); }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 24px; }
.checks label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; }
.checks input[type="checkbox"] { width: auto; accent-color: var(--paper); }
button, .link-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid var(--rule-strong); border-radius: 0; background: transparent; color: var(--paper); padding: 9px 13px; font-size: 10px; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
button:hover, .link-button:hover { border-color: var(--paper); }
.primary { background: var(--paper); color: var(--ink); }
.danger { border-color: rgba(233,161,148,.7); color: var(--danger); }
.admin-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: clamp(14px, 2vw, 24px); width: 100%; }
.admin-shoot-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 18px; min-height: 150px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--image-radius); background: var(--night-soft); }
.admin-shoot-card__image { grid-row: 1 / span 2; display: grid; min-height: 120px; overflow: hidden; border-radius: calc(var(--image-radius) - 6px); place-items: center; background: #24211d; color: var(--smoke); font-size: 10px; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.admin-shoot-card__image img { width: 100%; height: 100%; object-fit: cover; }
.admin-shoot-card__content { align-self: center; min-width: 0; }
.admin-list h2 { margin: 0 0 9px; font-size: clamp(1.35rem, 2vw, 2rem); }
.admin-list p, .admin-help { color: var(--smoke); }
.admin-list p { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.admin-shoot-card > .link-button { justify-self: start; margin-top: 14px; }
.upload-progress { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--rule); }
.upload-progress[hidden] { display: none; }
.upload-progress__head, .upload-progress__meta { display: flex; justify-content: space-between; gap: 14px; color: var(--smoke); font-size: 12px; }
.upload-progress__head strong { color: var(--paper); }
.upload-progress__bar { position: relative; height: 8px; overflow: hidden; background: #33302b; }
.upload-progress__bar span { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--paper); transition: width .18s ease; }
.upload-form.is-uploading button[type="submit"] { cursor: progress; opacity: .65; }
.upload-form.has-upload-error .upload-progress { border-color: var(--danger); }
.image-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.image-admin-card { position: relative; margin: 0; padding: 10px; border: 1px solid var(--rule); background: var(--night); cursor: grab; }
.image-admin-card:active { cursor: grabbing; }
.image-admin-card.is-dragging { border-color: var(--paper); opacity: .55; }
.image-admin-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.drag-handle { width: 100%; min-height: 34px; margin-bottom: 8px; color: var(--smoke); }
.reorder-status { color: var(--smoke); font-size: 12px; }
.reorder-status[data-state="saved"] { color: var(--paper); }
.reorder-status[data-state="error"], .error { color: var(--danger); }
.success { color: var(--paper); }

@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .brand__name { max-width: 140px; }
  nav { gap: 13px; }
  nav a, .nav-button { font-size: 9px; letter-spacing: .09em; }
  .portfolio-intro { min-height: calc(100svh - 64px); padding-top: 72px; }
  .intro-bottom, .site-footer { align-items: start; flex-direction: column; }
  .about-me { grid-template-columns: 1fr; gap: 28px; }
  .about-me h2 { margin-bottom: 30px; }
  .portfolio-masonry { grid-template-columns: 1fr; gap: 14px; padding-top: 14px; }
  .portfolio-masonry.masonry-ready, .masonry-column { gap: 14px; }
  .shoot-card__caption { opacity: 1; transform: none; }
  .admin-shoot-card { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; min-height: 126px; padding: 10px; }
  .admin-shoot-card__image { min-height: 104px; }
  .project-header { grid-template-columns: 1fr; gap: 30px; margin-bottom: 70px; }
  .project-header__detail { padding-top: 0; }
  .project-gallery { grid-template-columns: 1fr; gap: 14px; }
  .project-image, .project-image:nth-child(3n + 2), .project-image:nth-child(3n + 3) { grid-column: auto; margin-top: 0; }
  .project-image__expand { opacity: 1; transform: none; }
  .lightbox { width: 100vw; max-height: 100svh; min-height: 100svh; border: 0; }
  .lightbox figure { max-height: 100svh; min-height: 100svh; }
  .lightbox img { max-height: 100svh; user-select: none; -webkit-user-select: none; }
  .lightbox__close { min-width: 48px; min-height: 48px; padding: 14px; }
  .lightbox__previous, .lightbox__next { display: none; }
  .lightbox__hint { display: block; position: absolute; right: 0; bottom: 16px; left: 0; margin: 0; color: var(--smoke); font-size: 9px; letter-spacing: .12em; text-align: center; text-transform: uppercase; pointer-events: none; }
  .lightbox figcaption { top: 16px; bottom: auto; }
  .editorial-page { grid-template-columns: 1fr; gap: 56px; min-height: calc(100svh - 130px); padding-top: 86px; }
  .editorial-page__body, .contact-page__body { padding-bottom: 0; }
  .contact-links a { grid-template-columns: 78px minmax(0, 1fr) auto; gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-head, .admin-list article { align-items: start; flex-direction: column; }
}

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