:root {
    --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
    --pad: clamp(20px, 5vw, 72px);
}
/* Dropdown base */
.home-header nav ul li.has-sub > ul.sub {
    background: transparent;
}

/* HOME PAGE: white text */
body.home-page .home-header nav ul li.has-sub > ul.sub li a {
    color: #000;
}
/* OTHER PAGES: black text */
body:not(.home-page) .home-header nav ul li.has-sub > ul.sub li a {
    color: #000;
}

/* Hover */
.home-header nav ul li.has-sub > ul.sub li a:hover {
    background: transparent;
}
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    height: 55px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 var(--pad);
    box-sizing: border-box;

    transition: background 0.3s, color 0.3s;
}
/* Keep the header fixed on every page except the home page */
body:not(.home-page) header {
    position: fixed;
    top: 0;
    background: #fff;
    color: #000;
}

body:not(.home-page) header .logo,
body:not(.home-page) header nav a,
body:not(.home-page) header .menu-btn {
    color: #000;
}

body:not(.home-page) header .bars {
    background: #000;
    box-shadow: 0 -4px #000, 0 4px #000;
}
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overscroll-behavior-y: none;
}

main {
    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 0;
    padding: 0;
}
.home-header {
    color: #000;
}
.home-header .logo,
.home-header nav a,
.home-header .menu-btn {
    color: #000;
}

.home-header .bars {
    background: #000;
    box-shadow: 0 -4px #000, 0 4px #000;
}

.home-header .bars {
    background: #000;
    box-shadow: 0 -4px #000000, 0 4px #000000;
}
a {
    color: inherit;
}

:focus-visible {
    outline-offset: 3px;
}



/* ========================================
   PROJECT DETAIL
======================================== */

.project-detail {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0 0 0 155px;
    margin: 0;
    font-family: "Bricolage Grotesque", sans-serif;
}

.project-top {
    display: grid;
    grid-template-columns: minmax(0, 522px) minmax(0, 1fr);
    gap: 63px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin-top: 60px;
    padding-top: 20px;
    padding-right: 0;
    background: #fff;
}

.project-info {
    display: flex;
    flex-direction: column;
    background: white;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 12px;
    color: #666;
    text-decoration: none;
}

.back-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ddd;
}

.back-line {
    width: 24px;
    height: 2px;
    background: #000;
    margin-left: -10px;
    margin-right: 12px;
}

.project-title {
    margin: 40px 0 0;
    font-size: 40px;
    font-weight: 400;
    text-transform: uppercase;
}

.project-meta {
    margin: auto 0 0;
    border-top: 1px solid #000;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #000;
    font-size: 16px;
}

.meta-row dt,
.meta-row dd {
    margin: 0;
}

.meta-row dd {
    text-transform: uppercase;
}

.project-cover {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.project-cover img {
    display: block;
    width: 100%;
    max-width: none;
    height: 500px;
    object-fit: cover;
}

.project-description {
    margin: 60px 0;
}

.project-description p {
    font-size: 24px;
    line-height: 1.4;
    text-align: justify;
    margin: 0;
}

/* ========================================
   HEADER
======================================== */

header {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px clamp(40px, 8vw, 140px) 10px var(--pad);
    transition: background 0.3s, color 0.3s;
}

header.inner-page-header {
    color: #000;
    background: transparent;
}

header.inner-page-header.solid {
    color: #000;
}

header.inner-page-header nav a,
header.inner-page-header .logo,
header.inner-page-header .menu-btn {
    color: #000;
}

header.inner-page-header nav .sub,
header.inner-page-header nav .sub a {
    color: #000;
    text-shadow: none;
}

.logo {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.04em;
    text-decoration: none;
    line-height: 1;
}

nav ul {
    display: flex;
    gap: clamp(28px, 4.5vw, 64px);
    list-style: none;
}

nav a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 400;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.bars {
    display: inline-block;
    width: 13px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -4px currentColor, 0 4px currentColor;
}

.menu-btn {
    display: none;
    background: none;
    border: 1px solid transparent;
    color: inherit;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 99px;
    cursor: pointer;
}

/* Projects dropdown */

.has-sub {
    position: relative;
}

nav .sub {
    position: absolute;
    z-index: 200;
    top: calc(100% - 2px);
    left: -16px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    background: transparent;
    border: 0;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.has-sub:hover .sub,
.has-sub:focus-within .sub {
    opacity: 1;
    visibility: visible;
    transform: none;
}

nav .sub a {
    display: flex;
    padding: 11px 20px;
    border-bottom: 0;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

header.solid nav .sub {
    background: transparent;
}

header.solid nav .sub a {
    text-shadow: none;
}

header.solid nav .sub a:hover,
header.solid nav .sub a:focus-visible {
    background: rgba(28, 40, 38, 0.08);
}



.contentclass{
    padding-right: 200px;
    padding-left: 200px;
}
.hero {
    position: relative;
    display: block;
    width: 100%;
    height: 900px;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    object-position: center;
}



.hero-text {
    position: absolute;
    left: 8%;              /* lines up with the logo's left edge */
    bottom: 17%;
    color: #fff;
    z-index: 2;
}

.hero-text h1 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 40px;  /* ~50px on a 1920px screen */
    font-weight: 300;      /* regular, not bold */
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);  /* keeps it readable on the photo */
}


.hero-link {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-left: 0.6rem;
    vertical-align: baseline;
    white-space: nowrap;
}

.hero-link:hover { opacity: 0.7; }

.see {
    font-size: 15px;
    margin-left: 10px;
    color: #fff;
    text-decoration: underline;
    white-space: nowrap;
}

.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 28px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 99px;
    transition: background 0.2s;
}

/* ========================================
   GENERAL SECTIONS
======================================== */

.project{
    padding: clamp(72px, 11vw, 150px) var(--pad);
}

.project-top {
    padding: clamp(72px, 11vw, 150px) var(--pad);
}
h2 {
    font-weight: 500;
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    max-width: 20ch;
}
/* Project content images: full width without side padding */
#contentBlocks .project-content-image {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Project content images — fixed maximum height */
#contentBlocks .project-content-image img,
#contentBlocks img.project-full-image,
#contentBlocks img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 900px;
    max-height: 900px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    object-fit: cover;
    object-position: center;
}

/* Remove inherited section padding from text blocks */
#contentBlocks .project-text-block {
    padding: 0;
    margin: 0;
}
.head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 48px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filters button {
    font: inherit;
    padding: 8px 18px;
    background: none;
    border-radius: 99px;
    cursor: pointer;
}

/* ========================================
   PROJECTS GRID
======================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.card {
    grid-column: span 4;
    display: block;
    text-decoration: none;
}

.card:nth-child(5n + 1) {
    grid-column: span 7;
}

.card:nth-child(5n + 2) {
    grid-column: span 5;
}

.card[hidden] {
    display: none;
}

.thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
}

.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card h3 {
    margin-top: 14px;
    font-weight: 500;
    font-size: 1.25rem;
}

.card span {
    color: #5c6b66;
    font-size: 0.95rem;
}

/* Projects section */

.projects {
    padding: clamp(56px, 7vw, 90px) 12px;
}

.projects .head {
    padding-inline: calc(var(--pad) - 12px);
    margin-bottom: 32px;
}

.projects h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

.sub-title {
    color: #6b7873;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    margin-top: 4px;
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 14px;
}

.grid.three .card {
    grid-column: auto;
    min-width: 0;
}

.grid.three .thumb {
    aspect-ratio: 3 / 2.4;
    border-radius: 0;
}

.cap {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 10px;
    font-family: Arial, Helvetica, sans-serif;
}

