/* ============================================================
   AURA — K-pop Fandom Hub
   Cinematic hero · glassmorphism cards · editorial nav
   ============================================================ */

:root {
  --ink: #1d1f2b;
  --ink-soft: #3a3d52;
  --paper: rgba(244, 245, 250, 0.92);
  --paper-hover: rgba(255, 255, 255, 0.98);
  --accent: #4b5cf0;
  --accent-deep: #3a48d8;
  --accent-soft: #8b96ff;
  --lavender: #b9a7ff;
  --text-light: #f2f3fa;
  --text-dim: rgba(242, 243, 250, 0.62);
  --radius-card: 26px;
  --shadow-card: 0 18px 44px -14px rgba(8, 10, 30, 0.55);
  --shadow-card-hover: 0 30px 64px -16px rgba(8, 10, 30, 0.7);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-cond: "Barlow Condensed", "Noto Sans KR", "Noto Sans JP", sans-serif;
  --font-body: "Inter", "Noto Sans KR", "Noto Sans JP", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: #0b0d1c;
  color: var(--text-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }

/* ============ Loader ============ */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: #0b0d1c;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark {
  width: 44px; height: 44px; fill: var(--lavender);
  animation: loaderPulse 1.1s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.15) rotate(90deg); opacity: 1; }
}

/* ============ Cinematic background ============ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }

.bg__image {
  position: absolute; inset: -4%;
  background:
    url("https://images.unsplash.com/photo-1470229722913-7c0e2dbbafd3?q=80&w=2000&auto=format&fit=crop")
    center 38% / cover no-repeat;
  filter: saturate(0.85) brightness(0.9);
  animation: bgDrift 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes bgDrift {
  from { transform: scale(1.02) translate(0, 0); }
  to   { transform: scale(1.1) translate(-1.4%, 1.6%); }
}

/* dreamy blue-purple wash */
.bg__gradient {
  position: absolute; inset: 0;
  background:
    linear-gradient(112deg,
      rgba(38, 30, 84, 0.82) 0%,
      rgba(52, 42, 110, 0.62) 34%,
      rgba(24, 34, 78, 0.55) 62%,
      rgba(10, 14, 38, 0.88) 100%),
    linear-gradient(to top,
      rgba(8, 9, 24, 0.9) 0%,
      rgba(8, 9, 24, 0.15) 42%,
      rgba(30, 24, 70, 0.35) 100%);
}

/* soft spotlight behind the artist visual */
.bg__spotlight {
  position: absolute;
  top: -12%; left: 50%;
  width: 62vmax; height: 62vmax;
  transform: translateX(-38%);
  background: radial-gradient(circle,
    rgba(214, 205, 255, 0.34) 0%,
    rgba(160, 150, 235, 0.14) 34%,
    transparent 68%);
  mix-blend-mode: screen;
  animation: spotlightBreathe 9s ease-in-out infinite;
}
@keyframes spotlightBreathe {
  0%, 100% { opacity: 0.75; transform: translateX(-38%) scale(1); }
  50% { opacity: 1; transform: translateX(-36%) scale(1.06); }
}

/* floating light orbs */
.bg__orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px);
  mix-blend-mode: screen;
  pointer-events: none;
}
.bg__orb--1 {
  width: 34vmax; height: 34vmax;
  top: 8%; left: -8%;
  background: radial-gradient(circle, rgba(96, 84, 220, 0.4), transparent 70%);
  animation: orbFloat1 16s ease-in-out infinite alternate;
}
.bg__orb--2 {
  width: 26vmax; height: 26vmax;
  bottom: -6%; right: 6%;
  background: radial-gradient(circle, rgba(64, 110, 235, 0.34), transparent 70%);
  animation: orbFloat2 20s ease-in-out infinite alternate;
}
.bg__orb--3 {
  width: 16vmax; height: 16vmax;
  top: 46%; left: 44%;
  background: radial-gradient(circle, rgba(190, 150, 255, 0.22), transparent 70%);
  animation: orbFloat1 13s ease-in-out infinite alternate-reverse;
}
@keyframes orbFloat1 {
  from { transform: translate(0, 0); }
  to   { transform: translate(4vmax, -3vmax); }
}
@keyframes orbFloat2 {
  from { transform: translate(0, 0); }
  to   { transform: translate(-3vmax, -4vmax); }
}

