/* ============================================================
   Asude Kılıç — portfolio (House of Gül structure, cream warmth)
   tokens come from styles.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background .5s var(--ease), color .5s var(--ease);
}

/* ============================================================
   DARK / NIGHT THEME
   ============================================================ */
[data-theme="dark"] {
  --paper:    #11131d;
  --paper-2:  #171a26;
  --paper-3:  #1c2030;
  --paper-4:  #0c0e16;
  --ink:      #EFE7D6;
  --ink-soft: #B7B1A0;
  --ink-faint:#7D7868;
  --line:       #2a2f40;
  --line-strong:#3a4055;
  --ink-line:   rgba(239,231,214,.14);
  --tomato:   #D887FE;
  --mustard:  #F2C53D;
  --rose:     #3a3550;
}
[data-theme="dark"] body { background: var(--paper); }
[data-theme="dark"] ::selection { background: var(--mustard); color: #11131d; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--mustard); color: var(--ink); }

/* image-slot: let aspect-ratio drive height; visible on cream */
image-slot { display: block; height: auto; border: 1.5px solid var(--line-strong); box-shadow: var(--shadow-sm); background: var(--paper-3); }

/* mono helpers */
.mono { font-family: var(--font-mono); }
.script { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.tagm {
  font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: .04em; color: var(--ink-soft);
}

/* ============================================================
   PAGE FRAME — fixed left rail + right banner, content between
   ============================================================ */
:root { --rail: 150px; --banner: 69px; }
.rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail);
  z-index: 40; display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 30px 0 36px 22px;
  pointer-events: none;
}
.rail__item { pointer-events: auto; display: flex; gap: 10px; align-items: baseline; cursor: pointer; }
.rail__no { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); }
.rail__label {
  font-family: var(--font-serif); font-size: 1.04rem; color: var(--ink-faint);
  transition: color var(--dur) var(--ease), font-style var(--dur) var(--ease);
}
.rail__item:hover .rail__label { color: var(--ink); }
.rail__item.is-active .rail__label { color: #7600FF; font-style: italic; }
.rail__item.is-active .rail__no { color: #7600FF; }

/* right vertical banner */
.banner {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--banner);
  z-index: 40; background: #9CFF00;
  border-left: 1px solid #7600FF;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.banner__text {
  writing-mode: vertical-rl;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .26em;
  text-transform: uppercase; color: #7600FF;
  white-space: nowrap;
  animation: bannerScroll 38s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}
@keyframes bannerScroll { from { transform: translate3d(0,-50%,0);} to { transform: translate3d(0,0,0);} }

/* content column */
.page { margin-left: var(--rail); margin-right: var(--banner); position: relative; z-index: 1; }
.pad { padding-inline: clamp(20px, 4vw, 64px); }

/* ============================================================
   FLOWER CURSOR
   ============================================================ */
.cursor {
  position: fixed; top: 0; left: 0; width: 54px; height: 39px;
  margin: -19px 0 0 -27px; z-index: 9999; pointer-events: none;
  will-change: transform; transition: opacity .2s;
}
.cursor svg, .cursor__img { width: 100%; height: 100%; display:block; object-fit: contain;
  animation: bloom .5s var(--ease-out) both, sway 6s ease-in-out infinite; transform-origin: 50% 50%; }
.cursor .smile { opacity: 0; transition: opacity .18s; }
.cursor.is-hot svg, .cursor.is-hot .cursor__img { transform: scale(1.18); }
.cursor.is-hot .smile { opacity: 1; }
@keyframes bloom { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
@keyframes sway { 0%,100%{ rotate: -6deg;} 50%{ rotate: 6deg;} }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
  body { cursor: auto !important; }
}
@media (hover: hover) and (pointer: fine) {
  body, a, .rail__item, .chip, .row, .btn { cursor: none; }
}

/* static decorative flower (landing center) */
.flower-static { width: 92px; height: 92px; }
.flower-static svg { width:100%; height:100%; animation: sway 7s ease-in-out infinite; transform-origin:50% 50%; }
.home__eyes { width: clamp(300px, 38vw, 520px); aspect-ratio: 74 / 30;
  background: url('assets/eyes.gif') no-repeat 50% 49%; background-size: 135% auto;
  animation: floatY 5s ease-in-out infinite; }
@keyframes floatY { 0%,100%{ transform: translateY(-6px); } 50%{ transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce){ .home__eyes { animation: none; } }

/* ============================================================
   INFO BAR (top-right paragraph + location + email) — HoG style
   ============================================================ */
.infobar { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px,4vw,60px); padding-top: 30px; }
.infobar p { font-size: .92rem; line-height: 1.45; color: var(--ink); margin: 0; max-width: 42ch; }
.infobar .meta { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.infobar .meta .em { letter-spacing: .04em; }
@media (max-width: 720px){ .infobar{ grid-template-columns: 1fr; } }

/* ============================================================
   LANDING / HOME
   ============================================================ */
.home { position: relative; min-height: calc(100vh - 0px); display: flex; flex-direction: column; }
.home__wash {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--rose) 42%, var(--paper)) 88%);
  pointer-events: none; z-index: 0;
}
.home__top { position: relative; z-index: 2; padding-top: 26px; }
.home__statement {
  font-family: var(--font-sans); font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.02; letter-spacing: -.015em;
  margin: 18px 0 0; max-width: 18ch;
}
.home__statement .script { color: var(--tomato); }
.home__sub {
  font-size: clamp(1.5rem, 3.2vw, 2.7rem); line-height: 1.08; margin-top: 6px; font-weight: 500;
  letter-spacing: -.01em;
}
.home__sub sup { font-family: var(--font-mono); font-size: .42em; vertical-align: super; color: var(--tomato); margin-right: 2px; }
.home__sub .name { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.home__center { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 220px; }
.home__wordmark {
  position: relative; z-index: 2; font-weight: 700;
  font-size: clamp(3.2rem, 15vw, 13rem); line-height: .82; letter-spacing: -.02em;
  padding-bottom: 18px;
}
.home__wordmark .script { font-weight: 400; font-size: 1.04em; }
.home__cart { font-family: var(--font-mono); font-size: .8rem; border:1px solid var(--ink); padding: 4px 14px; display:inline-block; margin-left: 10px; }

/* ============================================================
   SECTION (work lists / about / contact)
   ============================================================ */
.section { position: relative; padding-block: clamp(40px,6vw,90px) clamp(48px,7vw,96px); border-top: 1px solid var(--ink-line); }
.section__head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 34px; flex-wrap: wrap; }
.section__no { font-family: var(--font-mono); font-size: 2.2rem; color: var(--ink); }
.section__title { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.6rem,3vw,2.4rem); white-space: nowrap; }