.cap h3 {
    margin: 0;
    font-weight: 400;
    font-size: 0.95rem;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cap span {
    color: #7a8580;
    font-size: 0.8rem;
    text-align: right;
}

/* ========================================
   ABOUT
======================================== */

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 100px);
}

.about p {
    max-width: 52ch;
    margin-bottom: 1.1em;
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.facts strong {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.03em;
}

/* ========================================
   NEWS
======================================== */

.news ul {
    list-style: none;
    border-top: 1px solid var(--ink);
}

.news li a {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 24px;
    padding: 26px 0;
    border-bottom: 1px solid var(--fog);
    text-decoration: none;
    transition: padding 0.25s;
}

.news li a:hover {
    padding-left: 14px;
    border-bottom-color: var(--brass);
}

.news time {
    color: #5c6b66;
}

.news b {
    font-weight: 500;
    font-size: 1.2rem;
}

/* ========================================
   CAREERS AND CONTACT
======================================== */

.careers {
    background: var(--pine);
}

.careers p {
    max-width: 50ch;
    margin: 20px 0 0;
    color: var(--fog);
}

.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 100px);
}

label {
    display: grid;
    gap: 6px;
    font-weight: 500;
}

input,
textarea {
    font: inherit;
    padding: 12px 14px;
    border: 1px solid var(--mist);
    border-radius: 6px;
    background: #fff;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

button.send {
    font: inherit;
    font-weight: 700;
    padding: 14px 28px;
    border: 0;
    border-radius: 99px;
    cursor: pointer;
    justify-self: start;
}

.status {
    min-height: 1.4em;
    color: var(--pine);
    font-weight: 500;
}

/* ========================================
   FOOTER
======================================== */

footer {
    padding: 28px var(--pad);
    border-top: 1px solid var(--fog);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: #5c6b66;
    font-size: 0.95rem;
}

.footer {
    display: block;
    border-top: 0;
    background: #fff;
    font-size: inherit;
    padding: 100px 20px 30px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1.1fr 0.8fr;
    align-items: start;
    gap: 40px;
}

.footer__title {
    margin: 0;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.footer__contact {
    font-style: normal;
    font-size: 15px;
}

.footer__contact p {
    margin: 0 0 14px;
    line-height: 1.3;
}

.footer__contact a:hover {
    text-decoration: underline;
}

.footer__social {
    display: flex;
    justify-content: flex-end;
    gap: 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__social a {
    display: inline-flex;
    align-items: center;
    height: 24px;
    transition: opacity 0.2s;
}

.footer__social a:hover {
    opacity: 0.55;
}

.footer__be {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.footer__legal {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-top: 90px;
    font-size: 12px;
    line-height: 1.7;
    color: #555;
}

.footer__legal p {
    margin: 0;
    max-width: 1050px;
}

.footer__legal a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer__terms {
    white-space: nowrap;
}

/* ========================================
   UPLOAD PAGE
======================================== */

.header-link {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.admin {
    max-width: 960px;
    margin: 0 auto;
    padding: 110px var(--pad) 80px;
}

.admin h1 {
    font-weight: 500;
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 28px;
}

.msg {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 500;
}

.msg.ok {
    background: #e1efe3;
    color: #1d4a28;
}

.msg.err {
    background: #f6e0e0;
    color: #7a1f1f;
}

.upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--fog);
    border-radius: 8px;
}

.upload-form input[type="file"] {
    flex: 1 1 260px;
}

.upload-form input[type="file"]::file-selector-button {
    font: inherit;
    margin-right: 12px;
    padding: 6px 14px;
    border-radius: 99px;
    background: none;
    cursor: pointer;
}

.note {
    margin-top: 10px;
    color: #5c6b66;
    font-size: 0.95rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.upload-item {
    background: #fff;
    border: 1px solid var(--fog);
    border-radius: 8px;
    overflow: hidden;
}

.upload-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.upload-item .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 0.95rem;
}

.upload-item form {
    display: block;
}

.badge {
    padding: 2px 12px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
}

button.danger {
    font: inherit;
    font-size: 0.9rem;
    padding: 6px 14px;
    border: 1px solid #9b2c2c;
    border-radius: 99px;
    background: none;
    color: #9b2c2c;
    cursor: pointer;
}

button.danger:hover {
    background: #9b2c2c;
    color: #fff;
}

/* ========================================
   TEAMWORK SECTION
======================================== */

.teamwork-section {
    padding: clamp(72px, 10vw, 130px) var(--pad);
}

.teamwork-content {
    max-width: 1100px;
    margin: 0 auto;
}

.teamwork-content h2 {
    max-width: 100%;
    margin-bottom: 28px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.teamwork-content h2 a {
    color: #6b7873;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
    transition: color 0.25s ease;
}

.teamwork-content h2 a:hover {
    color: var(--brass);
}

.teamwork-content p {
    max-width: 850px;
    color: #5c6b66;
    font-size: 1rem;
    line-height: 1.9;
}

/* ========================================
   TEAMWORK CONTACT FOOTER
======================================== */

.contact-footer {
    padding: clamp(55px, 8vw, 90px) var(--pad);
}

.contact-footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-footer-content h4 {
    margin-bottom: 24px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
}

.contact-footer-content a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

.contact-footer-content a:hover {
    color: var(--brass);
}

.contact-footer-content .contact-link {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--paper);
    border-radius: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-footer-content address {
    margin-top: 32px;
    font-style: normal;
}

.contact-footer-content h5 {
    margin-top: 16px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
}

/* ========================================
   PROJECT CONTENT EDITOR
======================================== */

#projectContent,
#contentBlocks {
    width: 100%;
    margin: 0;
    padding: 0;
}

.content-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #fff;
}

/* Keep the image upload form hidden */
#imageForm {
    display: none !important;
}

/* Hide the text editor by default */
#textEditor[hidden] {
    display: none !important;
}

/* Display the editor when JavaScript opens it */
#textEditor.is-open {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
}

#textEditor textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 150px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #ccc;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
}

.editor-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#contentMessage {
    padding: 0 20px;
    font-size: 14px;
}

.content-toolbar button,
.editor-buttons button,
#textEditor button {
    padding: 12px 20px;
    border: 1px solid #111;
    background: #fff;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.content-toolbar button:hover,
.editor-buttons button:hover,
#textEditor button:hover {
    background: #f5f5f5;
    color: #111;
}

/*
 * The upload form remains hidden.
 * JavaScript triggers the file picker directly.
 */
#imageForm {
    display: none !important;
}

/*
 * The text editor stays hidden until Add Text is clicked.
 * JavaScript must remove hidden and add is-open.
 */
#textEditor {
    display: none;
    width: 100%;
    padding: 20px;
}

#textEditor.is-open:not([hidden]) {
    display: block;
}

#textEditor[hidden] {
    display: none !important;
}

#imageForm input[type="file"] {
    display: block;
    margin-bottom: 12px;
}

#textEditor textarea {
    display: block;
    width: 100%;
    min-height: 150px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #ccc;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
}

.editor-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#contentMessage {
    padding: 0 20px;
    font-size: 14px;
}

.content-toolbar button,
.editor-buttons button,
#textEditor button {
    padding: 12px 20px;
    border: 1px solid #111;
    background: #fff;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.content-toolbar button:hover,
.editor-buttons button:hover,
#textEditor button:hover {
    background: #f5f5f5;
    color: #111;
}

/* ========================================
   HORIZONES PROJECT PAGE
======================================== */

.horizones-page .project-intro {
    padding: 130px var(--pad) 0;
}

