/* ============================================
   DonnyDon.com - Style Sheet
   Aesthetic: Industrial-tech with warm accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&display=swap');

:root {
  --bg:        #0e1012;
  --bg-card:   #161a1e;
  --bg-nav:    rgba(14, 16, 18, 0.92);
  --surface:   #1c2127;
  --border:    #2a3038;
  --text:      #e2e4e8;
  --text-dim:  #8a919c;
  --accent:    #7b5ea7;
  --accent-hover: #9474bf;
  --white:     #f5f5f7;
  --font-display: 'Outfit', sans-serif;
  --font-mono:   'DM Mono', monospace;
  --font-serif:  'Playfair Display', Georgia, serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1100px;
  /* Walled Garden toolbar */
  --wg-green:       #4a9868;
  --wg-green-hover: #63b882;
  --wg-green-dim:   rgba(74, 152, 104, 0.6);
  --wg-bg:          rgba(8, 14, 10, 0.95);
  --wg-border:      rgba(62, 140, 90, 0.25);
  --wg-surface:     rgba(62, 140, 90, 0.1);
}

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.dot { color: var(--accent); }

/* Walled Garden green theme override */
body.wg-page { --accent: var(--wg-green); --accent-hover: var(--wg-green-hover); }

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
/* First row: logo + toggle + links */
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  /* safe-area-inset-top keeps content clear of the status bar in iOS PWA mode */
  padding: max(16px, env(safe-area-inset-top, 16px)) max(32px, env(safe-area-inset-right, 32px)) 16px max(32px, env(safe-area-inset-left, 32px));
  transition: padding 0.3s var(--ease-out);
}
.nav.scrolled .nav-row {
  padding: max(10px, env(safe-area-inset-top, 10px)) max(32px, env(safe-area-inset-right, 32px)) 10px max(32px, env(safe-area-inset-left, 32px));
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--white); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-dim);
  padding: 6px 16px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover {
  color: var(--white);
  background: var(--surface);
}
.nav-links a.active {
  color: var(--white);
  background: var(--accent);
}

/* Separated nav item (Max May Art) */
.nav-separated {
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-row {
    padding: max(14px, env(safe-area-inset-top, 14px)) max(20px, env(safe-area-inset-right, 20px)) 14px max(20px, env(safe-area-inset-left, 20px));
  }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    width: min(280px, 80vw);
    height: 100vh;
    flex-direction: column;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    padding: 80px 24px 32px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-size: 1.05rem;
    padding: 16px 20px;
    min-height: 52px;
    display: flex;
    align-items: center;
    border-radius: 8px;
  }
  .nav-separated {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
}

/* ============ WALLED GARDEN TOOLBAR ============ */
/* Lives inside .nav — stacks naturally below .nav-row, no positioning needed */
.wg-bar {
  align-self: center;
  width: calc(100% - 64px);
  max-width: 840px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(180deg, rgba(20, 42, 27, 0.99) 0%, rgba(9, 17, 12, 0.97) 100%);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(62, 140, 90, 0.35);
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.5),
    0 3px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(110, 210, 140, 0.1),
    inset 0 -1px 0 rgba(74, 152, 104, 0.18);
}

.wg-bar-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wg-green);
  flex-shrink: 0;
}
.wg-bar-icon {
  color: var(--wg-green);
  flex-shrink: 0;
  opacity: 0.85;
}
.wg-bar-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.wg-bar-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1;
  color: var(--wg-green-dim);
  padding: 4px 12px;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
.wg-bar-link:hover {
  color: var(--wg-green-hover);
  background: var(--wg-surface);
}
.wg-bar-link.active {
  color: var(--wg-green);
  background: var(--wg-surface);
}
.wg-bar--guest {
  justify-content: center;
}
.wg-bar--guest .wg-bar-brand {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: none;
  text-decoration: none;
  transition: color 0.2s;
}
.wg-bar--guest .wg-bar-brand:hover {
  color: var(--wg-green-hover);
}

@media (max-width: 640px) {
  /* Hide the floating panel — wg links live in the slide-out nav instead */
  .wg-bar { display: none; }
}