/* sort-by filter row */
.sortbar { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 10px 0 10px; }
.sortbar .lbl { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-faint); letter-spacing: .08em; }
.chips { display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.chip {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: clamp(1rem,1.6vw,1.35rem); color: var(--ink); font-weight: 500;
}
.chip:first-child { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.chip.is-active { color: var(--tomato); }
.chip:hover { color: var(--tomato); }

/* ============================================================
   WORK LIST (big titles + rule + inline expand)
   ============================================================ */
.list { border-top: 2px solid var(--ink); }
.row { border-bottom: 2px solid var(--ink); }
.row.is-hidden { display: none; }
.row__head { display: flex; align-items: center; gap: 18px; padding: 15px 0; cursor: pointer; }
.row__title {
  font-family: var(--font-sans); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.4rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -.01em;
  transition: color var(--dur) var(--ease);
}
.row__cat { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-soft); letter-spacing: .04em; }
.row:hover .row__title { color: var(--tomato); font-family: var(--font-serif); font-style: italic; font-weight: 400; text-transform: none; }
.row.is-open .row__title { color: var(--tomato); }
.row__plus { margin-left: auto; font-family: var(--font-mono); font-size: 1.4rem; color: var(--ink-soft); transition: transform var(--dur) var(--ease); }
.row.is-open .row__plus { transform: rotate(45deg); color: var(--tomato); }

/* expand panel — display toggle + fade (bulletproof, keeps slot heights) */
.row__panel { display: none; }
.row.is-open .row__panel { display: block; }
@media (prefers-reduced-motion: no-preference){
  .row.is-open .row__panel { animation: panelIn .4s var(--ease-out) both; }
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.panel__inner { padding: 8px 0 30px; display: grid; gap: 18px; }
.gallery { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.gallery image-slot { flex: 0 0 auto; width: clamp(220px, 26vw, 320px); scroll-snap-align: start; }
.panel__foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.panel__desc { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.45; color: var(--ink); max-width: 52ch; margin: 0; }

/* See full case study (image 5) */
.casebtn {
  position: relative; display: inline-grid; grid-template-columns: auto auto; gap: 8px 40px;
  padding: 6px 4px; align-items: center; cursor: pointer;
}
.casebtn span { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--ink); transition: color var(--dur) var(--ease); }
.casebtn:hover span { color: var(--tomato); }
.casebtn .mini { grid-column: 1 / -1; justify-self: center; width: 40px; height: 40px; margin: -6px 0; }
.casebtn .mini.eye { background: url('assets/star.png') no-repeat center; background-size: contain; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px,5vw,64px); align-items: start; }
.about__lead { font-family: var(--font-serif); font-size: clamp(1.3rem,2.4vw,2rem); line-height: 1.3; }
.about__lead .script { color: var(--tomato); }
.about__body { font-size: 1rem; line-height: 1.6; color: var(--ink-soft); margin-top: 16px; }
.about__list { display: grid; gap: 2px; margin-top: 8px; }
.about image-slot { width: 100%; }
.about__list .r { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ink-line); font-family: var(--font-mono); font-size: .86rem; }
.about__list .r span:first-child { color: var(--ink-faint); }
@media (max-width: 760px){ .about{ grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact__big { font-family: var(--font-sans); font-weight: 600; font-size: clamp(2rem,6vw,5rem); line-height: .98; letter-spacing: -.02em; }
.contact__big .script { font-weight: 400; color: var(--tomato); }
.contact__links { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 26px; }
.contact__links a { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.3rem,2.4vw,1.9rem); }
.contact__links a:hover { color: var(--tomato); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid var(--ink-line); margin-top: 40px; }
.foot .tagm { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }

/* generic button */
.btn {
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--tomato); border-color: var(--tomato); color: var(--paper); }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--tomato); border-color: var(--tomato); }