.horizones-page .project-eyebrow {
    color: var(--mist);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.horizones-page .project-title {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 40px;
    margin: 30px 0 55px;
}

.horizones-page .project-title h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(48px, 10vw, 145px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.075em;
}

.horizones-page .project-title h1 span {
    color: var(--brass);
}

.horizones-page .project-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    gap: 18px 25px;
    min-width: 280px;
}

.horizones-page .project-meta dt {
    color: var(--mist);
    font-size: 10px;
    letter-spacing: 0.1em;
}

.horizones-page .project-meta dd {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
}

.horizones-page .project-meta div {
    padding-top: 8px;
    border-top: 1px solid var(--fog);
}


.horizones-page .project-image img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.horizones-page .project-image:hover img {
    transform: scale(1.02);
}


/* Admin: existing projects */
/* ========================================
   ADMIN: EXISTING PROJECTS
======================================== */

.project-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 20px 0;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--fog);
    border-radius: 8px;
}

.project-row .project-image {
    flex: 0 0 120px;
    width: 120px;
}

.project-row .project-image img {
    display: block;
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.project-row .no-image {
    display: grid;
    place-items: center;
    width: 120px;
    height: 90px;
    background: #eee;
    color: #777;
    font-size: 0.8rem;
}

.project-row .project-image p {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: #5c6b66;
}

.project-row .project-body {
    flex: 1;
    min-width: 0;
}

.project-row .project-fields {
    display: grid;
    gap: 12px;
}

@media (max-width: 600px) {
    .project-row {
        gap: 12px;
        padding: 12px;
    }

    .project-row .project-image {
        flex: 0 0 85px;
        width: 85px;
    }

    .project-row .project-image img,
    .project-row .no-image {
        width: 85px;
        height: 65px;
    }
}
.horizones-page .project-image::after {
    content: attr(data-label);
    position: absolute;
    inset: auto 0 0;
    padding: 28px 15px 10px;
    background: linear-gradient(
            transparent,
            rgba(246, 248, 245, 0.9)
    );
    font-size: 10px;
    letter-spacing: 0.08em;
    pointer-events: none;
}

.horizones-page .project-overview {
    display: grid;
    grid-template-columns: 0.65fr 1.2fr 1fr;
    gap: 35px;
    padding: 65px 0 100px;
}

.horizones-page .project-lead {
    font-size: clamp(21px, 2.5vw, 34px);
    line-height: 1.4;
    letter-spacing: -0.035em;
}

.horizones-page .project-copy {
    color: #5c6b66;
    font-size: 15px;
    line-height: 1.9;
}

.horizones-page .project-copy p + p {
    margin-top: 18px;
}

.horizones-page .project-section {
    padding: clamp(75px, 10vw, 140px) var(--pad);
}

.horizones-page .project-section-heading {
    display: grid;
    grid-template-columns: 0.65fr 1fr;
    gap: 35px;
    margin-bottom: 55px;
}

.horizones-page .project-section-heading h2 {
    max-width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(38px, 6.5vw, 85px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.055em;
}

.horizones-page .project-section-heading h2 span {
    color: var(--brass);
}

.horizones-page .project-split {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    align-items: start;
    gap: clamp(35px, 8vw, 120px);
}

.horizones-page .project-narrow {
    max-width: 720px;
    margin-left: 25%;
}

.horizones-page .project-narrow.project-copy {
    margin-top: 20px;
    margin-bottom: 50px;
}

.horizones-page .project-gallery {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: start;
    margin-top: 60px;
}


.horizones-page .project-panorama {
    margin-top: 60px;
    aspect-ratio: 2 / 1;
}

.horizones-page .project-materials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 50px;
}


.horizones-page .project-closing {
    max-width: 720px;
    margin: 120px 0 0 25%;
    padding-top: 25px;
    border-top: 1px solid var(--fog);
}

.horizones-page .project-closing .project-lead {
    margin-top: 25px;
}

.horizones-page .project-next {
    padding: 65px var(--pad);
}

.horizones-page .project-next a {
    display: block;
    margin-top: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--mist);
    font-size: clamp(30px, 5.5vw, 72px);
    line-height: 1.1;
    letter-spacing: -0.05em;
    text-decoration: none;
}

.horizones-page .project-next a:hover {
    color: var(--pine);
}

/* ========================================
   TEAM SECTION
======================================== */

.inline-link {
    font-size: 15px;
    font-weight: 400;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 10px;
    white-space: nowrap;
}

.team {
    padding: 0;                     /* removes the global section padding */
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: stretch;
    min-height: 100vh;
}

.team-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    padding: 60px 87px 60px var(--pad);   /* padding lives on the text side only */
}

.team-copy h2 {
    margin: 0;
    max-width: 14em;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.team-copy p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    text-align: justify;
}

.team-copy hr {
    width: 100%;
    margin: 0;
    border: 0;
    border-top: 1px solid #000;
}
#contentBlocks img,
.content-blocks img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 900px;
    object-fit: cover;
    object-position: center;
}
.team-photo {
    position: relative;
    margin: 0;
    height: 550px;
}

.team-photo img {
    position: absolute;
    inset: 0;                       /* flush top, right, bottom, left */
    display: block;
    width: 100%;
    height: 550px;
    object-fit: cover;
    object-position: center;
}

.team-photo img[hidden] {
    display: none;
}

/* Back-to-top button */

