/* =========================
   GLOBAL
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    background: #fff;
    line-height: 1.6;
}

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

/* Make text hyperlinks clearly recognizable without changing button styling */
a:not(.button):not(.social-button) {
    color: #1f5fbf;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: rgba(31, 95, 191, 0.45);
    transition: color 0.2s ease, text-decoration-color 0.2s ease, opacity 0.2s ease;
}

a:not(.button):not(.social-button):hover {
    color: #123f84;
    text-decoration-color: currentColor;
}

a:not(.button):not(.social-button):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

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

/* =========================
   NAVIGATION
========================= */

header {
    width: 100%;
    background: #fff;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
}

.nav-links a:hover {
    opacity: 0.55;
}

/* =========================
   HOME / HERO
========================= */

.home {
    max-width: 1400px;
    min-height: 760px;
    margin: 0 auto;
    padding: 60px 50px 90px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 70px;
    align-items: center;
}

.home-content {
    max-width: 620px;
}

.small-title {
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home h1 {
    margin-bottom: 28px;
    font-size: clamp(3rem, 5vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.intro,
.education,
.portfolio-description {
    max-width: 590px;
    margin-bottom: 18px;
    font-size: 1rem;
    color: #3f3f3f;
}

.home-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.button {
    min-width: 145px;
    padding: 13px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.button:hover {
    background: #333;
}

.button-outline {
    background: transparent;
    color: #111;
}

.button-outline:hover {
    background: #111;
    color: #fff;
}

.home-image {
    width: 100%;
    height: min(620px, 70vh);
    min-height: 460px;
    overflow: hidden;
}

.home-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* =========================
   EXPERIENCE
========================= */

.experience-section,
.research-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 110px 50px;
    border-top: 1px solid #e5e5e5;
}

.company-experience-section {
    padding-top: 90px;
}

.section-heading {
    max-width: 900px;
    margin-bottom: 65px;
}

.section-heading h2 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.experience-case-study {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 70px;
    align-items: start;
}

.experience-summary {
    padding: 12px 0;
}

.experience-meta {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #d9d9d9;
    font-size: 0.9rem;
    color: #555;
}

.experience-company {
    font-weight: 700;
    color: #111;
}

.experience-company a:hover {
    opacity: 0.75;
}

.experience-summary h3 {
    max-width: 620px;
    margin-bottom: 28px;
    font-size: clamp(2rem, 3vw, 3.15rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.experience-intro {
    max-width: 600px;
    color: #4b4b4b;
    font-size: 1rem;
}

.experience-summary ul {
    margin: 28px 0 0 20px;
    color: #4b4b4b;
}

.experience-summary li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 32px;
}

.experience-tags span {
    padding: 7px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 100px;
    font-size: 0.76rem;
    color: #444;
}

/* =========================
   PROJECT IMAGE CARDS
========================= */

.project-image-grid,
.research-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 22px;
}

.project-image-card {
    margin: 0;
}

.project-image-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center;
    border-radius: 14px;
    background: #f4f4f2;
    border: 1px solid #e2e2e2;
}

.project-image-card figcaption {
    padding: 13px 3px 0;
}

.project-image-card h4 {
    margin-bottom: 3px;
    font-size: 1rem;
    line-height: 1.3;
}

.project-image-card p {
    color: #666;
    font-size: 0.86rem;
    line-height: 1.45;
}

/* =========================
   RESEARCH GRID LAYOUTS
========================= */

.research-case-study + .research-case-study {
    margin-top: 90px;
}

.research-divider {
    padding-top: 90px;
    border-top: 1px solid #e5e5e5;
}

.graduate-featured-image {
    grid-column: 1 / -1;
}

.graduate-featured-image img {
    aspect-ratio: 2 / 1;
}

.undergraduate-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vinse-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 30px 22px;
    align-items: stretch;
}

.vinse-left-top {
    grid-column: 1;
    grid-row: 1;
}

.vinse-left-bottom {
    grid-column: 1;
    grid-row: 2;
}

.vinse-tall-image {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
}

.vinse-tall-image img {
    flex: 1;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
}

/* =========================
   ABOUT
========================= */

.about-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 110px 50px;
    border-top: 1px solid #e5e5e5;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 70px;
    align-items: start;
}

.about-copy {
    max-width: 560px;
}

.about-copy p {
    color: #4b4b4b;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-slideshow {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(78%, 1fr);
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scroll-padding-inline: 2px;
    padding: 0 0 16px;
    scrollbar-width: thin;
    scrollbar-color: #b5b5b5 #ededed;
}

