@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/eb-garamond-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/eb-garamond-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/eb-garamond-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/eb-garamond-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* carmenmagdalena.com — hârtie caldă, granulație de film, compoziție de revistă.
   Serif (EB Garamond) pentru nume și texte; monospace de sistem pentru marcaje, ca pe marginea filmului. */

:root {
  --bg: #f1ece3;
  --paper: #f6f2eb;
  --ink: #201b17;
  --muted: #857a6e;
  --rule: #d9d0c3;
  --placeholder: #e6dfd3;
  --accent: #7a4a32; /* maro nubuck, din fotografii */
  --serif: 'EB Garamond', 'Iowan Old Style', 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --gap: clamp(14px, 2.2vw, 32px);
  --frame-h: calc(100svh - 120px);
  --content: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--serif);
  -webkit-font-smoothing: antialiased;
}

/* Granulație fină de film peste toată pagina (nu se vede pe poze decât ca textură, nu prinde clickuri). */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible,
summary:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--pad);
  top: 8px;
  z-index: 60;
  background: var(--paper);
  padding: 4px 8px;
}

/* ---- Antet ---- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 40px;
  max-width: var(--content);
  margin: 0 auto;
  padding: calc(var(--pad) * 0.7) var(--pad) 22px;
  border-bottom: 1px solid var(--rule);
}

.name {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role {
  margin: 10px 0 0;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav > ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li,
summary {
  font: 400 11.5px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

nav a[aria-current='page'],
details[open] > summary {
  color: var(--accent);
}

details {
  position: relative;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 0;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0 2px 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

details[open] > summary::after {
  transform: translateY(3px) rotate(-135deg);
}

.sub {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  z-index: 20;
  min-width: 260px;
  margin: 0;
  padding: 14px 18px 8px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -24px rgb(32 27 23 / 0.35);
}

.sub li {
  margin: 0 0 10px;
  font: italic 400 17px/1.25 var(--serif);
  letter-spacing: 0;
  text-transform: none;
}

.insta {
  display: inline-flex;
  padding: 4px;
}

.insta svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.insta .dot {
  fill: currentColor;
  stroke: none;
}

/* ---- Conținut ---- */

main {
  max-width: var(--content);
  min-height: 60svh;
  margin: 0 auto;
  padding: calc(var(--pad) * 0.9) var(--pad) 0;
}

.lede {
  margin: 0;
  font-style: italic;
  color: var(--muted);
  max-width: 46ch;
}

.home-lede {
  margin: 0 0 calc(var(--gap) * 2.4);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  color: var(--ink);
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: calc(var(--gap) * 3);
}

.row {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
}

.frame {
  margin: 0;
  scroll-margin-top: 24px;
}

/* Pereche: două verticale; a doua coboară puțin, ca pe o pagină de revistă. */
.row-pair {
  justify-content: center;
}

.row-pair .frame {
  width: min(calc((100% - var(--gap)) / 2), calc(var(--frame-h) * var(--r)));
}

.row-pair .frame:nth-child(2) {
  margin-top: calc(var(--gap) * 2.5);
}

.row-wide {
  justify-content: center;
}

.row-wide .frame {
  width: min(100%, calc(var(--frame-h) * var(--r)));
}

.row-solo .frame {
  width: min(48%, calc(var(--frame-h) * var(--r)));
}

.solo-left {
  justify-content: flex-start;
  padding-left: 8%;
}

.solo-right {
  justify-content: flex-end;
  padding-right: 8%;
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--placeholder);
}

.frame a img {
  transition: opacity 0.35s ease;
}

.frame a:hover img {
  opacity: 0.88;
}

figcaption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-top: 9px;
  font: 400 10.5px/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.num {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.frame:hover .num,
.frame:hover .cap {
  color: var(--accent);
}

.empty {
  font-style: italic;
  color: var(--muted);
}

/* ---- Pagina de proiect ---- */

.intro {
  display: grid;
  gap: 10px;
  margin: 0 0 calc(var(--gap) * 2.4);
}

.meta {
  margin: 0;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.next {
  margin: calc(var(--gap) * 4) 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  text-align: right;
  font: italic 400 clamp(22px, 2.4vw, 30px) / 1.2 var(--serif);
}

/* ---- Info ---- */

.info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 32px clamp(32px, 6vw, 96px);
  padding-top: 8px;
}

.info h1 {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.info h2 {
  margin: 0 0 16px;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.info p {
  margin: 0 0 0.9em;
  font-size: clamp(21px, 2.1vw, 28px);
  line-height: 1.4;
  max-width: 34em;
}

.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16.5px;
}

.contact li {
  margin-bottom: 8px;
  overflow-wrap: break-word;
}

.contact a {
  border-bottom: 1px solid var(--rule);
}

.contact .avail {
  margin-bottom: 18px;
  font-style: italic;
  color: var(--muted);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--content);
  margin: calc(var(--gap) * 4) auto 0;
  padding: 22px var(--pad) 28px;
  border-top: 1px solid var(--rule);
  font: 400 10.5px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot p {
  margin: 0;
}

/* ---- Telefon ---- */

@media (max-width: 760px) {
  :root {
    --frame-h: calc(100svh - 150px);
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding-top: 22px;
    padding-bottom: 16px;
  }

  nav,
  nav > ul {
    gap: 18px;
    flex-wrap: wrap;
  }

  .sub {
    left: 0;
    right: auto;
    min-width: min(280px, 86vw);
  }

  .row {
    flex-direction: column;
    align-items: center;
  }

  .row-pair .frame,
  .row-wide .frame,
  .row-solo .frame {
    width: min(100%, calc(var(--frame-h) * var(--r)));
  }

  .row-pair .frame:nth-child(2) {
    margin-top: 0;
  }

  .solo-left,
  .solo-right {
    padding: 0;
  }

  .gallery {
    gap: calc(var(--gap) * 2.4);
  }

  .info {
    grid-template-columns: 1fr;
  }

  .info section:last-child {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::after {
    transition: none !important;
  }
}
