/* Site font: Raleway is loaded with a <link> in each page's <head> */

:root {
    --font-sans: "Raleway", "Helvetica Neue", Arial, sans-serif;
    --bg: #1d1d1d;
    --text: #dedede;
    --accent: #e47647;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);

}

h1 {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 420pt;
    letter-spacing: 0.05em;
    color: var(--bg);
    -webkit-text-stroke: 4px var(--text);
    paint-order: stroke fill;
}

h2 {
    text-transform: uppercase;
}

/* Navbar base - fully transparent until the page is scrolled */
.navbar {
    padding-top: 24px;
    padding-bottom: 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 100px;
    width: 100%;
    --nav-glass: transparent;
}

/* The glass (tint + blur) sits on a layer behind the links, with a hard
   bottom edge. Same treatment on every page; case-study pages only swap
   the tint (see case-study.css) */
.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--nav-glass);
    opacity: 0;
    transition: opacity 0.4s ease, background-color 0.4s ease;
}

/* Once the page has scrolled, the header gains its glass */
.navbar.nav-scrolled {
    --nav-glass: color-mix(in srgb, var(--bg) 38%, transparent);
}

.navbar.nav-scrolled::before {
    opacity: 1;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* ---------- Adaptive glass nav (every page) ----------
   main.js adds .nav-light while a [data-nav-theme="light"] section sits under
   the nav's centre line; glass tint, links, logo and hamburger flip to suit.
   Pages can retint it with --nav-dark / --nav-light / --nav-ink. */
.navbar,
.navbar .nav-link,
.navbar-brand img,
#nav-icon1 span {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, color 0.35s ease, filter 0.35s ease;
}

