
:root {
    --primary: #111111;
    --primary-light: #333333;
    --heading: #1a365d;
    --heading-light: #2a4a7f;
    --accent: #d69e2e;
    --accent-hover: #b7841a;
    --bg: #ffffff;
    --bg-alt: #f7fafc;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
    --primary: #111111;
    --primary-light: #222222;
    --heading: #90cdf4;
    --heading-light: #63b3ed;
    --accent: #ecc94b;
    --accent-hover: #d69e2e;
    --bg: #1a202c;
    --bg-alt: #2d3748;
    --text: #e2e8f0;
    --text-light: #a0aec0;
    --border: #4a5568;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* Header */
.site-header {
    background: var(--primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}
.site-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
}
.site-title:hover { color: var(--accent); }
.theme-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    transition: background 0.2s;
    margin-left: 0.5rem;
}
.theme-toggle:hover { background: rgba(255,255,255,0.15); }
.main-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 2px solid transparent;
}
.nav-link:hover {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.4);
}
.nav-link.active {
    color: #fff;
    border-bottom-color: #fff;
}
/* Dropdown */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: inherit;
}
.nav-dropdown-toggle::after {
    content: " ▾";
    font-size: 0.7em;
}
.nav-dropdown-toggle:hover {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.4);
}
.nav-dropdown.active .nav-dropdown-toggle {
    color: #fff;
    border-bottom-color: #fff;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    min-width: 180px;
    z-index: 200;
    padding: 0.25rem 0;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: flex;
    flex-direction: column;
}
.nav-dropdown-menu .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0;
    border-bottom: none;
    white-space: nowrap;
}
.nav-dropdown-menu .nav-link:hover,
.nav-dropdown-menu .nav-link.active {
    border-bottom: none;
    background: rgba(255,255,255,0.1);
}

.nav-sub-dropdown {
    position: relative;
    width: 100%;
}
.nav-sub-dropdown-toggle {
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.nav-sub-dropdown-toggle::after {
    content: " ▸";
    font-size: 0.7em;
}
.nav-sub-dropdown-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.nav-sub-dropdown-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 160px;
    z-index: 201;
    padding: 0.25rem 0;
    flex-direction: column;
}
.nav-sub-dropdown:hover .nav-sub-dropdown-menu,
.nav-sub-dropdown.open .nav-sub-dropdown-menu {
    display: flex;
    flex-direction: column;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Main content */
.page-content {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2.5rem;
}
.page-content h1 { color: var(--heading); margin: 1.5rem 0 1rem; font-size: 2rem; }
.page-content h2 { color: var(--heading); margin: 1.5rem 0 0.75rem; font-size: 1.5rem; }
.page-content h3 { color: var(--heading-light); margin: 1.25rem 0 0.5rem; font-size: 1.2rem; }
.page-content p { margin: 0.75rem 0; }
.page-content ul, .page-content ol { margin: 0.75rem 0 0.75rem 1.5rem; }
.page-content li { margin: 0.35rem 0; }
.page-content hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.page-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0;
    background: var(--bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text);
}
.page-content strong { color: var(--heading); }
.page-content code {
    background: var(--bg-alt);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Callout (from Notion aside blocks) */
.callout {
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.callout a { font-weight: 600; }

/* Hero */
.hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}
.hero-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--heading);
    flex-shrink: 0;
}
.hero-text h1 { margin: 0 0 0.5rem; font-size: 2rem; color: var(--heading); }
.hero-text p { color: var(--text-light); font-size: 1.1rem; margin: 0; }