/* ============================================================
   PROJECT PAGE
   ============================================================ */
.proj__title { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 14px 0; margin-top: 18px; }
.proj__title h1 { font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; font-size: clamp(2rem,5.6vw,4.2rem); line-height: 1.02; margin: 0; letter-spacing: -.01em; }
.proj__title h1 .script { text-transform: none; color: var(--tomato); font-weight: 400; }
.proj__tabs { display: flex; gap: 40px; padding: 16px 0 26px; border-bottom: 2px solid var(--ink); }
.proj__tab { font-family: var(--font-mono); font-size: 1rem; color: var(--ink); cursor: pointer; }
.proj__tab sup { color: var(--tomato); margin-right: 4px; }
.proj__tab:hover { color: var(--tomato); }
.proj__hero { margin: 28px 0; }
.proj__hero image-slot { border: 1px solid var(--ink-line); }
.proj__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px,2.4vw,28px); margin: 20px 0; }
.proj__grid .phone { grid-column: span 3; }
.proj__grid .wide { grid-column: span 6; }
.proj__grid .tall { grid-column: span 4; }
.proj__grid image-slot { border: 1px solid var(--ink-line); width: 100%; }
@media (max-width: 820px){ .proj__grid .phone{ grid-column: span 6;} .proj__grid .wide,.proj__grid .tall{ grid-column: span 12;} }
.proj__next { border-top: 2px solid var(--ink); margin-top: 30px; padding: 26px 0; display:flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.proj__next .lbl { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase; }
.proj__next .nm { font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem,4vw,3rem); }
.proj__next .nm .script { font-weight: 400; text-transform: none; color: var(--tomato); }
.proj__next:hover .nm { color: var(--tomato); }

