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

:root {
  --font-display: 'Figtree', sans-serif;
  --font-body: 'Figtree', sans-serif;
  --radius: 18px;
  --container: 1080px;
  --container-wide: 1720px;
}

[data-theme="dark"] {
  --bg-a: #090d16;
  --bg-b: #101827;
  --bg-c: #0f1420;
  --surface: rgba(17, 24, 38, 0.72);
  --surface-strong: rgba(17, 24, 38, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2ff;
  --text-muted: #aab3c5;
  --text-faint: #6d7688;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --glow-a: rgba(139, 92, 246, 0.16);
  --glow-b: rgba(59, 130, 246, 0.12);
  --glow-c: rgba(34, 197, 94, 0.08);
  --logo: #ffffff;
  --input-bg: rgba(255, 255, 255, 0.03);
  --input-focus: rgba(124, 140, 255, 0.26);
}

[data-theme="dim"] {
  --bg-a: #13141c;
  --bg-b: #181a25;
  --bg-c: #11131a;
  --surface: rgba(30, 31, 40, 0.76);
  --surface-strong: rgba(30, 31, 40, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --text-faint: #70788a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --glow-a: rgba(139, 92, 246, 0.12);
  --glow-b: rgba(59, 130, 246, 0.10);
  --glow-c: rgba(34, 197, 94, 0.07);
  --logo: #e5e7eb;
  --input-bg: rgba(255, 255, 255, 0.035);
  --input-focus: rgba(124, 140, 255, 0.22);
}

[data-theme="light"] {
  --bg-a: #f5f7fc;
  --bg-b: #edf1f8;
  --bg-c: #f7f4fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(10, 15, 25, 0.03);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #111827;
  --text-muted: #5b6476;
  --text-faint: #8a94a8;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.09);
  --glow-a: rgba(139, 92, 246, 0.10);
  --glow-b: rgba(59, 130, 246, 0.08);
  --glow-c: rgba(34, 197, 94, 0.06);
  --logo: #111827;
  --input-bg: rgba(15, 23, 42, 0.03);
  --input-focus: rgba(124, 140, 255, 0.18);
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, var(--glow-a), transparent 26%),
    radial-gradient(circle at 86% 16%, var(--glow-b), transparent 22%),
    radial-gradient(circle at 50% 90%, var(--glow-c), transparent 28%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b) 52%, var(--bg-c));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18) 0 1px, transparent 1.4px),
    radial-gradient(circle at 80% 25%, rgba(255,255,255,0.12) 0 1px, transparent 1.4px),
    radial-gradient(circle at 40% 75%, rgba(255,255,255,0.10) 0 1px, transparent 1.4px);
  background-size: 160px 160px, 220px 220px, 260px 260px;
  animation: grainShift 18s linear infinite;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: screen;
  animation: floaty 16s ease-in-out infinite;
}

.orb.a { width: 420px; height: 420px; left: -120px; top: -100px; background: rgba(139, 92, 246, 0.35); }
.orb.b { width: 340px; height: 340px; right: -120px; top: 120px; background: rgba(59, 130, 246, 0.28); animation-delay: -5s; }
.orb.c { width: 300px; height: 300px; left: 35%; bottom: -120px; background: rgba(34, 197, 94, 0.20); animation-delay: -9s; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

.wrap-wide {
  width: min(var(--container-wide), calc(100% - 2rem));
}

.home-wrap main,
.admin-wrap main {
  width: 100%;
}

nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0.25rem 0;
  backdrop-filter: blur(18px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--logo);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: opacity 0.18s ease;
}

.brand:hover {
  opacity: 0.82;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.96) 0%, rgba(79, 70, 229, 0.96) 100%);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.26);
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark::before {
  content: "🐸";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(134, 239, 172, 0.55)) drop-shadow(0 1px 0 rgba(255,255,255,0.18));
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  pointer-events: none;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.brand-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.admin-link {
  text-decoration: none;
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.68rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-menu {
  position: relative;
}

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(12px);
}

.nav-menu-btn:hover,
.nav-menu.open .nav-menu-btn {
  border-color: rgba(139,92,246,0.55);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12), 0 2px 8px rgba(0,0,0,0.14);
}