.to-top {
    position: fixed;
    right: 60px;
    bottom: 60px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #000;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    z-index: 50;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* ========================================
   RESPONSIVE LAYOUT
======================================== */

@media (max-width: 960px) {
    .team {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .team-copy {
        padding: 80px var(--pad);
        gap: 30px;
    }

    .team-photo {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }

    .footer {
        padding-top: 70px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer__social {
        justify-content: flex-start;
    }

    .footer__legal {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-top: 50px;
    }

    .to-top {
        right: 20px;
        bottom: 20px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 900px) {
    .project-detail {
        padding: 0 20px;
    }

    .project-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-cover img {
        height: auto;
    }

    .project-description p {
        font-size: 18px;
    }
}

@media (max-width: 820px) {
    header {
        padding: 10px var(--pad);
    }

    .menu-btn {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        padding: 12px var(--pad) 24px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }

    @media (max-width: 820px) {
        nav.nav-open {
            display: block;
        }
    }
    @media (max-width: 820px) {
        body:not(.home-page) .menu-btn {
            background: #fff;
            color: #1c2826;
        }
    }

    nav ul {
        flex-direction: column;
        gap: 6px;
    }

    nav a {
        display: block;
        padding: 10px 0;
    }

    nav .sub,
    header.solid nav .sub {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: none;
        padding: 0 0 0 16px;
        min-width: 0;
    }

    nav .sub a {
        padding: 8px 0;
        text-shadow: none;
    }

    nav .sub a:hover {
        background: none;
    }

    .card,
    .card:nth-child(5n + 1),
    .card:nth-child(5n + 2) {
        grid-column: span 12;
    }

    .grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about,
    .contact {
        grid-template-columns: 1fr;
    }

    .news li a {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .horizones-page .project-intro {
        padding-top: 110px;
    }

    .horizones-page .project-title {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .horizones-page .project-overview {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 45px 0 70px;
    }

    .horizones-page .project-section-heading {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 35px;
    }

    .horizones-page .project-split {
        grid-template-columns: 1fr;
        gap: 30px;
    }


    .horizones-page .project-narrow,
    .horizones-page .project-closing {
        margin-left: 0;
    }

    .horizones-page .project-gallery {
        margin-top: 40px;
        gap: 12px;
    }


    .horizones-page .project-closing {
        margin-top: 80px;
    }
}

@media (max-width: 600px) {
    .content-toolbar {
        gap: 8px;
        padding: 14px;
    }

    .content-toolbar button,
    .editor-buttons button,
    #textEditor button {
        padding: 10px 14px;
    }



    .project-full-text {
        padding: 28px 20px;
    }
}

@media (max-width: 520px) {
    .horizones-page .project-title h1 {
        font-size: clamp(43px, 12vw, 65px);
    }

    .horizones-page .project-meta {
        min-width: 0;
        width: 100%;
    }



    .horizones-page .project-gallery {
        grid-template-columns: 1fr;
    }


    .horizones-page .project-materials {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }


    .horizones-page .project-closing {
        margin-top: 65px;
    }

    .teamwork-section {
        padding: 65px var(--pad);
    }

    .teamwork-content h2 {
        font-size: 2rem;
        line-height: 1.25;
    }

    .teamwork-content p {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .contact-footer {
        padding: 55px var(--pad);
    }

    .grid.three {
        grid-template-columns: 1fr;
    }

    .facts {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none;
    }


    .teamwork-content h2 a,
    .contact-footer-content a,
    .to-top {
        transition: none;
    }
}






/* ========================================
   LOGIN / MY ACCOUNT
======================================== */

/* The header is position:absolute, so main needs room at the top */
main:has(.login) {
    min-height: 100vh;
    padding: 160px var(--pad) 100px;
    box-sizing: border-box;
    background: #fff;
}

.login {
    max-width: 440px;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
}

.login h1 {
    margin: 0 0 40px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.login h2 {
    max-width: 100%;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

/* ----- Form ----- */

.login form {
    display: grid;
    gap: 8px;
}

.login label {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5c6b66;
}

.login input[type="text"],
.login input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid #000;
    border-radius: 0;
    background: #fff;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.2s, border-color 0.2s;
}

.login input:hover {
    background: #f5f5f5;
}

.login input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brass, #000);
    box-shadow: 0 0 0 1px var(--brass, #000);
}

/* ----- Button ----- */

.loginbutton {
    justify-self: start;
    margin-top: 24px;
    padding: 14px 32px;
    border: 1px solid #000;
    border-radius: 0;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.25s, color 0.25s;
}

.loginbutton:hover {
    background: #fff;
    color: #000;
}

.loginbutton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ----- Message (errors / info from JS) ----- */

.login #message {
    min-height: 1.4em;
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #7a1f1f;
}

.login #message.ok {
    color: #1d4a28;
}

/* ----- Links ----- */

.login .lost-password {
    display: block;
    width: fit-content;
    margin-top: 18px;
    font-size: 13px;
    color: #5c6b66;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.25s;
}

.login .lost-password:hover {
    color: var(--brass, #000);
}

.login .lost-password:first-of-type {
    margin-top: 32px;
}

/* ----- Success panel (hidden until JS adds .is-visible) ----- */

.login-success-panel {
    display: none;
    padding: 32px 28px;
    border: 1px solid #000;
    background: #fff;
    text-align: left;
}

.login-success-panel.is-visible,
.login-success-panel.show {
    display: block;
}

.login-success-panel h2 {
    margin: 20px 0 8px;
    padding: 0;
    border: 0;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.login-success-panel p {
    margin: 0;
    color: #5c6b66;
    font-size: 15px;
}

.success-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

/* ----- Responsive ----- */

@media (max-width: 820px) {
    main:has(.login) {
        padding-top: 120px;
    }
}

@media (max-width: 520px) {
    main:has(.login) {
        padding-bottom: 70px;
    }

    .loginbutton {
        width: 100%;
        justify-self: stretch;
    }
}

:root { --muted: #8a8a8a; }  /* used by .inline-link but not defined in this file */

/* Your header is fixed at 55px on inner pages, so push content down */
.projects-page { padding-top: 55px; }

/* ---------- Category menus ---------- */
.categories { padding: 60px var(--pad) 0; }
.category { max-width: 636px; }

.category h2 {
    position: relative;
    max-width: 100%;               /* overrides your global h2 max-width: 20ch */
    margin: 0;
    padding: 24px 0 14px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    cursor: pointer;
}

.category h2::after {            /* the vertical bar on the right */
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 1px;
    height: 36px;
    background: #000;
    transform: translateY(-40%);
}
.category h2::after { transition: transform 0.3s ease; }
.category.is-open h2::after { transform: translateY(-40%) rotate(90deg); }
.category ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category.is-open ul { max-height: 300px; }

.category li a {
    display: block;
    padding: 10px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
}
.category li a:hover { text-decoration: underline; }

/* ---------- Sort dropdown ---------- */
.sort { position: relative; }

.sort > button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

.sort-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 16px);
    z-index: 10;
    gap: 32px;
    min-width: 260px;
    padding: 24px;
    background: #fff;
    border: 1px solid #000;
}
.sort.is-open .sort-panel { display: flex; }

.sort-panel fieldset { border: 0; margin: 0; padding: 0; }

.sort-panel legend {
    padding: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

/* override your global label (display:grid) and input (padding/border) */
.sort-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}
.sort-panel input { width: auto; margin: 0; padding: 0; border: 0; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 32px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: black;
}
.pagination a { text-decoration: none; }
.pagination a:hover { text-decoration: underline; }
.pagination .disabled { color: var(--muted); pointer-events: none; }
   .pagination {
       display: flex;
       justify-content: space-between;
       align-items: center;
       gap: 20px;
       margin-top: 0;
       margin-right: 30px;
       margin-left: 30px;
   }

.pagination button {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: #000;
    opacity: 1;
}

.pagination button:disabled {
    color: #000;
    opacity: 1;
    cursor: not-allowed;
    text-decoration: none;
}
.categories {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.category {
    width: 100%;
    text-align: left;
}

.category h2 {
    margin: 0;
    text-align: left;
}

.category h2 a {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.category h2 a:hover {
    text-decoration: none;
}

.category-children {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    text-align: left;
}

.category-children li {
    margin-bottom: 10px;
}

.category-children[hidden] {
    display: none;
}

.home-header nav ul li.has-sub {
    position: relative;
}

.home-header nav ul li.has-sub > ul.sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: 99999;
    box-sizing: border-box;
}

.home-header nav ul li.has-sub:hover > ul.sub,
.home-header nav ul li.has-sub:focus-within > ul.sub,
.home-header nav ul li.has-sub.dropdown-open > ul.sub {
    display: block;
}

.home-header nav ul li.has-sub > ul.sub li {
    display: block;
    width: 100%;
}

.home-header nav ul li.has-sub > ul.sub li a {
    display: block;
    padding: 12px 16px;
    color: var(--ink, #1c2826);
    text-decoration: none;
    white-space: nowrap;
}

.home-header nav ul li.has-sub > ul.sub li a:hover {
    background: var(--fog, #d5dcd7);
}

@media (max-width: 768px) {
    .home-header nav ul li.has-sub > ul.sub {
        position: static;
        min-width: 0;
        box-shadow: none;
    }
}

@media (max-width: 820px) {
    body:not(.home-page) .menu-btn {
        background-color: #fff;
        background-image: none;
        color: #1c2826;
        border: 1px solid #fff;
        opacity: 1;
    }

    body:not(.home-page) nav#nav.nav-open {
        background-color: #fff;
    }
}

@media (max-width: 820px) {
    .home-header .menu-btn {
        display: block;
        cursor: pointer;
    }

    .home-header nav {
        display: none;
    }

    .home-header nav.nav-open {
        display: block;
    }

    .home-header nav ul li.has-sub > ul.sub {
        display: none;
        position: static;
        width: 100%;
        min-width: 0;
        box-shadow: none;
    }

    .home-header nav ul li.has-sub.dropdown-open > ul.sub {
        display: block;
    }
}
/* ========================================
   ADMIN — EXISTING PROJECT THUMBNAILS
======================================== */

#existingProjects .project-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

#existingProjects .project-row .project-image {
    display: block;
    flex: 0 0 50px;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    height: 40px;
    overflow: hidden;
}

#existingProjects .project-row .project-image img {
    display: block;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    object-fit: cover;
}

#existingProjects .project-row .no-image {
    display: grid;
    place-items: center;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    height: 40px;
    box-sizing: border-box;
    overflow: hidden;
}
#contentBlocks img,
.content-blocks img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 900px;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
}

#contentBlocks img,
#contentBlocks .project-content-image img,
.content-blocks img {
    display: block;
    width: 100%;
    height: 900px;
    max-height: 900px;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
}
/* Existing projects: prevent oversized images */
#existingProjects .admin-project-card img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: cover;
    object-position: center;
    box-sizing: border-box;
}


/* =========================================================
   EXISTING PROJECTS — RECORD TABLE
   ========================================================= */

#existingProjectsSection {
    width: 100%;
    min-width: 0;
}

#existingProjectsSection > h2 {
    margin: 0 0 35px;
    font-size: 20px;
    font-weight: 400;
}

#existingProjectsSection .orders-search {
    width: 100%;
    margin-bottom: 25px;
}

