/* ============================================================
   Jon Fintzi — Personal Site Styles
   Clean, professional, responsive. No frameworks needed.
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #fafafa;
    --bg-alt: #f0f0f0;
    --text: #1a1a2e;
    --text-muted: #555;
    --accent: #2c5282;
    --accent-hover: #1a365d;
    --border: #d0d0d0;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --max-width: 900px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html {
    scroll-behavior: smooth;
}

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

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

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

/* --- Nav --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

/* --- Sections --- */
.section, .hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

.alt-bg {
    max-width: none;
    background: var(--bg-alt);
}

.alt-bg > h2,
.alt-bg > .software-grid,
.alt-bg > .awards-list {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* --- Hero --- */
.hero {
    padding-top: 4.5rem;
    padding-bottom: 3rem;
}

.hero-top {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.headshot {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.bio {
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1rem;
    max-width: 680px;
}

.links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* --- Cards (Research Interests) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Software --- */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.software-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    color: var(--text);
}

.software-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    color: var(--text);
}

.software-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.software-card h3 {
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.software-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.lang {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.lang.julia { background: #cbafed; color: #3b1d6e; }
.lang.r { background: #b8d4e3; color: #1b3a4b; }
.lang.cpp { background: #cce5ff; color: #003366; }

.stars {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Publications --- */
.section-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pub-subsection {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.pub {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
}

.pub-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.pub-authors {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.pub-venue {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.award {
    color: var(--accent);
    font-weight: 600;
}

/* --- Awards --- */
.awards-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1.5rem;
}

.awards-list li {
    font-size: 0.95rem;
    padding-left: 1.25rem;
    position: relative;
}

.awards-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* --- Contact --- */
#contact p {
    font-size: 1rem;
    line-height: 2;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* --- Responsive --- */
@media (max-width: 600px) {
    nav {
        gap: 1.25rem;
    }
    
    .hero-top {
        flex-direction: column;
        text-align: center;
    }

    .headshot {
        width: 120px;
        height: 120px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section, .hero {
        padding: 2.5rem 1.25rem;
    }

    .card-grid,
    .software-grid {
        grid-template-columns: 1fr;
    }
}
