/* Ewa Smolińska — portfolio, wygląd v0.6 */
:root {
  --background: #eae1d4;
  --ink: #201e1a;
  --menu-hover: #d8c8ad;
  --menu-item-hover: #bcaa90;
  --muted: #796e60;
  --spacing: 26px;
}
* { box-sizing: border-box; }
html { background: var(--background); }
body { margin: 0; min-width: 290px; color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; }
a { color: inherit; }
.site { min-height: 100vh; background: var(--background); }
.site-header { position: relative; height: 154px; display: flex; align-items: flex-start; justify-content: center; padding: 35px 24px 0; }
.brand { color: inherit; text-decoration: none; font-size: 27px; font-weight: 400; letter-spacing: -.045em; line-height: 1.15; white-space: nowrap; }
.navigation { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); display: flex; align-items: flex-start; justify-content: center; gap: 19px; white-space: nowrap; z-index: 10; font-size: 12px; letter-spacing: .01em; }
.nav-button, .language { display: inline-block; background: none; border: none; border-radius: 2px; color: inherit; text-decoration: none; text-align: left; padding: 9px 12px; line-height: 1.2; }
.nav-button { cursor: pointer; transition: background-color .16s ease; }
.nav-button:hover, .nav-button:focus-visible { background: var(--menu-hover); outline-offset: 2px; }
.projects-nav { position: relative; }
.projects-nav:hover > .projects-toggle, .projects-nav:focus-within > .projects-toggle, .projects-nav.is-open > .projects-toggle { background: var(--menu-hover); }
.projects-dropdown { position: absolute; top: 100%; left: 0; min-width: 151px; display: flex; flex-direction: column; gap: 1px; padding: 5px; background: var(--menu-hover); box-shadow: 0 9px 18px rgba(28,24,16,.08); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
.projects-nav:hover .projects-dropdown, .projects-nav:focus-within .projects-dropdown, .projects-nav.is-open .projects-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.projects-dropdown a { display: block; padding: 9px 10px; text-decoration: none; border-radius: 1px; }
.projects-dropdown a:hover, .projects-dropdown a:focus-visible { background: var(--menu-item-hover); outline-offset: 2px; }
.languages { display: flex; gap: 2px; align-items: center; }
.language { padding-left: 5px; padding-right: 5px; }
.language.inactive { color: var(--muted); opacity: .35; }
.main-content { max-width: 1500px; margin: 0 auto; padding: 0 45px 78px; }
.page-heading { font-size: 13px; font-weight: 400; margin: 0 0 25px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--spacing); }
.gallery-card { min-width: 0; border: 0; padding: 0; margin: 0; position: relative; display: block; width: 100%; aspect-ratio: 1.23; overflow: hidden; text-decoration: none; color: #fff; background: #a89a87; }
a.gallery-card, button.gallery-card { cursor: pointer; }
button.gallery-card { text-align: left; font: inherit; }
.gallery-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-card:hover img { transform: scale(1.025); }
.card-label { position: absolute; bottom: 16px; left: 16px; z-index: 1; display: inline-block; max-width: calc(100% - 32px); padding: 10px 16px; background: rgba(25, 24, 22, .82); color: #f6f2ec; font-size: 12px; line-height: 1.25; letter-spacing: .02em; overflow-wrap: anywhere; }

.gallery-card.placeholder { display: flex; align-items: flex-end; }

.palette-0 { background: #587351; }
.palette-1 { background: #cbb844; }
.palette-2 { background: #4e7292; }
.palette-3 { background: #55507e; }
.palette-4 { background: #ac685a; }
.palette-5 { background: #8e7962; }
.empty-message { color: var(--muted); font-size: 13px; line-height: 1.7; }
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(16,15,14,.95); display: flex; justify-content: center; align-items: center; color: #fff; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: calc(100vw - 140px); max-height: 100vh; }
.lightbox-figure img { display: block; max-width: 100%; max-height: calc(100vh - 88px); width: auto; height: auto; object-fit: contain; }
.lightbox-figure figcaption { margin-top: 17px; font-size: 12px; letter-spacing: .08em; }
.lightbox button { border: none; background: transparent; color: white; cursor: pointer; }
.lightbox-close { position: absolute; top: 17px; right: 26px; font-size: 36px; font-weight: 300; line-height: 1; }
.lightbox-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 55px; font-weight: 200; opacity: .8; }
.lightbox-arrow:hover, .lightbox-close:hover { opacity: .65; }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
body.lightbox-open { overflow: hidden; }
@media (max-width: 900px) {
  .main-content { padding: 0 25px 55px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 560px) {
  .site-header { height: 156px; padding-top: 28px; }
  .brand { font-size: 24px; }
  .navigation { top: 85px; gap: 3px; }
  .nav-button { padding: 9px 7px; }
  .main-content { padding: 0 18px 45px; }
  .gallery { grid-template-columns: 1fr; gap: 18px; }
  .gallery-card { aspect-ratio: 1.35; }
  .lightbox-figure { max-width: calc(100vw - 76px); }
  .lightbox-arrow { font-size: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
/* Przejścia między galeriami — v0.8 */
.gallery-card { isolation: isolate; }
.gallery-card.card-updating img { transition: none; }
.card-transition-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.card-transition-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none !important;
}
.card-transition-layer .card-label { z-index: 3; }
@media (prefers-reduced-motion: reduce) {
  .card-transition-layer { display: none; }
}

/* O mnie — 1 kolumna zdjęcia + 2 kolumny tekstu, v0.9 */
.about-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--spacing);
  align-items: stretch;
}
.about-photo {
  width: 100%;
  min-width: 0;
  align-self: start;
  aspect-ratio: 1.23;
  overflow: hidden;
  background: #d8c8ad;
}
.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.about-panel {
  grid-column: span 2;
  min-width: 0;
  padding: 27px 31px 30px;
  background: #e2d6c5;
  text-align: left;
}
.about-title {
  margin: 0 0 25px;
  font-size: clamp(24px, 2.4vw, 37px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.about-description {
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.about-description p { margin: 0 0 1em; }
.about-description p:last-child { margin-bottom: 0; }
.about-description.is-empty { color: var(--muted); }
@media (max-width: 900px) {
  .about-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .about-panel { padding: 22px 24px 26px; }
}
@media (max-width: 650px) {
  .about-layout { grid-template-columns: 1fr; gap: 25px; }
  .about-panel { grid-column: auto; }
  .about-photo { max-width: 100%; }
}

/* Kontakt — trzy kafelki, v1.1 */
.contact-layout { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:var(--spacing); }
.contact-tile, .contact-photo { min-width:0; width:100%; aspect-ratio:1.23; }
.contact-tile { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:26px; padding:20px; background:#fff; border:0; text-decoration:none; color:#111; cursor:pointer; font:inherit; transition:transform .35s ease; }
.contact-action:hover, .contact-action:focus-visible { background:#fff; transform:scale(1.025); }
.contact-icon {display:block; width:clamp(64px,8vw,116px); height:clamp(64px,8vw,116px); object-fit:contain; color:#111; }
.contact-caption {font-size:14px; text-align:center; overflow-wrap:anywhere; line-height:1.5;}
.contact-photo {background:#d8c8ad; overflow:hidden;}
.contact-photo img {width:100%; height:100%; object-fit:cover; display:block;}
.contact-photo-empty {display:flex; align-items:center; justify-content:center; text-align:center; padding:20px; color:#796e60; font-size:13px;}
.sr-only {position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;}
@media(max-width:900px){.contact-layout{grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px;}}
@media(max-width:560px){.contact-layout{grid-template-columns:1fr; gap:18px;}}

/* v1.2: płynne przenikanie tekstu potwierdzenia kopiowania */
.contact-caption-stack { display:grid; place-items:center; width:100%; }
.contact-caption-text { grid-area:1 / 1; opacity:1; transition:opacity .32s ease-in-out; text-align:center; }
.contact-caption-status { opacity:0; pointer-events:none; }
.contact-copy.show-copy-status .contact-caption-text:not(.contact-caption-status) { opacity:0; }
.contact-copy.show-copy-status .contact-caption-status { opacity:1; }

/* v1.4 — mobile, tablet, dotyk i Safari iOS */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
.site { min-height: 100vh; min-height: 100dvh; }
.projects-expand { display: none; }
.navigation { align-items: center; }
.nav-button, .projects-expand, .contact-action, .lightbox button { -webkit-tap-highlight-color: transparent; }
.gallery-card, .contact-tile, .contact-photo { -webkit-transform: translateZ(0); }
img { max-width: 100%; }
.gallery-card img, .contact-photo img, .about-photo img { -webkit-user-drag: none; }
:focus-visible { outline: 2px solid #514638; outline-offset: 3px; }
.lightbox { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.lightbox-figure img { max-height: calc(100dvh - 110px); }
.lightbox-close { top: max(17px, env(safe-area-inset-top, 0px)); right: max(22px, env(safe-area-inset-right, 0px)); }
@media (max-width: 900px) {
  .site-header { height: 158px; }
  .main-content { padding-left: 25px; padding-right: 25px; }
  .gallery, .contact-layout, .about-layout { gap: 20px; }
}
@media (max-width: 650px) {
  .site-header { height: auto; min-height: 147px; padding: 27px 16px 32px; flex-direction: column; align-items: center; gap: 29px; }
  .brand { font-size: clamp(24px, 7vw, 29px); text-align: center; }
  .navigation { position: relative; left: auto; top: auto; transform: none; width: 100%; justify-content: center; gap: clamp(5px, 3vw, 17px); font-size: 13px; }
  .projects-nav { display: flex; align-items: stretch; }
  .nav-button { min-height: 42px; padding: 12px 11px; }
  .projects-toggle { padding-right: 5px; }
  .projects-expand { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 42px; padding: 0; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; }
  .projects-expand span { font-size: 21px; line-height: 1; transform: translateY(-3px); }
  .projects-nav.is-open .projects-expand, .projects-expand:focus-visible { background: var(--menu-hover); }
  .projects-dropdown { left: 0; min-width: 165px; z-index: 20; box-shadow: 0 10px 24px rgba(25,20,12,.15); }
  .projects-dropdown a { min-height: 42px; display: flex; align-items: center; }
  .languages { margin-left: 2px; }
  .language { padding: 12px 5px; }
  .main-content { padding: 0 18px 55px; }
  .gallery, .contact-layout, .about-layout { grid-template-columns: 1fr; gap: 19px; }
  .gallery-card, .contact-tile, .contact-photo { aspect-ratio: 1.23; }
  .contact-tile { gap: 20px; padding: 22px 15px; }
  .contact-caption { font-size: 14px; }
  .contact-icon { width: 88px; height: 88px; }
  .about-panel { grid-column: auto; padding: 24px 23px 27px; }
  .about-title { font-size: 28px; }
  .about-description { font-size: 14px; line-height: 1.75; }
  .lightbox-figure { max-width: calc(100vw - 70px); }
  .lightbox-figure img { max-height: calc(100dvh - 115px); }
  .lightbox-arrow { font-size: 44px; min-width: 36px; min-height: 60px; }
  .lightbox-prev { left: max(0px, env(safe-area-inset-left, 0px)); }
  .lightbox-next { right: max(0px, env(safe-area-inset-right, 0px)); }
}
@media (hover: none) and (pointer: coarse) {
  /* iOS: no hover-generated dropdown, use the separate chevron control. */
  .projects-nav:hover:not(.is-open) .projects-dropdown { opacity: 0; visibility: hidden; transform: translateY(-6px); }
  .projects-nav.is-open .projects-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-button:hover { background: transparent; }
  .projects-nav:hover:not(.is-open) > .projects-toggle { background: transparent; }
  .gallery-card:hover img { transform: none; }
  .contact-action:hover { transform: none; background: #fff; }
  .contact-action:active { transform: scale(.985); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-card img, .projects-dropdown, .contact-caption-text, .contact-tile { transition-duration: .01ms !important; }
}

/* v1.5 — typografia i własny kursor na komputerach */
:root { --font-display: "EB Garamond", Georgia, "Times New Roman", serif; --font-interface: "Lato", "Helvetica Neue", Arial, sans-serif; }
body, button, .navigation, .card-label, .contact-caption, .about-description { font-family: var(--font-interface); }
.brand { font-family: var(--font-display); font-size: 36px; font-weight: 500; letter-spacing: -.025em; }
.about-title { font-family: var(--font-display); }
@media (max-width: 650px) { .brand { font-size: clamp(30px, 8vw, 36px); } }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  html.has-dot-cursor, html.has-dot-cursor * { cursor: none !important; }
  .dot-cursor { position: fixed; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; background: #111; pointer-events: none; z-index: 2147483647; opacity: 0; transform: translate3d(-100px,-100px,0) translate(-50%,-50%); transition: width .22s ease, height .22s ease, opacity .15s ease; will-change: transform; }
  .dot-cursor.is-visible { opacity: 1; }
  .dot-cursor.is-interactive { width: 30px; height: 30px; background: rgba(17,17,17,.68); }
  .dot-cursor.is-on-dark { background: rgba(255,255,255,.85); }
}