.nav-menu-btn-copy {
  display: grid;
  gap: 0.05rem;
  text-align: left;
  min-width: 0;
}

.nav-menu-btn-user {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}

.nav-menu-btn-role {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.nav-menu-chev {
  width: 12px;
  height: 12px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s ease;
}

.nav-menu.open .nav-menu-chev {
  transform: rotate(180deg);
}

.nav-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 48px rgba(0,0,0,0.26), 0 0 0 1px rgba(139,92,246,0.10);
  backdrop-filter: blur(20px);
  padding: 0.5rem;
  display: none;
  overflow: hidden;
  z-index: 60;
}

.nav-menu.open .nav-menu-dropdown {
  display: block;
}

.nav-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.nav-menu-item:hover {
  background: var(--surface-soft);
  border-color: var(--border);
}

.nav-menu-item.danger {
  color: var(--error, #f87171);
}

.nav-menu-item.danger:hover {
  border-color: rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.06);
}

.theme-picker { position: relative; }

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    var(--surface-strong);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(12px);
}

.theme-btn:hover,
.theme-picker.open .theme-btn {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12), 0 2px 8px rgba(0,0,0,0.14);
}

.theme-btn:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.7);
  outline-offset: 2px;
}

.theme-icon {
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.18));
}

.theme-label {
  min-width: 3.05rem;
  text-align: left;
  color: var(--text);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.chev {
  width: 12px;
  height: 12px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s ease, stroke 0.3s ease;
}

.theme-picker.open .chev { transform: rotate(180deg); }

.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 200px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 48px rgba(0,0,0,0.26), 0 0 0 1px rgba(139,92,246,0.10);
  backdrop-filter: blur(20px);
  padding: 0.5rem;
  display: none;
  overflow: hidden;
}

.theme-picker.open .theme-menu { display: block; }

.theme-option {
  width: 100%;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.theme-option:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border-color: var(--border-strong);
}

.theme-option.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.10));
  border-color: rgba(139,92,246,0.35);
  color: var(--text);
  font-weight: 700;
}

.theme-option:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.7);
  outline-offset: -2px;
}

.theme-swatch {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.12);
}

[data-theme="light"] .theme-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(246,249,255,0.86)),
    rgba(255,255,255,0.96);
  border-color: rgba(15,23,42,0.16);
  box-shadow: 0 8px 20px rgba(15,23,42,0.08);
}

[data-theme="light"] .theme-label,
[data-theme="light"] .theme-option {
  color: #0f172a;
}

[data-theme="light"] .theme-option {
  background: rgba(15,23,42,0.02);
  border-color: rgba(15,23,42,0.06);
}

[data-theme="light"] .theme-option:hover {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.18);
}

[data-theme="dim"] .theme-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)),
    rgba(30,31,40,0.92);
}

.swatch-dark {
  background: linear-gradient(135deg, #090d16 50%, #101827);
  border-color: rgba(255,255,255,0.12);
}

.swatch-dim {
  background: linear-gradient(135deg, #13141c 50%, #181a25);
  border-color: rgba(255,255,255,0.10);
}

.swatch-light {
  background: linear-gradient(135deg, #f5f7fc 50%, #edf1f8);
  border-color: rgba(0,0,0,0.10);
}

.hero {
  padding: 4.5rem 0 1.8rem;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-faint);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.eyebrow.centered {
  width: 100%;
  justify-content: center;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--text-faint);
  opacity: 0.75;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-bottom: 0.85rem;
}

.intro {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.75;
  white-space: pre-line;
}

.scroll-indicator {
  margin: 1.4rem auto 0;
  width: 26px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  box-shadow: var(--shadow);
}

.scroll-indicator::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  animation: scrollDot 1.8s ease-in-out infinite;
}

.split {
  height: 1px;
  background: var(--border);
  margin: 1.9rem 0;
}

.section-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.85rem;
}

.centered-label {
  width: 100%;
  text-align: center;
}

.about p {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--text-muted);
  max-width: 760px;
}

.about p + p {
  margin-top: 0.55rem;
}

.login-shell {
  width: min(520px, 100%);
  display: grid;
  gap: 1rem;
}