#existingProjectsSection .orders-search input {
    display: block;
    width: 100%;
    height: 50px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid #cfcfcf;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-family: Arial, sans-serif;
    font-size: 15px;
    outline: none;
}

#existingProjectsSection .orders-search input:focus {
    border-color: #777;
}

.projects-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-top: 1px solid #ddd;
}

.projects-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    table-layout: auto;
    text-align: left;
    font-family: Arial, sans-serif;
}

.projects-table thead th {
    padding: 17px 14px;
    border-bottom: 1px solid #ccc;
    background: #f7f7f7;
    color: #555;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.projects-table tbody td {
    padding: 14px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
    font-size: 13px;
    font-weight: 400;
    vertical-align: middle;
    white-space: nowrap;
}

.projects-table tbody tr {
    background: #fff;
    transition: background 0.15s ease;
}

.projects-table tbody tr:hover {
    background: #f8f8f8;
}

.projects-table tbody td:first-child {
    color: #222;
    font-weight: 500;
}

.projects-table tbody td img {
    display: block;
    width: 64px;
    height: 46px;
    max-width: 64px;
    object-fit: cover;
}

.projects-table .delete-project-button {
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: #a33;
    font-family: Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.projects-table .delete-project-button:hover {
    text-decoration: underline;
}

.projects-table #projectsLoading {
    padding: 25px 14px;
    color: #777;
    text-align: left;
}

@media (max-width: 700px) {
    #existingProjectsSection > h2 {
        margin-bottom: 25px;
    }

    .projects-table {
        min-width: 1050px;
    }
}

/* Transparent Projects dropdown */
.home-header nav ul li.has-sub > ul.sub {
    background: transparent;
    box-shadow: none;
}

/* Transparent dropdown items */
.home-header nav ul li.has-sub > ul.sub li,
.home-header nav ul li.has-sub > ul.sub li a {
    background: transparent;
}

/* Keep it transparent on hover and keyboard focus */
.home-header nav ul li.has-sub > ul.sub li a:hover,
.home-header nav ul li.has-sub > ul.sub li a:focus-visible {
    background: transparent;
}
.hero1 {
    position: relative;
    display: block;
    width: 100%;
    height: 650px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.hero1 .hero-bg1 {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    object-position: center;
}

.hero1 .hero-text {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}
#aboutHeroHeading {
    white-space: pre-line;
}


.hero-text1 {
    position: absolute;
    left: 8%;              /* lines up with the logo's left edge */
    bottom: 15%;
    color: #fff;
    z-index: 2;
}

.hero-text1 h1 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 40px;  /* ~50px on a 1920px screen */
    font-weight: 300;      /* regular, not bold */
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);  /* keeps it readable on the photo */
}




/* ========================================
   ABOUT PAGE
======================================== */

/* Fixed 55px header on inner pages */
.about-page {
    padding-top: 55px;
    font-family: var(--font);
}

/* Beat your global h2 { max-width: 20ch; font-weight: 500 } */
.about-page h2 {
    max-width: 100%;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* ----- Vision (extends existing .team styles) ----- */
.about-page .team-copy h2 {
    font-size: clamp(2rem, 2.6vw, 2.5rem);
    max-width: 100%;
}

.about-page .team-copy p {
    font-size: 1.125rem;
    line-height: 1.45;
}

.team-founders h3 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 400;
    text-transform: uppercase;
}

.about-page .team-copy .team-founders p {
    font-size: 0.9375rem;
    text-transform: uppercase;
    text-align: left;
}

.about-page .team-photo {
    height: 750px;
}

.about-page .team-photo img {
    height: 100%;
    filter: grayscale(1);
}

/* ----- Shared section spacing ----- */
.staff,
.awards,
.collaborators {
    padding: clamp(64px, 9vw, 130px) var(--pad) 0;
}

.staff h2,
.awards h2,
.collaborators h2 {
    margin: 0 0 28px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
}
/* Bring the Staff section directly after Vision */
body.about-page .team {
    margin-bottom: 0;
    padding-bottom: 0;
}

body.about-page .staff {
    margin-top: 0;
    padding-top: 0;
}
.staff > p,
.awards > p,
.collaborators > p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

/* ----- Team grid ----- */
.staff__grid {
    list-style: none;
    margin-top: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px 24px;
}

.staff__member img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.staff__member:hover img {
    filter: grayscale(0);
}

.staff__member h3 {
    margin: 12px 0 0;
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
}

.staff__member p {
    margin: 2px 0 0;
    font-size: 0.875rem;
    color: var(--muted);
}

/* ----- Awards ----- */
.awards__list {
    list-style: none;
    margin: 48px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.award {
    padding-top: 20px;
    border-top: 1px solid #000;
}

.award h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 400;
}

.award h4 {
    margin: 12px 0 16px;
    font-size: 1.125rem;
    font-weight: 400;
    text-transform: uppercase;
}

.award p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* ----- Collaborators ----- */
.collaborators {
    padding-bottom: clamp(64px, 9vw, 130px);
}

.collaborators__logos {
    list-style: none;
    margin: 48px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 32px;
    align-items: center;
}

.collaborators__logos img {
    display: block;
    max-height: 70px;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    object-fit: contain;
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
    .about-page .team-photo {
        height: auto;
        aspect-ratio: 4 / 3;
    }
    .about-page .team-photo img {
        position: static;
    }
}

@media (max-width: 600px) {
    .staff__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 14px;
    }
    .staff > p,
    .awards > p,
    .collaborators > p {
        text-align: left;
    }
}


/* ABOUT PAGE — VISION IMAGE */
body.about-page .team {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    width: 100%;
}

body.about-page .team-photo {
    position: relative;
    width: 400px;
    height: 500px;
    margin: 40px 0 0;
    padding: 0;
    overflow: hidden;
}

body.about-page .team-photo img#visionImage {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 960px) {
    body.about-page .team {
        grid-template-columns: minmax(0, 1fr);
    }

    body.about-page .team-photo {
        width: 250px;
        height: 250px;
        margin-top: 20px;
    }
}


body.about-page .team {
    min-height: 0;
    height: auto;
    margin-bottom: 0;
    padding-bottom: 0;
}

body.about-page .team-copy {
    padding-bottom: 0;
}