/* film grain */
.bg__grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.07;
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.4%); }
  50% { transform: translate(1.6%, -1%); }
  75% { transform: translate(-1%, -1.8%); }
  100% { transform: translate(0, 0); }
}

.bg__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 42%,
    transparent 46%, rgba(5, 6, 18, 0.55) 100%);
}

/* ============ Entrance animation ============ */
.js-anim {
  opacity: 0;
  transform: translateY(26px);
  animation: riseIn 0.9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Header ============ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(18px, 3vw, 34px) clamp(20px, 4vw, 52px);
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform 0.4s var(--ease-out);
}
.logo:hover { transform: translateY(-2px); }
.logo__mark {
  width: 30px; height: 30px; fill: #fff;
  filter: drop-shadow(0 0 12px rgba(185, 167, 255, 0.8));
  transition: transform 0.6s var(--ease-out);
}
.logo:hover .logo__mark { transform: rotate(180deg); }
.logo__text {
  font-family: var(--font-cond);
  font-weight: 700; font-size: 1.35rem;
  letter-spacing: 0.34em; text-transform: uppercase;
}

/* language switcher */
.lang { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.lang button {
  position: relative;
  font-family: var(--font-cond);
  font-size: 1.02rem; font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding: 4px 2px;
  transition: color 0.3s ease;
}
.lang button::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; border-radius: 2px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.lang button:hover { color: var(--text-light); }
.lang button:hover::after { transform: scaleX(0.6); }
.lang button.is-active { color: #fff; }
.lang button.is-active::after { transform: scaleX(1); }

/* ============ Hero layout ============ */
.hero {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(96px, 14vh, 140px) clamp(20px, 4.5vw, 60px) clamp(32px, 6vh, 64px);
}

/* ============ Cards (left) ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 218px));
  gap: clamp(14px, 1.8vw, 24px);
  perspective: 1100px;
}

.card {
  position: relative;
  aspect-ratio: 1 / 1.04;
  border-radius: var(--radius-card);
  padding: clamp(18px, 2vw, 26px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out),
    background 0.4s ease;
  will-change: transform;
}
.card:hover, .card:focus-visible {
  background: var(--paper-hover);
  box-shadow: var(--shadow-card-hover);
}
.card:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 4px; }

.card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* blue accent arrow */
.card__arrow {
  position: absolute;
  right: clamp(16px, 1.8vw, 24px);
  bottom: clamp(16px, 1.8vw, 24px);
  width: 30px; height: 30px;
  color: var(--accent);
  transition: transform 0.45s var(--ease-out);
}
.card__arrow svg { width: 100%; height: 100%; }
.card:hover .card__arrow,
.card:focus-visible .card__arrow { transform: translateX(7px); }

/* --- Photos card --- */
.card__meta {
  margin-top: auto;
  display: flex; align-items: baseline; gap: 7px;
  color: var(--accent-deep);
}
.card__meta strong {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.card__meta span { font-size: 0.95rem; font-weight: 600; opacity: 0.85; }

/* fanned photo stack on hover */
.card__fan { position: absolute; inset: 0; pointer-events: none; }
.card__fan span {
  position: absolute;
  right: 14px; top: 16px;
  width: 46px; height: 60px;
  border-radius: 10px;
  background: linear-gradient(150deg, #cfd4ff, #8b96ff 60%, #5a68e8);
  box-shadow: 0 8px 18px -6px rgba(40, 50, 160, 0.5);
  opacity: 0;
  transform: translate(14px, 10px) rotate(0deg);
  transition: transform 0.55s var(--ease-out), opacity 0.4s ease;
}
.card__fan span:nth-child(2) { transition-delay: 0.05s; background: linear-gradient(150deg, #e6d9ff, #b9a7ff 60%, #7d6ae8); }
.card__fan span:nth-child(3) { transition-delay: 0.1s; background: linear-gradient(150deg, #d4ecff, #8fb8ff 60%, #4f6fe0); }
.card--photos:hover .card__fan span,
.card--photos:focus-visible .card__fan span { opacity: 1; }
.card--photos:hover .card__fan span:nth-child(1) { transform: translate(-6px, 2px) rotate(-14deg); }
.card--photos:hover .card__fan span:nth-child(2) { transform: translate(-16px, -4px) rotate(0deg); }
.card--photos:hover .card__fan span:nth-child(3) { transform: translate(-26px, 4px) rotate(14deg); }

/* --- LIVE card --- */
.card__live-dot {
  position: absolute;
  top: clamp(18px, 2vw, 26px);
  right: clamp(18px, 2vw, 26px);
  width: 11px; height: 11px; border-radius: 50%;
  background: #ff4d6d;
  box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.55);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(255, 77, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); }
}

/* --- Album card --- */
.card--album { padding: 0; background: #14162a; }
.card--album img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 0.8s var(--ease-out), filter 0.5s ease;
  filter: saturate(0.95);
}
.card--album:hover img,
.card--album:focus-visible img { transform: scale(1.14); filter: saturate(1.1); }
.card__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(10, 12, 32, 0.78) 0%,
    rgba(10, 12, 32, 0.12) 46%,
    rgba(30, 26, 70, 0.25) 100%);
}
.card__album-label {
  position: absolute; left: 18px; bottom: 16px;
  font-family: var(--font-cond);
  font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff;
}
.card__badge {
  position: absolute; right: 14px; bottom: 14px;
  min-width: 30px; height: 30px;
  display: grid; place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff; font-size: 0.82rem; font-weight: 700;
}
.card__play {
  position: absolute; top: 50%; left: 50%;
  width: 52px; height: 52px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.45s var(--ease-out), background 0.3s ease;
}
.card--album:hover .card__play { transform: translate(-50%, -50%) scale(1.12); background: rgba(255, 255, 255, 0.24); }
.card__play .icon-play { width: 20px; height: 20px; fill: #fff; margin-left: 2px; transition: opacity 0.25s ease, transform 0.25s ease; }
.card__play .eq { position: absolute; display: none; align-items: flex-end; gap: 3px; height: 16px; }
.card__play .eq i {
  width: 3px; border-radius: 2px; background: #fff;
  animation: eqBounce 0.9s ease-in-out infinite;
}
.card__play .eq i:nth-child(2) { animation-delay: 0.18s; }
.card__play .eq i:nth-child(3) { animation-delay: 0.36s; }
@keyframes eqBounce {
  0%, 100% { height: 5px; }
  50% { height: 16px; }
}
.card--album.is-playing .icon-play { opacity: 0; transform: scale(0.5); }
.card--album.is-playing .eq { display: flex; }

/* --- Luck card --- */
.card__spark {
  position: absolute;
  top: clamp(16px, 1.8vw, 24px);
  right: clamp(16px, 1.8vw, 24px);
  width: 22px; height: 22px;
  fill: var(--accent);
  opacity: 0.85;
  transition: transform 0.6s var(--ease-out);
}
.card--luck:hover .card__spark,
.card--luck:focus-visible .card__spark { transform: rotate(180deg) scale(1.2); }
.card--luck::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(139, 150, 255, 0.28), transparent 55%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.card--luck:hover::before { opacity: 1; }

/* ============ Right navigation ============ */
.main-nav {
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: clamp(6px, 1.6vh, 16px);
  text-align: right;
}
.main-nav__link {
  position: relative;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 2px 0 6px;
  transition: color 0.35s ease, transform 0.45s var(--ease-out), letter-spacing 0.45s var(--ease-out);
}
.main-nav__link::after {
  content: "";
  position: absolute; right: 0; bottom: 0;
  height: 3px; width: 100%;
  border-radius: 3px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.main-nav__link:hover {
  color: var(--text-light);
  transform: translateX(-8px);
  letter-spacing: 0.05em;
}
.main-nav__link:hover::after { transform: scaleX(0.45); }
.main-nav__link.is-active { color: #fff; }
.main-nav__link.is-active::after { transform: scaleX(1); }

/* ============ Fortune modal ============ */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 20px;
  visibility: hidden;
  transition: visibility 0s 0.5s;
}
.modal.is-open { visibility: visible; transition-delay: 0s; }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 9, 24, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.modal.is-open .modal__backdrop { opacity: 1; }

.modal__panel {
  position: relative;
  width: min(440px, 100%);
  border-radius: 30px;
  padding: 40px 36px 32px;
  background: linear-gradient(160deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  box-shadow: 0 40px 90px -20px rgba(4, 6, 20, 0.8);
  text-align: center;
  opacity: 0;
  transform: translateY(34px) scale(0.94);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.modal.is-open .modal__panel { opacity: 1; transform: translateY(0) scale(1); }

.modal__close {
  position: absolute; top: 14px; right: 16px;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1.5rem; line-height: 1;
  color: var(--text-dim);
  transition: color 0.3s ease, background 0.3s ease, transform 0.4s var(--ease-out);
}
.modal__close:hover { color: #fff; background: rgba(255, 255, 255, 0.12); transform: rotate(90deg); }

.modal__eyebrow {
  font-family: var(--font-cond);
  font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 8px;
}
.modal__title {
  font-family: var(--font-cond);
  font-size: 2.3rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.modal__fortune {
  font-size: 1.06rem; line-height: 1.65;
  color: var(--text-light);
  min-height: 3.4em;
  margin-bottom: 24px;
  transition: opacity 0.3s ease;
}
.modal__fortune.is-fading { opacity: 0; }

.modal__meta {
  display: flex; justify-content: center; gap: 18px;
  margin-bottom: 26px;
}
.modal__meta-item {
  flex: 1;
  padding: 14px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; flex-direction: column; gap: 6px;
}
.modal__meta-item span {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-dim);
}
.modal__meta-item strong {
  font-size: 1.15rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.modal__meta-item em { font-style: normal; }
.swatch {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 10px currentColor;
  display: inline-block;
}

.modal__again {
  font-family: var(--font-cond);
  font-size: 1.05rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff;
  padding: 13px 34px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), #7d6ae8);
  box-shadow: 0 14px 30px -10px rgba(75, 92, 240, 0.65);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, filter 0.3s ease;
}
.modal__again:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
  box-shadow: 0 20px 38px -10px rgba(75, 92, 240, 0.8);
}
.modal__again:active { transform: translateY(-1px) scale(0.98); }

/* ============ Responsive ============ */
@media (max-width: 820px) {
  .hero {
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: clamp(30px, 6vh, 48px);
    padding-top: 110px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    order: 2;
  }
  .main-nav {
    order: 1;
    align-items: flex-start;
    text-align: left;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }
  .main-nav__link::after { right: auto; left: 0; transform-origin: left; }
  .main-nav__link:hover { transform: translateX(8px); }
}

@media (max-width: 480px) {
  .site-header { padding: 16px 18px; }
  .logo__text { font-size: 1.1rem; }
  .lang { gap: 14px; }
  .lang button { font-size: 0.9rem; }
  .hero { padding: 96px 16px 28px; gap: 26px; }
  .cards { gap: 12px; }
  .card { border-radius: 20px; padding: 16px; }
  .card__arrow { right: 14px; bottom: 14px; width: 24px; height: 24px; }
  .main-nav__link { font-size: clamp(1.5rem, 8vw, 2rem); }
  .modal__panel { padding: 34px 24px 26px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js-anim { opacity: 1; transform: none; }
}

/* ============================================================
   OFFICIAL LINKS PAGE
   White header · periwinkle backdrop · 3-col link cards
   ============================================================ */

.links-page {
  background: linear-gradient(180deg, #6f8ef2 0%, #5f7fe8 55%, #5573dd 100%);
  min-height: 100vh;
  color: var(--ink);
}

/* soft light bloom behind the grid */
.links-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(255, 255, 255, 0.28), transparent 70%),
    radial-gradient(40% 35% at 85% 100%, rgba(139, 150, 255, 0.35), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Header ---- */
.links-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px -12px rgba(20, 30, 80, 0.35);
}

.logo--dark { color: #4a7fd4; }
.logo--dark .logo__mark { width: 30px; height: 30px; fill: currentColor; }

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3.4vw, 44px);
  font-family: var(--font-cond);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.topnav__link {
  position: relative;
  color: #8a8f9e;
  padding: 4px 2px;
  transition: color 0.25s var(--ease-out);
}

.topnav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%) scale(0);
  transition: transform 0.3s var(--ease-out);
}

.topnav__link:hover { color: var(--ink); }
.topnav__link.is-active { color: var(--ink); font-weight: 600; }
.topnav__link.is-active::after { transform: translateX(-50%) scale(1); }

.lang--dark button { color: #8a8f9e; }
.lang--dark button:hover { color: var(--ink); }
.lang--dark button.is-active { color: var(--ink); }
.lang--dark button.is-active::after { background: var(--ink); }

/* ---- Grid ---- */
.links-main {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 4.5vh, 56px) clamp(20px, 6vw, 90px) 64px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  max-width: 1180px;
  margin: 0 auto;
}

/* ---- Link card ---- */
.lcard {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 26px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  box-shadow: 0 14px 30px -14px rgba(25, 40, 110, 0.45);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background 0.35s var(--ease-out);
}

.lcard:hover {
  transform: translateY(-6px);
  background: #ffffff;
  box-shadow: 0 26px 48px -16px rgba(25, 40, 110, 0.55);
}

.lcard:active { transform: translateY(-2px) scale(0.99); }

.lcard:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.lcard__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #4a8fd8;
  transition: transform 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

.lcard__icon svg { width: 44px; height: 44px; }

.lcard:hover .lcard__icon {
  transform: scale(1.1) rotate(-4deg);
  color: var(--accent);
}

.lcard__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lcard__title {
  font-family: var(--font-cond);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #3f7fd0;
  line-height: 1.1;
  transition: color 0.3s var(--ease-out);
}

.lcard:hover .lcard__title { color: var(--accent-deep); }

.lcard__sub {
  font-family: var(--font-cond);
  font-size: 1.02rem;
  font-weight: 500;
  color: #7d8296;
  letter-spacing: 0.01em;
}

.lcard__go {
  margin-left: auto;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: #b6bccf;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.lcard:hover .lcard__go {
  opacity: 1;
  transform: translate(0, 0);
  color: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topnav { display: none; } /* keep header clean on small screens */
}

@media (max-width: 560px) {
  .links-header { padding: 12px 18px; }
  .links-grid { grid-template-columns: 1fr; }
  .lcard { padding: 20px; gap: 14px; }
  .lcard__icon { width: 48px; height: 48px; }
  .lcard__icon svg { width: 36px; height: 36px; }
  .lcard__go { opacity: 1; transform: none; } /* always visible on touch */
}

/* ============================================================
   PHOTOS PAGE
   ============================================================ */
.photos-page {
  background: #f4f5fb;
  min-height: 100vh;
  color: var(--ink);
}

.photos-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 28px 90px;
}

/* ---- Head ---- */
.photos-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.photos-title {
  font-family: var(--font-cond);
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.photos-sub {
  font-family: var(--font-cond);
  font-size: 1.15rem;
  color: #6b7186;
  margin-top: 6px;
}

.photos-updated {
  font-family: var(--font-cond);
  font-size: 1.05rem;
  color: #6b7186;
  margin-top: 2px;
}

.photos-pageind {
  font-family: var(--font-cond);
  font-size: 1.2rem;
  color: var(--ink);
  white-space: nowrap;
}
.photos-pageind strong { font-weight: 700; }
.admin-link {
  display: inline-block;
  margin-right: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #1d2b4f;
  color: #fff;
  font-family: var(--font-cond);
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease-out), filter 0.2s ease;
}
.admin-link:hover { transform: translateY(-2px); filter: brightness(1.15); }


/* ---- Toolbar ---- */
.photos-toolbar { display: grid; gap: 14px; margin-bottom: 26px; }
.toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.search {
  display: flex;
  align-items: stretch;
  flex: 1 1 340px;
  max-width: 520px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 22px -14px rgba(20, 30, 80, 0.35);
  border: 1px solid #e3e6f2;
  background: #fff;
}
.search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-family: var(--font-cond);
  font-size: 1.1rem;
  color: var(--ink);
  background: transparent;
}
.search input::placeholder { color: #9aa0b4; }
.search__btn {
  width: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.search__btn svg { width: 20px; height: 20px; }
.search__btn:hover { filter: brightness(1.08); }
.search__btn:active { transform: scale(0.94); }
.search__btn--reset { background: #e23b3b; }
.search__btn--go { background: #1d2b4f; }

.imgsearch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a59, #ff5e8a);
  color: #fff;
  font-family: var(--font-cond);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px -12px rgba(255, 94, 138, 0.6);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, filter 0.2s ease;
}
.imgsearch svg { width: 18px; height: 18px; }
.imgsearch:hover { transform: translateY(-2px); filter: brightness(1.05); }
.imgsearch:active { transform: translateY(0) scale(0.97); }

/* dates */
.toolbar-row--dates { gap: 10px; }
.datefield {
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e3e6f2;
  background: #fff;
  box-shadow: 0 6px 18px -14px rgba(20, 30, 80, 0.3);
}
.datefield input {
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family: var(--font-cond);
  font-size: 1.05rem;
  color: var(--ink);
  background: transparent;
}
.datefield__reset {
  width: 42px;
  display: grid;
  place-items: center;
  color: #6b7186;
  border-left: 1px solid #eef0f7;
  transition: background 0.2s ease, color 0.2s ease;
}
.datefield__reset svg { width: 17px; height: 17px; }
.datefield__reset:hover { background: #f2f4fb; color: var(--ink); }
.date-tilde { color: #9aa0b4; font-family: var(--font-cond); font-size: 1.2rem; }

/* tags */
.toolbar-row--tags { gap: 8px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: #e7eaf3;
  color: #5a6076;
  font-family: var(--font-cond);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s var(--ease-out);
}
.chip:hover { transform: translateY(-2px); background: #dde2f0; }
.chip.is-active { background: #1d2b4f; color: #fff; }

/* ---- Grid ---- */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.pcard {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #eceef6;
  box-shadow: 0 14px 34px -20px rgba(20, 30, 80, 0.35);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}
.pcard:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -22px rgba(20, 30, 80, 0.45); }

.pcard__imgwrap {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.pcard__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.pcard:hover .pcard__imgwrap img { transform: scale(1.07); }
.pcard__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0) 55%, rgba(10, 14, 30, 0.55));
  opacity: 0.9;
}
.pcard__source {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--src, #1d2b4f);
  color: #fff;
  font-family: var(--font-cond);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pcard__date {
  position: absolute;
  bottom: 12px;
  right: 14px;
  color: #fff;
  font-family: var(--font-cond);
  font-size: 0.95rem;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.pcard__caption {
  padding: 14px 16px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #3a4055;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photos-empty {
  text-align: center;
  color: #6b7186;
  font-family: var(--font-cond);
  font-size: 1.2rem;
  padding: 60px 0;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagebtn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e3e6f2;
  color: #5a6076;
  font-family: var(--font-cond);
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.22s var(--ease-out);
}
.pagebtn:hover:not(:disabled) { transform: translateY(-2px); border-color: #c9d2ec; color: var(--ink); }
.pagebtn.is-active { background: #1d2b4f; border-color: #1d2b4f; color: #fff; }
.pagebtn:disabled { opacity: 0.4; cursor: not-allowed; }
.pagebtn--nav { font-size: 1.3rem; line-height: 1; }

/* ---- Viewer ---- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  visibility: hidden;
  transition: visibility 0s linear 0.35s;
}
.viewer.is-open { visibility: visible; transition-delay: 0s; }

.viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 22, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.viewer.is-open .viewer__backdrop { opacity: 1; }

.viewer__stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 0;
  width: min(1060px, 92vw);
  max-height: 88vh;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
}
.viewer.is-open .viewer__stage { opacity: 1; transform: translateY(0) scale(1); }

.viewer__frame {
  position: relative;
  background: #0d1020;
  display: grid;
  place-items: center;
  min-height: 320px;
}
.viewer__frame img {
  width: 100%;
  height: 100%;
  max-height: 88vh;
  object-fit: cover;
  display: block;
  transition: opacity 0.18s ease;
}
.viewer__frame img.is-fading { opacity: 0; }
.viewer__dots {
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.viewer__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.viewer__dots i:nth-child(1) { background: #ff5f57; }
.viewer__dots i:nth-child(2) { background: #febc2e; }
.viewer__dots i:nth-child(3) { background: #28c840; }

.viewer__caption {
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.viewer__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.viewer__source {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--src, #1d2b4f);
  color: #fff;
  font-family: var(--font-cond);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.viewer__date { font-family: var(--font-cond); color: #6b7186; font-size: 1rem; }
.viewer__text { font-size: 1.05rem; line-height: 1.55; color: #2a3047; font-weight: 500; }
.viewer__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.vtag {
  padding: 5px 12px;
  border-radius: 999px;
  background: #eef0f8;
  color: #5a6076;
  font-family: var(--font-cond);
  font-size: 0.92rem;
  font-weight: 600;
}
.viewer__actions { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.viewer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1d2b4f;
  color: #fff;
  font-family: var(--font-cond);
  font-size: 1.02rem;
  font-weight: 600;
  transition: transform 0.25s var(--ease-out), filter 0.2s ease, background 0.2s ease;
}
.viewer__link svg { width: 17px; height: 17px; }
.viewer__link:hover { transform: translateY(-2px); filter: brightness(1.1); }
.viewer__link--ghost { background: #eef0f8; color: #2a3047; }
.viewer__link--ghost:hover { background: #e2e6f3; }
.viewer__link--ghost.is-copied { background: #28c840; color: #fff; }

.viewer__close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.3s var(--ease-out);
}
.viewer__close:hover { background: rgba(255, 255, 255, 0.24); transform: rotate(90deg); }

.viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.25s var(--ease-out), opacity 0.2s ease;
}
.viewer__nav svg { width: 24px; height: 24px; }
.viewer__nav:hover:not(:disabled) { background: rgba(255, 255, 255, 0.26); }
.viewer__nav:disabled { opacity: 0.3; cursor: not-allowed; }
.viewer__nav--prev { left: 20px; }
.viewer__nav--next { right: 20px; }
.viewer__nav--prev:hover:not(:disabled) { transform: translateY(-50%) translateX(-3px); }
.viewer__nav--next:hover:not(:disabled) { transform: translateY(-50%) translateX(3px); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .photos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer__stage { grid-template-columns: 1fr; max-height: 92vh; }
  .viewer__frame img { max-height: 52vh; }
}

@media (max-width: 560px) {
  .photos-main { padding: 24px 16px 70px; }
  .photos-grid { grid-template-columns: 1fr; gap: 16px; }
  .photos-head { flex-direction: column; align-items: flex-start; }
  .search { max-width: none; }
  .viewer__nav--prev { left: 10px; }
  .viewer__nav--next { right: 10px; }
  .viewer__caption { padding: 20px; }
}

/* ============================================================
   Skeleton loading cards
   ============================================================ */
.pcard--skeleton { pointer-events: none; }
.pcard--skeleton .pcard__imgwrap {
  background: linear-gradient(100deg, #e6e9f2 40%, #f2f4fa 50%, #e6e9f2 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
.pcard--skeleton .pcard__caption {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(100deg, #e6e9f2 40%, #f2f4fa 50%, #e6e9f2 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  color: transparent;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   Admin — add photo page
   ============================================================ */
.admin-page {
  background: linear-gradient(160deg, #f4f6fc 0%, #e9edf8 100%);
  min-height: 100vh;
  color: var(--ink, #1d2b4f);
  font-family: var(--font-body, "Inter", sans-serif);
}
.admin-wrap { max-width: 640px; margin: 0 auto; padding: 48px 22px 90px; }
.admin-back {
  display: inline-block;
  margin-bottom: 18px;
  color: #4b5cf0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.admin-back:hover { text-decoration: underline; }
.admin-title {
  font-family: var(--font-cond, "Barlow Condensed", sans-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}
.admin-sub { color: #6b7186; margin: 0 0 28px; line-height: 1.55; }
.admin-form {
  background: #fff;
  border: 1px solid #e3e7f4;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 50px -30px rgba(20, 30, 80, 0.25);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field small { color: #8a90a5; font-size: 0.78rem; }
.field small code { background: #eef1fa; padding: 1px 6px; border-radius: 5px; font-size: 0.78rem; }
.field input[type="text"],
.field input[type="url"],
.field input[type="password"],
.field input[type="date"],
.field select,
.field textarea {
  font: inherit;
  padding: 11px 14px;
  border: 1.5px solid #dbe0ef;
  border-radius: 12px;
  background: #fbfcfe;
  color: var(--ink, #1d2b4f);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: #4b5cf0;
  box-shadow: 0 0 0 3px rgba(75, 92, 240, 0.15);
}
.admin-drop {
  position: relative;
  border: 2px dashed #c9d2ec;
  border-radius: 16px;
  background: #f7f9fe;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.admin-drop.is-over { border-color: #4b5cf0; background: #eef1fd; }
.admin-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.admin-drop__hint {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #8a90a5; pointer-events: none; text-align: center; padding: 20px;
}
.admin-drop__hint svg { width: 34px; height: 34px; }
.admin-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.admin-submit {
  font: inherit;
  font-weight: 700;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  background: #1d2b4f;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}
.admin-submit:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.15); }
.admin-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.admin-status { margin: 0; font-size: 0.92rem; font-weight: 600; min-height: 1.2em; }
.admin-status.is-ok { color: #1a9e5c; }
.admin-status.is-err { color: #d23b3b; }
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .admin-form { padding: 20px; }
}