/* project page right banner = ink */
.banner--ink { background: var(--ink); border-left: 0; }
.banner--ink .banner__text { color: var(--paper); }

/* reveal */
@media (prefers-reduced-motion: no-preference){
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============================================================
   ANIMATED SKY (landing backdrop) — day clouds / night stars
   ============================================================ */
.sky { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.sky__day, .sky__night { position: absolute; inset: 0; transition: opacity .6s var(--ease); }
.sky__day {
  opacity: 1;
  background: linear-gradient(to bottom, color-mix(in srgb, #BFD9EE 60%, var(--paper)) 0%, var(--paper) 62%);
}
.sky__night { opacity: 0; inset: -40%; background: radial-gradient(120% 60% at 70% 12%, #1c2340 0%, #0c0e16 70%); }
.starfield { position: absolute; inset: 0; will-change: transform; }
[data-theme="dark"] .sky__day { opacity: 0; }
[data-theme="dark"] .sky__night { opacity: 1; animation: skyDrift 110s ease-in-out infinite alternate; }
@keyframes skyDrift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-3%, -2%, 0); } }

/* clouds (soft illustrative SVG, generated by JS) */
.cloud { position: absolute; left: -32%; width: calc(260px * var(--s, 1));
  will-change: transform; filter: none;
  animation-name: drift; animation-timing-function: linear; animation-iteration-count: infinite; }
.cloud svg { display: block; width: 100%; height: auto; }
[data-theme="dark"] .cloud { display: none; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(170vw); } }
@media (prefers-reduced-motion: reduce){ .cloud { animation: none !important; } }

/* stars (generated by JS into .sky__night) */
.star { position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%; background: #fff;
  opacity: .85; animation: twinkle 3.2s ease-in-out infinite; }
.star.big { width: 4px; height: 4px; background: #FFF8E6; box-shadow: 0 0 7px 1.5px rgba(255,248,220,.75); }
@keyframes twinkle { 0%,100%{ opacity:.28; transform: scale(.78); } 50%{ opacity:1; transform: scale(1.3); } }
.moon-deco { position: absolute; top: 9%; right: 12%; width: 64px; height: 64px; border-radius: 50%;
  background: #F2E6C0; box-shadow: inset -16px -8px 0 0 #DCCB9A, 0 0 40px 6px rgba(242,230,192,.35); opacity: 0; transition: opacity .6s; }
[data-theme="dark"] .moon-deco { opacity: 1; }
@media (prefers-reduced-motion: reduce){ .star { animation: none !important; } }

/* hide the rose wash in dark (stars take over) */
[data-theme="dark"] .home__wash { opacity: 0; }

/* ============================================================
   CONTROLS (theme toggle + edit button)
   ============================================================ */
.controls { position: fixed; top: 16px; right: calc(var(--banner) + 16px); z-index: 60; display: flex; gap: 10px; }
.ctrl {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-pill); background: var(--paper);
  color: var(--ink); cursor: pointer; transition: all var(--dur-fast) var(--ease);
}
.ctrl:hover { background: var(--ink); color: var(--paper); }
.ctrl .ic { font-size: .95rem; line-height: 1; }
@media (max-width: 680px){ .controls { right: 12px; top: 10px; } .ctrl span.lbl { display:none; } }

/* dark cursor petals -> handled by swapping SVG; keep smile color */

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); z-index: 200;
  background: var(--paper-2); border-left: 2px solid var(--ink); box-shadow: -20px 0 60px -30px rgba(0,0,0,.4);
  transform: translateX(102%); transition: transform .4s var(--ease); display: flex; flex-direction: column; color: var(--ink); }
.admin.is-open { transform: none; }
.admin__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1.5px solid var(--ink); }
.admin__head h2 { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; margin: 0; }
.admin__close { cursor: pointer; font-family: var(--font-mono); font-size: 1.1rem; background: none; border: 0; color: var(--ink); }
.admin__tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--ink-line); }
.admin__tab { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 8px 12px; border: 0; background: none; color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; }
.admin__tab.is-active { color: var(--tomato); border-color: var(--tomato); }
.admin__body { flex: 1; overflow-y: auto; padding: 16px 18px 90px; }
.admin__foot { position: absolute; bottom: 0; left: 0; right: 0; display: flex; gap: 8px; padding: 12px 16px;
  background: var(--paper-2); border-top: 1.5px solid var(--ink); }