.login-brand {
  justify-content: center;
}

.login-card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.contact-card {
  width: min(100%, 920px);
  max-width: 100%;
  margin: 0 auto;
}

.contact {
  display: grid;
  justify-items: center;
}

.contact-intro {
  max-width: 640px;
  text-align: center;
  margin-bottom: 1.2rem;
}

.contact-feedback {
  display: none;
  align-items: center;
  gap: 0.9rem;
  border-radius: 16px;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.contact-feedback.visible {
  display: flex;
}

.contact-feedback-badge {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.contact-feedback-text {
  display: grid;
  gap: 0.15rem;
}

.contact-feedback-text strong {
  font-size: 0.88rem;
}

.contact-feedback-text span {
  font-size: 0.78rem;
  line-height: 1.55;
}

.contact-feedback-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.32);
}

.contact-feedback-success .contact-feedback-badge {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.contact-feedback-success .contact-feedback-text strong {
  color: #bbf7d0;
}

.contact-feedback-success .contact-feedback-text span {
  color: #86efac;
}

.contact-feedback-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.32);
}

.contact-feedback-error .contact-feedback-badge {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.contact-feedback-error .contact-feedback-text strong {
  color: #fecaca;
}

.contact-feedback-error .contact-feedback-text span {
  color: #fca5a5;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 35%, rgba(255,255,255,0.015));
  pointer-events: none;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.field label {
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
  resize: vertical;
  appearance: none;
  -webkit-appearance: none;
}

.simple-check {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  min-height: 2.5rem;
  cursor: pointer;
}

.simple-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.simple-check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.simple-check-box::before {
  content: "x";
  color: var(--text-faint);
  font-size: 0.8rem;
  font-weight: 700;
}

.simple-check input:checked + .simple-check-box {
  border-color: rgba(34,197,94,0.55);
  background: rgba(34,197,94,0.16);
}

.simple-check input:checked + .simple-check-box::before {
  content: "✓";
  color: #86efac;
}

.simple-check-text {
  font-size: 0.84rem;
  color: var(--text);
}

.simple-check .when-on {
  display: none;
}

.simple-check input:checked ~ .simple-check-text .when-off {
  display: none;
}

.simple-check input:checked ~ .simple-check-text .when-on {
  display: inline;
}

.field select {
  background-color: var(--bg-b);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' opacity='0.5'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.4rem;
  cursor: pointer;
  color: var(--text);
  border-color: var(--border-strong);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(124, 140, 255, 0.10);
}

.password-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pw-toggle {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  cursor: pointer;
}

.send-btn {
  margin-top: 0.95rem;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.05rem;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  box-shadow: 0 14px 30px rgba(59,130,246,0.22);
  font: inherit;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(59,130,246,0.28);
}

.send-btn:disabled,
.ghost-btn:disabled {
  cursor: wait;
  opacity: 0.78;
}

.back-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--text-faint);
  text-decoration: none;
  font-size: 0.8rem;
}

.form-note {
  margin-top: 0.75rem;
  color: var(--text-faint);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

.admin-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(380px, 1fr));
  gap: 1.1rem;
}

.panel-box {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.ghost-btn {
  margin-top: 0.95rem;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.85rem 1.05rem;
  cursor: pointer;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-weight: 600;
}

.admin-card-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.mini-item {
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 0.8rem 0.9rem;
}

.mini-item[draggable="true"] {
  cursor: grab;
}

.mini-item.dragging {
  opacity: 0.55;
  border-color: rgba(34,197,94,0.42);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.10);
}

.mini-item strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.18rem;
}

