/* ── Typeface ───────────────────────────────────────────── */
@font-face {
  font-family: "pv";
  src: url("/assets/pv.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ─────────────────────────────────────────── */
:root, [data-theme="light"] {
  /* DaisyUI tokens — matches click project */
  --b1: 100% 0 0;
  --b2: 97.2% 0.002 264;
  --b3: 84.8% 0.004 264;
  --bc: 13.6% 0.002 264;
  --p:  55.17% 0.213 252.84;
  --pc: 100% 0 0;
  --rounded-btn: 0.5rem;

  --bg:       oklch(var(--b1));
  --fg:       oklch(var(--bc));
  --fg-muted: oklch(48% 0.002 264);
  --border:   oklch(var(--b3));
  --gap:      6px;
  --font: "pv", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --b1: 20.0% 0.002 264;
  --b2: 13.4% 0.002 264;
  --b3: 31.5% 0.002 264;
  --bc: 97.2% 0.002 264;
  --p:  72.6% 0.157 239.4;
  --pc: 13% 0 0;

  --bg:       oklch(var(--b1));
  --fg:       oklch(var(--bc));
  --fg-muted: oklch(65% 0.002 264);
  --border:   oklch(var(--b3));
}

/* ── Theme transition ──────────────────────────────────── */
.switching,
.switching *,
.switching *::before,
.switching *::after {
  transition:
    color            0.15s ease,
    background-color 0.15s ease,
    border-color     0.15s ease !important;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ──────────────────────────────────────────────── */
html {
  font-family: var(--font);
  font-size: 14px;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

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

/* ── Header ────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}

.nav-icon-link, #theme-btn { font-size: 1rem; }
.hidden { display: none; }

/* ── Main ──────────────────────────────────────────────── */
main { flex: 1; }

/* ── Profile header ────────────────────────────────────── */
.profile-header {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  text-align: center;
}

.profile-avatar {
  width: 46px;
  height: 38px;
  display: block;
  margin: 0 auto 20px;
}

[data-theme="light"] .profile-avatar {
  filter: invert(1);
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.profile-website {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #65F859;
  text-decoration: none;
}

[data-theme="light"] .profile-website {
  color: #C200C2;
}

.profile-website i {
  font-size: 15px;
  color: #ffffff;
}

[data-theme="light"] .profile-website i {
  color: var(--fg);
}

.profile-website:hover { color: #65F859; }


/* ── Gallery ───────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 70%;
  margin: 0 auto;
  border-radius: var(--rounded-btn, 0.5rem);
  overflow: hidden;
}

@media (min-width: 1200px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px)  { .gallery { width: 100%; } }

.gallery-item {
  display: block;
  aspect-ratio: 4/5;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.25s ease;
}

.gallery-item:hover img {
  opacity: 0.85;
}

/* ── Load More ─────────────────────────────────────────── */
.gallery-hidden { display: none; }

.load-more-wrap {
  text-align: center;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.load-more-btn {
  font-family: var(--font);
  letter-spacing: 0.04em;
}

.load-all-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0;
}

.load-all-btn:hover { color: var(--fg); }

.end-msg {
  display: none;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

/* ── Lightbox ──────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

#lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

.lb-btn {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 24px;
  padding: 16px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
  z-index: 201;
}

.lb-btn:hover { color: #fff; }

#lb-close          { top: 16px; right: 16px; }
#lb-prev           { left: 16px; top: 50%; transform: translateY(-50%); }
#lb-next           { right: 16px; top: 50%; transform: translateY(-50%); }


/* ── Static pages (About, Contact) ────────────────────── */
.page-content {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.page-content h1 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.page-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-muted);
}

.page-body p + p {
  margin-top: 1.2em;
}

.page-body a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Mobile adjustments ────────────────────────────────── */
@media (max-width: 480px) {
  header { padding: 14px 16px; gap: 12px; }
  nav { gap: 14px; }
  .nav-icon-link i, #theme-btn i { font-size: 1.35rem; }
  .gallery { grid-template-columns: repeat(1, 1fr); width: auto; margin: 0 16px; }
  .profile-header { padding: 32px 20px 24px; }
  .page-content { padding: 32px 16px 60px; }
}
