:root {
    --bg: #0a0a0a;
    --bg-card: #141414;
    --bg-border: #2a2a2a;
    --cream: #f0e6d0;
    --cream-50: rgba(240,230,208,0.5);
    --cream-30: rgba(240,230,208,0.3);
    --orange: #ffb81c;
    --orange-bg: rgba(255,184,28,0.12);
    --gold: #d4a843;
    --green: #3d7a5a;
    --green-bright: #4a9a6a;
    --steel: #888888;
    --coral: #c94530;
    --reveal-bg: #0f1a14;
    --nav-bg: #050505;
    --nav-h: 48px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--cream);
    -webkit-font-smoothing: antialiased;
}

/* ===== TOP NAV ===== */
.nav-bar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--bg-border);
    display: flex; align-items: center; justify-content: center; gap: 4px;
    z-index: 1001;
    padding: 0 8px;
    padding-top: env(safe-area-inset-top, 0px);
}
.tab {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 9px; border-radius: 20px;
    background: none; border: none;
    color: var(--cream-30);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    cursor: pointer; transition: background 0.25s, color 0.25s;
    -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.tab-icon { font-size: 1.05rem; line-height: 1; }
.tab-label { font-size: 0.5rem; color: var(--cream-30); }
.tab.active { background: var(--orange-bg); color: var(--orange); box-shadow: 0 2px 0 var(--orange) inset; }
.tab.active .tab-label { color: var(--orange); }

/* ===== APP SHELL ===== */
.app {
    position: fixed; top: var(--nav-h); bottom: 0; left: 0; right: 0;
    overflow: hidden;
}
.page {
    position: absolute; inset: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    opacity: 0; pointer-events: none;
    display: flex; flex-direction: column; align-items: center;
    padding: 2rem 1.5rem 3rem;
}
.page.active { opacity: 1; pointer-events: auto; z-index: 1; }
.page-content { width: 100%; max-width: 440px; }

/* ===== GRAIN ===== */
.grain {
    position: fixed; inset: 0; pointer-events: none; z-index: 10000;
    opacity: 0.06; mix-blend-mode: overlay;
    background: repeat / 256px 256px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== SHARED ===== */
.page-header { text-align: center; margin-bottom: 2rem; }
.page-header h2 { font-family: 'Rye', Georgia, serif; font-size: clamp(1.5rem, 7vw, 2rem); color: var(--orange); }
.page-header p { font-family: 'Caveat', cursive; font-size: 1.15rem; color: var(--cream-50); margin-top: 0.25rem; }
.squiggle { display: block; width: 80px; height: 8px; margin: 0.75rem auto 0; }
.photo { width: 100%; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); margin: 1.25rem 0; display: block; }
.photo-row { display: flex; gap: 0.5rem; margin: 1.25rem 0; }
.photo-row .photo { flex: 1; min-width: 0; object-fit: cover; height: 280px; margin: 0; }
.photo-row .photo:only-child { height: auto; object-fit: contain; }
.photo-caption { font-family: 'Caveat', cursive; font-size: 0.85rem; color: var(--cream-30); text-align: center; margin-top: -0.5rem; margin-bottom: 1rem; }
.photo-strip { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 0.5rem 0 1rem; scrollbar-width: none; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip .photo { flex: 0 0 75%; scroll-snap-align: center; height: 240px; object-fit: cover; margin: 0; border-radius: 12px; }

/* ===== HOME ===== */
#home {
    justify-content: center; text-align: center;
    background: radial-gradient(ellipse at 50% 30%, rgba(255,184,28,0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 70%, rgba(136,136,136,0.04) 0%, transparent 50%), var(--bg);
}
.hero-snake-svg { width: 150px; max-width: 42vw; margin: 0 auto 1.25rem; filter: drop-shadow(0 2px 8px rgba(255,184,28,0.25)); }
.snake-body { stroke-dasharray: 400; stroke-dashoffset: 400; }
.snake-body.drawn { animation: drawSnake 1.8s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes drawSnake { to { stroke-dashoffset: 0; } }
.hero-pre { font-family: 'Caveat', cursive; font-size: clamp(1.3rem, 4vw, 1.7rem); color: var(--cream-50); margin-bottom: 0.1rem; }
.hero-title { font-family: 'Rye', Georgia, serif; font-size: clamp(2.2rem, 10vw, 3.6rem); line-height: 1.05; background: linear-gradient(135deg, var(--orange), var(--gold) 50%, var(--cream) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-tagline { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 0.85rem; color: var(--cream-30); margin-top: 0.75rem; }
.hero-player { width: 100%; max-width: 360px; margin: 1.25rem auto 0; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.35); }
.hero-player iframe { display: block; width: 100%; height: 152px; border: none; border-radius: 12px; }
.hero-player-hint { font-family: 'Caveat', cursive; font-size: 0.95rem; color: var(--cream-30); margin-top: 0.6rem; }
.swipe-hint { margin-top: 1.25rem; font-size: 0.68rem; color: var(--cream-30); letter-spacing: 0.05em; animation: pulse 2.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.25; } 50% { opacity: 0.65; } }

/* ===== WEEKEND ===== */
#weekend { background: var(--bg); }
.setlist-day { margin-bottom: 2rem; }
.setlist-day:last-child { margin-bottom: 0; }
.setlist-day h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.15rem; color: var(--gold); padding-bottom: 0.5rem; border-bottom: 1px solid var(--bg-border); margin-bottom: 0.75rem; }
.setlist-item { display: flex; gap: 1rem; padding: 0.5rem 0 0.5rem 1rem; align-items: baseline; border-left: 2px solid var(--bg-border); transition: border-color 0.3s; }
.setlist-item:hover { border-left-color: var(--orange); }
.setlist-time { font-weight: 700; color: var(--orange); font-size: 0.85rem; min-width: 68px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.setlist-event { font-size: 0.95rem; }

/* ===== MENU ===== */
#menu { background: var(--bg); }
.menu-card { background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: 12px; padding: 2rem 1.5rem; position: relative; overflow: hidden; }
.menu-card::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--bg-border); border-radius: 8px; pointer-events: none; }
.menu-ornament { text-align: center; color: var(--gold); letter-spacing: 0.4em; font-size: 0.55rem; padding: 0.75rem 0; }
.menu-top { text-align: center; padding: 0.5rem 0 1.25rem; border-bottom: 1px solid var(--bg-border); margin-bottom: 1.5rem; }
.menu-top h2 { font-family: 'Rye', Georgia, serif; font-size: clamp(1rem, 4.5vw, 1.3rem); color: var(--cream); }
.menu-top .motto { font-family: 'Caveat', cursive; color: var(--gold); font-size: 1.1rem; margin-top: 0.2rem; }
.menu-section { margin-bottom: 1.25rem; }
.menu-section:last-of-type { margin-bottom: 0; }
.menu-section-title { font-family: 'Rye', Georgia, serif; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--orange); text-align: center; margin-bottom: 1rem; }
.menu-item { text-align: center; margin-bottom: 0.9rem; }
.menu-item:last-child { margin-bottom: 0; }
.menu-item-name { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.05rem; }
.menu-item-desc { font-style: italic; font-size: 0.82rem; color: var(--cream-30); margin-top: 0.1rem; line-height: 1.4; }
.menu-rule { text-align: center; margin: 1rem 0; color: var(--bg-border); font-size: 1.5rem; letter-spacing: 0.5em; }

