/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0052cc 0%, #003d99 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #0052cc;
}

h3 {
    font-size: 1.5rem;
    color: #1a1a1a;
}

h4 {
    font-size: 1.25rem;
    color: #0052cc;
}

p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: #404040;
}

strong {
    font-weight: 600;
    color: #0052cc;
}

a {
    color: #0052cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #003d99;
    text-decoration: underline;
}

/* ============================================================================
   LAYOUT UTILITIES
   ============================================================================ */

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0052cc;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #404040;
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    color: #0052cc;
}

.nav-link.active {
    color: #0052cc;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #0052cc;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f0f4ff 100%);
    border-bottom: 1px solid #e5e5e5;
}

.hero-content {
    text-align: center;
}

.hero h1 {
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.subtitle {
    font-size: 1.5rem;
    color: #404040;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.author {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    font-style: italic;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0052cc 0%, #003d99 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 82, 204, 0.3);
    text-decoration: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #0052cc;
    border: 2px solid #0052cc;
}

.btn-secondary:hover {
    background: #0052cc;
    color: white;
    text-decoration: none;
}

.btn .icon {
    font-size: 1.3em;
}

/* ============================================================================
   OVERVIEW SECTION
   ============================================================================ */

.overview {
    padding: 5rem 0;
}

.intro-text {
    font-size: 1.2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: #404040;
    line-height: 1.9;
}

.card {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 82, 204, 0.1);
    border-color: #0052cc;
}

.card h3 {
    color: #0052cc;
    margin-bottom: 1rem;
}

.card p {
    color: #404040;
    margin-bottom: 0;
}

/* ============================================================================
   FINDINGS SECTION
   ============================================================================ */

.findings {
    padding: 5rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.finding-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    text-align: center;
}

.finding-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 82, 204, 0.15);
    border-color: #0052cc;
}

.finding-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.finding-card h3 {
    margin-bottom: 1rem;
    color: #0052cc;
}

.finding-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #404040;
    text-align: left;
    margin-bottom: 0;
}

/* ============================================================================
   FRAMEWORK SECTION
   ============================================================================ */

.framework {
    padding: 5rem 0;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: #404040;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #0052cc;
    transition: all 0.3s ease;
}

.step:hover {
    background: #f0f4ff;
    transform: translateX(5px);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0052cc 0%, #003d99 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.step-content h4 {
    margin-bottom: 0.5rem;
    color: #0052cc;
}

