:root {
    --dark-teal: #354D59;
    --tan: #CDBAA0;
    --cream: #ECEAD9;
    --mint: #6EBA9A;
    --dark-teal-90: rgba(53, 77, 89, 0.9);
    --white: #fff;
    --text: #2a2a2a;
    --text-light: #5a5a5a;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

a { text-decoration: none; color: inherit; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-primary { background: var(--mint); color: var(--dark-teal); }
.btn-primary:hover { background: #5dab88; }
.btn-secondary { background: transparent; border: 2px solid var(--dark-teal); color: var(--dark-teal); }
.btn-secondary:hover { background: var(--dark-teal); color: var(--cream); }

/* Navbar */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--dark-teal-90);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.15); }
.nav-container {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 2rem;
}
.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; font-weight: 700; color: var(--mint);
}
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a {
    color: var(--cream); font-size: 0.9rem; font-weight: 400;
    position: relative; transition: color 0.2s;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--mint); transition: width 0.3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--mint); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--cream); transition: 0.3s; }

/* Hero */
#hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--dark-teal) 0%, #2a3d47 100%);
    text-align: center; padding: 2rem;
}
.hero-greeting { color: var(--mint); font-size: 1.1rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.5rem; }
.hero-name { color: var(--cream); font-size: clamp(2.5rem, 7vw, 5rem); margin-bottom: 0.75rem; }
.hero-tagline { color: var(--tan); font-size: 1.25rem; margin-bottom: 2.5rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 6rem 0; }
.section-alt { background: var(--white); }
.section-title {
    font-size: 2.2rem; text-align: center; margin-bottom: 1rem;
    color: var(--dark-teal); position: relative; padding-bottom: 1rem;
}
.section-title::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 60px; height: 3px;
    background: var(--mint); border-radius: 2px;
}
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 2.5rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; align-items: start; margin-top: 3rem; }
.profile-photo {
    width: 280px; height: 320px; object-fit: cover; border-radius: 12px;
}
.about-text p { margin-bottom: 1rem; color: var(--text-light); font-size: 1.05rem; }
.about-details { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.detail { display: flex; gap: 1rem; }
.detail-label { font-weight: 600; color: var(--dark-teal); min-width: 100px; }

/* Timeline */
.timeline { max-width: 700px; margin: 3rem auto 0; position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
    width: 2px; background: var(--tan);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-marker {
    position: absolute; left: -2rem; top: 0.3rem;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--mint); border: 3px solid var(--white);
}
.timeline-content { background: var(--cream); padding: 1.5rem; border-radius: 10px; }
.timeline-date { font-size: 0.85rem; color: var(--mint); font-weight: 600; }
.timeline-content h3 { font-size: 1.2rem; color: var(--dark-teal); margin: 0.25rem 0; }
.timeline-content h4 { font-size: 0.95rem; color: var(--text-light); font-weight: 400; margin-bottom: 0.5rem; }
.timeline-content p { font-size: 0.95rem; color: var(--text-light); }
.timeline-location { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.75rem; }
.timeline-highlights { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.timeline-highlights li { font-size: 0.9rem; color: var(--text-light); padding-left: 1rem; position: relative; }
.timeline-highlights li::before { content: '▸'; position: absolute; left: 0; color: var(--mint); }
.timeline-tenure { display: inline-block; margin-top: 0.75rem; font-size: 0.8rem; color: var(--tan); background: var(--dark-teal); padding: 0.2rem 0.75rem; border-radius: 20px; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem; }
.project-card {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.project-image {
    height: 200px; background: var(--dark-teal);
    display: flex; align-items: center; justify-content: center;
    color: var(--tan); font-size: 1rem;
}
.project-info { padding: 1.5rem; }
.project-info h3 { font-size: 1.2rem; color: var(--dark-teal); margin-bottom: 0.5rem; }
.project-info p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; }
.project-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tag {
    padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem;
    background: rgba(110,186,154,0.15); color: var(--dark-teal); font-weight: 500;
}
.project-links { display: flex; gap: 1rem; }
.project-link { font-size: 0.9rem; color: var(--mint); font-weight: 500; transition: color 0.2s; }
.project-link:hover { color: var(--dark-teal); }
.project-card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.project-embed { background: var(--dark-teal); }
.project-embed iframe { width: 100%; height: 100%; min-height: 400px; border: none; }
@media (max-width: 768px) { .project-card-wide { grid-template-columns: 1fr; } .project-embed iframe { min-height: 300px; } }

/* Resume */
.resume-container { text-align: center; margin-top: 2rem; }
.resume-actions { margin-bottom: 2rem; }
.resume-hint { color: var(--text-light); font-size: 0.9rem; margin-top: 0.75rem; }
.resume-viewer { max-width: 800px; margin: 0 auto; position: relative; }
.resume-viewer iframe { width: 100%; height: 800px; border: 2px solid var(--tan); border-radius: 10px; }
.resume-fallback { display: none; padding: 3rem; background: var(--cream); border-radius: 10px; text-align: center; }

/* Embeds */
.embed-container { max-width: 800px; margin: 0 auto; position: relative; }
.embed-container iframe { width: 100%; height: 600px; border: 2px solid var(--tan); border-radius: 10px; }
.embed-overlay {
    position: absolute; inset: 0; background: rgba(53,77,89,0.9);
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; color: var(--cream); padding: 2rem; text-align: center;
}
.embed-overlay code { background: rgba(255,255,255,0.15); padding: 0.2rem 0.5rem; border-radius: 4px; }
.substack-card {
    max-width: 500px; margin: 0 auto; text-align: center;
    background: var(--white); border: 2px solid var(--tan); border-radius: 12px;
    padding: 3rem 2rem;
}
.substack-card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.substack-card h3 { color: var(--dark-teal); font-size: 1.4rem; margin-bottom: 0.75rem; }
.substack-card p { color: var(--text-light); margin-bottom: 1.5rem; }
.writing-sample-heading { font-size: 1.5rem; color: var(--dark-teal); text-align: center; margin-top: 3rem; margin-bottom: 1.5rem; }
.writing-sample { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 900px; margin: 0 auto; text-align: center; }
.writing-sample-info h4 { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--dark-teal); margin-bottom: 0.5rem; }
.writing-sample-info p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1rem; }
.writing-sample-viewer iframe { width: 100%; height: 900px; border: 2px solid var(--tan); border-radius: 10px; }
@media (max-width: 768px) { .writing-sample-viewer iframe { height: 600px; } }

.podcast-embed { max-width: 800px; margin: 0 auto 1.5rem; position: relative; }
.podcast-embed iframe { border-radius: 12px; }
.podcast-embed .embed-overlay { border-radius: 12px; }
.podcast-platforms { display: flex; gap: 1rem; justify-content: center; }

/* Contact */
#contact { text-align: center; }
.contact-text { color: var(--text-light); font-size: 1.1rem; max-width: 500px; margin: 1.5rem auto 2rem; }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Footer */
footer {
    text-align: center; padding: 2rem;
    background: var(--dark-teal); color: var(--tan); font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none; flex-direction: column; position: absolute;
        top: 100%; left: 0; right: 0; background: var(--dark-teal);
        padding: 1.5rem 2rem; gap: 1rem;
    }
    .nav-links.open { display: flex; }
    .about-grid { grid-template-columns: 1fr; justify-items: center; }
    .projects-grid { grid-template-columns: 1fr; }
    .timeline { padding-left: 1.5rem; }
    .resume-viewer iframe { height: 500px; }
    .embed-container iframe { height: 400px; }
}
