:root {
    --ink: #152033;
    --muted: #637083;
    --line: #d9e1ec;
    --surface: #ffffff;
    --soft: #f5f8fc;
    --accent: #0f766e;
    --accent-dark: #134e4a;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    background: var(--soft);
    color: var(--ink);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.page-content {
    flex: 1;
    width: 100%;
}

.site-nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.hero {
    padding: 7rem 0 3rem;
}

.hero .hero-content {
    z-index: 1;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.02;
}

.hero-copy {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 690px;
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 800;
}

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

.profile-photo {
    position: relative;
    align-items: center;
    aspect-ratio: 1;
    background:
        linear-gradient(145deg,
            #0F756D 0%,
            #27486b 50%,
            #2F3237 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(21, 32, 51, 0.16);
    color: #fff;
    display: flex;
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.04em;
    min-height: 280px;
    overflow: hidden;
}

.profile-photo::before {
    content: "";
    position: absolute;
    inset: 15%;
    background: radial-gradient(circle,
            rgba(255, 190, 90, .18),
            transparent 70%);
    filter: blur(30px);
    z-index: 0;
}

.profile-photo img {
    height: 90%;
    object-fit: cover;
    width: 90%;
    border-radius: 10px;
}

.course-unit {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(21, 32, 51, 0.08);
    margin: 1rem auto 0;
    overflow: hidden;
}

.course-unit-header {
    align-items: baseline;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.95rem 0.65rem;
}

.course-unit-header h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.course-list {
    display: grid;
}

.course-row {
    align-items: center;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.8rem 0.95rem;
}

.course-row+.course-row {
    border-top: 1px solid var(--line);
}

.course-row h3 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 0.18rem;
}

.course-row p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
    margin: 0;
}

.course-meta {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    white-space: nowrap;
}

.course-meta span,
.course-meta strong {
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.35rem 0.5rem;
}

.course-meta span {
    background: #e9f3f1;
    color: var(--accent-dark);
    font-weight: 800;
}

.course-meta strong {
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}

.course-more .course-row {
    border-top: 1px solid var(--line);
}

.course-actions {
    border-top: 1px solid var(--line);
    padding: 0.65rem 0.95rem;
}

.section-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--accent-dark);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.4rem;
    padding: 0.25rem 0;
}

.section-toggle:hover {
    color: var(--accent);
}

.section-toggle:focus-visible {
    border-radius: 4px;
    outline: 3px solid rgba(15, 118, 110, 0.25);
    outline-offset: 3px;
}

.section-toggle .when-expanded {
    display: none;
}

.section-toggle[aria-expanded="true"] .when-collapsed {
    display: none;
}

.section-toggle[aria-expanded="true"] .when-expanded {
    display: inline;
}

.toggle-icon {
    transition: transform 0.2s ease;
}

.section-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.compact-section {
    padding: 1rem 0 2.5rem;
}

.work-timeline {
    margin-right: auto;
    max-width: 660px;
}

.work-heading {
    border-left: 4px solid var(--accent);
    margin-bottom: 1.25rem;
    padding-left: 1rem;
}

.work-heading h2 {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0;
}

.work-items {
    border-left: 1px solid var(--line);
    display: grid;
    gap: 1.1rem;
    margin-left: 0.45rem;
    padding-left: 1.35rem;
}

.work-item {
    background: transparent;
    position: relative;
}

.work-item::before {
    background: var(--soft);
    border: 3px solid var(--accent);
    border-radius: 999px;
    content: "";
    height: 0.75rem;
    left: -1.75rem;
    position: absolute;
    top: 0.35rem;
    width: 0.75rem;
}

.work-item time {
    color: var(--accent-dark);
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.work-item h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
}

.work-item p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0;
}

.work-more.show {
    display: grid;
    gap: 1.1rem;
}

.work-toggle {
    margin: 1.1rem 0 0 1.8rem;
}

.footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

a {
    color: var(--muted);
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .hero {
        padding: 5.5rem 0 2rem;
        text-align: left;
        --mobile-photo-size: 200px;
    }

    /* Makes the portrait position relative to the hero row. */
    .hero .row {
        position: relative;
    }

    /* Reserves space before the text begins. */
    .hero-content {
        padding-top: 10rem;
        position: relative;
        z-index: 2;
    }

    /* Moves and sizes the portrait in the upper-right corner. */
    .hero .hero-visual {
        position: absolute;
        top: 0;
        right: 3rem;
        width: var(--mobile-photo-size);
        padding: 0;
        z-index: 0;
    }

    .profile-photo {
        width: var(--mobile-photo-size);
        min-height: 0;
        margin: 0;
        transform: rotate(4deg);
    }

    .hero-title {
        position: relative;
        max-width: 250px;
        margin-bottom: 1rem !important;
        font-size: 2.5rem;
        line-height: 0.95;
        z-index: 2;
    }

    .hero-copy {
        max-width: 100%;
        font-size: 1rem;
    }

    .navbar-nav {
        padding-top: 0.75rem;
        text-align: center;
    }

    .nav-link {
        padding: 0.75rem 0;
        font-weight: 700;
    }

    .footer .container {
        text-align: center;
        align-items: center;
    }

    .footer nav {
        justify-content: center;
        flex-wrap: wrap;
    }
}