body.about-page .staff {
    margin-top: 0;
    padding-top: 0;
}
.staff__image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #000;
}

.staff__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: transform 0.4s ease;
}

.staff__image-wrap:hover .staff__photo {
    transform: scale(1.03);
}

.staff__company-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 65%;
    max-height: 25%;
    object-fit: contain;
    filter: none;
}

.staff__company-logo-text {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: var(--font);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    max-width: 90%;
    overflow-wrap: anywhere;
}

.staff__image-empty {
    background: #000;
}

.staff__image-empty .staff__photo {
    display: none;
}









.contact-page { max-width: 1600px; margin: 0 auto; padding: 0 8%; font-family: Arial, Helvetica, sans-serif; color: #111; }
.contact-hero { padding: 120px 0 90px; }
.contact-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 400; line-height: 1.2; margin: 0; }

.contact-body { display: grid; grid-template-columns: 2fr 1fr; gap: 8%; align-items: start; padding-bottom: 120px; }

.accordion { border-bottom: 2px solid #111; }
.accordion summary { list-style: none; cursor: pointer; font-size: clamp(1.5rem, 2.4vw, 2.2rem); padding: 24px 0; display: flex; justify-content: space-between; align-items: center; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; width: 2px; height: 36px; background: #111; margin-right: 0; }
.accordion[open] summary::after { transform: rotate(90deg); }

.form { display: grid; gap: 20px; padding: 10px 0 32px; }
.form label { display: grid; gap: 6px; font-size: .95rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select { border: 0; border-bottom: 1px solid #111; padding: 8px 0; font: inherit; background: transparent; outline: none; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-size: .95rem; padding: 0; margin-bottom: 8px; }
.date-row { display: flex; gap: 16px; }
.time-slots { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.time-slots label { display: flex; flex-direction: row; gap: 6px; }
.form button { justify-self: start; border: 1px solid #111; background: #111; color: #fff; padding: 12px 32px; cursor: pointer; font: inherit; }

.general-info h2 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 400; color: #777; margin: 0 0 80px; }
.general-info address { font-style: normal; font-weight: 700; font-size: .9rem; }
.general-info p { margin: 0 0 24px; }
.general-info a { color: inherit; text-decoration: none; }

@media (max-width: 900px) { .contact-body { grid-template-columns: 1fr; } }


/* ========================================
   CAREERS / JOBS PAGE
======================================== */

.jobs-page {
    padding-top: 55px; /* fixed 55px header */
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
}

/* ----- Hero ----- */
.jobs-hero {
    padding: clamp(64px, 9vw, 120px) var(--pad) clamp(32px, 4vw, 56px);
}

.jobs-hero h1 {
    margin: 0;
    max-width: 100%;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.jobs-hero p {
    max-width: 52ch;
    margin: 20px 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #5c6b66;
}

/* ----- Job list ----- */
.jobs-list {
    list-style: none;
    margin: 0;
    padding: 0 var(--pad) clamp(64px, 9vw, 130px);
}

.job-card {
    border-top: 1px solid #000;
}

.job-card:last-child {
    border-bottom: 1px solid #000;
}

.job-card a {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 24px;
    padding: 32px 0;
    color: inherit;
    text-decoration: none;
    transition: padding 0.25s ease;
}

.job-card a:hover {
    padding-left: 14px;
}

.job-title {
    margin: 0;
    max-width: 100%; /* overrides your global h2 max-width: 20ch */
    font-size: clamp(1.6rem, 3vw, 2.75rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.job-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: right;
    color: #5c6b66;
}

/* ----- Mobile ----- */
@media (max-width: 600px) {
    .job-card a {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .job-meta {
        text-align: left;
    }
}

/* ========================================
   JOB DETAIL PAGE
======================================== */

.jd-page {
    --jd-pad: clamp(20px, 7.5vw, 145px);
    --jd-dark: #141414;
    padding-top: 55px; /* fixed header */
    font-family: Arial, Helvetica, sans-serif;
    color: #212529;
    background: #fff;
}

/* ----- Back bar ----- */
.jd-back {
    padding: 14px var(--jd-pad);
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1.5rem;
}

.jd-back a {
    color: #555;
    text-decoration: none;
}

.jd-back a:hover {
    color: #000;
}

/* ----- Hero ----- */
.jd-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding: 48px var(--jd-pad) 44px;
}

.jd-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5.6vw, 5.2rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.jd-location {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 0;
    font-size: 1.6rem;
}

/* ----- Buttons ----- */
.jd-apply {
    display: inline-block;
    flex-shrink: 0;
    margin-top: 16px;
    padding: 18px 32px;
    background: #a6a6a6;
    color: #212529;
    font-size: 1.6rem;
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
}

.jd-apply:hover {
    background: #000;
    color: #fff;
}

/* ----- Dark section ----- */
.jd-body {
    display: grid;
    grid-template-columns: minmax(200px, 340px) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 110px);
    align-items: start;
    padding: 40px var(--jd-pad) 80px;
    background: var(--jd-dark);
    color: #fff;
}

/* Sticky table of contents */
.jd-toc {
    position: sticky;
    top: 75px; /* 55px header + breathing room */
    display: flex;
    flex-direction: column;
}

.jd-toc a {
    padding: 14px 0 14px 12px;
    border-left: 2px solid transparent;
    color: #aaa;
    font-size: 1.3rem;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.jd-toc a:hover {
    color: #fff;
}

.jd-toc a.is-active {
    color: #fff;
    border-left-color: #fff;
}

/* ----- Content ----- */
.jd-content section {
    scroll-margin-top: 75px;
    margin-bottom: 90px;
}

.jd-content section:last-child {
    margin-bottom: 0;
}

.jd-content h2 {
    max-width: 100%; /* overrides global h2 { max-width: 20ch } */
    margin: 0;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
}

.jd-content h3 {
    margin: 56px 0 14px;
    font-size: 1.9rem;
    font-weight: 400;
}

.jd-content p {
    margin: 36px 0 0;
    font-size: 1.15rem;
    line-height: 1.55;
}

.jd-content h3 + p {
    margin-top: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.jd-content p.jd-lead {
    font-size: 1.5rem;
    line-height: 1.55;
}

.jd-content ul {
    margin: 40px 0 0;
    padding-left: 40px;
    list-style: disc;
}

.jd-content li {
    margin: 0;
    padding: 2px 0;
    font-size: 1.15rem;
    line-height: 1.6;
}

/* ----- Bottom CTA ----- */
.jd-cta {
    display: flex;
    justify-content: center;
    padding: 30px var(--jd-pad) 70px;
}

.jd-cta .jd-apply {
    margin-top: 0;
    font-size: 1.3rem;
    padding: 18px 32px;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .jd-hero {
        flex-direction: column;
        gap: 20px;
    }

    .jd-body {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .jd-toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 20px;
    }

    .jd-toc a {
        padding: 6px 0;
        border-left: 0;
        font-size: 1rem;
    }

    .jd-toc a.is-active {
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    .jd-content section {
        margin-bottom: 60px;
    }

    .jd-content ul {
        padding-left: 22px;
    }

    .jd-content p.jd-lead {
        font-size: 1.2rem;
    }
}




/* ========================================
   JOB APPLICATION PAGE
======================================== */

.ja-page {
    --ja-pad: clamp(20px, 7.5vw, 145px);
    padding: 105px var(--ja-pad) 100px; /* 55px fixed header + space */
    font-family: Arial, Helvetica, sans-serif;
    color: #212529;
    background: #fff;
}

/* ----- Breadcrumb ----- */
.ja-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.ja-breadcrumb li + li::before {
    content: "/";
    padding: 0 10px;
    color: #6c757d;
}

.ja-breadcrumb a {
    color: #6c757d;
    text-decoration: none;
}

.ja-breadcrumb li:first-child a {
    color: #000;
    font-weight: 700;
    text-transform: none;
}

.ja-breadcrumb a:hover {
    text-decoration: underline;
}

/* ----- Title ----- */
.ja-title {
    margin: 4px 0 36px;
    font-size: clamp(2.4rem, 5.2vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

/* ----- Layout ----- */
.ja-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: clamp(32px, 6vw, 115px);
    align-items: start;
}

/* ----- Form ----- */
.ja-form {
    display: grid;
    gap: 20px;
}

.ja-page .ja-field {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 0;
}

.ja-page .ja-field label {
    display: block;
    margin: 0;
    padding-top: 10px;
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #212529;
}

.ja-req {
    font-size: 0.7em;
    vertical-align: middle;
}

.ja-page .ja-field input,
.ja-page .ja-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
    height: 47px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #212529;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.3rem;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.ja-page .ja-field input::placeholder,
.ja-page .ja-field textarea::placeholder {
    color: #8a8a8a;
}

.ja-page .ja-field input:focus,
.ja-page .ja-field textarea:focus {
    outline: none;
    border-color: #000;
}

/* File inputs */
.ja-page .ja-field input[type="file"] {
    padding: 0;
    line-height: 45px;
    cursor: pointer;
}

.ja-page .ja-field input[type="file"]::file-selector-button {
    height: 45px;
    margin-right: 16px;
    padding: 0 16px;
    border: 0;
    border-right: 1px solid #ddd;
    background: #efefef;
    color: #212529;
    font: inherit;
    cursor: pointer;
}

/* Textarea */
.ja-page .ja-field--textarea {
    margin-top: 10px;
}

.ja-page .ja-field textarea {
    height: auto;
    min-height: 167px;
    padding: 14px 16px;
    line-height: 1.5;
    resize: vertical;
}

/* ----- Submit ----- */
.ja-actions {
    padding-left: 250px;
}

.ja-submit {
    min-width: 239px;
    height: 70px;
    padding: 0 32px;
    border: 0;
    border-radius: 2px;
    background: #a6a6a6;
    color: #212529;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.6rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ja-submit:hover {
    background: #000;
    color: #fff;
}

/* ----- Sidebar ----- */
.ja-side {
    position: sticky;
    top: 75px;
}

.ja-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 70px;
    border: 1px solid #aaa;
    border-radius: 2px;
    color: #8a8a8a;
    font-size: 1.7rem;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.ja-back:hover {
    color: #000;
    border-color: #000;
}

.ja-summary {
    margin: 28px 0 0;
}

.ja-summary dt {
    margin: 0;
    font-size: 1rem;
    color: #444;
}

.ja-summary dd {
    margin: 2px 0 18px;
    font-size: 1.4rem;
    line-height: 1.2;
}

.ja-summary dd:first-of-type {
    text-transform: uppercase;
}

.ja-side hr {
    width: 167px;
    margin: 28px 0 0;
    border: 0;
    border-top: 1px solid #ddd;
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
    .ja-layout {
        grid-template-columns: 1fr;
    }

    .ja-side {
        position: static;
        order: -1; /* show "Job Description" summary above the form */
    }
}

@media (max-width: 600px) {
    .ja-page .ja-field {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .ja-page .ja-field label {
        padding-top: 0;
    }

    .ja-actions {
        padding-left: 0;
    }

    .ja-submit {
        width: 100%;
    }
}

.ja-page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

.ja-layout {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 270px;
}

.ja-form,
.ja-side,
.ja-page .ja-field {
    min-width: 0;
}

.ja-page .ja-field input,
.ja-page .ja-field textarea {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========================================
   MOBILE RESPONSIVE ADJUSTMENTS
======================================== */

/* Tablets and smaller laptops */
@media (max-width: 820px) {
    :root {
        --pad: 24px;
    }

    header {
        height: 55px;
        padding: 10px var(--pad);
    }

    header nav {
        box-sizing: border-box;
        max-height: calc(100vh - 55px);
        overflow-y: auto;
    }

    nav ul {
        margin: 0;
        padding: 0;
    }

    .hero {
        height: 70vh;
        min-height: 450px;
        max-height: 750px;
    }

    .hero-text,
    .hero-text1 {
        left: var(--pad);
        right: var(--pad);
        bottom: 12%;
    }

    .hero-text h1,
    .hero-text1 h1 {
        font-size: clamp(28px, 5vw, 40px);
    }

    .hero1 {
        height: 480px;
    }

    .contentclass {
        padding-right: var(--pad);
        padding-left: var(--pad);
    }

    .project-detail {
        padding: 0 var(--pad);
    }

    .project-top {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-top: 55px;
        padding: 40px 0 0;
    }

    .project-title {
        margin-top: 24px;
        font-size: clamp(28px, 6vw, 40px);
    }

    .project-cover img {
        height: auto;
        max-height: 600px;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .project-description {
        margin: 35px 0;
    }

    .project-description p {
        font-size: 18px;
        text-align: left;
    }

    #contentBlocks img,
    #contentBlocks .project-content-image img,
    #contentBlocks img.project-full-image,
    .content-blocks img {
        width: 100%;
        height: auto;
        max-height: 600px;
        object-fit: cover;
    }

    .project,
    .project-top {
        padding-left: var(--pad);
        padding-right: var(--pad);
    }

    .projects {
        padding: 48px var(--pad);
    }

    .projects .head {
        padding-inline: 0;
    }

    .grid,
    .grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 14px;
    }

    .card,
    .card:nth-child(5n + 1),
    .card:nth-child(5n + 2),
    .grid.three .card {
        grid-column: auto;
        min-width: 0;
    }

    .cap {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .cap span {
        text-align: left;
    }

    .about,
    .contact {
        grid-template-columns: minmax(0, 1fr);
    }

    .team {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .team-copy {
        padding: 55px var(--pad);
        gap: 24px;
    }

    .team-photo {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .team-photo img {
        height: 100%;
    }

    body.about-page .team {
        grid-template-columns: minmax(0, 1fr);
    }

    body.about-page .team-photo {
        width: 100%;
        max-width: 400px;
        height: auto;
        aspect-ratio: 4 / 3;
        margin: 20px var(--pad) 0;
    }

    .staff,
    .awards,
    .collaborators {
        padding: 55px var(--pad) 0;
    }

    .staff__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 14px;
    }

    .footer {
        padding: 55px var(--pad) 25px;
    }

    .footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .footer__social {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 20px;
    }

    .footer__legal {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-top: 45px;
    }

    .footer__terms {
        white-space: normal;
    }

    .contact-page {
        padding: 0 var(--pad);
    }

    .contact-hero {
        padding: 95px 0 50px;
    }

    .contact-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        padding-bottom: 65px;
    }

    .jobs-hero {
        padding-top: 65px;
    }

    .jd-hero {
        padding: 35px var(--jd-pad);
    }

    .jd-body {
        grid-template-columns: minmax(0, 1fr);
        padding: 35px var(--jd-pad) 55px;
    }

    .jd-toc {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .jd-toc a {
        padding: 6px 0;
        font-size: 1rem;
    }

    .ja-page {
        padding-top: 85px;
    }

    .ja-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 35px;
    }

    .ja-side {
        position: static;
        order: -1;
    }

    .ja-page .ja-field {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .ja-actions {
        padding-left: 180px;
    }
}

/* Phones */
@media (max-width: 600px) {
    :root {
        --pad: 18px;
    }

    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }

    main {
        min-width: 0;
    }

    h2 {
        font-size: clamp(25px, 7vw, 32px);
    }

    .hero {
        height: 75svh;
        min-height: 420px;
        max-height: 650px;
    }

    .hero-text,
    .hero-text1 {
        left: var(--pad);
        right: var(--pad);
        bottom: 10%;
    }

    .hero-text h1,
    .hero-text1 h1 {
        font-size: clamp(26px, 7vw, 34px);
        line-height: 1.15;
    }

    .hero1 {
        height: 400px;
    }

    .hero1 .hero-text {
        left: var(--pad);
        right: var(--pad);
    }

    .hero-link,
    .see {
        display: inline-block;
        margin: 12px 0 0;
    }

    .project,
    .project-top {
        padding-left: var(--pad);
        padding-right: var(--pad);
    }

    .project-detail {
        padding: 0 var(--pad);
    }

    .project-top {
        gap: 22px;
        padding-top: 25px;
    }

    .project-title {
        font-size: 28px;
    }

    .meta-row {
        gap: 16px;
        padding: 14px 0;
        font-size: 13px;
    }

    .project-cover img {
        aspect-ratio: 4 / 3;
        height: auto;
        max-height: 450px;
    }

    .project-description p {
        font-size: 16px;
        line-height: 1.6;
    }

    #contentBlocks img,
    #contentBlocks .project-content-image img,
    #contentBlocks img.project-full-image,
    .content-blocks img {
        height: auto;
        max-height: 450px;
    }

    .content-toolbar {
        justify-content: flex-start;
        padding: 14px var(--pad);
    }

    .content-toolbar button,
    .editor-buttons button,
    #textEditor button {
        padding: 10px 12px;
        font-size: 13px;
    }

    #textEditor {
        box-sizing: border-box;
        padding: 14px var(--pad);
    }

    #textEditor textarea {
        box-sizing: border-box;
        width: 100%;
        font-size: 15px;
    }

    .projects {
        padding: 40px var(--pad);
    }

    .projects .head {
        align-items: flex-start;
        gap: 16px;
    }

    .grid,
    .grid.three {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .thumb,
    .grid.three .thumb {
        aspect-ratio: 4 / 3;
    }

    .cap {
        flex-direction: row;
        align-items: baseline;
    }

    .cap h3 {
        font-size: 13px;
    }

    .cap span {
        font-size: 11px;
    }

    .categories {
        padding: 35px var(--pad) 0;
        box-sizing: border-box;
    }

    .category h2 {
        font-size: 23px;
        padding: 20px 35px 14px 0;
    }

    .category h2::after {
        right: 8px;
        height: 28px;
    }

    .pagination {
        margin-right: 0;
        margin-left: 0;
        gap: 12px;
        font-size: 11px;
    }

    .team-copy {
        padding: 45px var(--pad);
    }

    .team-copy h2 {
        font-size: clamp(28px, 8vw, 38px);
    }

    .team-copy p {
        font-size: 14px;
        text-align: left;
    }

    body.about-page .team-photo {
        width: calc(100% - 2 * var(--pad));
        max-width: none;
        margin: 10px var(--pad) 0;
    }

    .staff,
    .awards,
    .collaborators {
        padding: 45px var(--pad) 0;
    }

    .staff__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 12px;
    }

    .staff__member h3 {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .staff__member p {
        font-size: 12px;
    }

    .awards__list,
    .collaborators__logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 14px;
    }

    .contact-page {
        padding: 0 var(--pad);
    }

    .contact-hero {
        padding: 90px 0 40px;
    }

    .contact-hero h1 {
        font-size: 30px;
    }

    .contact-body {
        gap: 35px;
        padding-bottom: 50px;
    }

    .accordion summary {
        gap: 18px;
        font-size: 22px;
        padding: 20px 0;
    }

    .accordion summary::after {
        flex: 0 0 2px;
    }

    .date-row {
        flex-direction: column;
        gap: 14px;
    }

    .time-slots {
        gap: 12px;
    }

    .footer {
        padding: 45px var(--pad) 20px;
    }

    .footer__title {
        font-size: 34px;
    }

    .footer__legal {
        font-size: 11px;
    }

    .jobs-hero {
        padding: 55px var(--pad) 30px;
    }

    .jobs-hero h1 {
        font-size: 30px;
    }

    .jobs-list {
        padding: 0 var(--pad) 55px;
    }

    .job-card a {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        padding: 24px 0;
    }

    .job-title {
        font-size: 25px;
        overflow-wrap: anywhere;
    }

    .job-meta {
        text-align: left;
        font-size: 11px;
    }

    .jd-back {
        font-size: 18px;
        padding: 12px var(--jd-pad);
    }

    .jd-hero {
        gap: 18px;
        padding: 30px var(--jd-pad);
    }

    .jd-hero h1 {
        font-size: clamp(32px, 10vw, 46px);
        overflow-wrap: anywhere;
    }

    .jd-location {
        font-size: 17px;
    }

    .jd-apply {
        box-sizing: border-box;
        width: 100%;
        text-align: center;
        font-size: 17px;
        padding: 15px 20px;
    }

    .jd-body {
        padding: 28px var(--jd-pad) 45px;
    }

    .jd-toc {
        gap: 10px 16px;
    }

    .jd-content section {
        margin-bottom: 48px;
    }

    .jd-content h2 {
        font-size: 27px;
        padding-bottom: 18px;
    }

    .jd-content h3 {
        margin-top: 32px;
        font-size: 21px;
    }

    .jd-content p,
    .jd-content li {
        font-size: 15px;
    }

    .jd-content p {
        margin-top: 24px;
    }

    .jd-content ul {
        margin-top: 25px;
        padding-left: 22px;
    }

    .jd-cta .jd-apply {
        font-size: 17px;
    }

    .ja-page {
        padding: 85px var(--pad) 55px;
    }

    .ja-breadcrumb {
        font-size: 12px;
    }

    .ja-title {
        font-size: clamp(30px, 9vw, 42px);
        margin-bottom: 28px;
        overflow-wrap: anywhere;
    }

    .ja-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .ja-page .ja-field {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .ja-page .ja-field label {
        padding-top: 0;
        font-size: 15px;
    }

    .ja-page .ja-field input,
    .ja-page .ja-field textarea {
        font-size: 15px;
    }

    .ja-page .ja-field input[type="file"] {
        font-size: 12px;
    }

    .ja-actions {
        padding-left: 0;
    }

    .ja-submit {
        width: 100%;
        min-width: 0;
        height: 56px;
        font-size: 17px;
    }

    .ja-back {
        height: 54px;
        font-size: 16px;
    }

    .ja-summary dd {
        font-size: 17px;
    }

    .to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    :root {
        --pad: 14px;
    }

    .staff__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-text h1,
    .hero-text1 h1 {
        font-size: 26px;
    }

    .content-toolbar {
        gap: 6px;
    }

    .content-toolbar button {
        padding: 9px 10px;
        font-size: 12px;
    }

    .meta-row {
        font-size: 12px;
    }
}


/* Mobile image performance and layout */
@media (max-width: 768px) {
    #contentBlocks img,
    .project-content img,
    .project-image,
    .projects-grid img,
    .project-card img,
    .staff__grid img,
    .about-image {
        max-width: 100%;
        height: auto;
    }

    #contentBlocks img,
    .project-content img {
        display: block;
        width: 100%;
        object-fit: contain;
        content-visibility: auto;
        contain-intrinsic-size: auto 400px;
    }

    .projects-grid img,
    .project-card img {
        display: block;
        width: 100%;
        object-fit: cover;
    }
}