.navbar.nav-scrolled {
    --nav-glass: color-mix(in srgb, var(--nav-dark, #0f1716) 38%, transparent);
}

.navbar.nav-scrolled::before {
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.navbar.nav-scrolled.nav-light:not(.menu-open) {
    --nav-glass: color-mix(in srgb, var(--nav-light, #f6f6f3) 55%, transparent);
}

.navbar.navbar-dark.nav-light:not(.menu-open) .navbar-nav .nav-link:not([download]) {
    color: var(--nav-ink, #1d1d1d);
}

.navbar.navbar-dark.nav-light:not(.menu-open) .navbar-nav .nav-link:not([download]):hover {
    color: var(--accent);
}

/* Logo SVG is cream; flatten it to ink on light sections */
.navbar.nav-light:not(.menu-open) .navbar-brand img {
    filter: brightness(0) opacity(0.85);
}

.navbar.nav-light:not(.menu-open) #nav-icon1 span {
    background: var(--nav-ink, #1d1d1d);
}

/* Remove background/blur when mobile menu is open */
.navbar.menu-open::before {
    opacity: 0;
}

.navbar.menu-open {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Define button aesthetics */
.btn.btn-primary {
    background-color: var(--bg);
    border: 2px solid var(--text);
    font-family: var(--font-sans);
    padding: 8px 18px;
    color: var(--text);
    border-radius: 30px;
}

/* Logo size */
.navbar-brand img {
    height: 15px;
    width: auto;
    display: block;
    position: relative;
    z-index: 200;
}

/* Nav links: Raleway, quiet by default, a thin underline grows on hover
   and marks the current page */
.navbar-dark .navbar-nav .nav-link {
    position: relative;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 8px 10px;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(.2, .7, .2, 1);
}

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link:focus-visible::after,
.navbar-dark .navbar-nav .nav-link.active[aria-current="page"]::after {
    transform: scaleX(1);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: var(--text);
    outline: none;
}

.navbar-dark .navbar-nav .nav-link.active[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* Resume keeps the accent colour */
.navbar-dark .navbar-nav .nav-link[download] {
    color: var(--accent) !important;
}

/* Custom hamburger wrapper inside Bootstrap button */
.custom-toggler {
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 200;
}

/* Reset your icon so it behaves inside a navbar */
#nav-icon1 {
    width: 30px;
    height: 22px;
    position: relative;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
    cursor: pointer;
    margin: 0;
}

#nav-icon1 span {
    display: block;
    position: absolute;
    height: 4px;
    width: 100%;
    background: var(--text);
    border-radius: 4px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

/* Line positions */
#nav-icon1 span:nth-child(1) {
    top: 0px;
}

#nav-icon1 span:nth-child(2) {
    top: 9px;
}

#nav-icon1 span:nth-child(3) {
    top: 18px;
}

/* Open (X) state */
#nav-icon1.open span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

#nav-icon1.open span:nth-child(2) {
    opacity: 0;
    left: -30px;
}

#nav-icon1.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */

/* Full-screen mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--accent);
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Active state - menu is open */
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Mobile menu navigation container */
.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

/* Mobile menu links */
.mobile-menu-link {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: block;
    text-align: center;
}

.mobile-menu-link:hover {
    transform: translateX(10px);
    opacity: 0.8;
    color: white;
}

.mobile-menu-link:active {
    transform: scale(0.95);
}

/* Hide mobile menu on desktop */
@media (min-width: 768px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Hide Bootstrap collapse menu on mobile - we use the overlay instead */
@media (max-width: 767px) {
    .navbar-collapse {
        display: none !important;
    }
}


.bg-bleed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.bg-bleed img {
    position: absolute;
    top: -100px;
    left: 0;
    will-change: transform;
}

/* Scroll Sections Wrapper - Pinned Container */
#scroll-sections-wrapper {
    position: relative;
    height: 100vh;
    /* Single viewport height container */
    margin-top: -30vh;
    /* Pull up to overlap with hero, eliminating gap */
}

/* Scroll Sections - All stacked on top of each other */
.scroll-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Perfect vertical centering */
    justify-content: center;
}

.scroll-section .container {
    overflow: hidden;
}

.text-content,
.image-content {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    /* GPU acceleration */
}

/* Ensure overall body doesn't show horizontal scroll.
   Only set on html, not body: setting overflow-x on both forces
   overflow-y:auto on each (per the CSS overflow spec pairing rule),
   which turns body into its own scroll container and breaks
   position:sticky for any sticky element on the page. */
html {
    overflow-x: hidden;
}

/* About Me Section */
.about-me {
    min-height: 100vh;
    padding: 3.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.about-me .section-heading {
    margin-bottom: 1.5rem;
}

/* Two-column layout: intro bio on the left, experience timeline on the right */
.about-layout {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

/* Bio, skills and software: too tall to stay pinned, so it scrolls with the page */
.about-intro {
    flex: 1 1 45%;
    max-width: 520px;
    min-width: 0;
}

.about-intro p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
    opacity: 0.9;
    margin-bottom: 1.25rem;
}

.about-intro p:last-child {
    margin-bottom: 0;
}

.about-main {
    flex: 1 1 60%;
    min-width: 0;
}

/* Orbit Container (footer) */
.orbit-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
}

/* Experience Timeline */
.experience-timeline {
    position: relative;
    z-index: 2;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline-item {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(222, 222, 222, 0.15);
}

.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-date {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.timeline-role {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.timeline-company {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    opacity: 0.7;
    margin-bottom: 0.4rem;
}

.timeline-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.85;
    max-width: 700px;
}

@media (min-width: 769px) {
    .about-orbit-rail {
        display: block;
    }
}

/* Footer orbit container - positioned at top of footer */
.contact-footer-section .orbit-container {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    bottom: auto;
    right: auto;
    width: auto;
    height: auto;
    z-index: 0;
    pointer-events: none;
}

/* Footer orbits - make them visible and sized */
.contact-footer-section .orbit-container .orbit {
    opacity: 1 !important;
    /* Override the default opacity: 0 and any JS animations */
}

.contact-footer-section .orbit-container #big-orbit {
    width: 400px !important;
    height: auto;
    opacity: 1 !important;
}

.contact-footer-section .orbit-container #med-orbit {
    width: 300px !important;
    height: auto;
    opacity: 1 !important;
}

.contact-footer-section .orbit-container #small-orbit {
    width: 200px !important;
    height: auto;
    opacity: 1 !important;
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    opacity: 0;
    will-change: transform, opacity;
    display: block;
    z-index: -100;
}

/* Clients Carousel Section */
.clients-section {
    height: 30vh;
    background-color: #dedede;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.clients-section h4 {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 14pt;
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    color: #696969;
}

.clients-section h2 {
    padding-top: 24px;
    text-align: center;
    color: #1d1d1d;
}

.clients-carousel {
    width: 100%;
    overflow: hidden;
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 150px;
    width: fit-content;
    padding-left: 100px;
    /* Space from left edge */

    /* Space from right edge */
}

.client-logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo-item img {
    max-height: 20px;
    height: 20px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.client-logo-item img.larger-logo {
    max-height: 40px;
    height: 40px;
}

.client-logo-item img.medium-logo {
    max-height: 30px;
    height: 30px;
}

.client-logo-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Works Section Gallery Styles */

.works-section .header,
.works-section .footer {
    background: #1d1d1d;
    color: #dedede;
    padding: 30px;
    text-align: center;
}

.works-section .header a,
.works-section .footer a {
    color: #dedede;
    text-decoration: none;
}

@media (min-width: 768px) {

    .works-section .header,
    .works-section .footer {
        padding: 100px 30px;
    }
}

.works-section .header h1,
.works-section .footer h1 {
    font-size: 4em;
    font-weight: 300;
}

.works-section .header .arrow-icon,
.works-section .footer .arrow-icon {
    width: 60px;
    height: 60px;
    display: inline-block;
    margin-top: 20px;
    color: #dedede;
}

.works-section .header .bounce,
.works-section .footer .bounce {
    -webkit-animation-name: bounce;
    animation-name: bounce;
    -webkit-transform-origin: center bottom;
    transform-origin: center bottom;
    animation-iteration-count: infinite;
    -webkit-animation-iteration-count: infinite;
}

.works-section .header .animated,
.works-section .footer .animated {
    -webkit-animation-duration: 4s;
    animation-duration: 4s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

.works-section .section {
    width: 100%;
    position: relative;
}

.works-section .section .left,
.works-section .section .middle,
.works-section .section .right {
    width: 100%;
    display: block;
    color: #dedede;
    box-sizing: border-box;
    left: 0;
    padding: 30px;
    text-align: center;
    overflow: hidden;
    -moz-transition: 0.8s ease-out all;
    -o-transition: 0.8s ease-out all;
    -webkit-transition: 0.8s ease-out all;
    transition: 0.8s ease-out all;
}

@media (min-width: 480px) {

    .works-section .section .left .content,
    .works-section .section .middle .content,
    .works-section .section .right .content {
        position: relative;
        top: 50%;
        -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
        transform: translateY(-50%);
    }
}

@media (min-width: 480px) {

    .works-section .section .left,
    .works-section .section .middle,
    .works-section .section .right {
        width: 50%;
        font-size: 0.9em;
        padding: 10px;
        left: 0;
        float: left;
        position: absolute;
    }
}

@media (min-width: 768px) {

    .works-section .section .left,
    .works-section .section .middle,
    .works-section .section .right {
        width: 33.33333%;
        left: 33.33%;
        padding: 10px;
    }
}

@media (min-width: 992px) {

    .works-section .section .left,
    .works-section .section .middle,
    .works-section .section .right {
        padding: 30px;
        font-size: 1em;
    }
}

.works-section .section.animate .left {
    left: 0;
}

@media (min-width: 480px) {
    .works-section .section.animate .left {
        left: 50%;
    }
}

@media (min-width: 768px) {
    .works-section .section.animate .left {
        left: 0;
    }
}

.works-section .section.animate .right {
    left: 0;
}

@media (min-width: 480px) {
    .works-section .section.animate .right {
        left: 50%;
    }
}

@media (min-width: 768px) {
    .works-section .section.animate .right {
        left: 66.66%;
    }
}

.works-section .section .title {
    background: var(--accent);
}

.works-section .section .title h2 {
    margin-top: 0;
}

.works-section .section .title p {
    line-height: 1.55em;
    margin-bottom: 0.75em;
}

.works-section .section .title .btn-primary {
    display: inline-block;
    margin-top: 24px;
    background-color: #e47647;
    border: 2px solid var(--text);
    font-family: var(--font-sans);
    padding: 8px 18px;
    color: var(--text);
    border-radius: 30px;
    text-decoration: none;
    -moz-transition: 0.4s ease-out all;
    -o-transition: 0.4s ease-out all;
    -webkit-transition: 0.4s ease-out all;
    transition: 0.4s ease-out all;
}

.works-section .section .title .btn-primary:hover {
    background: #e47647;
}

.works-section .section .tiles {
    padding: 0;

    clear: both;
    display: none;
    float: none;
}

.works-section .section .tiles img {
    width: 49%;
    float: left;
    height: auto;
    opacity: 0.7;
    -moz-transition: 0.6s ease-out all;
    -o-transition: 0.6s ease-out all;
    -webkit-transition: 0.6s ease-out all;
    transition: 0.6s ease-out all;
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    filter: grayscale(100%);
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

.works-section .section .tiles img:hover {
    opacity: 1;
    -webkit-filter: grayscale(0%);
    -moz-filter: grayscale(0%);
    -o-filter: grayscale(0%);
    filter: grayscale(0%);
}

@media (min-width: 768px) {
    .works-section .section .tiles {
        display: block;
    }
}

.works-section .section .middle {
    background: #1d1d1d;
    z-index: 2;
    padding: 0;
}

.works-section .section .middle img {
    width: 100%;
    height: auto;
    display: block;
}

@-webkit-keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        -webkit-transform: translateY(0);
    }

    40% {
        -webkit-transform: translateY(-20px);
    }

    60% {
        -webkit-transform: translateY(-10px);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* ============================================
   FOOTER / CONTACT SECTION
   ============================================ */

.contact-footer-section {
    min-height: 100vh;
    height: 100vh;
    /* No background: the page (and on the homepage, the shell) shows through */
    background-color: transparent;
    color: #dedede;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.footer-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto 1fr auto;
    grid-template-columns: 1fr auto 1fr;
    padding: 3rem;
    position: relative;
}

/* ============================================
   TOP SECTION - Navigation & Social
   ============================================ */

.footer-top {
    grid-row: 1;
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

/* Top Left: Vertical Navigation */
.footer-nav-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav-vertical a {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #dedede;
    transition: color 0.3s ease;
}

.footer-nav-vertical a:hover {
    color: var(--accent);
}

/* Top Right: Social Links & Email */
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.footer-email a {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 500;
    color: #dedede;
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.social-links a {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    text-decoration: underline;
    color: #dedede;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
}

.social-links a:hover {
    color: var(--accent);
}

.social-links a::after {
    content: "";
    display: inline-block;
    width: 0.35rem;
    height: 0.35rem;
    margin: 0 0 0.12rem 0.4rem;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
}

/* ============================================
   MIDDLE SECTION - Bracketed Links
   ============================================ */

.footer-middle {
    grid-row: 2;
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    margin-bottom: -250px;
}

.bracketed-link {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-decoration: none;
    color: #dedede;
    transition: all 0.3s ease;
}

.bracketed-link:hover {
    color: var(--accent);
    letter-spacing: 0.15em;
}

/* ============================================
   CENTER - Giant Logo
   ============================================ */

.footer-logo {
    grid-row: 3;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0 0.5rem 0;
}

.footer-logo img {
    max-width: 90%;
    height: auto;
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: -250px;
}

/* ============================================
   BOTTOM SECTION - Location & Copyright
   ============================================ */

.footer-bottom {
    grid-row: 5;
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 0.5rem;
}

.footer-location {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    color: #dedede;
    letter-spacing: 0.05em;
}

.footer-copyright {
    text-align: right;
}

/* Same treatment as .footer-location on the opposite corner */
.footer-copyright p {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    color: #dedede;
    margin: 0;
    letter-spacing: 0.05em;
}

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

@media (max-width: 768px) {
    .footer-container {
        padding: 2rem 1.5rem;
        grid-template-rows: auto auto 1fr auto auto;
    }

    .footer-top {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-social {
        align-items: flex-start;
    }

    .footer-social::after {
        text-align: left;
    }

    .footer-email a {
        font-size: 1.2rem;
    }

    .social-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer-middle {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .footer-copyright {
        text-align: left;
    }

    .footer-logo img {
        max-height: 120px;
    }
}

/* ============================================
   WORK PAGE CAROUSEL STYLES (from work.css)
   ============================================ */

.work-page {
    background-color: var(--bg);
    padding-top: 120px;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* ============================================
   IMMERSIVE HOMEPAGE: Work + About float on one frosted-glass panel that
   slides up over the sticky hero; the particle shell glows through it
   ============================================ */
.shell-hero ~ .work-page {
    background: rgba(29, 29, 29, 0.58);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-top: 1px solid rgba(222, 222, 222, 0.1);
    border-radius: 40px 40px 0 0;
    box-shadow: 0 -40px 80px -40px rgba(0, 0, 0, 0.6);
    padding-top: 40px;
}

/* Cards: no border; a deep soft shadow lifts them off the glass panel,
   and they rise a little on hover */
.shell-hero ~ .work-page .project-card {
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.9), 0 20px 40px -30px rgba(0, 0, 0, 0.7);
    transition: transform 0.6s cubic-bezier(.2, .7, .2, 1);
    will-change: transform;
}

.shell-hero ~ .work-page .project-card:hover {
    transform: translateY(-6px);
}

/* About shares the glass panel instead of its own background */
.shell-hero ~ .work-page .about-me {
    background: transparent;
}

/* Hero Section */
.work-hero {
    padding: 80px 0 60px;
    text-align: center;
}

.work-title {
    font-family: var(--font-sans);
    font-size: 4rem;
    font-weight: 900;
    color: var(--bg);
    -webkit-text-stroke: 3px var(--text);
    paint-order: stroke fill;
    margin-bottom: 1rem;
}

.work-subtitle {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    color: var(--text);
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Work Sections */
.work-section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.section-heading {
    font-family: var(--font-sans);
    font-size: 36pt;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3rem;
    text-align: left;
}

/* UI design showcases and articles: two columns under the project grid,
   each a vertical carousel of short strip cards (one at a time, auto-advancing) */
.work-more {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-top: 5rem;
}

.work-more-col {
    --strip: 120px;
    display: grid;
    gap: 1.25rem;
    align-content: start;
    min-width: 0;
}

.work-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.work-more-heading {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.work-more-nav {
    display: flex;
    gap: 0.5rem;
}

.work-more-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--text);
    background: transparent;
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.work-more-nav button:hover:not(:disabled) {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.work-more-nav button:disabled {
    opacity: 0.25;
    cursor: default;
}

.work-more-list {
    display: grid;
    gap: 1rem;
    /* One card at a time; the script auto-advances and loops */
    max-height: var(--strip);
    /* Stepped by the up/down buttons only: the wheel and touch always scroll
       the page, never get caught by the list */
    overflow-y: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.work-more-list::-webkit-scrollbar {
    display: none;
}

/* Short strip version of the project card: same look, quarter height */
.project-card.project-card-strip {
    aspect-ratio: auto;
    height: var(--strip);
    scroll-snap-align: start;
}

.project-card-strip .project-card-overlay {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
}

.project-card-strip::before {
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.1) 100%);
}

.project-card-strip .project-card-title {
    margin: 0;
}

/* No room for the hover description in a strip; the CTA carries the action */
.project-card-strip .project-card-desc {
    display: none;
}

.project-card-strip .project-card-cta {
    margin-top: 0;
    flex-shrink: 0;
}

/* Solid strip: a flat brand colour instead of an image, so no darkening gradient */
.project-card-solid::before {
    display: none;
}

/* Placeholder strip: no image, dashed outline */
.project-card-soon {
    background-color: transparent;
    border: 1px dashed rgba(222, 222, 222, 0.35);
}

.project-card-soon::before,
.project-card-soon::after {
    display: none;
}

.project-card-soon .project-card-title {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .work-more {
        grid-template-columns: 1fr;
        margin-top: 3.5rem;
    }

    .work-more-col {
        --strip: 96px;
    }

    /* The whole strip is the link; no room for the CTA beside the title */
    .project-card-strip .project-card-cta {
        display: none;
    }

    .project-card.project-card-strip {
        aspect-ratio: auto;
    }
}

/* Project Grid - featured card up top, thumbnails below in a bento layout */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.project-card {
    position: relative;
    display: block;
    grid-column: span 1;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
    background-color: #2a2a2a;
    background-position: center;
    background-size: cover;
    text-decoration: none;
    isolation: isolate;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    transition: opacity 0.35s ease;
}

.project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    background-position: inherit;
    background-size: cover;
    transform: scale(1);
    transition: transform 0.9s cubic-bezier(.2, .7, .2, 1);
    will-change: transform;
    z-index: -1;
}

.project-card:hover::after {
    transform: scale(1.06);
}

.project-card-featured {
    grid-column: 1 / -1;
    aspect-ratio: 21 / 9;
}

.project-card-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
}

.project-card-title {
    font-family: var(--font-sans);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.project-card-featured .project-card-title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.project-card-desc {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    transition: opacity 0.3s ease, max-height 0.35s ease, margin-top 0.3s ease;
}

.project-card-featured .project-card-desc {
    opacity: 0.85;
    max-height: 6em;
    max-width: 640px;
    font-size: 1rem;
    margin-top: 0;
}

.project-card:hover .project-card-desc {
    opacity: 0.85;
    max-height: 6em;
    margin-top: 0.4rem;
}

.project-card-ip {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-style: italic;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 0.5rem;
}

.project-card:hover .project-card-ip,
.project-card-featured .project-card-ip {
    opacity: 0.85;
}

.project-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 0.9rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card:hover .project-card-cta {
    opacity: 1;
    transform: translateY(0);
}

.project-card-arrow {
    transition: transform 0.3s ease;
}

.project-card:hover .project-card-arrow {
    transform: translateX(4px);
}

/* Project Card Button */
.card-btn {
    display: inline-block;
    background-color: #1d1d1d;
    border: 2px solid var(--text);
    font-family: var(--font-sans);
    padding: 8px 18px;
    color: var(--text);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .work-title {
        font-size: 2.5rem;
    }

    .work-subtitle {
        font-size: 1rem;
    }

    .section-heading {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .project-card,
    .project-card-featured {
        grid-column: 1 / -1;
        aspect-ratio: 4 / 3;
    }

    .project-card-title {
        font-size: 1.15rem;
    }

    .project-card-featured .project-card-title {
        font-size: 1.6rem;
    }

    /* Touch devices have no hover: keep description/CTA visible so the
       card's content isn't hidden behind an interaction that can't happen. */
    .project-card-desc {
        opacity: 0.85;
        max-height: 6em;
        margin-top: 0.4rem;
    }

    .project-card-cta {
        opacity: 1;
        transform: translateY(0);
    }

    .project-card-ip {
        opacity: 0.85;
    }

    /* Ensure button text doesn't wrap */
    .card-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .work-page {
        padding-top: 100px;
    }

    .work-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .work-title {
        font-size: 2rem;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    .project-card-title {
        font-size: 1.05rem;
    }

    .project-card-featured .project-card-title {
        font-size: 1.4rem;
    }

    .project-card-desc {
        font-size: 0.8rem;
    }

    /* Smaller button for very small screens */
    .card-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* ============================================
   MOBILE VIEW IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {

    /* Increase left-right margins (double) */
    .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    /* Position scroll sections content to start at ~15% from top */
    .scroll-section {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding-top: 15vh !important;
        overflow: visible !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    /* Remove overflow hidden from container */
    .scroll-section .container {
        overflow: visible !important;
    }

    /* Scale down illustrations to fit better with new margins */
    .scroll-section .image-content img {
        max-height: 300px !important;
        width: auto !important;
    }

    /* Ensure image content container doesn't clip */
    .scroll-section .image-content {
        overflow: visible !important;
        margin-top: 0.5rem;
        margin-bottom: 3rem;
        padding-bottom: 3rem;
        position: relative;
    }

    /* Position illustrations to occupy 50-60% of viewport with spacing.
       Override Bootstrap's align-items-center + min-vh-100 (set inline in
       the markup), which otherwise vertically center the text+image stack
       inside a full-viewport-height row and push the illustration down. */
    .scroll-section .row {
        overflow: visible !important;
        padding-bottom: 4rem !important;
        min-height: auto !important;
        align-items: flex-start !important;
    }

    /* Add bottom spacing to scroll sections */
    .scroll-section {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding-top: 15vh !important;
        padding-bottom: 3rem !important;
        overflow: visible !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    /* Reposition wiggly line background lower on mobile */
    .bg-bleed {
        top: 30vh !important;
        overflow: visible !important;
        height: 200vh !important;
    }

    .bg-bleed img {
        top: 0 !important;
    }

    /* Ensure scroll sections wrapper doesn't clip content */
    #scroll-sections-wrapper {
        overflow: visible !important;
        height: auto !important;
    }

    /* Ensure text content respects the new positioning */
    .scroll-section .text-content {
        margin-bottom: 2rem;
    }

    /* Adjust heading sizes for better mobile readability */
    .scroll-section h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }

    /* Button spacing */
    .scroll-section .btn {
        margin-top: 1rem;
    }

    /* Ensure row has proper spacing */
    .scroll-section .row {
        overflow: visible !important;
    }

    /* ============================================
       ABOUT ME SECTION MOBILE IMPROVEMENTS
       ============================================ */

    /* Stack the intro bio above the timeline on mobile */
    .about-layout {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .about-intro {
        max-width: 100% !important;
        position: static !important;
    }

    /* Ensure About Me section has proper spacing and allows overflow */
    .about-me {
        padding: 3rem 0 0 0 !important;
        min-height: auto !important;
    }

    /* Remove bottom padding from container inside About Me */
    .about-me .container.py-5 {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Ensure clients section appears above About Me orbits */
    .clients-section {
        position: relative !important;
        z-index: 1 !important;
    }

    /* The 150px gap / 100px padding here were tuned for desktop's wide
       track; on mobile they left only 1-2 logos visible at a time with
       huge gaps between them, so scale both down. */
    .clients-track {
        gap: 50px;
        padding-left: 30px;
    }

    /* Footer orbit adjustments - half size and right aligned */
    .contact-footer-section .orbit-container {
        left: auto !important;
        right: 100px !important;
        transform: translateX(0) !important;
        top: 2rem !important;
        width: auto !important;
        height: auto !important;
    }

    .contact-footer-section .orbit {
        width: 270px !important;
        height: 270px !important;
    }

    .contact-footer-section #big-orbit-footer {
        width: 270px !important;
        height: 270px !important;
    }

    .contact-footer-section #med-orbit-footer {
        width: 210px !important;
        height: 210px !important;
    }

    .contact-footer-section #small-orbit-footer {
        width: 150px !important;
        height: 150px !important;
    }

    /* Footer middle - reduce spacing and center */
    .footer-middle {
        justify-content: center !important;
        gap: 1rem !important;
        padding: 0 !important;
        margin-top: 3rem !important;
    }

    /* Footer logo - add spacing above location */
    .footer-logo {
        margin-top: 3.5rem !important;
        margin-bottom: 1.5rem !important;
    }
}

/* ============================================
   PROJECT CARDS: hover reveal (homepage grid)
   A frosted glass layer grows out of the arrow button (a circle expanding
   from the top-right corner) and the project details rise into it.
   ============================================ */
.project-grid .project-card {
    --pc-ease: cubic-bezier(.65, 0, .25, 1);
}

/* Round arrow button, top right */
.project-grid .pc-arrow {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 3;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #f2f2ee;
    background: rgba(242, 242, 238, 0.12);
    border: 1px solid rgba(242, 242, 238, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.45s var(--pc-ease), color 0.45s var(--pc-ease),
        border-color 0.45s var(--pc-ease), transform 0.6s var(--pc-ease);
}

.project-grid .pc-arrow svg {
    transition: transform 0.6s var(--pc-ease);
}

.project-grid .project-card:hover .pc-arrow,
.project-grid .project-card:focus-visible .pc-arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: #1d1d1d;
    transform: scale(1.08);
}

.project-grid .project-card:hover .pc-arrow svg,
.project-grid .project-card:focus-visible .pc-arrow svg {
    transform: rotate(45deg);
}

/* Glass layer: the blur fades in (opacity is cheap), while a tinted circle
   grows from the arrow corner using transform only */
.project-grid .project-card-overlay {
    position: relative;
    z-index: 2;
}

.project-grid .project-card-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: rgba(18, 18, 18, 0.25);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    opacity: 0;
    transition: opacity 0.55s ease;
}

.project-grid .project-card-overlay::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 300%;
    aspect-ratio: 1;
    top: 2.75rem;
    right: 2.75rem;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.4);
    transform: translate(50%, -50%) scale(0);
    transition: transform 0.85s var(--pc-ease);
    will-change: transform;
}

.project-grid .project-card:hover .project-card-overlay::before,
.project-grid .project-card:focus-visible .project-card-overlay::before {
    opacity: 1;
}

.project-grid .project-card:hover .project-card-overlay::after,
.project-grid .project-card:focus-visible .project-card-overlay::after {
    transform: translate(50%, -50%) scale(1);
}

/* Details: always laid out, but the title + details are pushed down by the
   details' height at rest (--rv, measured in JS), so hover is a pure slide */
.project-grid .project-card-title,
.project-grid .pc-reveal {
    transform: translateY(var(--rv, 0px));
    transition: transform 0.75s var(--pc-ease);
    will-change: transform;
}

.project-grid .project-card:hover .project-card-title,
.project-grid .project-card:hover .pc-reveal,
.project-grid .project-card:focus-visible .project-card-title,
.project-grid .project-card:focus-visible .pc-reveal {
    transform: translateY(0);
}

.project-grid .pc-reveal__inner > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.6s var(--pc-ease);
}

.project-grid .project-card:hover .pc-reveal__inner > *,
.project-grid .project-card:focus-visible .pc-reveal__inner > * {
    opacity: 1;
    transform: none;
}

.project-grid .project-card:hover .pc-reveal__inner > :nth-child(1) { transition-delay: 0.1s; }
.project-grid .project-card:hover .pc-reveal__inner > :nth-child(2) { transition-delay: 0.16s; }
.project-grid .project-card:hover .pc-reveal__inner > :nth-child(3) { transition-delay: 0.22s; }
.project-grid .project-card:hover .pc-reveal__inner > :nth-child(4) { transition-delay: 0.28s; }

/* The old show-on-hover description rules don't apply inside the reveal */
.project-grid .pc-reveal .project-card-desc,
.project-grid .pc-reveal .project-card-ip {
    display: block;
    max-height: none;
    opacity: 1;
    margin: 0.85rem 0 0;
    max-width: 62ch;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(242, 242, 238, 0.85);
}

.project-grid .pc-reveal .project-card-ip {
    margin-top: 0.4rem;
    font-size: 0.78rem;
}

/* Tag pills */
.project-grid .pc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
}

.project-grid .pc-tags li {
    padding: 4px 12px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: #f2f2ee;
    background: rgba(242, 242, 238, 0.12);
    border: 1px solid rgba(242, 242, 238, 0.2);
}

.project-grid .pc-tags li:first-child {
    background: var(--accent);
    border-color: var(--accent);
    color: #1d1d1d;
}

/* Glass metrics strip */
.project-grid .pc-metrics {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1rem 0 0;
    padding: 0.9rem 1.25rem;
    border-radius: 16px;
    background: rgba(242, 242, 238, 0.08);
    border: 1px solid rgba(242, 242, 238, 0.14);
}

.project-grid .pc-metrics__label {
    margin: 0 auto 0 0;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: #f2f2ee;
}

.project-grid .pc-metrics div {
    text-align: center;
}

.project-grid .pc-metrics dt {
    font-family: var(--font-sans);
    font-size: clamp(1.15rem, 1.9vw, 1.75rem);
    font-weight: 700;
    line-height: 1.1;
    color: #f2f2ee;
    font-variant-numeric: tabular-nums;
}

.project-grid .pc-metrics dd {
    margin: 2px 0 0;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: rgba(242, 242, 238, 0.7);
    white-space: nowrap;
}

/* Smaller cards: no room for the description */
.project-grid .project-card:not(.project-card-featured) .pc-reveal .project-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-grid .project-card:not(.project-card-featured) .pc-metrics {
    gap: 1rem;
    padding: 0.75rem 1rem;
}

.project-grid .project-card:not(.project-card-featured) .pc-metrics__label {
    display: none;
}

.project-grid .project-card:not(.project-card-featured) .pc-metrics div {
    flex: 1;
}

/* Touch screens: no hover, so show just the tags under the title */
@media (hover: none) {
    .project-grid .project-card-title,
    .project-grid .pc-reveal {
        transform: none;
    }

    .project-grid .pc-reveal__inner > * {
        opacity: 1;
        transform: none;
    }

    .project-grid .pc-reveal .project-card-desc,
    .project-grid .pc-reveal .project-card-ip,
    .project-grid .pc-metrics {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-grid .project-card-overlay::before,
    .project-grid .project-card-overlay::after,
    .project-grid .project-card-title,
    .project-grid .pc-reveal,
    .project-grid .pc-reveal__inner > *,
    .project-grid .pc-arrow,
    .project-grid .pc-arrow svg {
        transition: none;
    }
}

/* Lite mode (phones + low-spec machines, set in index.html <head>): no live
   backdrop blur anywhere, since re-blurring the animated shell every frame is
   the single heaviest thing on the page */
html.lite-fx *,
html.lite-fx *::before,
html.lite-fx *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Phones: a solid panel instead of a full-page live blur (much smoother) */
html.lite-fx .shell-hero ~ .work-page {
    background: rgba(20, 20, 20, 0.92);
}

@media (max-width: 768px) {
    .shell-hero ~ .work-page {
        background: rgba(20, 20, 20, 0.92);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ============================================
   BACK TO TOP (every page; created by js/main.js)
   Same round glass button as the project cards' arrow
   ============================================ */
.to-top {
    position: fixed;
    right: clamp(16px, 3vw, 40px);
    bottom: clamp(16px, 3vw, 40px);
    z-index: 140; /* under the mobile menu overlay (150) */
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    color: #f2f2ee;
    background: rgba(242, 242, 238, 0.1);
    border: 1px solid rgba(242, 242, 238, 0.24);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.5s cubic-bezier(.65, 0, .25, 1),
        background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* At the very bottom, lift clear of the footer's copyright line */
.to-top.is-visible.at-end {
    transform: translateY(-56px);
}

.to-top svg {
    transition: transform 0.4s cubic-bezier(.65, 0, .25, 1);
}

.to-top:hover,
.to-top:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
    color: #1d1d1d;
    outline: none;
}

.to-top:hover svg {
    transform: translateY(-2px);
}

/* On light sections of the case studies the glass flips to dark ink */
.to-top.on-light:not(:hover) {
    color: #1d1d1d;
    border-color: rgba(29, 29, 29, 0.3);
    background: rgba(255, 255, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .to-top,
    .to-top svg {
        transition: opacity 0.2s ease, visibility 0.2s ease;
        transform: none;
    }
}

/* "IP Protected" pill on password-protected work (see js/ip-gate.js) */
.ip-pill {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f2f2ee;
    background: rgba(12, 12, 16, 0.55);
    border: 1px solid rgba(242, 242, 238, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
}

.ip-pill svg {
    width: 13px;
    height: 13px;
    color: var(--accent);
}

html.lite-fx .ip-pill {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(12, 12, 16, 0.8);
}

/* Strip cards with a pill: the pill and the CTA stack in one spot on the right.
   At rest the pill shows; on hover or keyboard focus it fades out and the CTA fades in. */
.strip-action {
    display: grid;
    align-items: center;
    justify-items: end;
    flex-shrink: 0;
}

.strip-action > * {
    grid-area: 1 / 1;
}

.ip-pill.ip-pill--inline {
    position: static;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-card:hover .ip-pill--inline,
.project-card:focus-visible .ip-pill--inline {
    opacity: 0;
    transform: translateY(-6px);
}

.project-card:focus-visible .strip-action .project-card-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Phones: card metrics share the strip equally and their labels may wrap, so a
   long one ("Sign-up ease") can't push the last metric past the card edge */
@media (max-width: 768px) {
    .project-grid .pc-metrics {
        gap: 0.75rem;
    }

    .project-grid .pc-metrics div {
        flex: 1 1 0;
        min-width: 0;
    }

    .project-grid .pc-metrics dd {
        white-space: normal;
    }
}

/* ============ About: Skills and Software (pills under the experience timeline) ============ */
.about-me .section-heading.about-subhead {
    font-weight: 700;
    font-size: 18px;
    margin: 3rem 0 1.25rem;
}

.skills-list {
    position: relative;
    z-index: 2;
    max-width: 700px;
    display: grid;
    gap: 1.5rem;
}

.skill-group__label {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin: 0 0 0.6rem;
}

.skill-note {
    color: var(--text);
    opacity: 0.6;
    font-weight: 500;
    letter-spacing: 0;
}

.skill-pills {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pills li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(222, 222, 222, 0.18);
    background: rgba(222, 222, 222, 0.04);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.skill-pills li:hover {
    border-color: rgba(222, 222, 222, 0.4);
    background: rgba(222, 222, 222, 0.08);
}

.skill-pills--icons li {
    padding-left: 10px;
}

/* Simple Icons are black by default: invert to the page's light text colour */
.skill-pills--icons img {
    width: 16px;
    height: 16px;
    flex: none;
    filter: invert(0.87);
}

/* Letter badge for tools without a published brand icon */
.skill-mono {
    width: 18px;
    height: 18px;
    flex: none;
    display: inline-grid;
    place-items: center;
    border-radius: 5px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0;
}

@media (max-width: 768px) {
    .about-me .section-heading.about-subhead {
        margin-top: 2.5rem;
    }

    .skill-pills li {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
}

/* Skills / Software tabs under the About bio */
.about-tabs {
    margin-top: 2.5rem;
}

.about-tabs__list {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(222, 222, 222, 0.18);
    background: rgba(222, 222, 222, 0.04);
}

.about-tabs__list [role="tab"] {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    opacity: 0.7;
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.about-tabs__list [role="tab"]:hover {
    opacity: 1;
}

.about-tabs__list [role="tab"][aria-selected="true"] {
    background: var(--text);
    color: var(--bg);
    opacity: 1;
}

.about-tabs__list [role="tab"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.skills-list[hidden] {
    display: none;
}

/* Each tab shows its main groups first; "View all" reveals the rest */
.skills-list:not(.is-open) .skill-group--more {
    display: none;
}

.skills-more {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    background: transparent;
    border: 1px solid rgba(228, 118, 71, 0.45);
    border-radius: 999px;
    padding: 7px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.skills-more:hover {
    background: rgba(228, 118, 71, 0.1);
    border-color: var(--accent);
}

.skills-more:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============ Chevrons: the one arrow style used across the site (back-to-top excepted) ============ */
svg.chev {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    flex: none;
    vertical-align: -0.06em;
    overflow: visible;
}

.skills-more__chev {
    transition: transform 0.25s ease;
}

.skills-more[aria-expanded="true"] .skills-more__chev {
    transform: rotate(180deg);
}

/* Project cards: the title states the problem; hover reveals the project and client */
.project-grid .pc-project {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin: 0 0 0.15rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.project-grid .pc-project b {
    font-weight: 700;
    color: var(--accent);
}

.project-grid .pc-project span {
    color: rgba(242, 242, 238, 0.75);
}

.project-grid .pc-project span::before {
    content: "·";
    margin-right: 10px;
    color: rgba(242, 242, 238, 0.45);
}

.project-grid .project-card:hover .pc-reveal__inner > :nth-child(5) { transition-delay: 0.34s; }

/* Problem titles run longer than names: keep them to a readable measure */
.project-grid .project-card-title {
    max-width: 30ch;
    text-wrap: balance;
}

/* Featured card: the title may run over the screenshot's left edge */
.project-grid .project-card-featured .project-card-title {
    max-width: min(40ch, calc(100% - 4rem));
}

@media (max-width: 768px) {
    .project-grid .project-card-featured .project-card-title {
        max-width: none;
    }
}

/* Card metrics: two results with context, then a count of the rest */
.project-grid .pc-metrics dd {
    white-space: normal;
    max-width: 17ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.project-grid .pc-metrics .pc-more dt {
    color: var(--accent);
}

.project-grid .pc-metrics .pc-more {
    flex: 0 0 auto !important;
    padding-left: 1rem;
    border-left: 1px solid rgba(242, 242, 238, 0.14);
}

/* ============ Phones only ============ */
@media (max-width: 768px) {
    /* Room between the experience timeline and the footer */
    .about-me {
        padding-bottom: 4.5rem !important;
    }

    /* Featured card: a tall portrait card, most of a phone screen */
    .project-grid .project-card-featured {
        aspect-ratio: 4 / 7;
    }

    /* Cards: a dark, blurred layer always sits behind the text, darkest at
       the bottom where the title is, so text reads over any image */
    .project-grid .project-card-overlay::before {
        opacity: 1;
        background: linear-gradient(to top,
                rgba(10, 10, 12, 0.9) 0%,
                rgba(10, 10, 12, 0.72) 45%,
                rgba(10, 10, 12, 0.45) 100%);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .project-grid .project-card-title {
        color: #f5f5f2;
    }

    .project-grid .pc-project span {
        color: rgba(245, 245, 242, 0.85);
    }
}

/* Lite mode has no blur, so the layer is a little darker instead */
@media (max-width: 768px) {
    html.lite-fx .project-grid .project-card-overlay::before {
        background: linear-gradient(to top,
                rgba(10, 10, 12, 0.94) 0%,
                rgba(10, 10, 12, 0.8) 45%,
                rgba(10, 10, 12, 0.6) 100%);
    }
}

/* ============ About: bio + experience + skills (desktop) ============
   Grid instead of the old flex row, now the tabs are their own block:
   bio and tabs on the left, experience on the right. Phones keep the
   stacked layout from the mobile rules (bio, tabs, experience). */
@media (min-width: 769px) {
    .about-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        grid-template-areas:
            "bio exp"
            "tabs exp";
        grid-template-rows: auto 1fr;
        column-gap: 3.5rem;
        align-items: start;
    }

    .about-intro {
        grid-area: bio;
        max-width: none;
    }

    .about-layout > .about-tabs {
        grid-area: tabs;
    }

    .about-main {
        grid-area: exp;
    }

    /* ---- Pinned mode (set by JS only when everything fits one screen) ----
       The section grows tall; its content sticks for one screen while the
       scroll steps through the jobs, then the whole section scrolls on. */
    .about-me.is-pinned {
        display: block;
        min-height: 0;
        padding: 0;
        height: calc(100vh + var(--about-steps, 5) * 40vh);
    }

    .about-me.is-pinned > .container {
        position: sticky;
        top: 0;
        height: 100vh;
        padding-top: 104px !important;
        padding-bottom: 28px !important;
        display: flex;
        flex-direction: column;
    }

    .about-me.is-pinned .about-layout {
        flex: 1;
        min-height: 0;
        grid-template-areas:
            "bio exp"
            "tabs tabs";
        grid-template-rows: minmax(0, 1fr) auto;
        row-gap: 1.25rem;
    }

    .about-me.is-pinned .section-heading {
        margin-bottom: 1rem;
    }

    .about-me.is-pinned .about-intro p {
        font-size: 0.98rem;
        line-height: 1.6;
        margin-bottom: 0.8rem;
    }

    .about-me.is-pinned .about-main .section-heading {
        margin-bottom: 0.75rem;
    }

    /* Experience: an accordion. Every job shows its date, role and company;
       only the active one opens its description, inside a glass card */
    .about-me.is-pinned .experience-timeline {
        gap: 4px;
    }

    .about-me.is-pinned .timeline-item {
        padding: 12px 18px;
        border: 1px solid transparent;
        border-radius: 16px;
        cursor: pointer;
        opacity: 0.55;
        transition: opacity 0.35s ease, background-color 0.35s ease, border-color 0.35s ease;
    }

    .about-me.is-pinned .timeline-item:last-child {
        padding-bottom: 12px;
    }

    .about-me.is-pinned .timeline-item:hover {
        opacity: 0.8;
    }

    .about-me.is-pinned .timeline-item.is-active {
        opacity: 1;
        background: rgba(222, 222, 222, 0.06);
        border-color: rgba(222, 222, 222, 0.14);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .about-me.is-pinned .timeline-company {
        margin-bottom: 0;
    }

    .about-me.is-pinned .timeline-desc {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        margin: 0;
        transition: max-height 0.45s cubic-bezier(.2, .7, .2, 1), opacity 0.3s ease, margin-top 0.45s ease;
    }

    .about-me.is-pinned .timeline-item.is-active .timeline-desc {
        max-height: 10em;
        opacity: 0.85;
        margin-top: 0.5rem;
    }

    /* Skills / Software: a full-width glass band along the bottom, with the
       groups side by side in columns; View all just makes the band taller */
    .about-me.is-pinned .about-tabs {
        margin-top: 0;
        padding: 16px 20px 18px;
        border-radius: 20px;
        border: 1px solid rgba(222, 222, 222, 0.14);
        background: rgba(222, 222, 222, 0.04);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .about-me.is-pinned .about-tabs__list {
        margin-bottom: 0.9rem;
    }

    .about-me.is-pinned .skills-list {
        max-width: none;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem 1.5rem;
        align-items: start;
    }

    .about-me.is-pinned #panel-skills .skill-group:first-child {
        grid-column: span 2;
    }

    .about-me.is-pinned .skills-more {
        grid-column: 1 / -1;
    }

    .about-me.is-pinned .skill-pills {
        gap: 6px;
    }

    .about-me.is-pinned .skill-pills li {
        font-size: 0.78rem;
        padding: 4px 11px;
    }

    .about-me.is-pinned .skill-pills--icons li {
        padding-left: 8px;
    }

    .about-me.is-pinned .skill-group__label {
        margin-bottom: 0.45rem;
    }
}

@media (max-width: 768px) {
    /* The tabs now sit between bio and experience in the page; keep the
       spacing they had when they lived inside the bio column */
    .about-layout > .about-tabs {
        margin-top: 0.5rem;
    }
}

@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
    .about-me.is-pinned .timeline-item,
    .about-me.is-pinned .timeline-desc {
        transition: none;
    }
}

/* ---- Pinned About: compact so bio, jobs and skills share one screen ---- */
@media (min-width: 769px) {
    .about-me.is-pinned > .container {
        padding-top: 92px !important;
        padding-bottom: 20px !important;
    }

    .about-me.is-pinned .about-intro .section-heading {
        margin-bottom: 0.75rem;
    }

    .about-me.is-pinned .about-intro p {
        font-size: 0.95rem;
        line-height: 1.55;
        margin-bottom: 0.65rem;
    }

    /* Job rows: role · company on the left, dates on the right, one line */
    .about-me.is-pinned .timeline-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 1rem;
        align-items: baseline;
        padding: 9px 16px;
    }

    .about-me.is-pinned .timeline-item:last-child {
        padding-bottom: 9px;
    }

    .about-me.is-pinned .timeline-date {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        white-space: nowrap;
        font-size: 0.8rem;
    }

    .about-me.is-pinned .timeline-body {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        column-gap: 0.5rem;
    }

    .about-me.is-pinned .timeline-role {
        font-size: 1rem;
        margin: 0;
    }

    .about-me.is-pinned .timeline-company {
        font-size: 0.85rem;
    }

    .about-me.is-pinned .timeline-company::before {
        content: "·";
        margin-right: 0.5rem;
        opacity: 0.6;
    }

    .about-me.is-pinned .timeline-desc {
        flex-basis: 100%;
        font-size: 0.86rem;
    }

    /* Skills band: two rows of pills per group until View all */
    .about-me.is-pinned .about-tabs {
        position: relative;
        z-index: 5;
        padding: 12px 18px 14px;
    }

    .about-me.is-pinned .about-tabs__list {
        margin-bottom: 0.7rem;
    }

    .about-me.is-pinned .about-tabs__list [role="tab"] {
        padding: 6px 16px;
        font-size: 0.78rem;
    }

    .about-me.is-pinned .skills-list {
        gap: 0.75rem 1.5rem;
    }

    .about-me.is-pinned .skills-list:not(.is-open) .skill-pills {
        max-height: 3.6rem;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
        mask-image: linear-gradient(to bottom, #000 60%, transparent);
    }

    /* Open: the band grows upward as a glass sheet over the bio */
    .about-me.is-pinned .about-tabs:has(.skills-list.is-open) {
        background: rgba(24, 24, 24, 0.94);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 -30px 60px -30px rgba(0, 0, 0, 0.8);
    }
}

/* ---- Pinned About, compact: shorter laptop screens (e.g. 125% scaling) ---- */
@media (min-width: 769px) {
    .about-me.is-pinned.is-compact > .container {
        padding-top: 104px !important;
        padding-bottom: 14px !important;
    }

    .about-me.is-pinned.is-compact .about-intro .section-heading {
        font-size: 2.1rem;
        margin-bottom: 0.5rem;
    }

    .about-me.is-pinned.is-compact .about-main .section-heading {
        margin-bottom: 0.4rem;
    }

    .about-me.is-pinned.is-compact .about-intro p {
        font-size: 0.88rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }

    .about-me.is-pinned.is-compact .timeline-item {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .about-me.is-pinned.is-compact .about-layout {
        row-gap: 0.75rem;
    }

    .about-me.is-pinned.is-compact .about-tabs {
        padding: 10px 16px 12px;
    }

    .about-me.is-pinned.is-compact .skills-list:not(.is-open) .skill-pills {
        max-height: 1.9rem;
    }
}

/* ---- Pinned About, refined: no job box; a full-width glass band ---- */
@media (min-width: 769px) {
    /* The open job just brightens; its description softly fades open.
       No card, so the list reads as one seamless column */
    .about-me.is-pinned .timeline-item,
    .about-me.is-pinned .timeline-item.is-active {
        background: transparent;
        border-color: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding-left: 0;
        padding-right: 0;
        opacity: 0.45;
        transition: opacity 0.6s ease;
    }

    .about-me.is-pinned .timeline-item.is-active {
        opacity: 1;
    }

    .about-me.is-pinned .timeline-desc {
        transform: translateY(-4px);
        transition: max-height 0.7s cubic-bezier(.2, .7, .2, 1), opacity 0.6s ease 0.1s,
            margin-top 0.7s cubic-bezier(.2, .7, .2, 1), transform 0.7s cubic-bezier(.2, .7, .2, 1);
    }

    .about-me.is-pinned .timeline-item.is-active .timeline-desc {
        transform: none;
    }

    /* Skills band: a full-width glass strip, like the hero's marquee band.
       The glass runs edge to edge; the content keeps the page's columns */
    .about-me.is-pinned .about-tabs,
    .about-me.is-pinned .about-tabs:has(.skills-list.is-open) {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 14px 0 16px;
    }

    .about-me.is-pinned .about-tabs::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 100vw;
        transform: translateX(-50%);
        border-top: 1px solid rgba(242, 242, 238, 0.14);
        border-bottom: 1px solid rgba(242, 242, 238, 0.14);
        background: rgba(242, 242, 238, 0.04);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        transition: background-color 0.3s ease;
    }

    .about-me.is-pinned .about-tabs:has(.skills-list.is-open)::before {
        background: rgba(22, 22, 22, 0.85);
        backdrop-filter: blur(28px) saturate(140%);
        -webkit-backdrop-filter: blur(28px) saturate(140%);
    }

    /* Tabs, View all: the same glass buttons as back-to-top */
    .about-tabs__list {
        padding: 0;
        border: 0;
        background: transparent;
        gap: 8px;
    }

    .about-tabs__list [role="tab"],
    .about-me.is-pinned .about-tabs__list [role="tab"],
    .skills-more {
        opacity: 1;
        color: #f2f2ee;
        background: rgba(242, 242, 238, 0.1);
        border: 1px solid rgba(242, 242, 238, 0.24);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
        border-radius: 999px;
        transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
    }

    .about-tabs__list [role="tab"][aria-selected="true"],
    .about-tabs__list [role="tab"]:hover,
    .skills-more:hover {
        background: var(--accent);
        border-color: var(--accent);
        color: #1d1d1d;
    }
}

@media (min-width: 769px) {
    /* Selected and hovered tabs win over the pinned-mode glass */
    .about-me .about-tabs__list [role="tab"][aria-selected="true"],
    .about-me .about-tabs__list [role="tab"]:hover,
    .about-me .skills-more:hover {
        background: var(--accent);
        border-color: var(--accent);
        color: #1d1d1d;
    }

    /* Band content lines up with the bio's left edge in every mode */
    .about-me.is-pinned .about-tabs,
    .about-me.is-pinned.is-compact .about-tabs {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 769px) {
    /* main.js fades each job row in with an inline opacity, so the dimming
       lives on the row's contents instead of the row itself */
    .about-me.is-pinned .timeline-item,
    .about-me.is-pinned .timeline-item.is-active {
        opacity: 1;
    }

    .about-me.is-pinned .timeline-item > * {
        opacity: 0.45;
        transition: opacity 0.6s ease;
    }

    .about-me.is-pinned .timeline-item.is-active > *,
    .about-me.is-pinned .timeline-item:hover > * {
        opacity: 1;
    }
}

/* ---- Pinned About: vertical timeline, marquee band, flush to the bottom ---- */
.tl-line,
.tl-dot,
.about-marquee {
    display: none;
}

@media (min-width: 769px) {
    .about-me.is-pinned > .container,
    .about-me.is-pinned.is-compact > .container {
        padding-bottom: 0 !important;
    }

    /* Years first, then the line and its dot, then the job */
    .about-me.is-pinned .experience-timeline {
        position: relative;
        gap: 2px;
    }

    .about-me.is-pinned .timeline-item {
        grid-template-columns: 112px 28px minmax(0, 1fr);
        column-gap: 0;
        align-items: start;
    }

    .about-me.is-pinned .timeline-date {
        grid-column: 1;
        grid-row: 1;
        padding-top: 3px;
    }

    .about-me.is-pinned .timeline-body {
        grid-column: 3;
        grid-row: 1;
        padding-left: 0.6rem;
    }

    .about-me.is-pinned .tl-line {
        display: block;
        position: absolute;
        left: calc(112px + 14px - 1px);
        top: var(--tl-start, 0);
        height: calc(var(--tl-end, 0px) - var(--tl-start, 0px));
        width: 2px;
        border-radius: 2px;
        background: rgba(222, 222, 222, 0.14);
        pointer-events: none;
    }

    .about-me.is-pinned .tl-line i {
        display: block;
        width: 100%;
        height: var(--tl-fill, 0);
        border-radius: 2px;
        background: var(--accent);
        box-shadow: 0 0 10px rgba(228, 118, 71, 0.5);
        transition: height 0.6s cubic-bezier(.2, .7, .2, 1);
    }

    .about-me.is-pinned .tl-dot {
        display: block;
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        position: relative;
        z-index: 1;
        width: 13px;
        height: 13px;
        margin-top: 6px;
        padding: 0;
        border-radius: 50%;
        border: 2px solid rgba(222, 222, 222, 0.35);
        background: #1d1d1d;
        cursor: pointer;
        transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    }

    .about-me.is-pinned .timeline-item > .tl-dot {
        opacity: 1;
    }

    .about-me.is-pinned .tl-dot:hover,
    .about-me.is-pinned .tl-dot:focus-visible {
        border-color: var(--accent);
        outline: none;
    }

    .about-me.is-pinned .timeline-item.is-past .tl-dot {
        border-color: var(--accent);
    }

    .about-me.is-pinned .timeline-item.is-active .tl-dot {
        background: var(--accent);
        border-color: var(--accent);
        box-shadow: 0 0 0 5px rgba(228, 118, 71, 0.2);
        transform: scale(1.15);
    }

    /* Band, closed: just the marquee */
    .about-me.is-pinned .about-tabs:not(.is-tray-open) > .about-tabs__list,
    .about-me.is-pinned .about-tabs:not(.is-tray-open) > .skills-list {
        display: none !important;
    }

    .about-me.is-pinned .about-tabs,
    .about-me.is-pinned.is-compact .about-tabs {
        padding-top: 0;
        padding-bottom: 0;
    }

    .about-me.is-pinned .about-marquee {
        display: flex;
        align-items: center;
        position: relative;
        width: 100%;
        padding: 14px 0;
        border: 0;
        background: transparent;
        color: var(--text);
        cursor: pointer;
        text-align: left;
    }

    .about-me.is-pinned .about-tabs.is-tray-open > .about-marquee {
        display: none;
    }

    .about-marquee__viewport {
        display: flex;
        width: 100%;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
        mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    }

    .about-marquee__track {
        display: flex;
        flex: none;
        gap: 8px;
        margin: 0;
        padding: 0 8px 0 0;
        list-style: none;
        animation: about-marquee 50s linear infinite;
    }

    .about-marquee__track li {
        flex: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 14px;
        border-radius: 999px;
        border: 1px solid rgba(222, 222, 222, 0.18);
        background: rgba(222, 222, 222, 0.04);
        font-size: 0.85rem;
        font-weight: 500;
        white-space: nowrap;
    }

    .about-marquee:hover .about-marquee__track,
    .about-marquee:focus-visible .about-marquee__track {
        animation-play-state: paused;
    }

    @keyframes about-marquee {
        to { transform: translateX(-100%); }
    }

    /* "Expand" appears on hover, in the site's glass button style */
    .about-marquee__hint {
        position: absolute;
        right: 0;
        top: 50%;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 999px;
        font-size: 0.85rem;
        font-weight: 700;
        color: #1d1d1d;
        background: var(--accent);
        border: 1px solid var(--accent);
        box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
        opacity: 0;
        transform: translate(8px, -50%);
        transition: opacity 0.3s ease, transform 0.3s ease;
        pointer-events: none;
    }

    .about-marquee:hover .about-marquee__hint,
    .about-marquee:focus-visible .about-marquee__hint {
        opacity: 1;
        transform: translate(0, -50%);
    }

    .about-marquee:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 4px;
    }

    /* Tray, open: every group, frosted glass, room between rows, no View all */
    .about-me.is-pinned .about-tabs.is-tray-open {
        padding-top: 16px;
        padding-bottom: 22px;
    }

    .about-me.is-pinned .about-tabs.is-tray-open::before {
        background: rgba(22, 22, 22, 0.85);
        backdrop-filter: blur(28px) saturate(140%);
        -webkit-backdrop-filter: blur(28px) saturate(140%);
    }

    .about-me.is-pinned .about-tabs.is-tray-open .skills-more {
        display: none;
    }

    .about-me.is-pinned .about-tabs.is-tray-open .skills-list {
        row-gap: 1.75rem;
        column-gap: 2rem;
    }
}

@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
    .about-marquee__track {
        animation: none;
    }

    .about-me.is-pinned .tl-line i {
        transition: none;
    }
}

/* Bio: justified, and 70% of its column's width (desktop) */
@media (min-width: 769px) {
    .about-intro {
        max-width: 70%;
    }

    .about-intro p {
        text-align: justify;
        hyphens: none;
        -webkit-hyphens: none;
    }
}

/* ============ About: education badges + wider experience ============ */
.about-me .section-heading.edu-heading {
    font-weight: 700;
    font-size: 18px;
    margin: 2.5rem 0 1rem;
}

.edu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.edu-card {
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(242, 242, 238, 0.16);
    background: rgba(242, 242, 238, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}

.edu-card:hover {
    border-color: rgba(228, 118, 71, 0.55);
    background: rgba(242, 242, 238, 0.07);
    box-shadow: 0 0 0 1px rgba(228, 118, 71, 0.15), 0 0 36px -6px rgba(228, 118, 71, 0.35);
}

.edu-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}

.edu-card__school {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.edu-card__place,
.edu-card__dates {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--accent);
    white-space: nowrap;
}

.edu-card__degree {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
    opacity: 0.85;
}

.edu-card__course {
    margin: 2px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text);
    opacity: 0.7;
}

.edu-card__course span {
    font-weight: 600;
}

@media (min-width: 769px) {
    /* Bio column sized to the narrower bio, so experience gets the room */
    .about-layout {
        grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    }

    .about-intro {
        max-width: none;
    }

    .edu {
        grid-template-columns: 1fr 1fr;
    }

    .about-me.is-pinned .section-heading.edu-heading {
        margin: 1.4rem 0 0.6rem;
    }
}

/* ---- About: top offset from the real navbar, aligned headings, smaller education ---- */
@media (min-width: 769px) {
    .about-me.is-pinned > .container,
    .about-me.is-pinned.is-compact > .container {
        padding-top: var(--about-top, 104px) !important;
    }

    /* EXPERIENCE sits on the same line as the bottom of ABOUT */
    .about-me .about-main > .section-heading:first-child {
        display: flex;
        align-items: flex-end;
        min-height: calc(36pt * 1.2);
        margin-bottom: 0.75rem;
    }

    .about-me.is-pinned.is-compact .about-main > .section-heading:first-child {
        min-height: calc(2.1rem * 1.2);
    }

    .about-me .about-intro .section-heading {
        line-height: 1.2;
    }
}

/* Education: compact, and a quiet hover (they aren't links) */
.edu {
    gap: 10px;
}

.edu-card {
    gap: 3px;
    padding: 10px 14px;
    border-radius: 14px;
}

.edu-card:hover {
    border-color: rgba(242, 242, 238, 0.26);
    background: rgba(242, 242, 238, 0.06);
    box-shadow: none;
}

.edu-card__school {
    font-size: 0.85rem;
}

.edu-card__degree {
    font-size: 0.78rem;
}

.edu-card__place,
.edu-card__dates {
    font-size: 0.7rem;
}

.edu-card__course {
    font-size: 0.7rem;
    line-height: 1.4;
}

/* Education cards: year | place, school, degree */
.edu-card {
    gap: 2px;
    padding: 12px 16px;
}

.edu-card__meta {
    margin: 0 0 2px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.edu-card__meta span {
    margin: 0 0.35em;
    opacity: 0.5;
}

.edu-card__school {
    font-size: 0.92rem;
}

.edu-card__degree {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.75;
}