.step-content p {
    color: #404040;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ============================================================================
   CONCEPTS SECTION
   ============================================================================ */

.concepts {
    padding: 5rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.concept {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.concept:hover {
    border-color: #0052cc;
    box-shadow: 0 8px 25px rgba(0, 82, 204, 0.1);
}

.concept h4 {
    margin-bottom: 1rem;
    color: #0052cc;
}

.concept p {
    color: #404040;
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================================================
   TAKEAWAYS SECTION
   ============================================================================ */

.takeaways {
    padding: 5rem 0;
}

.takeaway-list {
    list-style: none;
    max-width: 900px;
    margin: 3rem auto 0;
}

.takeaway-list li {
    padding: 1.5rem 0;
    padding-left: 3rem;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #404040;
    border-bottom: 1px solid #e5e5e5;
}

.takeaway-list li:last-child {
    border-bottom: none;
}

.takeaway-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #0052cc;
    font-size: 1.5rem;
}

/* ============================================================================
   DOWNLOAD SECTION
   ============================================================================ */

.download {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fa 100%);
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.download h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.download > .container > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #404040;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.download-card {
    padding: 2.5rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e5e5;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
}

.download-card:hover {
    border-color: #0052cc;
    box-shadow: 0 15px 40px rgba(0, 82, 204, 0.15);
    transform: translateY(-8px);
    text-decoration: none;
}

.download-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.download-card h3 {
    margin-bottom: 1rem;
    color: #0052cc;
}

.download-card p {
    color: #404040;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.download-cta {
    display: inline-block;
    color: #0052cc;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
    margin-top: 1rem;
    width: 100%;
    transition: color 0.3s ease;
}

.download-card:hover .download-cta {
    color: #003d99;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
    background-color: #1a1a1a;
    color: #a0a0a0;
    padding: 3rem 0;
    border-top: 1px solid #333;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
    color: #a0a0a0;
}

footer a {
    color: #0052cc;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #70c0ff;
}

.footer-note {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .step {
        gap: 1.5rem;
    }

    .findings-grid,
    .concept-grid,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .takeaway-list li {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .intro-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .overview,
    .findings,
    .framework,
    .concepts,
    .takeaways,
    .download {
        padding: 3rem 0;
    }

    .card,
    .finding-card,
    .concept,
    .step,
    .download-card {
        padding: 1.5rem;
    }

    .hero h1 {
        margin-bottom: 1rem;
    }

    .author {
        margin-bottom: 2rem;
    }

    .button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================================================
   TOPICS & CLASS MATERIAL STYLES
   ============================================================================ */

.topics-section {
    padding: 5rem 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.topic-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 82, 204, 0.12);
    border-color: #0052cc;
}

.topic-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.topic-card h3 {
    margin-bottom: 1rem;
    color: #0052cc;
    font-size: 1.3rem;
}

.topic-card p {
    color: #404040;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.topic-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-items li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #404040;
    font-size: 0.9rem;
}

.topic-items li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #0052cc;
    font-weight: bold;
}

/* ============================================================================
   RESOURCES SECTION
   ============================================================================ */

.resources-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.resource-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.resource-card:hover {
    box-shadow: 0 10px 30px rgba(0, 82, 204, 0.1);
    border-color: #0052cc;
}

.resource-card h3 {
    color: #0052cc;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.resource-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-card li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #404040;
    font-size: 0.95rem;
}

.resource-card li:last-child {
    border-bottom: none;
}

/* ============================================================================
   BEST PRACTICES SECTION
   ============================================================================ */

.practices-section {
    padding: 5rem 0;
}

.practices-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.practice {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #0052cc;
    transition: all 0.3s ease;
}

.practice:hover {
    background: #f0f4ff;
    transform: translateX(5px);
}

.practice-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0052cc;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.practice-content h4 {
    margin-bottom: 0.5rem;
    color: #0052cc;
    font-size: 1.1rem;
}

.practice-content p {
    color: #404040;
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ============================================================================
   FAMILY TREE SECTION
   ============================================================================ */

.family-tree-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.family-tree-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.tree-container {
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    min-height: 600px;
}

.tree-diagram {
    max-width: 100%;
    height: auto;
    width: 100%;
}

.tree-hierarchy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.tree-level {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
}

.tree-level.level-root {
    gap: 0;
}

.tree-node {
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    min-width: 140px;
    transition: all 0.3s ease;
}

.tree-node:hover {
    background: #e8f4f8;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.root-node {
    background: #3498db;
    color: white;
    border: 2px solid #2980b9;
    font-size: 1rem;
    min-width: 200px;
    padding: 1rem 1.5rem;
}

.root-node:hover {
    background: #2980b9;
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
}

.parent-node {
    background: #9b59b6;
    color: white;
    border: 2px solid #8e44ad;
}

.parent-node:hover {
    background: #8e44ad;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.2);
}

.child-m,
.child-gmm,
.child-np {
    background: #e74c3c;
    color: white;
    border: 2px solid #c0392b;
    min-width: 160px;
}

.child-m:hover,
.child-gmm:hover,
.child-np:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.grandchild-node {
    background: #f39c12;
    color: white;
    border: 2px solid #d68910;
    min-width: 140px;
}

.grandchild-node:hover {
    background: #d68910;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.2);
}

.family-tree-section .container > div:last-child {
    margin-top: 2rem;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    body {
        background: white;
    }

    header,
    footer {
        display: none;
    }

    a {
        color: inherit;
    }
}

/* ============================================================================
   RESPONSIVE: Family Tree
   ============================================================================ */

@media (max-width: 768px) {
    .tree-container {
        padding: 2rem 1rem;
        min-height: 500px;
    }

    .tree-level {
        gap: 1rem;
    }

    .tree-hierarchy {
        gap: 1.5rem;
    }

    .tree-node {
        min-width: 120px;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .root-node {
        min-width: 160px;
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
}
