:root {
  --font-outfit: 'Outfit', sans-serif;
  --font-geist-mono: 'Geist Mono', monospace;
  --radius: 0.625rem;
  --background: #fff;
  --foreground: #141414;
  --header: #141414;
  --body: #575757;
  --body-secondary: #707070;
  --card: #f8f8f8;
  --card-foreground: #0a0a0a;
  --popover: #fff;
  --popover-foreground: #0a0a0a;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --secondary: #f5f5f5;
  --secondary-foreground: #171717;
  --muted: #f5f5f5;
  --muted-foreground: #707070;
  --accent: #f5f5f5;
  --accent-foreground: #171717;
  --destructive: #e40014;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --ring: #a1a1a1;
  --sidebar: #fafafa;
  --primary-brand: #2563eb;
  --secondary-brand: #1d4ed8;
  --footer-background: #eff6ff;
  --folder-bg: #dbeafe;
  --folder-footer-bg: #eef5ff;
}

html.dark {
  --background: #141414;
  --foreground: #fff;
  --header: #fff;
  --popover: #171717;
  --popover-foreground: #fafafa;
  --primary: #e5e5e5;
  --primary-foreground: #171717;
  --secondary: #262626;
  --secondary-foreground: #fafafa;
  --accent: #262626;
  --accent-foreground: #fafafa;
  --destructive: #ff6568;
  --input: rgba(255,255,255,0.15);
  --ring: #737373;
  --sidebar: #171717;
  --primary-brand: #60a5fa;
  --secondary-brand: #bfdbfe;
  --footer-background: #111;
  --folder-bg: #1e3a8a;
  --folder-footer-bg: #1d4ed8;
  --card: #f8f8f8;
  --card-foreground: #0a0a0a;
  --body: #575757;
  --body-secondary: #707070;
  --muted: #f5f5f5;
  --muted-foreground: #707070;
  --border: #e5e5e5;
}

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

html {
  font-family: var(--font-outfit);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--footer-background);
  color: var(--foreground);
  font-family: var(--font-outfit);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; background: none; border: none; font-family: inherit; }
img { display: block; max-width: 100%; }
html, body { overflow-x: hidden; }

.site-wrapper {
  width: 100%;
  min-height: 100vh;
  background-color: var(--footer-background);
}

.main-surface {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  border-radius: 0 0 12px 12px;
  background:
    radial-gradient(800px 300px at 50% 0%, color-mix(in srgb, var(--primary-brand) 15%, transparent) 0%, transparent 100%),
    linear-gradient(to right, color-mix(in srgb, var(--primary-brand) 4%, transparent) 0%, transparent 150px),
    linear-gradient(to left, color-mix(in srgb, var(--primary-brand) 4%, transparent) 0%, transparent 150px),
    var(--background);
}

nav {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem 2rem;
  background: transparent;
}

.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  color: var(--body);
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger:hover { color: var(--header); }
.nav-hamburger:focus { outline: none; }
.nav-hamburger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary-brand) 50%, transparent);
  outline-offset: 2px;
}
.nav-hamburger svg { pointer-events: none; }
.nav-link.gift-nav.nav-mobile-gift { display: none; }

.mobile-menu {
  position: absolute;
  top: calc(100% - 0.25rem);
  right: 1rem;
  z-index: 50;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  padding: 0.5rem;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.mobile-menu[hidden] { display: none; }
.mobile-link {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  color: var(--header);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.15s;
}
.mobile-link:active { background: var(--muted); }
.mobile-menu-socials {
  display: flex;
  gap: 0.25rem;
  padding: 0.4rem 0.4rem 0.2rem;
  border-top: 1px solid var(--border);
  margin-top: 0.35rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-self: start;
}

.nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-style: dotted;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--header);
  text-decoration: underline;
  text-decoration-style: dotted;
}

.nav-link.active {
  color: var(--header);
  font-weight: 600;
}

.nav-link.gift-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 0.875rem;
  background: var(--primary-brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--primary-brand) 24%, transparent);
}

.nav-link.gift-nav:hover,
.nav-link.gift-nav.active {
  color: #fff;
  text-decoration: none;
  background: var(--secondary-brand);
}

.nav-logo {
  justify-self: center;
  color: var(--primary-brand);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  color: var(--body);
  transition: color 0.15s, background-color 0.15s;
  text-decoration: none;
}

.icon-btn:hover { color: var(--header); }
.icon-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ring) 50%, transparent);
  outline-offset: 2px;
}
.icon-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  pointer-events: none;
}

.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border);
  margin-left: 0.75rem;
  padding-left: 0.75rem;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
}

.page-body {
  padding: 1.5rem;
  padding-bottom: 5rem;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-section {
  width: 100%;
  max-width: 1100px;
}

footer {
  position: sticky;
  bottom: 0;
  display: flex;
  height: 160px;
  width: 100%;
  background-color: var(--footer-background);
  padding: 3rem;
  justify-content: center;
  align-items: flex-end;
}

footer .footer-inner {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

@media (max-width: 639px) {
  .nav-left, .nav-right { display: none; }
  nav { grid-template-columns: 1fr auto 1fr; }
  .nav-link.gift-nav.nav-mobile-gift { display: inline-flex; justify-self: start; }
  .nav-hamburger { display: inline-flex; justify-self: end; }
  .nav-logo { justify-self: center; }
}

@media (min-width: 640px) {
  nav { padding: 1rem 3rem; }
  .page-body { padding: 2rem; padding-bottom: 5rem; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s cubic-bezier(0, 0, 0.2, 1) both;
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.4s; }
.delay-9 { animation-delay: 0.45s; }
.delay-10 { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .animate-in { animation: none; }
}