/* ============ WALLED GARDEN MOBILE NAV SECTION ============ */
/* Hidden on desktop — shown only inside the mobile slide-out panel */
.wg-nav-section { display: none; }

@media (max-width: 640px) {
  .wg-nav-section { display: block; }

  .wg-nav-header-item {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(62, 140, 90, 0.35);
  }
  .wg-nav-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wg-green-hover);
    padding: 0 20px 10px;
    opacity: 0.9;
  }
  li.wg-nav-section a {
    color: var(--wg-green);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(62, 140, 90, 0.06);
    border-left: 2px solid rgba(74, 152, 104, 0.4);
  }
  li.wg-nav-section a:hover {
    color: var(--wg-green-hover);
    background: rgba(62, 140, 90, 0.14);
    border-left-color: var(--wg-green-hover);
  }
  li.wg-nav-section a.active {
    color: var(--wg-green-hover);
    background: rgba(62, 140, 90, 0.18);
    border-left-color: var(--wg-green-hover);
  }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
}
.hero-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: center;
}
.hero-image-wrap { position: relative; }
.hero-image-frame {
  width: 240px;
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--border);
  position: relative;
  z-index: 1;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-image-accent {
  position: absolute;
  top: 12px; left: 12px;
  width: 240px; height: 240px;
  border-radius: 20px;
  border: 2px solid var(--accent);
  opacity: 0.35;
  z-index: 0;
}
.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.outline {
  -webkit-text-stroke: 2px var(--white);
  color: transparent;
}
.hero-socials {
  display: flex;
  gap: 16px;
}
.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.25s var(--ease-out);
}
.hero-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(232, 148, 58, 0.15);
}

@media (max-width: 700px) {
  .hero { padding: 100px 20px 60px; min-height: auto; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    justify-items: center;
  }
  .hero-image-frame { width: 180px; height: 180px; }
  .hero-image-accent { width: 180px; height: 180px; }
  .hero-socials { justify-content: center; }
}

/* ============ ABOUT SECTION ============ */
.about {
  padding: 80px 0 100px;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}
.label-line {
  width: 48px;
  height: 1px;
  background: var(--accent);
}
.label-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.about-content { max-width: 780px; margin-bottom: 64px; }
.about-lead {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.55;
  margin-bottom: 28px;
}
.about-body p {
  color: var(--text-dim);
  font-size: 0.98rem;
  margin-bottom: 16px;
  line-height: 1.75;
}
.about-body p:last-child { margin-bottom: 0; }

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.skill-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--font-mono);
}
.skill-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 8px;
}
.skill-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 700px) {
  .about { padding: 60px 0 80px; }
  .skills-grid { grid-template-columns: 1fr; }
}

/* ============ PAGE HEADER (Gallery, etc.) ============ */
.page-header {
  padding: 140px 0 60px;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -0.03em;
}

@media (max-width: 700px) {
  .page-header { padding: 125px 0 40px; }
}

/* ============ GALLERY ============ */
.gallery-section { padding: 0 0 100px; }
.gallery-intro {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 40px;
  max-width: 520px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.gallery-item:hover img { transform: scale(1.05); }

/* Placeholder items */
.placeholder-item {
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-item:hover { transform: none; box-shadow: none; }
.placeholder-content {
  text-align: center;
  color: var(--text-dim);
  opacity: 0.5;
}
.placeholder-content svg { margin: 0 auto 12px; opacity: 0.4; }
.placeholder-content p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
}
.placeholder-content code {
  color: var(--accent);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gallery-item { aspect-ratio: 1; }
}
@media (max-width: 400px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-caption {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 16px;
  text-align: center;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 2rem;
  padding: 16px;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 10;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 16px; right: 24px; font-size: 2.5rem; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); font-size: 3rem; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.footer-email {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 8px;
  transition: all 0.25s;
}
.footer-email:hover {
  border-color: var(--accent);
  background: rgba(232, 148, 58, 0.08);
}

@media (max-width: 500px) {
  .footer-inner { justify-content: center; text-align: center; }
  .footer-left { flex-direction: column; gap: 8px; }
}

/* ============ GALLERY AUTH UI ============ */
.gallery-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.gallery-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.user-badge svg { opacity: 0.6; }
.logout-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.logout-btn:hover {
  color: #e85a5a;
  border-color: #e85a5a;
}
.nav-links .logout-link {
  color: var(--text-dim);
  opacity: 0.7;
}
.nav-links .logout-link:hover {
  color: #e85a5a;
  background: rgba(232, 90, 90, 0.08);
}

@media (max-width: 700px) {
  .gallery-header-row { flex-direction: column; align-items: flex-start; }
  .gallery-user-info { padding-bottom: 0; }
}

/* ============ PROFILE NAV LINK ============ */
.nav-profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  line-height: 0;
}
.nav-profile-link:hover,
.nav-profile-link.active { color: var(--white); background: var(--surface); }

/* ============ MESSAGES NAV LINK ============ */
.nav-msg-item {
  position: relative;
}
.nav-msg-link {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  line-height: 0;
}
.nav-msg-link:hover,
.nav-msg-link.active { color: var(--white); background: var(--surface); }
.msg-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}