.apane { display: none; }
.apane.is-active { display: block; }
.afield { margin-bottom: 14px; }
.afield label { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
.afield input, .afield textarea, .afield select {
  width: 100%; font-family: var(--font-sans); font-size: .92rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; }
.afield textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.afield input:focus, .afield textarea:focus, .afield select:focus { outline: none; border-color: var(--tomato); }
.asec { border: 1.5px solid var(--ink-line); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.asec > h3 { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; margin: 0 0 10px; }
.acard { border: 1px solid var(--ink-line); border-radius: 10px; padding: 10px; margin-bottom: 9px; background: var(--paper); }
.acard__top { display: flex; align-items: center; gap: 8px; }
.acard__title { font-weight: 600; font-size: .95rem; flex: 1; }
.acard__edit { display: none; margin-top: 10px; }
.acard.is-editing .acard__edit { display: block; }
.aicon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper); cursor: pointer; font-family: var(--font-mono); font-size: .85rem; color: var(--ink); }
.aicon:hover { background: var(--tomato); color: #fff; border-color: var(--tomato); }
.abtn { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.abtn:hover { background: var(--ink); color: var(--paper); }
.abtn--solid { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.abtn--solid:hover { filter: brightness(1.05); background: var(--tomato); }
.abtn--ghost { border-color: var(--line-strong); }
.aadd { width: 100%; margin-top: 4px; border-style: dashed; }
.admin__scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 190; opacity: 0; pointer-events: none; transition: opacity .35s; }
.admin__scrim.is-open { opacity: 1; pointer-events: auto; }
.amini { display:flex; gap:6px; }

/* small screens: collapse rails */
@media (max-width: 680px){
  :root { --rail: 0px; --banner: 46px; }
  .rail { position: sticky; top: 0; z-index: 50; flex-direction: row; width: auto; padding: 14px 16px; gap: 14px;
    overflow-x: auto; background: var(--paper); border-bottom: 1px solid var(--ink-line); pointer-events: auto; }
  .rail__item { flex: 0 0 auto; }
  .page { margin-left: 0; }
  .controls { top: 62px; left: 16px; right: auto; }
}

/* ============================================================
   IMAGE CELLS (galleries + portrait) — admin-managed
   ============================================================ */
.shot { position: relative; overflow: hidden; border: 1.5px solid var(--line-strong); border-radius: 0;
  background: var(--paper-3); box-shadow: var(--shadow-sm); }
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--paper-3); }
.shot--empty { display: flex; align-items: center; justify-content: center; border-style: dashed; }
.shot--empty span { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em; color: var(--ink-faint); text-align: center; padding: 8px; }
/* horizontal gallery: each image keeps its natural ratio at a fixed height — never cropped */
.gallery .shot { flex: 0 0 auto; width: auto; height: clamp(300px, 44vh, 460px); aspect-ratio: auto !important; scroll-snap-align: start; cursor: zoom-in; }
.gallery .shot img { width: auto; height: 100%; }
[data-portrait] .shot { width: 100%; aspect-ratio: auto !important; }
[data-portrait] .shot img { height: auto; }

/* ============================================================
   LIGHTBOX — full-screen uncropped image viewer
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: clamp(20px, 4vw, 64px);
  background: rgba(12, 10, 22, .9); backdrop-filter: blur(6px); opacity: 0; transition: opacity .26s var(--ease-out); }
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 0; box-shadow: 0 30px 80px rgba(0,0,0,.5); cursor: zoom-out;
  transform: scale(.97); transition: transform .26s var(--ease-out); }
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close { position: absolute; top: clamp(16px, 3vw, 32px); right: clamp(16px, 3vw, 32px);
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: background .2s, transform .2s; }
.lightbox__close:hover { background: rgba(255,255,255,.2); transform: scale(1.08); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s; z-index: 1; padding: 0; }
.lightbox__chev { display: block; font-size: 34px; line-height: 1; }
.lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__prev { left: clamp(12px, 3vw, 40px); }
.lightbox__next { right: clamp(12px, 3vw, 40px); }
.lightbox__prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox__next:hover { transform: translateY(-50%) translateX(3px); }
.lightbox__count { position: absolute; bottom: clamp(16px, 3vw, 32px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: .85rem; letter-spacing: .12em; color: rgba(255,255,255,.85); }

/* ============================================================
   EDIT ENTRY (page bottom) + password modal
   ============================================================ */
