/* Partners / Client Logos Section */
.partners-section {
    background-color: #fff;
    padding: 40px 0;
}

.logo-scroller {
    overflow: hidden; /* hide scrollbar entirely */
    width: 100%;
}

.logo-track {
    display: flex;
    align-items: center;
    gap: 28px;
    width: max-content; /* allow intrinsic width */
    animation: logos-scroll 40s linear infinite;
    animation-direction: reverse; /* left-to-right */
}

.logo-track:hover {
    animation-play-state: paused; /* optional UX */
}

@keyframes logos-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.logo-grid {
    display: flex;
    flex-wrap: nowrap; /* was used earlier; retained for backward compat */
    gap: 28px;
    align-items: center;
}

.logo-item {
    flex: 0 0 auto; /* prevent shrinking/wrapping */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px; /* consistent hit area */
}

.logo-item img {
    max-width: 100%;
    max-height: 60px; /* normalize visual height */
    width: auto;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .logo-item { min-width: 120px; }
    .logo-item img { max-height: 48px; }
}

/* Reduce heading size for Partners section */
#partners-title {
    font-size: 1.9rem; /* ~half of global h2 (3.8rem) */
}
/* Font declarations */
@font-face {
    font-family: 'NeueHaasDisplay';
    src: url('../fonts/NeueHaasDisplayRoman.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'NeueHaasDisplay';
    src: url('../fonts/NeueHaasDisplayBold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --black-hsl: 0, 0%, 0%;
    --white-hsl: 0, 0%, 100%;
    --accent-color: #003E74;
    --text-color: hsla(var(--black-hsl), 1);
    --background-color: hsla(var(--white-hsl), 1);
    --header-height: 75px; /* Fixed header height */
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

body {
    font-family: 'NeueHaasDisplay', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4vw;
    box-sizing: border-box;
}

header {
    color: white;
    padding: 0; /* Remove padding */
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    transition: background-color 0.3s ease;
    background-color: rgba(0, 0, 0, 0.425); /* Reduced from 0.85 to 0.425 (half as opaque) */
    height: var(--header-height); /* Force fixed height */
    max-height: var(--header-height); /* Ensure it doesn't exceed this height */
    overflow: visible; /* Allow dropdowns if needed */
    box-shadow: 0px 12px 12px 0px rgba(0, 0, 0, 0.2); /* Added drop shadow based on Squarespace specs */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* For Safari support */
}

/* For browsers that don't support backdrop-filter, ensure the background is slightly more opaque */
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
    header {
        background-color: rgba(0, 0, 0, 0.75); /* Fallback for browsers without backdrop-filter support */
    }
}

header.transparent {
    background-color: rgba(0, 0, 0, 0.425); /* Reduced from 0.85 to 0.425 (half as opaque) */
}

header.scrolled {
    background-color: rgba(0, 0, 0, 0.425); /* Reduced from 0.85 to 0.425 (half as opaque) */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 1vw;
    box-sizing: border-box;
    height: 100%; /* Take full height of header */
}

.header-title {
    font-size: 18px; /* Smaller font */
    font-weight: bold;
    letter-spacing: 0.03em;
    padding-left: 3vw;
    display: flex;
    align-items: center;
    height: 100%;
    font-family: 'NeueHaasDisplay', sans-serif;
    flex: 1; /* Take available space */
}

.header-title-text {
    line-height: 1;
}

.header-nav {
    display: flex;
    flex-grow: 0; /* Don't grow */
    justify-content: flex-end; /* Align to right */
    padding-right: 3vw; /* Add padding on right */
}

.header-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px; /* Added gap to control spacing between nav items */
}

.header-nav-item {
    margin-left: 30px; /* Doubled from 15px to 30px */
    font-size: 17px; /* Increased by 20% from 14px to 17px */
    letter-spacing: 0.03em; /* Reduced letter spacing */
}

a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* Hide the social links in header */
.header-actions {
    display: none; /* Hide this entire section */
}

.icon {
    width: 20px;
    height: 20px;
    margin-left: 0;
}

.page-section {
    padding: 30px 0; /* Keep side padding */
    position: relative;
}

.page-section:first-of-type {
    padding-top: 0; /* No padding at top */
}

.page-section.hero-section {
    padding-top: 0;
    padding-bottom: 80px;
}

/* Team page specific adjustment */
.page-section[style*="padding-top:120px"] {
    padding-top: var(--header-height) !important;
}

/* Style to push content below header with NO extra space */
main#page {
    padding-top: var(--header-height) !important; /* Exactly header height, no extra */
    margin-top: 0 !important;
}