.mini-item span {
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-chip,
.tag-pill {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.tag-chip.active {
  border-color: rgba(139,92,246,0.75);
  background: linear-gradient(135deg, rgba(139,92,246,0.34), rgba(59,130,246,0.20));
  box-shadow: 0 0 0 2px rgba(139,92,246,0.18);
  color: var(--text);
  font-weight: 700;
}

/* Per-tag colour palette – deterministic mapping in app.js */
.tag-violet { background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.35); color: #c4b5fd; }
.tag-blue   { background: rgba(59,130,246,0.15);  border-color: rgba(59,130,246,0.35);  color: #93c5fd; }
.tag-cyan   { background: rgba(6,182,212,0.15);   border-color: rgba(6,182,212,0.35);   color: #67e8f9; }
.tag-green  { background: rgba(34,197,94,0.15);   border-color: rgba(34,197,94,0.35);   color: #86efac; }
.tag-amber  { background: rgba(245,158,11,0.15);  border-color: rgba(245,158,11,0.35);  color: #fcd34d; }
.tag-red    { background: rgba(239,68,68,0.15);   border-color: rgba(239,68,68,0.35);   color: #fca5a5; }
.tag-rose   { background: rgba(244,63,94,0.15);   border-color: rgba(244,63,94,0.35);   color: #fda4af; }
.tag-orange { background: rgba(249,115,22,0.15);  border-color: rgba(249,115,22,0.35);  color: #fdba74; }

[data-theme="light"] .tag-violet { color: #6d28d9; }
[data-theme="light"] .tag-blue   { color: #1d4ed8; }
[data-theme="light"] .tag-cyan   { color: #0e7490; }
[data-theme="light"] .tag-green  { color: #15803d; }
[data-theme="light"] .tag-amber  { color: #b45309; }
[data-theme="light"] .tag-red    { color: #b91c1c; }
[data-theme="light"] .tag-rose   { color: #be123c; }
[data-theme="light"] .tag-orange { color: #c2410c; }

/* Tag colour picker */
.tag-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tag-color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.tag-color-swatch:hover {
  transform: scale(1.12);
}

.tag-color-swatch.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}

.tag-color-swatch[data-color="tag-violet"] { background: rgba(139,92,246,0.55); }
.tag-color-swatch[data-color="tag-blue"]   { background: rgba(59,130,246,0.55); }
.tag-color-swatch[data-color="tag-cyan"]   { background: rgba(6,182,212,0.55); }
.tag-color-swatch[data-color="tag-green"]  { background: rgba(34,197,94,0.55); }
.tag-color-swatch[data-color="tag-amber"]  { background: rgba(245,158,11,0.55); }
.tag-color-swatch[data-color="tag-red"]    { background: rgba(239,68,68,0.55); }
.tag-color-swatch[data-color="tag-rose"]   { background: rgba(244,63,94,0.55); }
.tag-color-swatch[data-color="tag-orange"] { background: rgba(249,115,22,0.55); }

@keyframes floaty { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(18px,-14px,0) scale(1.05); } }
@keyframes grainShift { 0% { transform: translate(0,0); } 50% { transform: translate(-1%,1%); } 100% { transform: translate(0,0); } }
@keyframes scrollDot { 0% { transform: translate(-50%, 0); opacity: 0.2; } 45% { opacity: 1; } 100% { transform: translate(-50%, 16px); opacity: 0; } }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 28vw, 360px), 1fr));
  gap: 1.1rem;
  margin-top: 1.2rem;
}

.work-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.work-section-copy {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  max-width: 560px;
}

.work-toggle {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.work-toggle-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.work-toggle-btn:hover,
.work-toggle-btn.active {
  border-color: rgba(139,92,246,0.42);
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(34,197,94,0.10));
  color: var(--text);
}

.projects-grid.loading {
  grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 28vw, 360px), 1fr));
}

.project-skeleton {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.project-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-line,
.skeleton-icon {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}

.skeleton-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.skeleton-line {
  height: 0.85rem;
  margin-bottom: 0.7rem;
}

.skeleton-line.short { width: 36%; }
.skeleton-line.medium { width: 68%; }
.skeleton-line.long { width: 100%; }

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.project-card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 1.2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow), 0 0 0 1px var(--border-strong);
}

.project-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.project-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-date {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.projects-empty {
  color: var(--text-faint);
  font-size: 0.85rem;
  padding: 1rem 0;
}

.timeline-wrap main {
  width: 100%;
}

.timeline-hero {
  padding-bottom: 1rem;
}

.timeline-section {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 1.35rem;
  padding: 1rem 0 0;
}

.timeline-list.loading {
  width: min(720px, 100%);
  margin: 0 auto;
}

.home-timeline-list {
  width: min(1180px, 100%);
  margin: 1.3rem auto 0;
}

.timeline-rail {
  position: absolute;
  top: 1rem;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.timeline-progress {
  position: absolute;
  inset: 0 0 auto;
  height: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #8b5cf6, #22c55e);
  box-shadow: 0 0 22px rgba(34,197,94,0.24);
  transition: height 0.12s linear;
}

.timeline-year {
  position: relative;
  z-index: 3;
  justify-self: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,0.34);
  background:
    linear-gradient(135deg, rgba(139,92,246,0.22), rgba(34,197,94,0.12)),
    var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow), 0 0 24px rgba(34,197,94,0.12);
  padding: 0.48rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: start;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.timeline-entry.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-entry:nth-of-type(even) .timeline-card {
  grid-column: 3;
}

.timeline-entry:nth-of-type(odd) .timeline-card {
  grid-column: 1;
}

.timeline-dot {
  grid-column: 2;
  justify-self: center;
  width: 18px;
  height: 18px;
  margin-top: 1.25rem;
  border-radius: 999px;
  border: 2px solid rgba(34,197,94,0.62);
  background: linear-gradient(135deg, #8b5cf6, #22c55e);
  box-shadow: 0 0 0 8px rgba(139,92,246,0.12), 0 0 24px rgba(34,197,94,0.28);
  z-index: 2;
}

.timeline-card {
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(139,92,246,0.12), transparent 34%, rgba(34,197,94,0.07)),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: clamp(1rem, 2vw, 1.35rem);
  min-width: 0;
}

.timeline-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.timeline-date,
.timeline-type,
.timeline-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.34rem 0.62rem;
}

.timeline-type {
  border-color: rgba(139,92,246,0.34);
  color: #c4b5fd;
}

.timeline-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 0.45rem;
}

.timeline-project {
  color: var(--text-faint);
  font-size: 0.76rem;
  margin-bottom: 0.7rem;
}

.timeline-project-desc,
.timeline-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.timeline-note {
  border-radius: 16px;
  border: 1px solid rgba(139,92,246,0.24);
  background: rgba(139,92,246,0.08);
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.timeline-note span {
  display: block;
  color: var(--text-faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.timeline-note p {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-line;
}

.timeline-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.timeline-detail {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.035);
  padding: 0.85rem;
}

.timeline-detail span {
  display: block;
  color: var(--text-faint);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.timeline-detail p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre-line;
}

.timeline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.timeline-link {
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.timeline-link:hover {
  border-color: rgba(34,197,94,0.38);
  transform: translateY(-1px);
}

.timeline-empty {
  width: min(720px, 100%);
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  text-align: center;
}

.timeline-empty strong {
  display: block;
  margin-bottom: 0.35rem;
}

.timeline-empty span {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-note {
  margin-top: 0.65rem;
  color: var(--text-faint);
  font-size: 0.75rem;
  line-height: 1.6;
}

.contact-grid .simple-check,
.contact-modal-card .simple-check {
  margin-top: 0.45rem;
}

.contact-grid .simple-check .simple-check-text,
.contact-modal-card .simple-check .simple-check-text {
  font-size: 0.76rem;
  color: var(--text-muted);
}

footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .timeline-rail {
    left: 12px;
  }

  .timeline-entry,
  .timeline-entry:nth-of-type(even),
  .timeline-entry:nth-of-type(odd) {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .timeline-entry:nth-of-type(even) .timeline-card,
  .timeline-entry:nth-of-type(odd) .timeline-card,
  .timeline-card {
    grid-column: 2;
  }

  .timeline-dot {
    grid-column: 1;
  }

  .timeline-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .admin-layout {
    grid-template-columns: repeat(3, minmax(300px, 1fr));
  }
}

@media (min-width: 1500px) {
  .admin-layout {
    grid-template-columns: repeat(4, minmax(280px, 1fr));
  }
}

@media (max-width: 560px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .work-section-head,
  .work-toggle {
    width: 100%;
  }

  .work-toggle-btn {
    flex: 1;
  }

  .wrap,
  .wrap-wide {
    width: calc(100% - 1rem);
  }
}