/* ===== PUBLICATIONS ===== */
#pubs { background: var(--bg); }
.pub-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2rem; }
.pub-stat { background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: 8px; padding: 0.5rem 0.8rem; text-align: center; font-size: 0.7rem; color: var(--cream-50); }
.pub-stat strong { display: block; font-family: 'Rye', Georgia, serif; font-size: 1.1rem; color: var(--orange); margin-bottom: 1px; }
.pub-bio { font-size: 0.8rem; color: var(--cream-50); text-align: center; margin-bottom: 1.5rem; line-height: 1.5; }
.pub-bio strong { color: var(--cream); }
.pub-year { font-family: 'Rye', Georgia, serif; font-size: 0.85rem; color: var(--gold); padding: 1.25rem 0 0.4rem; border-bottom: 1px solid var(--bg-border); margin-bottom: 0.5rem; }
.pub-year:first-child { padding-top: 0; }
.pub-item { display: block; text-decoration: none; color: var(--cream); padding: 0.55rem 0; border-bottom: 1px solid rgba(42,42,42,0.4); transition: background 0.2s; border-radius: 4px; }
.pub-item:active { background: var(--orange-bg); }
.pub-title { display: block; font-size: 0.8rem; line-height: 1.35; }
.pub-journal { display: block; font-size: 0.68rem; color: var(--orange); margin-top: 0.15rem; font-style: italic; }