/* ============ NOTIFICATION BELL ============ */
.nav-notif-item {
  position: relative;
}
.nav-notif-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 0.2s, background 0.2s;
  line-height: 0;
}
.nav-notif-btn:hover {
  color: var(--white);
  background: var(--surface);
}
.notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  z-index: 2000;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.notif-dropdown.open { display: block; }
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.notif-mark-all {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}
.notif-mark-all:hover { background: var(--surface); }
.notif-list {
  max-height: 300px;
  overflow-y: auto;
}
.notif-item {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface); }
.notif-item.unseen { background: rgba(123, 94, 167, 0.09); }
.notif-item.unseen:hover { background: rgba(123, 94, 167, 0.16); }
.notif-item-text {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 3px;
}
.notif-item-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.notif-empty {
  padding: 22px 14px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.notif-footer-link {
  display: block;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.notif-footer-link:hover {
  color: var(--accent);
  background: var(--surface);
}
@media (max-width: 640px) {
  .notif-dropdown { width: min(300px, calc(100vw - 32px)); right: -8px; }
}

/* ============ NOTIFICATION SETTINGS PAGE ============ */
.forum-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.forum-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.forum-settings-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3px;
}
.forum-settings-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.forum-settings-section-title {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 28px 0 12px;
}
.forum-toggle-btn {
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.forum-toggle-btn.on  { background: var(--accent); color: #fff; }
.forum-toggle-btn.off { background: var(--surface); color: var(--text-dim); border: 1px solid var(--border); }
.forum-toggle-btn.on:hover  { background: var(--accent-hover); }
.forum-toggle-btn.off:hover { color: var(--text); }

/* ============ SUBSCRIBE BUTTON (thread page) ============ */
.forum-thread-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.forum-subscribe-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.forum-subscribe-btn:hover { color: var(--text); border-color: var(--accent); }
.forum-subscribe-btn.subscribed {
  background: rgba(74, 152, 104, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}
.forum-subscribe-btn.subscribed:hover {
  background: var(--surface);
  color: var(--text-dim);
  border-color: var(--border);
}

/* ============ PWA INSTALL BAR ============ */
.pwa-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
}
.pwa-bar.visible { transform: translateY(0); }
.pwa-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.pwa-bar-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  white-space: nowrap;
}
.pwa-bar-logo .dot { color: var(--accent); }
.pwa-bar-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pwa-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pwa-install-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 7px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.pwa-install-btn:hover { background: var(--accent-hover); }
.pwa-dismiss-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}
.pwa-dismiss-btn:hover { color: var(--white); }

@media (max-width: 500px) {
  .pwa-bar { padding: 10px 16px; gap: 10px; }
  .pwa-bar-text { display: none; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-tag       { animation: fadeUp 0.7s var(--ease-out) 0.1s both; }
.hero-title     { animation: fadeUp 0.7s var(--ease-out) 0.2s both; }
.hero-socials   { animation: fadeUp 0.7s var(--ease-out) 0.35s both; }
.hero-image-frame { animation: fadeUp 0.7s var(--ease-out) 0.15s both; }
.hero-image-accent { animation: fadeUp 0.7s var(--ease-out) 0.25s both; }
.page-title     { animation: fadeUp 0.7s var(--ease-out) 0.15s both; }
