/* Color Tokens */
:root {
    /* Core brand (navy / teal family — committed) */
    --color-ink: #003249;
    --color-ink-soft: #2a4a5e;
    --color-teal: #007ea7;
    --color-teal-deep: #006187;
    --color-teal-900: #004f6e;
    --color-teal-light: #9ad1d4;
    --color-cyan: #0099cc;
    --color-accent: #80ced7;

    /* Text on dark/teal surfaces */
    --color-on-dark: #f1f6f8;
    --color-on-dark-muted: #ccdbdc;

    /* Surfaces */
    --color-surface: #ffffff;
    --color-surface-0: #f4f8f9;
    --color-surface-1: #e8f0f2;
    --color-surface-2: #d8e8eb;
    --color-tint: #e0f3f8;
    --color-border: #cfe2e5;
}

/* General Styles */
body {
    font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--color-ink);
    background-color: var(--color-on-dark-muted);
}

h1, h2, h3, h4 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Navbar Styles */
.nav-toggle {
    display: none;
}

.navbar {
    background-color: var(--color-teal-deep);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo a {
    color: var(--color-on-dark-muted);
    font-size: 1.5em;
    text-decoration: none;
    font-weight: bold;
}

.nav-links {
    list-style-type: none;
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    display: inline-block;
    padding: 6px 4px;
    color: var(--color-on-dark-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

.nav-links a.active {
    color: var(--color-accent);
    font-weight: 700;
}

/* Introduction Section */
.intro {
    background: linear-gradient(135deg, var(--color-teal-900) 0%, var(--color-teal) 60%, var(--color-cyan) 100%);
    color: var(--color-on-dark-muted);
    padding: clamp(60px, 10vw, 110px) 0;
}

.intro-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
}

.intro-eyebrow {
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin: 0 0 16px;
}

.intro h1 {
    font-size: clamp(2em, 4vw + 1em, 3.25em);
    color: var(--color-on-dark);
    margin: 0 0 20px;
}

.intro p {
    font-size: 1.15em;
    max-width: 50ch;
    margin: 0 0 30px;
}

.intro-photo {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--color-accent);
    justify-self: center;
}

.cta-button {
    background-color: var(--color-accent);
    color: var(--color-ink);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--color-teal);
    color: var(--color-on-dark);
}

/* Modules and Resources Sections */
.modules, .resources {
    padding: 60px 0;
}

.modules {
    background-color: var(--color-surface-0);
}

.resources {
    background-color: var(--color-surface-1);
}

.modules h2, .resources h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-ink);
}

.module-list, .resource-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Center a lone last item when there's an odd number */
.module:last-child:nth-child(odd),
.resource:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 10px);
    margin: 0 auto;
}

.module, .resource {
    background-color: var(--color-teal-light);
    width: auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: var(--color-ink);
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.module:hover, .resource:hover {
    transform: translateY(-5px);
}

.module-icon, .resource-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    color: var(--color-teal-deep);
}

.module-body, .resource-body {
    flex: 1;
    min-width: 0;
}

.module h3, .resource h3 {
    margin: 0 0 6px;
    font-size: 1.25em;
}

.module p, .resource p {
    margin: 0;
}

/* Talks Section */
.talks {
    padding: 60px 0;
    background-color: var(--color-surface-0);
    color: var(--color-ink);
}

.talks h2 {
    text-align: center;
    margin-bottom: 12px;
    color: var(--color-ink);
}

.talks-intro {
    max-width: 680px;
    margin: 0 auto 36px;
    font-size: 1.05em;
    text-align: center;
    color: var(--color-ink-soft);
    line-height: 1.7;
}

.talk-group-label {
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-teal-deep);
    max-width: 860px;
    margin: 0 auto 10px;
    padding: 0 4px;
}

.talk-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 860px;
    margin: 0 auto;
}

.talk-card {
    background: var(--color-surface);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.talk-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--color-tint);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    color: var(--color-teal);
}

.talk-body {
    flex: 1;
    min-width: 0;
}

.talk-body h3 {
    margin: 0 0 4px;
    font-size: 1.05em;
    color: var(--color-ink);
}

.talk-venue {
    margin: 0;
    font-size: 0.88em;
    color: var(--color-ink-soft);
}

.talk-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--color-teal);
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.88em;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.talk-link:hover {
    background-color: var(--color-ink);
}

@media (max-width: 768px) {
    .talk-card {
        flex-wrap: wrap;
    }
    .talk-link {
        width: 100%;
        justify-content: center;
    }
}

/* Conversations Section */
.conversations {
    padding: 60px 0;
    background-color: var(--color-surface-2);
    color: var(--color-ink);
}

.conversations h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-ink);
}

.conversations-intro {
    max-width: 760px;
    margin: 0 auto 40px;
    font-size: 1.05em;
    text-align: center;
    line-height: 1.75;
    color: var(--color-ink-soft);
}

.conversation-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.conversation-card {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: 20px 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid var(--color-border);
}

.conversation-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
}

.conv-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    display: block;
    transition: opacity 0.15s;
}
a:has(.conv-thumb) {
    flex-shrink: 0;
    line-height: 0;
}
a:has(.conv-thumb):hover .conv-thumb {
    opacity: 0.8;
}

.conversation-card-header h3 {
    margin: 0 0 5px;
    font-size: 1.05em;
    color: var(--color-ink);
}

.conversation-card-header h3 a {
    color: var(--color-ink);
    text-decoration: none;
    transition: color 0.2s;
}