/* Resume toggle */
.resume-toggle { position: sticky; top: 0; z-index: 10; background: var(--bg); display: flex; justify-content: center; gap: 0; margin-bottom: 1.5rem; padding: 0.5rem 0 0.75rem; }
.toggle-btn { flex: 1; max-width: 160px; padding: 9px 0; border: 1px solid var(--bg-border); background: none; color: var(--cream-30); font-family: 'DM Sans', sans-serif; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.25s; -webkit-tap-highlight-color: transparent; text-transform: uppercase; letter-spacing: 0.06em; }
.toggle-btn:first-child { border-radius: 20px 0 0 20px; }
.toggle-btn:last-child { border-radius: 0 20px 20px 0; border-left: none; }
.toggle-btn.active { background: var(--orange); color: var(--bg); border-color: var(--orange); }
.resume-mode { display: none; }
.resume-mode.active { display: block; }
.college-item { margin-bottom: 1rem; }
.college-label { font-family: 'Rye', Georgia, serif; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 0.2rem; }
.college-val { font-size: 0.95rem; line-height: 1.4; }
.college-val em { color: var(--cream-50); font-style: italic; font-size: 0.82rem; }
.fake-pub { padding: 0.5rem 0; border-bottom: 1px solid rgba(42,42,42,0.4); }
.fake-pub .pub-title { font-size: 0.82rem; }
.fake-pub .pub-journal { color: var(--steel); }

/* ===== GIFT ===== */
#gift { background: radial-gradient(ellipse at 50% 60%, rgba(255,184,28,0.06) 0%, transparent 60%), linear-gradient(180deg, #0d0d0d, var(--bg)); }
.gift-header { text-align: center; margin-bottom: 0.5rem; }
.gift-header h2 { font-family: 'Rye', Georgia, serif; font-size: clamp(1.5rem, 7vw, 2rem); color: var(--gold); }
.gift-lead { text-align: center; font-family: 'Caveat', cursive; font-size: 1.25rem; color: var(--cream-50); margin-bottom: 0.25rem; }
.gift-but { text-align: center; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 1.5rem; color: var(--cream); margin: 0.75rem 0 1.5rem; }
.gift-reveal-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 14px 32px; border: 2px solid var(--orange); border-radius: 50px;
    background: var(--orange-bg); color: var(--cream);
    font-family: 'Rye', Georgia, serif; font-size: 1rem;
    cursor: pointer; transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    animation: btnGlow 2s ease-in-out infinite;
}
@keyframes btnGlow { 0%,100% { box-shadow: 0 0 8px rgba(255,184,28,0.15); } 50% { box-shadow: 0 0 24px rgba(255,184,28,0.35); } }
.gift-reveal-btn:hover { background: rgba(255,184,28,0.25); transform: scale(1.05); box-shadow: 0 0 28px rgba(255,184,28,0.4); }
.gift-reveal-btn:active { transform: scale(0.97); }
.gift-reveal-btn-icon { font-size: 1.4rem; display: inline-block; animation: wiggle 1.5s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0deg) scale(1); } 25% { transform: rotate(-10deg) scale(1.1); } 75% { transform: rotate(10deg) scale(1.1); } }
.gift-reveal-btn.revealed { opacity: 0; pointer-events: none; height: 0; overflow: hidden; padding: 0; margin: 0; border: 0; }
.gift-reveal-panel { width: 100%; max-width: 440px; overflow: hidden; max-height: 0; opacity: 0; margin-top: 0; }
.gift-reveal-panel.open { margin-top: 1.5rem; }
.gift-video { width: 100%; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.35); margin-bottom: 1.5rem; }
.gift-video iframe { display: block; width: 100%; border: none; border-radius: 12px; }
.expo-card { display: block; background: #faf6ee; border-radius: 16px; padding: 2rem 1.5rem 1.75rem; text-align: center; text-decoration: none; color: #2d2d2d; box-shadow: 0 8px 32px rgba(0,0,0,0.25); transition: transform 0.3s; }
.expo-card:active { transform: scale(0.98); }
.expo-card img { max-width: 100%; height: auto; margin-bottom: 1.25rem; }
.expo-date { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.2rem; color: var(--gold); }
.expo-location { font-size: 0.9rem; color: #888; margin-top: 0.2rem; }
.expo-reveal { font-family: 'Rye', Georgia, serif; font-size: 1rem; color: var(--coral); margin-top: 1rem; }
.gift-coda { text-align: center; font-family: 'DM Sans', sans-serif; font-size: 0.75rem; color: var(--cream-30); margin-top: 1.5rem; font-style: italic; opacity: 0; }
.gift-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.gift-confetti span { position: absolute; display: block; width: 8px; height: 8px; border-radius: 1px; opacity: 0; }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }

/* ===== ANIM ===== */
.si { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .grain { display: none; } .si { opacity: 1; transform: none; } .snake-body { stroke-dashoffset: 0 !important; }
    .gift-reveal-btn-icon { animation: none; } .gift-reveal-btn { animation: none; } .gift-reveal-panel { max-height: none; opacity: 1; } .gift-coda { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 380px) {
    .page { padding: 1.5rem 1.25rem 2.5rem; }
    .menu-card { padding: 1.5rem 1rem; }
    .tab { padding: 6px 6px; gap: 3px; }
    .tab-icon { font-size: 0.95rem; }
}
@media (min-width: 768px) { .page-content { max-width: 520px; } }