/* Hero section needs special handling to avoid header overlap */
main#page section.hero-section:first-child {
    margin-top: calc(-1 * var(--header-height)) !important; /* Negative margin to counteract main padding */
}

.section-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.section-background img {
    width: 120%; /* Zoomed in by 20% */
    height: 120%; /* Zoomed in by 20% */
    object-fit: cover;
    transform: translateX(-10%); /* Center the zoomed image */
    transition: transform 0.3s ease-out; /* For smooth parallax transition */
}

.section-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.335); /* Reduced from 0.67 to 0.335 (50% less opacity) */
}

.black {
    color: white;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: bold;
    line-height: 1em;
    letter-spacing: 0em;
    font-family: 'NeueHaasDisplay', sans-serif;
}

h1 {
    font-size: 4.5rem;
    margin-bottom: 0.3em;
    letter-spacing: 0em;
    font-weight: normal;
}

h2 {
    font-size: 3.8rem;
    line-height: 1em;
    letter-spacing: 0em;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 0.2em;
    letter-spacing: 0em;
}

h4 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.2em;
    line-height: 0.95em;
    letter-spacing: 0em;
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
    box-sizing: border-box;
}

.span-3 {
    width: 25%;
}

.span-8 {
    width: 66.6666%;
}

.span-9 {
    width: 75%;
}

.span-12 {
    width: 100%;
}

.span-6 {
    width: 50%;
}

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

footer {
    padding: 30px 0;
    background-color: white;
    font-size: 14px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-left-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}

.footer-columns {
    display: flex;
    gap: 60px;
}

.footer-column h4 {
    color: #333;
    margin-top: 0;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-circle {
    width: 35px;
    height: 35px;
    background-color: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon {
    width: 20px;
    height: 20px;
    color: white;
}

footer p {
    margin: 0;
    color: #333;
}

footer .social-links a {
    color: white;
    display: inline-block;
    line-height: 0;
    font-size: 0;
    text-decoration: none;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
    
    .footer-left, .footer-right {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .footer-right {
        justify-content: flex-start;
    }
    
    .footer-left-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .span-6 {
        width: 100%;
        padding-right: 0 !important;
        margin-bottom: 30px;
    }
    
    .row {
        flex-direction: column;
    }
    
    /* Responsive adjustments for about and contact pages */
    .page-section .col.span-6[style*="height:90vh"] {
        height: 50vh !important;
        margin-bottom: 0;
        order: -1; /* Show image first on mobile */
    }
    
    .page-section .col.span-6[style*="padding-top:80px"] {
        padding-top: 30px !important;
    }
}

/* PhD Defence Section */
.phd-defence {
    text-align: center;
    padding: 60px 0;
    background-color: #000;
    color: white;
}

.phd-defence h2 {
    font-size: 2em;
    margin-bottom: 30px;
    letter-spacing: -0.01em;
}

.phd-defence p {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 16px;
    line-height: 1.2;
}

/* Publications Section */
.publications {
    background-color: var(--accent-color);
    color: white;
    padding: 60px 0;
}

.publications h3 {
    margin-bottom: 30px;
    font-size: 1.8em;
}

.publications ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.publications li {
    margin-bottom: 25px;
    line-height: 1.5;
}

section.publications a, section.publications a:visited, section.publications a:hover, section.publications a:active {
    color: white !important;
    text-decoration: underline !important;
}

.publications a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.publications strong {
    font-weight: bold;
}

.publications p {
    margin: 0.5em 0;
}

/* Patents Section */
.patents {
    background-color: var(--accent-color);
    color: white;
    padding-top: 0;
}

.patents h3 {
    margin-top: 20px;
    font-size: 1.8em;
}

.patents ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Reduce font size for publications and patents by two points */
.publications,
.patents {
    font-size: 0.875em;
}

/* Employment Section */
.employment {
    background-color: #f9f9f9;
    padding: 10px 0;
}

.employment h4 {
    margin-top: 0;
    font-weight: normal;
}

.employment h4 strong {
    font-weight: bold;
}

/* Hero section specific styling */
.hero-section {
    position: relative;
    margin-top: 0 !important; /* Removed header height margin */
    padding-top: 0 !important;
    min-height: 86.625vh; /* Increased by another 5% from 82.5vh to 86.625vh */
    display: flex;
    align-items: center;
}

.hero-section .image-block-wrapper {
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    top: 2.2em;
}

.hero-section .content-wrapper {
    padding-top: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    margin-top: 0;
    font-size: 4.5rem;
}

.hero-section h3 {
    margin-bottom: 1em;
}

.hero-section .section-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    margin: 5% auto;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    position: relative;
}

/* Close button in modal */
.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Play overlay styling for video thumbnail */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.play-overlay svg {
    width: 68px;
    height: 68px;
    filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.5));
}