/* Service cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.25rem 0;
}
.service-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: var(--bg-alt);
    transition: box-shadow 0.2s;
}
.service-card:hover {
    box-shadow: var(--shadow);
}
.service-card h3 {
    color: var(--heading);
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}
.service-card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text);
}

/* Credentials grid */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 1.25rem 0;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.credential-item {
    padding: 1rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.credential-item:nth-child(2n) {
    border-right: none;
}
.credential-item:nth-child(n+3) {
    border-bottom: none;
}
.credential-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--heading);
    margin-bottom: 0.25rem;
}
.credential-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* CTA box */
.cta-box {
    text-align: center;
    padding: 2rem 1.5rem;
    margin: 2rem 0 0;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.cta-box h2 {
    margin: 0 0 0.5rem;
}
.cta-box p {
    margin: 0 0 1rem;
    color: var(--text-light);
}

/* Card grid (blog) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.card a { color: inherit; display: block; }
.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0;
}
.card-body { padding: 1rem; }
.card-body h3 { font-size: 1rem; color: var(--heading); margin: 0 0 0.5rem; line-height: 1.4; }
.card-date { font-size: 0.85rem; color: var(--text-light); }
.card-excerpt { font-size: 0.85rem; color: var(--text-light); margin: 0.5rem 0 0; line-height: 1.5; }

/* Blog post */
.post-date {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.post-tldr {
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 1rem 0 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
}
.back-link { margin-top: 2rem; font-size: 0.95rem; }

/* Button */
.btn-primary {
    display: inline-block;
    background: var(--heading);
    color: #fff;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
    margin: 0.5rem 0;
}
.btn-primary:hover {
    background: var(--heading-light);
    color: #fff;
}

/* Video embed */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: var(--radius);
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* Photo gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.gallery a { display: block; }
.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 0.2s;
}
.gallery img:hover { transform: scale(1.03); }

/* Expand all toggle */
.expand-all-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.expand-all-toggle:hover {
    background: var(--bg-alt);
    color: var(--heading);
}

/* Slide decks list */
.page-content .deck-list { list-style: none; padding: 0; margin: 0.25rem 0 1.25rem 0; }
.page-content .deck-list li { margin-bottom: 0.35rem; }

/* Publications list */
.page-content .pub-list { list-style: none; padding: 0; margin: 0; }
.page-content .pub-list li { margin-bottom: 1.25rem; }
.pub-list .pub-title { font-weight: 600; }
.pub-list p { margin: 0.2rem 0 0; color: var(--text-muted, #666); font-size: 0.9rem; }
[data-theme="dark"] .pub-list p { color: #aaa; }

/* Collapsible sections */
.collapsible {
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.collapsible-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: var(--bg-alt);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--heading);
    text-align: left;
    transition: background 0.2s;
}
.collapsible-toggle:hover {
    background: var(--border);
}
.collapsible-toggle::after {
    content: "+";
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    transition: transform 0.2s;
}
.collapsible.open .collapsible-toggle::after {
    content: "\2212";
}
.collapsible-content {
    display: none;
    padding: 0.25rem 1.25rem 0.75rem;
}
.collapsible-content p { margin: 0.25rem 0; }
.collapsible.open .collapsible-content {
    display: block;
}

/* Publication titles */
.page-content .pub-title { color: #000; }
[data-theme="dark"] .page-content .pub-title { color: #fff; }
.page-content .pub-title a { color: #000; font-weight: 700; }
[data-theme="dark"] .page-content .pub-title a { color: #fff; }
.page-content .pub-title a:hover { color: var(--accent-hover); }
.collapsible-toggle.pub-title a { color: #000; font-weight: 700; }
[data-theme="dark"] .collapsible-toggle.pub-title a { color: #fff; }
.collapsible-toggle.pub-title a:hover { color: var(--accent-hover); }

/* Summit bio images */
.bio-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    float: left;
    margin: 0 1.25rem 0.75rem 0;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9rem;
}
.site-footer a { color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    .main-nav.open { display: flex; }
    .nav-link { padding: 0.75rem 1rem; }
    .nav-dropdown { width: 100%; }
    .nav-dropdown-toggle { width: 100%; text-align: left; padding: 0.75rem 1rem; }
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
    }
    .hero { flex-direction: column; text-align: center; }
    .hero-photo { width: 120px; height: 120px; }
    .card-grid { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; }
    .credentials-grid { grid-template-columns: 1fr; }
    .credential-item { border-right: none; border-bottom: 1px solid var(--border); }
    .credential-item:last-child { border-bottom: none; }
}

@media print {
    .site-header, .site-footer, .menu-toggle { display: none; }
    .page-content { max-width: 100%; margin: 0; }
}