.editbar { display: flex; justify-content: center; padding: 8px 0 40px; }
.editlink { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  background: none; border: 0; border-bottom: 1px dashed var(--line-strong); color: var(--ink-faint); cursor: pointer; padding: 3px 0; }
.editlink:hover { color: var(--tomato); border-color: var(--tomato); }
.editlink .k { color: var(--tomato); }

.pwd { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  background: rgba(20,15,10,.45); backdrop-filter: blur(3px); }
.pwd.is-open { display: flex; }
.pwd__box { width: min(380px, 92vw); background: var(--paper-2); border: 2px solid var(--ink); border-radius: 16px;
  padding: 26px 24px; position: relative; box-shadow: var(--shadow-lg); }
.pwd__x { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-family: var(--font-mono); cursor: pointer; color: var(--ink); }
.pwd__title { font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; }
.pwd__sub { font-size: .9rem; color: var(--ink-soft); margin: 4px 0 14px; }
.pwd__input { width: 100%; font-size: 1rem; padding: 11px 13px; border: 1.5px solid var(--line-strong);
  border-radius: 10px; background: var(--paper); color: var(--ink); margin-bottom: 10px; }
.pwd__input:focus { outline: none; border-color: var(--tomato); }
.pwd__err { display: none; color: var(--tomato); font-size: .82rem; margin-bottom: 10px; }
.pwd__err.show { display: block; }
.shake { animation: shake .45s; }
@keyframes shake { 0%,100%{ transform: translateX(0);} 20%,60%{ transform: translateX(-7px);} 40%,80%{ transform: translateX(7px);} }

/* ============================================================
   ADMIN: images + filter groups
   ============================================================ */
.admin__mode { font-family: var(--font-mono); font-size: .58rem; color: var(--ink-faint); letter-spacing: .04em; }
.afield label small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-faint); font-family: var(--font-sans); font-size: .82em; }
.imggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 6px; }
.imgrow { position: relative; }
.imgthumb { width: 96px; aspect-ratio: 3/4; border: 1.5px solid var(--line-strong); border-radius: 8px; overflow: hidden;
  background: var(--paper); display: flex; align-items: center; justify-content: center; }
.imggrid .imgthumb { width: 100%; }
.imgthumb img { width: 100%; height: 100%; object-fit: cover; }
.imgthumb.is-empty::after { content: '＋'; color: var(--ink-faint); font-size: 1.3rem; }
.imgthumb img.is-loading { opacity: .4; }
.imgrow .aicon { position: absolute; width: 22px; height: 22px; font-size: .68rem; background: rgba(248,242,226,.94); }
[data-theme="dark"] .imgrow .aicon { background: rgba(28,32,48,.94); }
.imgrow__up { left: 3px; bottom: 3px; }
.imgrow .aicon:not(.imgrow__up):not(.imgrow__mv) { right: 3px; top: 3px; }
.imgrow__mvl { left: 3px; top: 3px; }
.imgrow__mvr { right: 3px; bottom: 3px; }
.imgrow .aicon.imgrow__mv:disabled { opacity: .3; cursor: default; }
.fedit { margin-bottom: 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: .72rem;
  padding: 4px 7px 4px 11px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); color: var(--ink); }
.fchip button { border: 0; background: none; cursor: pointer; color: var(--ink-faint); font-size: .66rem; padding: 0; line-height: 1; }
.fchip button:hover { color: var(--tomato); }
.fchecks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; }
.fcheck { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .78rem; color: var(--ink); cursor: pointer; }
.fcheck input { accent-color: var(--tomato); width: 15px; height: 15px; }
