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

:root {
    --color-primary: #3a7ca5;
    --color-primary-dark: #2c5f7f;
    --color-primary-light: #5a9bc5;

    --color-event: #F9C89B;
    --color-command: #B8D4F0;
    --color-read-model: #D4EDBB;

    --color-text: #1a1a1a;
    --color-text-light: #4a4a4a;
    --color-text-muted: #6b6b6b;

    --color-bg: #ffffff;
    --color-bg-alt: #f8faf9;
    --color-bg-dark: #1a1a1a;

    --color-border: #e0e0e0;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;

    --max-width: 1200px;
    --header-height: 80px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
}

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

a:hover {
    color: var(--color-primary-dark);
}

/* === Typography === */
h1, h2, h3 {
    line-height: 1.2;
    font-weight: 600;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: var(--space-lg);
    scroll-margin-top: calc(var(--header-height) + var(--space-lg));
}

h2 + h2,
.about-block + h2,
.topics + h2 {
    margin-top: var(--space-xl);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-sm);
}

/* === Layout === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-2xl) 0;
}

main .section:first-child {
    padding-top: calc(var(--header-height) + var(--space-2xl));
}

.section-alt {
    background-color: var(--color-bg-alt);
}

.section-intro {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin-bottom: var(--space-xl);
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-nav {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 56px;
    width: 56px;
}

.logo span {
    color: var(--color-primary);
}

.logo:hover {
    color: var(--color-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.2s ease;
}

/* === Hero === */
.hero {
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero h1 {
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.hero-text {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin-bottom: var(--space-lg);
}

/* === Intro Text === */
.intro-text {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.intro-text h2 {
    margin-bottom: var(--space-md);
}

.intro-text p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.highlight {
    font-weight: 500;
}

.highlight--event { color: #c47a2a; }
.highlight--command { color: #4a7fad; }
.highlight--read-model { color: #5a9a3f; }
.highlight--ai {
    color: var(--color-text);
    font-weight: 600;
    background-color: #E8E8E8;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

/* === Topics === */
.topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.topic {
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.topic .topic-illustration {
    margin-top: auto;
}

.topic h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--space-sm) var(--space-lg);
    color: var(--color-text);
}

.topic h3 svg {
    flex-shrink: 0;
}

.topic p {
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
}

.topic:nth-child(1) {
    border: 1.5px solid var(--color-event);
}
.topic:nth-child(1) h3 {
    background-color: var(--color-event);
}

.topic:nth-child(2) {
    border: 1.5px solid var(--color-command);
}
.topic:nth-child(2) h3 {
    background-color: var(--color-command);
}

.topic:nth-child(3) {
    border: 1.5px solid var(--color-read-model);
}
.topic:nth-child(3) h3 {
    background-color: var(--color-read-model);
}

.topic p {
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* === Why Section === */
.why-content {
    max-width: 800px;
}

.why-text p {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

.why-text strong {
    color: var(--color-primary);
}

/* === Formulas === */
.formulas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.formula {
    padding: var(--space-xl);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    position: relative;
}

.formula-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 0.25rem 0.75rem;
    background-color: var(--color-accent-light);
    color: var(--color-primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
}

.formula h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.formula-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.formula-features {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.formula-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-light);
}

.formula-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

.formula-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.formula-home {
    border-color: var(--color-accent-light);
}

/* === About === */
.about-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.about-image {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
}

.about-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.about-text p {
    font-size: 1.0625rem;
    color: var(--color-text-light);
}

/* === Contact === */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    max-width: 900px;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.contact-method:hover {
    border-color: var(--color-primary);
    background-color: var(--color-bg);
}

.contact-icon {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.contact-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.contact-value {
    font-weight: 500;
    color: var(--color-text);
}

/* === About Block === */
.about-block {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-xl);
}

.about-photo {
    width: 220px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    align-self: stretch;
}

.about-info p,
.about-block ~ p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.about-name {
    font-weight: 600;
    color: var(--color-text) !important;
}

.about-role {
    font-weight: 400;
    color: var(--color-text-muted);
}

.email-link {
    font-weight: 500;
    border-bottom: 1.5px solid var(--color-primary);
}

/* === Topic Illustrations === */
.topic-illustration {
    margin: var(--space-sm) var(--space-lg) var(--space-lg);
    border-radius: 6px;
    overflow: hidden;
}

.topic-illustration img {
    width: 100%;
    height: auto;
    display: block;
}

.topic-illustration:empty,
.topic-illustration:not(:has(img)) {
    height: 180px;
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    background-color: var(--color-bg-alt);
}

/* === Cursus Block === */
.cursus-block {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.cursus-block > p {
    flex: 1;
    font-size: 1.125rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.semester-illustration {
    width: 360px;
    flex-shrink: 0;
}

.semester-illustration img {
    width: 100%;
    height: auto;
    display: block;
}

/* === Cursus Photo === */
.cursus-photo {
    width: 360px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.cursus-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === Cursus Dates === */
.cursus-dates {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.cursus-date {
    display: flex;
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    border-radius: 8px;
}

.cursus-date:nth-child(1) {
    background-color: var(--color-event);
}

.cursus-date:nth-child(2) {
    background-color: var(--color-command);
}

.cursus-date:nth-child(3) {
    background-color: var(--color-read-model);
}

.cursus-date-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.cursus-date-value {
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--color-text);
}

.cursus-details {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

/* === Footer === */
.footer {
    padding: var(--space-lg) 0;
    background-color: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    margin: 0;
}

/* === Mobile Styles === */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .logo-img {
        height: 44px;
        width: 44px;
    }

    .section {
        padding: var(--space-xl) 0;
    }

    .about-block {
        flex-direction: column-reverse;
        align-items: center;
    }

    .cursus-block {
        flex-direction: column;
    }

    .cursus-dates {
        flex-direction: column;
    }

    .semester-illustration {
        width: 100%;
        max-width: 360px;
    }

    .cursus-photo {
        width: 100%;
        max-width: 360px;
        max-height: 280px;
    }

    .about-photo {
        width: 160px;
        align-self: auto;
        aspect-ratio: 1;
    }

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

    .topic-illustration:not(:has(img)) {
        height: 140px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-sm) 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: var(--space-xs) var(--space-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .logo-img {
        height: 36px;
        width: 36px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .about-photo {
        width: 130px;
    }
}