.phd-video-container {
    position: relative;
    cursor: pointer;
}

.phd-video-container:hover .play-overlay svg {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Qualifications section */
.qualifications {
    background-color: #f9f9f9;
    padding: 10px 0;
}

.qualifications h4 {
    font-weight: 500;
}

/* Common styles for employment and qualifications sections */
.employment .content, .qualifications .content {
    max-width: 50%;
    margin: 0 auto;
}

.employment h3, .qualifications h3 {
    font-size: 1.8em;
    margin-top: 20px;
    font-weight: 600;
}

.career-entry {
    display: flex;
    margin-bottom: 35px;
    align-items: flex-start;
}

.career-date {
    width: 15%;
    text-align: right;
    padding-right: 10px;
    font-size: 16px;
    padding-top: 5px;
    color: #555;
    font-weight: bold;
}

.career-logo {
    width: 15%;
    padding: 0 10px;
    text-align: center;
}

.career-logo img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.career-details {
    width: 70%;
    padding-left: 10px;
}

.career-details h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: normal;
}

.career-details h4 strong {
    font-weight: bold;
}

.career-details p {
    margin-top: 8px;
    font-size: 16px;
    /* line-height: 1.5; */
    color: #333;
}

hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 30px 0;
    width: 100%;
}

@media (max-width: 1200px) {
    .employment .content, .qualifications .content {
        max-width: 70%;
    }
}