.conversation-card-header h3 a:hover {
    color: var(--color-teal);
}

.conv-badge {
    display: inline-block;
    font-size: 0.68em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 99px;
}

.conv-badge.substack { background: #fff0e0; color: #b06000; }
.conv-badge.podcast  { background: #ede8f5; color: #5a3a8a; }
.conv-badge.blog     { background: #e0f0e8; color: #1a6640; }

.conv-note {
    font-size: 0.95em;
    color: var(--color-ink-soft);
    line-height: 1.6;
    margin: 0;
    min-height: 1.2em;
}

@media (max-width: 768px) {
    .conversation-list {
        grid-template-columns: 1fr;
    }
}

/* About Section */
.about {
    padding: 60px 0;
    background-color: var(--color-ink);
    text-align: center;
    color: var(--color-on-dark);
}

.about h2 {
    margin-bottom: 20px;
}

.about p {
    max-width: 800px;
    margin: auto;
    font-size: 1.1em;
}

/* About Section Highlights */
.about-intro {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1em;
}

.about-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 30px;
}

.highlight {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: 24px;
    width: 28%;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: left;
    color: var(--color-ink);
}

.highlight-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.highlight i {
    font-size: 1.3em;
    color: var(--color-teal);
    flex-shrink: 0;
}

.highlight h3 {
    font-size: 1.1em;
    margin: 0;
    color: var(--color-ink);
}

.highlight p {
    font-size: 0.95em;
    margin: 0;
}

.about-personal {
    font-style: italic;
    color: var(--color-on-dark-muted);
    margin-top: 30px;
}

.catalyst-link {
    text-align: center;
    margin: 24px 0 36px;
}

.catalyst-button {
    display: inline-block;
    background-color: var(--color-teal-deep);
    color: var(--color-on-dark-muted);
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.catalyst-button:hover {
    background-color: var(--color-ink);
}

.catalyst-button i {
    margin-right: 8px;
}

.publications-section {
    max-width: 800px;
    margin: 40px auto 20px;
    text-align: left;
}

.publications-section h3 {
    text-align: center;
    font-size: 1.3em;
    color: var(--color-on-dark);
    margin-bottom: 20px;
}

.publication {
    background-color: var(--color-surface);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid var(--color-border);
}

.publication a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.publication a:hover h4 {
    color: var(--color-teal);
}

.publication h4 {
    margin: 0 0 6px;
    font-size: 1em;
    color: var(--color-ink);
    transition: color 0.2s;
}

.publication .pub-authors {
    margin: 0 0 4px;
    font-size: 0.9em;
    color: var(--color-ink-soft);
}

.publication .pub-meta {
    margin: 0;
    font-size: 0.85em;
    color: var(--color-teal-deep);
    font-style: italic;
}

.pub-loading {
    text-align: center;
    color: var(--color-on-dark-muted);
    font-style: italic;
}

/* 🎭 Easter egg */
#easter-egg {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.8s ease;
    background: rgba(10, 5, 20, 0.92);
}

#easter-egg.fade-out {
    opacity: 0;
}

.curtain {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #8b0000 0%, #5c0000 100%);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.curtain-left  { left: 0;  transform: translateX(0); }
.curtain-right { right: 0; transform: translateX(0); }

#easter-egg.open .curtain-left  { transform: translateX(-100%); }
#easter-egg.open .curtain-right { transform: translateX(100%); }

.easter-content {
    position: relative;
    z-index: 1;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease 0.8s, transform 0.6s ease 0.8s;
}

#easter-egg.open .easter-content {
    opacity: 1;
    transform: translateY(0);
}

.easter-notes {
    font-size: 1.8em;
    margin-bottom: 12px;
    letter-spacing: 8px;
}

.easter-title {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    margin: 0 0 12px;
    font-style: italic;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.easter-quote {
    font-size: 1.1em;
    color: #f0d0d0;
    margin: 0 0 16px;
    line-height: 1.7;
    font-style: italic;
}

.easter-sub {
    font-size: 2em;
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 60px 0;
    background-color: var(--color-surface-1);
    color: var(--color-ink);
}

.contact h2 {
    text-align: center;
    margin-bottom: 20px;
}

.contact form {
    max-width: 600px;
    margin: auto;
    display: flex;
    flex-direction: column;
}

.contact input, .contact textarea {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid var(--color-border);
}

.contact button {
    padding: 15px;
    border: none;
    background-color: var(--color-teal-deep);
    color: var(--color-on-dark-muted);
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact button:hover {
    background-color: var(--color-ink);
    color: var(--color-on-dark-muted);
}

/* Footer */
footer {
    background-color: var(--color-ink);
    color: var(--color-on-dark-muted);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Accessibility: focus & motion */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .module:hover, .resource:hover {
        transform: none;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .intro-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .intro-photo {
        order: -1;
        max-width: 200px;
    }

    .intro p {
        margin-left: auto;
        margin-right: auto;
    }

    .nav-links {
        flex-direction: column;
        display: none;
        background-color: var(--color-teal-deep);
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        padding: 10px;
        margin: -10px;
        color: var(--color-on-dark-muted);
        font-size: 1.5em;
        cursor: pointer;
    }

    .nav-toggle.active + .nav-links {
        display: flex;
    }

    .module-list, .resource-list {
        grid-template-columns: 1fr;
    }

    .module:last-child:nth-child(odd),
    .resource:last-child:nth-child(odd) {
        grid-column: 1;
        max-width: 100%;
        margin: 0;
    }
}