.about-slideshow:focus-visible {
    outline: 2px solid #1f5fbf;
    outline-offset: 6px;
    border-radius: 14px;
}

.about-slideshow::-webkit-scrollbar {
    height: 9px;
}

.about-slideshow::-webkit-scrollbar-track {
    background: #ededed;
    border-radius: 100px;
}

.about-slideshow::-webkit-scrollbar-thumb {
    background: #b5b5b5;
    border-radius: 100px;
}

.about-slide {
    margin: 0;
    scroll-snap-align: start;
}

.about-slide img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center;
    border: 1px solid #e2e2e2;
    border-radius: 14px;
    background: #f4f4f2;
}

/* =========================
   CONTACT
========================= */

.contact-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 50px;
    border-top: 1px solid #e5e5e5;
}

.contact-content {
    max-width: 700px;
}

.contact-content > p {
    color: #555;
    font-size: 1rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.social-button {
    min-height: 44px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.social-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-button:hover {
    border-color: #111;
    background: #f6f6f6;
    transform: translateY(-1px);
}

.social-button:focus-visible {
    outline: 2px solid #1f5fbf;
    outline-offset: 3px;
}

/* =========================
   LEGACY DETAIL GRID
========================= */

.experience-details-grid {
    margin-top: 70px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
}

.experience-detail {
    min-height: 260px;
    padding: 28px 28px 36px;
    border-right: 1px solid #d9d9d9;
}

.experience-detail:last-child {
    border-right: 0;
}

.detail-number {
    margin-bottom: 38px;
    font-size: 0.72rem;
    color: #888;
}

.experience-detail h4 {
    margin-bottom: 14px;
    font-size: 1.15rem;
}

.experience-detail p:last-child {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.65;
}

/* =========================
   PLACEHOLDER SECTIONS
========================= */

.placeholder-section {
    max-width: 1400px;
    min-height: 520px;
    margin: 0 auto;
    padding: 100px 50px;
    border-top: 1px solid #e5e5e5;
}

.placeholder-section h2 {
    margin-bottom: 18px;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.placeholder-section p:not(.small-title) {
    color: #555;
}

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

footer {
    padding: 36px 50px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

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

@media (max-width: 1050px) {
    .experience-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .experience-detail:nth-child(2) {
        border-right: 0;
    }

    .experience-detail:nth-child(-n + 2) {
        border-bottom: 1px solid #d9d9d9;
    }
}

@media (max-width: 900px) {
    nav {
        padding: 24px 28px;
    }

    .nav-links {
        gap: 18px;
    }

    .home {
        min-height: auto;
        padding: 50px 28px 70px;
        grid-template-columns: 1fr;
        gap: 46px;
    }

    .home-content {
        max-width: 700px;
    }

    .home-image {
        height: 520px;
        min-height: 0;
    }

    .experience-section,
    .research-section,
    .about-section,
    .contact-section,
    .placeholder-section {
        padding: 80px 28px;
    }

    .experience-case-study,
    .about-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .project-image-grid,
    .research-image-grid,
    .vinse-image-grid,
    .about-slideshow {
        max-width: 760px;
    }
}

@media (max-width: 650px) {
    nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .nav-links {
        width: 100%;
        gap: 14px 20px;
        flex-wrap: wrap;
    }

    .home {
        padding-top: 36px;
    }

    .home h1 {
        font-size: clamp(2.8rem, 14vw, 4.4rem);
    }

    .home-image {
        height: 420px;
    }

    .home-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }

    .experience-meta {
        flex-direction: column;
        gap: 3px;
    }

    .project-image-grid,
    .research-image-grid,
    .undergraduate-image-grid,
    .vinse-image-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 30px;
    }

    .graduate-featured-image,
    .vinse-left-top,
    .vinse-left-bottom,
    .vinse-tall-image {
        grid-column: 1;
        grid-row: auto;
    }

    .graduate-featured-image img,
    .vinse-tall-image img {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    .about-slideshow {
        grid-auto-columns: 90%;
    }

    .social-links {
        align-items: stretch;
    }

    .social-button {
        justify-content: center;
        flex: 1 1 150px;
    }

    .experience-details-grid {
        grid-template-columns: 1fr;
    }

    .experience-detail,
    .experience-detail:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #d9d9d9;
    }

    .experience-detail:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 430px) {
    nav,
    .home,
    .experience-section,
    .research-section,
    .about-section,
    .contact-section,
    .placeholder-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .home-image {
        height: 340px;
    }

    footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}