@media (max-width: 768px) {
    .employment .content, .qualifications .content {
        max-width: 90%;
    }
    
    .career-entry {
        flex-direction: column;
    }
    
    .career-date, .career-logo, .career-details {
        width: 100%;
        text-align: left;
        padding: 0;
        margin-bottom: 10px;
    }
    
    .career-logo img {
        max-width: 120px;
    }
    
    .span-3, .span-8, .span-9 {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .header-nav {
        display: none;
    }
    
    .header-burger {
        display: block;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h3 {
        font-size: 1.3em;
    }
    
    .page-section {
        padding: 60px 0;
    }
    
    .hero-section {
        min-height: 50vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section h3 {
        font-size: 1.3rem;
    }
}

p {
    line-height: 1.2;
} 

/* Modified hyperlink styling to use the normal text color for links, except for voice text links */
a.voice, a.voice:visited, a.voice:hover, a.voice:active {
    color: white;
} 

/* Footer layout updates */
footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

footer p {
    margin: 0;
    color: #333;
}

footer .social-links a {
    color: #333;
    display: inline-block;
    line-height: 0;
    font-size: 0;
} 

footer .social-links {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make the site title use same typography as headers */
#site-title {
    font-family: inherit;
    text-decoration: none;
    line-height: 1em;
    letter-spacing: 0em;
    font-size: 24px;
    display: inline-block;
    font-weight: bold;
}

/* Remove underlines from header links */
header a {
    text-decoration: none;
}

/* Styling for the image that takes up right half of screen */
.position-relative {
    position: relative;
}

.content-column {
    float: left;
    box-sizing: border-box;
}

.image-column {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    height: 100vh;
}

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

@media (max-width: 768px) {
    .span-6 {
        width: 100%;
        padding-right: 0 !important;
        margin-bottom: 30px;
    }
    
    .row {
        flex-direction: column;
    }
    
    /* Responsive adjustments for about and contact pages */
    .content-column {
        width: 100% !important;
        padding-right: 0 !important;
        padding-top: 30px !important;
        float: none;
    }
    
    .image-column {
        position: relative;
        width: 100%;
        height: 50vh;
        margin-bottom: 20px;
        order: -1;
    }
    
    /* Reordering for mobile */
    .position-relative {
        display: flex;
        flex-direction: column;
    }
    
    .image-column {
        order: -1;
    }
}

/* Full width layout with right image */
.full-width-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

.content-container {
    width: 50%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end; /* Align content to the right side of the left half */
    padding-top: var(--header-height); /* Exactly header height, no extra */
}

.content-inner {
    max-width: 600px;
    padding: 0 60px 40px 30px; /* More padding on the right side (near image) */
    width: 100%;
}

.full-right-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

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

/* Adjust hero section for header */
.hero-section {
    position: relative;
    margin-top: 0 !important; /* Removed header height margin */
    padding-top: 0 !important;
    min-height: 86.625vh; /* Increased by another 5% from 82.5vh to 86.625vh */
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .full-width-wrapper {
        flex-direction: column;
        min-height: auto;
    }
    
    .content-container {
        width: 100%;
        padding-top: var(--header-height); /* Keep the header height adjustment */
        justify-content: center;
        order: 2;
    }
    
    .content-inner {
        padding: 0 20px 40px;
        max-width: 100%;
    }
    
    .full-right-image {
        position: relative;
        width: 100%;
        height: 50vh;
        order: 1;
    }
}

/* Contact form styling */
.contact-form {
    width: 100%;
}

.contact-form label {
    display: block;
    margin-top: 15px;
    font-weight: 500;
    margin-bottom: 5px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .form-row {
    display: flex;
    margin-bottom: 15px;
}

.contact-form button {
    margin-top: 20px;
    padding: 12px 30px;
    background: #006dff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.contact-form button:hover {
    background: #0055cc;
}

.button {
    display: inline-block;
    padding: 10px 25px;
    background: #f1592a;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
    text-decoration: none;
    text-align: center;
    font-size: 1rem;
}

.button:hover {
    background: #d84c1f;
    text-decoration: none;
    opacity: 1;
}

@media (max-width: 768px) {
    #contact-section .row {
        flex-direction: column;
    }
    
    #contact-section .col.span-6 {
        width: 100%;
        padding-right: 0;
    }
    
    .contact-form .form-row {
        flex-direction: column;
    }
    
    .contact-form .form-row > div {
        margin: 0 0 15px 0 !important;
    }
}

/* ===== HAMBURGER MENU STYLES ===== */

/* Hamburger button - hidden on desktop, shown on mobile */
.header-burger {
    display: none;
    cursor: pointer;
    padding: 10px;
    margin-right: 3vw;
    z-index: 1001;
}

.burger-inner {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-inner .top-bun,
.burger-inner .patty,
.burger-inner .bottom-bun {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Animate to X when menu is open */
.header-burger.is-active .top-bun {
    transform: translateY(8px) rotate(45deg);
}

.header-burger.is-active .patty {
    opacity: 0;
}

.header-burger.is-active .bottom-bun {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu overlay */
.header-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.header-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.header-menu-nav-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding-top: var(--header-height);
}

.header-menu-nav-item {
    padding: 15px 0;
}

.header-menu-nav-item a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.header-menu-nav-item a:hover {
    opacity: 0.7;
}

.header-menu-nav-item-content {
    text-align: center;
}

/* Show hamburger and mobile menu on small screens */
@media (max-width: 768px) {
    .header-burger {
        display: block;
    }
    
    .header-menu {
        display: block;
    }
} 