* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(32, 76, 148, 0.10), transparent 25%),
        radial-gradient(circle at bottom right, rgba(15, 42, 86, 0.08), transparent 30%),
        #f5f7fb;
    color: #1f2937;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.75;
}

a {
    color: #123c8c;
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    text-decoration: underline;
}

.site {
    width: min(1180px, calc(100% - 40px));
    margin: 36px auto 50px;
}

/* HERO */

.hero-panel {
    position: relative;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 38px;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 45%, #eef4ff 100%);
    border: 1px solid #dbe4f1;
    border-radius: 32px;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(15, 42, 86, 0.10);
    overflow: hidden;
    margin-bottom: 24px;
}

.hero-panel::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -100px;
    top: -120px;
    border-radius: 50%;
    background: rgba(18, 60, 140, 0.08);
}

.hero-photo,
.hero-content,
.equation-mark {
    position: relative;
    z-index: 2;
}

.hero-photo img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    border-radius: 24px;
    border: 1px solid #d3dceb;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 42, 86, 0.14);
}

.hero-label {
    margin: 0 0 8px;
    color: #2d5a9d;
    font-size: 13px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-weight: bold;
}

.hero-content h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.08;
    color: #0f2a56;
    letter-spacing: -0.8px;
}

.name-link,
.name-link:link,
.name-link:visited,
.name-link:hover,
.name-link:active {
    color: inherit !important;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.hero-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0f2a56, rgba(15, 42, 86, 0.15));
    margin: 18px 0 22px;
}

.hero-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hero-info-grid p {
    margin: 0;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid #dce4f0;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.6;
}

.equation-mark {
    position: absolute;
    right: 28px;
    bottom: 18px;
    color: rgba(15, 42, 86, 0.18);
    font-size: 22px;
    font-style: italic;
    pointer-events: none;
}

/* NAV */

.section-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.section-nav a {
    display: inline-block;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #dbe4f1;
    border-radius: 999px;
    color: #0f2a56;
    box-shadow: 0 10px 24px rgba(15, 42, 86, 0.05);
}

.section-nav a:hover {
    background: #0f2a56;
    color: #ffffff;
    text-decoration: none;
}

/* GRID LAYOUT */

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe4f1;
    border-radius: 28px;
    padding: 28px 30px;
    box-shadow: 0 18px 44px rgba(15, 42, 86, 0.07);
}

.panel-wide {
    grid-column: 1 / -1;
}

.panel-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.panel-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0f2a56;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    flex-shrink: 0;
}

.panel h2 {
    margin: 0;
    color: #0f2a56;
    font-size: 26px;
    letter-spacing: 0.8px;
    line-height: 1.2;
}

.panel p {
    margin-top: 0;
}

.panel p:last-child {
    margin-bottom: 0;
}

strong {
    color: #111827;
}

/* STACK BLOCKS */

.stack-block {
    display: grid;
    gap: 14px;
}

.stack-block p {
    background: #f7f9fc;
    border-left: 4px solid #1f4f99;
    border-radius: 0 18px 18px 0;
    padding: 15px 18px;
    margin: 0;
}

/* PROJECTS */

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

.project-card {
    background: #f7f9fc;
    border: 1px solid #dde5f1;
    border-radius: 24px;
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15, 42, 86, 0.10);
}

.project-card h3 {
    margin: 0 0 14px;
    color: #0f2a56;
    font-size: 24px;
    line-height: 1.35;
}

.project-card p {
    font-size: 16px;
    line-height: 1.65;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.project-links-vertical {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.project-links-vertical a {
    display: block !important;
    width: fit-content;
}

.project-links a {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 999px;
    background: #0f2a56;
    color: #ffffff !important;
    font-size: 15px;
    line-height: 1.2;
}

.project-links a:hover {
    background: #1f5aa8;
    text-decoration: none;
    transform: translateY(-2px);
}

/* LINKS */

.link-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.link-boxes a {
    display: inline-block;
    padding: 13px 18px;
    border-radius: 999px;
    background: #0f2a56;
    color: #ffffff;
}

.link-boxes a:hover {
    background: #1f5aa8;
    text-decoration: none;
}

/* FOOTER */

footer {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    padding: 28px 0 10px;
}

/* COURSES PAGE COMPATIBILITY */

.page {
    max-width: 950px;
    margin: 42px auto;
    padding: 0 22px;
}

.page-title {
    color: #0f2a56;
    font-size: 34px;
    border-bottom: 2px solid #0f2a56;
    padding-bottom: 10px;
    margin-bottom: 34px;
}

.back-link {
    margin-bottom: 26px;
    font-size: 15px;
}

.course-section {
    background: #ffffff;
    border: 1px solid #dce3ee;
    border-radius: 22px;
    padding: 24px 28px;
    margin-bottom: 22px;
    box-shadow: 0 12px 28px rgba(15, 42, 86, 0.055);
}

.term-title {
    color: #0f2a56;
    font-size: 22px;
    border-bottom: 1px solid #d0d7e2;
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 14px;
}

.course-list {
    list-style-type: square;
    padding-left: 22px;
    margin-bottom: 0;
}

.course-list li {
    margin-bottom: 10px;
}

/* KAYRA PAGE COMPATIBILITY */

.name-page-wrapper {
    max-width: 1120px;
    margin: 45px auto;
    padding: 0 22px;
}

.name-page-box {
    position: relative;
    background: #ffffff;
    border: 1px solid #d0d7e2;
    padding: 70px 64px 60px;
    box-shadow: 16px 15px 0 #0f2a56;
}

.name-page-title {
    text-align: center;
    color: #0f2a56;
    font-size: 42px;
    letter-spacing: 4px;
    margin: 0 0 28px;
}

.name-page-line {
    border: none;
    border-top: 2px solid #0f2a56;
    margin: 0 0 36px;
}

.name-page-text {
    font-size: 22px;
    line-height: 1.9;
    color: #222222;
    max-width: 950px;
    margin: 0 auto 42px;
}

.name-page-button-wrap {
    text-align: center;
}

.name-page-button {
    display: inline-block;
    border: 1.5px solid #123c8c;
    color: #123c8c;
    padding: 14px 26px;
    text-decoration: none;
    font-weight: bold;
}

.name-page-button:hover {
    background-color: #eef4ff;
    text-decoration: none;
}

/* RESPONSIVE */

@media screen and (max-width: 1050px) {
    .hero-panel {
        grid-template-columns: 240px 1fr;
    }

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

@media screen and (max-width: 850px) {
    body {
        font-size: 16px;
    }

    .site {
        width: min(100% - 24px, 1180px);
        margin: 20px auto 36px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .hero-photo {
        max-width: 260px;
    }

    .hero-photo img {
        height: 320px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-info-grid,
    .dashboard {
        grid-template-columns: 1fr;
    }

    .panel {
        grid-column: auto;
    }

    .equation-mark {
        position: static;
        margin-top: 18px;
        text-align: right;
    }
}

@media screen and (max-width: 560px) {
    body {
        font-size: 15px;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .panel {
        padding: 22px 20px;
        border-radius: 22px;
    }

    .panel h2 {
        font-size: 21px;
    }

    .project-card h3 {
        font-size: 22px;
    }

    .hero-info-grid p {
        font-size: 15px;
    }

    .name-page-box {
        padding: 44px 26px 38px;
        box-shadow: 10px 10px 0 #0f2a56;
    }

    .name-page-title {
        font-size: 30px;
        letter-spacing: 2px;
    }

    .name-page-text {
        font-size: 18px;
        line-height: 1.75;
    }
}
