/* ═══════════════════════════════════════════════════════════
   John Oler — Personal Portfolio Site
   Modern Farmhouse theme (consistent with Oler Family Tree)
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg: #f6f1ea;
    --bg-alt: #efe7db;
    --bg-card: #fffdfa;
    --bg-hover: #f3ece0;
    --border: #e3d9cb;
    --border-strong: #d3c5b1;
    --text: #3e3630;
    --text-strong: #2b241e;
    --text-dim: #8a7b6b;
    --primary: #5f6f52;
    --primary-hover: #4e5d43;
    --accent: #b4835a;
    --green: #6b8e5a;
    --red: #b14a3b;
    --yellow: #c89b3c;
    --radius: 14px;
    --shadow: 0 4px 18px rgba(96, 74, 49, 0.08);
    --shadow-hover: 0 8px 26px rgba(96, 74, 49, 0.16);
    --font-head: 'Playfair Display', Georgia, serif;
    --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image:
        radial-gradient(rgba(148, 118, 82, 0.05) 1px, transparent 1px),
        linear-gradient(175deg, var(--bg) 0%, var(--bg-alt) 100%);
    background-size: 14px 14px, 100% 100%;
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .brand, .section-title, .stat-value {
    font-family: var(--font-head);
    color: var(--text-strong);
    letter-spacing: -0.01em;
}

/* ─── Nav ─────────────────────────────────────────────── */
.topnav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 14px rgba(96,74,49,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.75rem; min-height: 62px; max-width: 1200px; margin: 0 auto;
}
.brand { font-weight: 700; font-size: 1.25rem; color: var(--text-strong); display: flex; align-items: center; gap: .45rem; }
.nav-tabs { display: flex; gap: 0.35rem; flex: 1; flex-wrap: wrap; }
.nav-tab {
    display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem;
    border-radius: 999px; color: var(--text-dim); text-decoration: none; font-size: 0.92rem; font-weight: 500;
    transition: all 0.18s; border: 1px solid transparent; cursor: pointer;
}
.nav-tab:hover { background: var(--bg-hover); color: var(--text-strong); }
.nav-tab.active { background: var(--primary); color: #fdfbf7; box-shadow: 0 3px 10px rgba(95,111,82,0.35); }

/* ─── Content ─────────────────────────────────────────── */
.content { max-width: 1200px; margin: 0 auto; padding: 2rem 1.75rem; width: 100%; flex: 1; }

/* ─── Hero ────────────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2.5rem;
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
}
.hero-text h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 0.5rem; line-height: 1.15; }
.hero-subtitle { font-size: 1.4rem; color: var(--primary); font-weight: 500; margin-bottom: 1rem; }
.hero-description { font-size: 1.1rem; color: var(--text); line-height: 1.7; margin-bottom: 1.5rem; max-width: 500px; }
.hero-links { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-start; }
@media (max-width: 900px) { .hero-links { justify-content: center; } }
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
    text-decoration: none; transition: all 0.18s; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fdfbf7; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--bg-hover); }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 640px) { .hero-stats { grid-template-columns: 1fr; } }
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow); }
.stat-number { display: block; font-size: 1.5rem; font-weight: 600; color: var(--text-strong); margin-bottom: 0.3rem; }
.stat-label { font-size: 0.85rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }

/* ─── Cards ───────────────────────────────────────────── */
.card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.card h2 { font-size: 1.4rem; margin-bottom: 1rem; font-weight: 600; }
.featured-card { border-color: var(--primary); }

/* ─── Section title ──────────────────────────────────── */
.section-title { font-size: 1.75rem; font-weight: 600; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--border); }
.text-dim { color: var(--text-dim); }

/* ─── Education / Experience ─────────────────────────── */
.education-item, .experience-item { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.education-item:last-child, .experience-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.education-item h3, .experience-item h3 { font-size: 1.15rem; font-weight: 600; color: var(--text-strong); margin-bottom: 0.3rem; }
.education-details, .experience-details { color: var(--text); font-size: 0.95rem; }

/* ─── Certifications ─────────────────────────────────── */
.cert-list { list-style: none; padding: 0; }
.cert-list li { padding: 0.6rem 0 0.6rem 1.5rem; position: relative; color: var(--text); }
.cert-list li::before { content: "▸"; position: absolute; left: 0; color: var(--primary); font-weight: bold; }

/* ─── Skills Grid ────────────────────────────────────── */
.skills-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill-tag {
    background: var(--bg-hover); border: 1px solid var(--border); color: var(--text);
    padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500;
    transition: all 0.15s;
}
.skill-tag:hover { border-color: var(--primary); background: var(--bg-card); }
.skill-tag.learning { background: #fff8e8; border-color: var(--accent); color: #8a6d3a; }
.skill-tag.learning:hover { background: #fff3d0; }

/* ─── Contact Section ────────────────────────────────── */
.contact-section {
    margin-top: 3rem; padding: 2.5rem; text-align: center;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.contact-section h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.contact-section p { color: var(--text-dim); margin-bottom: 1.5rem; }

/* ─── Footer ─────────────────────────────────────────── */
.footer {
    text-align: center; color: var(--text-dim); font-size: 0.82rem; padding: 2rem 1.5rem;
    border-top: 1px solid var(--border); background: var(--bg-card);
    margin-top: auto;
}
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ─── View switching ─────────────────────────────────── */
.view { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }