/* =====================================================
   PHOTONICS RESEARCH GROUP — DESIGN SYSTEM
   Edit the colors, font, and spacing in :root first.
   ===================================================== */
:root {
    --navy: #102d42;
    --deep: #071b2c;
    --teal: #087f83;
    --mint: #60e3ce;
    --ink: #172d3b;
    --muted: #506575;
    --line: #dce6e8;
    --paper: #f4f8f8;
    --white: #ffffff;
    --radius: 14px;
    --max-width: 1240px;
    --shadow: 0 10px 30px #102d4209;
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 1. Base and layout */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--teal);
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 4px;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2, h3 {
    line-height: 1.15;
    letter-spacing: -.035em;
}

h1 {
    font-size: clamp(2.6rem, 4.6vw, 4rem);
}

h2 {
    font-size: clamp(1.85rem, 3.4vw, 2.8rem);
    margin-bottom: 18px;
}

h3 {
    font-size: 1.2rem;
    letter-spacing: -.02em;
}

img, svg {
    max-width: 100%;
}

.wrap {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: clamp(18px, 4vw, 40px);
}
.block {
    padding-block: clamp(48px, 7vw, 88px);
}

.soft {
    background: var(--paper);
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 6vw, 72px);
}

.eyebrow {
    color: var(--teal);
    font-size: .73rem;
    font-weight: 750;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.lead {
    color: var(--muted);
    font-size: 1.12rem;
    max-width: 730px;
}

.muted {
    color: var(--muted);
}

[hidden], .hidden {
    display: none !important;
}

.skip {
    position: absolute;
    left: -9999px;
}

.skip:focus {
    left: 12px;
    top: 6px;
    z-index: 100;
    background: white;
    padding: 12px;
}


/* 2. Header and navigation */
.topline {
    background: var(--deep);
    color: #c2d7df;
    font-size: .75rem;
}

.topline .wrap {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 8px;
}

.sitehead {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: #fffffff5;
    backdrop-filter: blur(14px);
}
.sitehead .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 80px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.2;
    min-width: 0;
}

.brand svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.brand strong {
    display: block;
    font-size: 1rem;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    margin-top: 5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.65vw, 24px);
    font-size: .85rem;
    font-weight: 650;
}

.nav a {
    padding-block: 26px 23px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.nav a.active {
    color: var(--teal);
    border-color: var(--teal);
}

.nav .contact {
    background: var(--teal);
    color: white;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
}

.nav .contact.active {
    background: var(--navy);
    color: white;
}

.menu {
    display: none;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    white-space: nowrap;
}


/* 3. Homepage and page banners */
.hero {
    background: radial-gradient(ellipse at 85% 45%, #125269, #102d42 40%, #071b2c 80%);
    color: white;
    overflow: hidden;
}
.hero .wrap {
    min-height: 550px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 28px;
    padding-block: 72px;
}

.hero .eyebrow, .pagebanner .eyebrow {
    color: var(--mint);
}

.hero h1 {
    margin-bottom: 24px;
}

.hero h1 em {
    color: var(--mint);
    font-style: normal;
}

.hero p {
    color: #c6dce3;
    font-size: 1.08rem;
    max-width: 560px;
}

.hero-art {
    min-width: 0;
    width: 100%;
}

.hero-art svg {
    display: block;
    width: 100%;
    height: auto;
}

.artnote {
    text-align: right;
    font-size: .68rem;
    color: #b6d1d8;
    text-transform: uppercase;
    letter-spacing: .08em;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 19px;
    border: 1px solid var(--teal);
    background: var(--teal);
    color: white;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
}

.btn:hover {
    background: #06666b;
    color: white;
}

.hero .btn, .contactband .btn {
    background: var(--mint);
    color: var(--deep);
    border-color: var(--mint);
}

.hero .outline {
    background: transparent;
    color: white;
    border-color: #88aab7;
}

.hero .outline:hover {
    background: #244557;
}

.metrics {
    border-bottom: 1px solid var(--line);
}

.metrics .wrap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-block: 25px;
}

.metric {
    padding: 4px 18px;
    border-right: 1px solid var(--line);
}

.metric:first-child {
    padding-left: 0;
}

.metric:last-child {
    border: 0;
}

.metric b {
    display: block;
    color: var(--teal);
    font-size: 1.9rem;
    line-height: 1.25;
}

.metric span {
    font-size: .83rem;
    color: var(--muted);
}

.pagebanner {
    background: linear-gradient(115deg, var(--deep), #124d5f);
    color: white;
    padding-block: clamp(44px, 6vw, 76px);
}

.pagebanner h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    margin-bottom: 14px;
}

.pagebanner p {
    color: #c6dce3;
    max-width: 740px;
    margin: 0;
}


/* 4. Research cards and publications */
.sectionhead {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.sectionhead p {
    margin-bottom: 0;
}

.textlink {
    color: var(--teal);
    font-weight: 700;
    font-size: .9rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    min-width: 0;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 11px;
}

.card p {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 0;
}

.research-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    border-radius: 12px;
    background: #e6f4f1;
    color: var(--teal);
}

.research-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pub {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 22px;
    padding-block: 23px;
    border-top: 1px solid var(--line);
    align-items: start;
}

.pub h3 {
    font-size: 1.08rem;
    margin: 7px 0;
    line-height: 1.45;
    letter-spacing: -.01em;
}

.pub p {
    color: var(--muted);
    font-size: .86rem;
    margin-bottom: 0;
}

.pub .year {
    color: var(--teal);
    font-weight: 750;
    padding-top: 5px;
}

.pub .doi {
    color: var(--teal);
    font-size: .82rem;
    font-weight: 700;
    align-self: center;
    white-space: nowrap;
}

.tag {
    display: inline-block;
    background: #e3f4f1;
    color: #096869;
    padding: 4px 9px;
    font-size: .72rem;
    font-weight: 650;
    border-radius: 5px;
}

.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.toolbar input, .toolbar select {
    color: var(--ink);
    background: white;
    border: 1px solid #b9cdd1;
    border-radius: 8px;
    padding: 11px 13px;
    max-width: 100%;
}

.toolbar input {
    flex: 1;
    min-width: min(100%, 220px);
}

.count, .empty {
    color: var(--muted);
    font-size: .85rem;
}


/* 5. People and square photos */
.faculty {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 64px;
}

.home-faculty {
    margin-bottom: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 24px;
    text-align: center;
}

.person h3 {
    font-size: 1.12rem;
    margin-bottom: 6px;
}

.person .role {
    color: var(--teal);
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.affiliation {
    color: var(--muted);
    font-size: .8rem;
}

.person .mail {
    display: inline-block;
    color: var(--teal);
    font-size: .81rem;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.person-content {
    width: 100%;
    min-width: 0;
}

.photo-slot {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 9px;
    width: 100%;
    max-width: 210px;
    aspect-ratio: 1 / 1;
    border: 1px solid #b8d2d3;
    border-radius: 0; /* Keep photographs square. */
    background: #edf5f5;
    color: var(--teal);
    padding: 0;
    overflow: hidden;
    font-size: .78rem;
    font-weight: 650;
}
.photo-slot svg {
    width: 34px;
    height: 34px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.4;
}

.photo-slot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.photo-action {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #071b2cdb;
    color: white;
    padding: 6px;
}

.photo-edit-mode .photo-slot {
    border-style: dashed;
}

.photo-edit-mode .photo-slot:hover {
    border-color: var(--teal);
    background: #e0eeee;
}

.profile-bio {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.profile-bio h4 {
    margin: 0 0 8px;
    font-size: .78rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.profile-bio p {
    line-height: 1.75;
    margin-bottom: 12px;
    font-size: .9rem;
}

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

.profile-bio .research-label {
    margin-top: 20px;
}

.photo-tools {
    display: none;
}

.photo-edit-mode .photo-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.photo-tools p {
    flex: 1;
    min-width: min(100%, 220px);
    margin: 0;
    font-size: .85rem;
}

.photo-status {
    font-size: .8rem;
    color: var(--teal);
}

.gallery-grid .card {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 14px;
}

.gallery-grid .photo-slot {
    max-width: none;
}

.gallery-grid h3 {
    margin: 0;
}


/* 6. Contact and footer */
.contactband {
    background: #0d3546;
    color: white;
}

.contactband .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-block: 40px;
}

.contactband h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.contactband p {
    color: #c2dbe1;
    margin: 0;
}

.footer {
    padding: 52px 0 20px;
    background: var(--deep);
    color: #b8cfd8;
    font-size: .86rem;
}

.footgrid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 30px;
}

.footer h3 {
    color: white;
    font-size: 1rem;
    letter-spacing: 0;
}

.footer a {
    display: block;
    margin: 6px 0;
    overflow-wrap: anywhere;
}

.footer a:hover {
    color: var(--mint);
}

.copyright {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #294554;
    padding-top: 18px;
    margin-top: 30px;
    font-size: .75rem;
}


/* 7. Responsive breakpoints */
@media (max-width: 1040px) {
    .sitehead .wrap {
        flex-wrap: wrap;
        min-height: 72px;
    }

    .menu {
        display: block;
    }

    .nav {
        display: none;
        width: 100%;
        padding-bottom: 15px;
        flex-wrap: wrap;
        gap: 6px 20px;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 9px 0;
    }

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

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

}
@media (max-width: 720px) {
    .topline .wrap span:last-child {
        display: none;
    }

    .hero .wrap {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
        padding-block: 48px 30px;
    }

    .hero-art {
        max-width: 460px;
        margin-inline: auto;
    }

    .metrics .wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 8px;
    }

    .metric:nth-child(2) {
        border: 0;
    }

    .metric:nth-child(3) {
        padding-left: 0;
    }

    .split, .cards, .faculty, .footgrid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sectionhead, .contactband .wrap {
        flex-direction: column;
        align-items: start;
    }

    .pub {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .pub .year {
        padding-top: 0;
    }

    .toolbar input, .toolbar select {
        width: 100%;
    }

    .copyright {
        flex-direction: column;
        gap: 8px;
    }

    .brand strong {
        font-size: .88rem;
    }

    .brand small {
        font-size: .65rem;
    }

    .brand svg {
        width: 37px;
        height: 37px;
    }

    .sitehead .wrap {
        gap: 9px;
    }

    .menu {
        font-size: .8rem;
    }

}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

}

/* Faculty contact list */
.card .contact-entry {
    margin-block: 10px;
}

