:root {
    --bg-primary: #fafafa;
    --text-primary: #111827;
    --border-subtle: #e5e7eb;
    --accent: #2563eb;
    --mono-font: "JetBrains Mono", monospace;
}

.dark {
    --bg-primary: #0c1222;
    --text-primary: #f1f5f9;
    --border-subtle: #334155;
    --accent: #60a5fa;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Subtle "page" feel in light mode: soft gradient so it's not flat like a PDF */
@media (min-width: 640px) {
    body {
        background: linear-gradient(180deg, #f0f0f0 0%, #fafafa 15%, #fafafa 100%);
    }

    html.dark body {
        background: var(--bg-primary);
    }
}

.serif {
    font-family: "Playfair Display", serif;
}

.mono {
    font-family: var(--mono-font);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.resume-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.resume-link:hover {
    border-bottom-color: currentColor;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid transparent;
    border-radius: 9999px;
    opacity: 0.85;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.social-link:hover {
    opacity: 1;
    border-color: var(--border-subtle);
    transform: translateY(-1px);
}

.social-link-email {
    color: #ea4335;
}

.social-link-linkedin {
    color: #0a66c2;
}

.social-link-github {
    color: #181717;
}

.social-link-scholar {
    color: #4285f4;
}

.social-link-blog {
    color: #f57c00;
}

.social-link-substack {
    color: #ff6719;
}

.dark .social-link-email {
    color: #ff8a80;
}

.dark .social-link-linkedin {
    color: #6fb7ff;
}

.dark .social-link-github {
    color: #f8fafc;
}

.dark .social-link-scholar {
    color: #8ab4f8;
}

.dark .social-link-blog {
    color: #ffb74d;
}

.dark .social-link-substack {
    color: #ff9b66;
}

/* Key numbers: subtle emphasis so the eye lands on impact (more than a flat resume) */
.metric {
    font-weight: 600;
    color: var(--text-primary);
}

.metric-light {
    opacity: 0.9;
}

/* Section hover: link appears + subtle left accent so blocks feel interactive */
.resume-section {
    position: relative;
    padding-right: 1rem;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.resume-section:hover {
    border-left-color: var(--accent);
    background-color: rgba(37, 99, 235, 0.02);
}

.dark .resume-section:hover {
    background-color: rgba(96, 165, 250, 0.04);
}

.resume-section .section-expand {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.75rem;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.resume-section:hover .section-expand {
    opacity: 0.6;
    transform: translateY(0);
    pointer-events: auto;
}

.resume-section .section-expand:hover {
    opacity: 1;
}

/* Touch: show expand link so it's still discoverable */
@media (hover: none) {
    .resume-section .section-expand {
        opacity: 0.5;
        pointer-events: auto;
    }
}

.resume-section .section-expand a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
}

/* Single "portal" CTA at end */
.portal-cta {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.06) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.dark .portal-cta {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.portal-cta .portal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 2px solid currentColor;
    transition: gap 0.2s ease;
}

.portal-cta .portal-link:hover {
    gap: 0.6rem;
}

/* Testimonial one-liner: social proof with link to full site */
.testimonial-onepager {
    font-size: 0.9rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-subtle);
}

.testimonial-onepager .attribution {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Visual timeline: horizontal line + dots (resume can't show this) */
.career-timeline {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    min-height: 3.5rem;
}

.career-timeline::before {
    content: "";
    position: absolute;
    left: 5%;
    right: 5%;
    top: 4px;
    height: 2px;
    background: var(--border-subtle);
    z-index: 0;
}

.timeline-node {
    flex: 0 0 auto;
    min-width: 4rem;
    position: relative;
    z-index: 1;
    text-align: center;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    margin: 0 auto 0.35rem;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 1px var(--border-subtle);
}

.timeline-node.current .timeline-dot {
    width: 12px;
    height: 12px;
    background: var(--text-primary);
}

.timeline-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    opacity: 0.9;
}

.timeline-date {
    font-size: 0.65rem;
    color: var(--text-primary);
    opacity: 0.5;
    margin-top: 0.1rem;
}

/* Currently writing: from blog feed */
.currently-writing {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.02);
}

.dark .currently-writing {
    background: rgba(255, 255, 255, 0.03);
}

.currently-writing .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    margin-bottom: 0.35rem;
}

.currently-writing a {
    font-weight: 500;
}

.currently-writing .loading {
    opacity: 0.6;
}

.cta-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
}

.cta-link:hover {
    opacity: 1;
    text-decoration: underline;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        padding: 0.5rem 0;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        opacity: 0.8;
    }
}
