:root {
    --background: #ffffff;
    --text: #5e5e5e;
    --text-strong: #3f3f3f;
    --line: #d6d6d6;
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: Aptos, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--background);
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.header-inner,
.section-inner {
    width: min(100%, calc(var(--max-width) + 48px));
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    min-height: 84px;
}

.main-nav {
    grid-column: 2;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav a {
    color: var(--text-strong);
    font-size: 1.05rem;
}

.main-nav a[aria-current="page"] {
    text-decoration: underline;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.contact-link:hover,
.contact-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.contact-menu {
    position: relative;
    grid-column: 3;
    justify-self: end;
}

.menu-button {
    display: grid;
    gap: 5px;
    align-content: center;
    justify-items: end;
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--text-strong);
}

.contact-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: min(260px, calc(100vw - 48px));
    border: 1px solid var(--line);
    background: #ffffff;
}

.contact-dropdown[hidden] {
    display: none;
}

.contact-link {
    display: block;
    padding: 14px 16px;
    overflow-wrap: anywhere;
}

.page-main {
    min-height: calc(100vh - 85px);
}

.section-inner {
    padding-top: 56px;
    padding-bottom: 56px;
}

.about-page .section-inner {
    min-height: calc(100vh - 85px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.content-page .section-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.section-title {
    margin: 0 0 28px;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-strong);
}

.section-description {
    margin: 0 0 28px;
    font-size: 1rem;
}

.content-page .section-title {
    margin: 0;
    font-size: 1.4rem;
}

.content-page .section-description {
    margin: 12px 0 28px;
    font-size: 1.2rem;
    line-height: 1.65;
}

.content-page .section-title {
    margin: 0;
    font-size: 1.4rem;
}

.content-page .section-description {
    margin: 12px 0 28px;
    font-size: 1.2rem;
    line-height: 1.65;
}

.secondary-section-title {
    margin-top: 56px;
}

.about-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}

.about-layout-secondary {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 56px;
}

.about-layout-secondary .about-secondary-text {
    grid-column: 1;
}

.about-layout-secondary .about-image {
    grid-column: 2;
    justify-self: end;
}

.about-layout-secondary .about-image img {
    max-width: 100%;
    height: auto;
}

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

.about-name {
    color: var(--text-strong);
    font-size: 1.4rem;
    font-weight: 600;
}

.about-role {
    font-size: 1.2rem;
    font-style: italic;
}

.about-email {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
}

.about-email a {
    color: #2563eb; 
    text-decoration: underline;
}

.about-description {
    max-width: 980px;
    font-size: 1.2rem;
    line-height: 1.35;
}

.about-profile-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: normal;
}

.about-secondary-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.about-profile-text > * {
    margin: 0;
}

.projects-page .section-inner,
.research-page .section-inner,
.current-page .section-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.projects-heading,
.research-heading,
.current-heading {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-strong);
}

.projects-description,
.research-description,
.current-description {
    margin: 0 0 28px;
    font-size: 1.2rem;
}

.projects-additional-heading {
    margin-top: 56px;
}

.current-date-section {
    width: 100%;
}

.current-date-section + .current-date-section {
    margin-top: 56px;
}

.current-date-heading {
    margin: 0 0 24px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-strong);
}

.projects-subsection-heading {
    margin: 0 0 20px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-strong);
}

.projects-list,
.research-list,
.current-list {
    display: grid;
    gap: 28px;
    width: 100%;
}

.projects-item {
    display: grid;
    grid-template-columns: var(--projects-main-image-width, 320px) minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 12px;
    align-items: start;
}

.research-item {
    display: grid;
    grid-template-columns: var(--research-main-image-width, 300px) minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 12px;
    align-items: start;
}

.current-item {
    display: grid;
    grid-template-columns: var(--current-main-image-width, 300px) minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 12px;
    align-items: start;
}

.projects-image,
.research-image,
.current-image {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.projects-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.research-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.current-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.projects-title,
.research-title,
.current-title {
    margin: 0;
    font-weight: 600;
    color: var(--text-strong);
}

.projects-item-description,
.research-item-description,
.current-item-description {
    margin: 0;
    line-height: 1.35;
    font-size: 1.2rem;
    text-align: left;
}

.current-body-text {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.35;
    grid-column: 1 / -1;
    width: 100%;
}

.current-inline-link {
    color: #2563eb;
    text-decoration: underline;
}

.projects-meta,
.research-meta,
.current-meta {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 400;
    text-align: left;
}

.projects-meta strong,
.research-meta strong,
.current-meta strong {
    font-weight: 600;
    color: var(--text-strong);
}

.projects-time,
.research-time,
.current-time {
    margin: 0;
    font-size: 1.2rem;
    text-align: left;
}

.projects-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    min-width: 0;
    margin-left: 0;
}

.projects-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    grid-column: 1 / -1;
    width: 100%;
}

.projects-gallery-image {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
}

.projects-gallery img {
    width: var(--projects-image-width, 120px);
    max-width: 100%;
    height: auto;
    flex: 0 0 auto;
}

.research-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    min-width: 0;
}

.current-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    min-width: 0;
}

.research-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    grid-column: 1 / -1;
    width: 100%;
    align-items: flex-start;
}

.research-gallery img {
    width: var(--research-image-width, 120px);
    height: auto;
    max-width: 100%;
    align-self: flex-start;
    flex: 0 0 auto;
}

.current-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    grid-column: 1 / -1;
    width: 100%;
}

.current-gallery img {
    width: var(--current-image-width, 120px);
    max-width: 100%;
    height: auto;
    flex: 0 0 auto;
}

.current-gallery iframe {
    display: block;
    max-width: 100%;
    border: 0;
}

.content-page .template-list {
    display: grid;
    gap: 28px;
    width: 100%;
}

.content-page .template-item {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}

.content-page .template-image {
    min-height: 280px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.content-page .template-copy {
    min-height: 280px;
    display: flex;
    align-items: center;
    line-height: 1.8;
    font-size: 1rem;
}

.content-page .template-copy p {
    margin: 0;
}

@media (max-width: 760px) {
    .header-inner {
        grid-template-columns: 1fr auto;
        gap: 16px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .main-nav {
        grid-column: 1 / -1;
    }

    .main-nav ul {
        justify-content: flex-start;
        gap: 14px 20px;
    }

    .about-page .section-inner {
        min-height: auto;
    }

    .about-layout,
    .research-item,
    .content-page .template-item {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .projects-item {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .research-item {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .current-item {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .research-gallery {
        grid-column: auto;
    }

    .current-gallery {
        grid-column: auto;
    }


    .projects-image,
    .research-image,
    .content-page .template-image,
    .content-page .template-copy {
        min-height: auto;
    }
}
