/* ============================================================
   Damian Hall-Beal — Personal Site
   Warm theatrical dark theme with sidebar layout
   ============================================================ */

/* ----- Theme Variables ----- */
/* Dark palette — matches poetry.hbidamian.xyz */
:root {
    --eg-0:         #1e2124;
    --eg-1:         #282b30;
    --eg-2:         #36393e;
    --eg-3:         #424549;

    --bg:            var(--eg-0);
    --bg-surface:    var(--eg-1);
    --bg-elevated:   var(--eg-2);
    --bg-highest:    var(--eg-3);

    --border:        rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.12);

    --text:          #E5E7EB;
    --text-secondary:#9CA3AF;
    --text-muted:    #6B7280;

    --accent:        #d4a248;
    --accent-soft:   rgba(212,162,72,0.10);
    --accent-glow:   rgba(212,162,72,0.22);

    --font-body:     'Inter', system-ui, -apple-system, sans-serif;
    --font-heading:  'Playfair Display', Georgia, serif;
    --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

    --radius:        6px;
    --radius-lg:     12px;

    --sidebar-w:     240px;
}

/* Light — warm paper tones with clear separation between layers */
[data-theme="light"] {
    --eg-0:         #f8f7f4;
    --eg-1:         #ffffff;
    --eg-2:         #f0efe9;
    --eg-3:         #e6e4dd;

    --bg:            var(--eg-0);
    --bg-surface:    var(--eg-1);
    --bg-elevated:   var(--eg-2);
    --bg-highest:    var(--eg-3);

    --border:        rgba(0,0,0,0.08);
    --border-strong: rgba(0,0,0,0.14);

    --text:          #1a1a20;
    --text-secondary:#5e5e6e;
    --text-muted:    #9696a3;

    --accent-soft:   rgba(180,140,50,0.10);
    --accent-glow:   rgba(180,140,50,0.15);
}

/* ----- Reset ----- */
*,*::before,*::after{box-sizing:border-box}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: var(--eg-0);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px 28px;
}

/* Logo */
.sidebar__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 48px;
    display: block;
    transition: color 0.2s;
    letter-spacing: -0.01em;
}

.sidebar__logo:hover {
    color: var(--accent);
}

/* Navigation */
.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: all 0.15s;
    margin: 0 -8px;
}

.sidebar__link:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.sidebar__external-icon {
    opacity: 0.4;
    flex-shrink: 0;
}

/* Bottom section */
.sidebar__bottom {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-body);
    transition: all 0.2s;
    width: 100%;
}

.theme-toggle:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.theme-toggle__sun,
.theme-toggle__moon {
    flex-shrink: 0;
    transition: opacity 0.3s;
}

[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__sun { display: none; }

/* Social icons in sidebar */
.sidebar__socials {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.sidebar__social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all 0.15s;
    font-size: 0.75rem;
}

.sidebar__social:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    padding: 0 0 80px;
    background: var(--bg);
    overflow-x: hidden;
}

/* ============================================================
   MOBILE NAV TOGGLE
   ============================================================ */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 60;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all 0.2s;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 80px 64px;
    position: relative;
    width: 100%;
}

.hero__image-wrap {
    margin-bottom: 40px;
}

.hero__image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
}

.hero__kicker {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 20px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.hero__aliases {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 40px;
    font-style: italic;
}

.hero__aliases span {
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--accent);
    color: var(--eg-0);
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
    padding: 100px 64px;
    width: 100%;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

.section-lede {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: -12px 0 32px;
    line-height: 1.6;
}

.section-lede span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
}

@media (min-width: 640px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-grid__image img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.about-grid__text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.7;
}

.about-grid__text strong {
    color: var(--text);
    font-weight: 600;
}

/* About stat chips */
.about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.about-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 150px;
    transition: border-color 0.2s;
}

.about-stat:hover {
    border-color: var(--accent);
}

.about-stat__icon {
    font-size: 1.3rem;
}

.about-stat__text em {
    font-style: normal;
    font-weight: 600;
    color: var(--text);
}

/* ============================================================
   PODCAST
   ============================================================ */
.podcast-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.podcast-card__header {
    background: linear-gradient(135deg, var(--eg-1) 0%, var(--eg-2) 50%, var(--eg-3) 100%);
    padding: 48px 48px;
    text-align: center;
    border-bottom: 1px solid var(--border-strong);
}

@media (max-width: 768px) {
    .podcast-card__header {
        padding: 28px 16px;
    }
    .podcast-card__body {
        padding: 16px 12px;
    }
    .podcast-card__title {
        font-size: 1.4rem;
    }
    .podcast-card__subtitle {
        font-size: 0.9rem;
    }
    .podcast-meta__col {
        padding: 14px;
    }
    .podcast-embed {
        margin: 20px 0;
    }
}

.podcast-card__emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.podcast-card__title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.podcast-card__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.podcast-card__tag {
    display: inline-block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.podcast-card__body {
    padding: 40px 48px;
}

.podcast-card__body > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 12px;
}

.podcast-card__body strong {
    color: var(--text);
}

/* Host + Production meta */
.podcast-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 28px 0;
}

@media (min-width: 480px) {
    .podcast-meta {
        grid-template-columns: 1fr 1fr;
    }
}

.podcast-meta__col {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.podcast-meta__col h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
}

.podcast-meta__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.podcast-meta__col li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 3px 0;
}

.podcast-meta__col li::before {
    content: '— ';
    color: var(--text-muted);
}

.podcast-meta__col li.is-me {
    color: var(--accent);
    font-weight: 600;
}

.podcast-meta__col li.is-me::before {
    color: var(--accent);
}

.podcast-meta__col p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.podcast-meta__col p strong {
    color: var(--text);
}

.podcast-meta__sub {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
}

/* Episode embed */
.podcast-embed {
    margin: 28px auto;
    overflow: hidden;
    max-width: 900px;
    width: 100%;
}

.podcast-embed h4 {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 16px;
    color: var(--text-secondary);
}

.podcast-embed__frame {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 100px;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.podcast-embed__frame iframe,
.podcast-embed__frame > * {
    max-width: 100% !important;
}

/* Platform buttons */
.podcast-platforms h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 16px;
}

.podcast-platforms__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.platform-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.15s;
}

.platform-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.platform-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #fff;
}

.platform-btn__icon--spotify  { background: #1DB954; }
.platform-btn__icon--audible  { background: #f97316; }
.platform-btn__icon--youtube  { background: #ef4444; }

/* ============================================================
   MUSIC
   ============================================================ */
.music-embed {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    overflow: hidden;
}

.music-embed iframe,
.music-embed > * {
    max-width: 100% !important;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.contact-item:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.contact-item--wide {
    grid-column: 1 / -1;
}

.contact-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--accent);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.15s;
}

.contact-item:hover .contact-item__icon {
    background: var(--accent);
    color: var(--eg-0);
}

.contact-item__name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.contact-item__handle {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 40px 64px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    width: 100%;
}

@media (min-width: 480px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer nav a {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.15s;
}

.footer nav a:hover {
    color: var(--accent);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar--open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0,0,0,0.5);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .section {
        padding: 64px 24px;
    }

    /* Podcast section goes nearly edge-to-edge on mobile */
    #podcast.section {
        padding: 48px 0;
    }

    #podcast .section-heading {
        padding: 0 16px;
    }

    #podcast .podcast-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .hero {
        padding: 80px 24px;
    }

    .footer {
        padding: 40px 24px;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
