@font-face {
    font-family: "CirrusCumulus";
    src: url("../fonts/CirrusCumulus.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DINdong";
    src: url("../fonts/DINdong.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Degular";
    src:
        url("../fonts/DegularText-Regular.woff2") format("woff2"),
        url("../fonts/DegularText-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Degular Fallback";
    src: url("../fonts/Degular-Fallback.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Sans";
    src: url("../fonts/InstrumentSans.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-stretch: 75% 125%;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Sans";
    src: url("../fonts/InstrumentSans-Italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-stretch: 75% 125%;
    font-display: swap;
}

@font-face {
    font-family: "Scope";
    src:
        url("../fonts/Scope-Medium.woff2") format("woff2"),
        url("../fonts/Scope-Medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "CamingoCode";
    src:
        url("../fonts/CamingoCode-Regular.woff2") format("woff2"),
        url("https://pearlitegates.com/assets/fonts/CamingoCode-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "CamingoCode";
    src:
        url("../fonts/CamingoCode-Italic.woff2") format("woff2"),
        url("https://pearlitegates.com/assets/fonts/CamingoCode-Italic.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Commit Mono";
    src: url("../fonts/CommitMono-400-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Commit Mono";
    src: url("../fonts/CommitMono-400-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Avara";
    src: url("../fonts/Avara-Bold.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Apfel Grotezk";
    src: url("../fonts/ApfelGrotezk-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Apfel Grotezk";
    src: url("../fonts/ApfelGrotezk-Mittel.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Apfel Grotezk";
    src: url("../fonts/ApfelGrotezk-Fett.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


:where(html) {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:where(h1) {
    font-size: 2em;
    margin-block-end: 0.67em;
    margin-block-start: 0.67em;
}

:where(b, strong) {
    font-weight: bolder;
}

:where( var) {
    font-family: var(--ff-mono);
    font-size: 0.8em;
}

:where(small) {
    font-size: 80%;
}

:where(button) {
    margin: 0;
}

:where(button) {
    text-transform: none;
}

:where(button) {
        -webkit-appearance: button;
    }

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto;
}

::-webkit-input-placeholder {
    color: inherit;
    opacity: 0.54;
}

::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

:where(button)::-moz-focus-inner {
            border-style: none;
            padding: 0;
        }

:where(button)::-moz-focusring {
            outline: 1px dotted ButtonText;
        }

:where(dialog) {
    background-color: #fff;
    border: solid;
    color: #000;
    height: fit-content;
    left: 0;
    margin: auto;
    padding: 1em;
    position: absolute;
    right: 0;
    width: fit-content;
}

:where(dialog:not([open])) {
    display: none;
}

:where(summary) {
    display: list-item;
}

:root {
    --pewter: #e8e7e4;
    --platinum: #f2f1ed;
    --zinc: #d9d9d5;

    --wrought-iron: #5f666d;
    --graphite: #3e474f;
    --nickel: #7e858b;
    --titanium: #6f7780;

    --aluminum: #c9ccd0;
    --tin: #dedfdd;
    --cadet-steel: #b7c0c7;

    --light-steel: #b0c4de;
    --blue-steel: #8a9eb0;
    --tempered-steel: #7a8e9e;
    --brushed-steel: #b7c5cf;
    --pale-steel: #d8e0e5;
    --dark-steel: #526675;

    --copper: #b77d6d;
    --aged-copper: #916154;
    --bronze: #8c807a;
    --verdigris: #718979;
    --smoked-steel: #867684;
    --rust: #a86762;

    --blue-steel-rgb: 138 158 176;
    --tempered-steel-rgb: 122 142 158;
    --gunmetal-rgb: 54 63 70;
    --platinum-glint-rgb: 255 255 255;
    --steel-selection: rgb(138 158 176 / 0.26);

    --tempered-steel-line: rgb(122 142 158 / 0.18);
    --soft-tempered-steel-line: rgb(122 142 158 / 0.085);

    --pewter-rgb: 232 231 228;

    --blue-steel-panel-bg: url("../icons/steel.webp");

    --blue-steel-bg-opacity: 0.105;
    --blue-steel-bg-size: 36rem auto;
    --blue-steel-bg-filter: grayscale(0.14) saturate(0.62) contrast(0.9) brightness(1.08);
    --blue-steel-bg-blur: 0.25px;
    --blue-steel-grain-opacity: 0.018;
    --blue-steel-mask-max: 1;

    --blue-steel-top-fade: 14rem;
    --blue-steel-left-fade: 42rem;

    --code-pewter: #e7e3dc;
    --code-graphite: var(--graphite);
    --code-zinc: #d8d4cc;
    --code-wrought-iron: #5f666d;
    --code-tempered-steel: var(--tempered-steel);
    --code-verdigris: var(--verdigris);

    --code-nickel: #88857f;
    --code-blue-steel: #5d7486;
    --code-smoked-steel: #847489;
    --code-gunmetal: #3e535e;
    --code-oxidized-steel: #5c7e8d;
    --code-titanium: #707f95;
    --code-copper: #9b735d;
    --code-dark-steel: #526d80;
    --code-iron: #606970;
    --code-dull-tin: #898985;
    --code-patina: #6f8b78;
    --code-burnished-copper: #8b6f7f;

    --scrollbar-tempered-steel: var(--tempered-steel);
    --scrollbar-zinc: var(--zinc);

    --iron-shadow: 205deg 8% 48%;
    --wrought-iron-shadow: drop-shadow(0.11ch 0.12ch 0.1ch hsl(var(--iron-shadow) / 0.22)) drop-shadow(0.08ch 0.099ch 0.03ch hsl(var(--iron-shadow) / 0.2)) drop-shadow(0.05ch 0.05ch 0.02ch hsl(var(--iron-shadow) / 0.18));

    --ff-sans:
        "Apfel Grotezk", "Helvetica Neue", Arial, ui-sans-serif, system-ui,
        sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
    --ff-serif:
        "Instrument Serif", Georgia, ui-serif, serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Noto Color Emoji";
    --ff-mono:
        "Commit Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ff-drawing:
        "Avara", Georgia, ui-serif, serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Noto Color Emoji";
    --ff-display:
        "DINdong", Impact, ui-sans-serif, system-ui, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
    --ff-technical:
        "Scope", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
    --font-weight-regular: 400;

    --fs-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.825rem);
    --fs-sm: clamp(0.825rem, 0.78rem + 0.25vw, 0.9rem);
    --fs-body: clamp(0.925rem, 0.84rem + 0.4vw, 1rem);
    --fs-label: clamp(0.925rem, 0.85rem + 0.45vw, 1.1rem);
    --fs-h6: clamp(0.95rem, 0.88rem + 0.35vw, 1.05rem);
    --fs-h5: clamp(1rem, 0.92rem + 0.45vw, 1.15rem);
    --fs-h4: clamp(1.1rem, 0.98rem + 0.6vw, 1.25rem);
    --fs-h3: clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem);
    --fs-h2: clamp(1.45rem, 1.1rem + 1.4vw, 1.75rem);
    --fs-h1: clamp(2.25rem, 1.25rem + 2vw, 3rem);

    --lh-body: 1.55;
    --lh-heading: 1.2;
    --lh-label: 1.4;
    --lh-tight: 1.1;

    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-7: 2rem;
    --sp-8: 2.5rem;
    --sp-9: 3rem;
    --sp-10: 4rem;
    --gap-section: var(--sp-8);

    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-m: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;
    --clock-width: 420px;
}

html.dark-mode {
    --pewter: #292b2d;
    --platinum: #343638;
    --zinc: #404346;

    --wrought-iron: #c9c8c2;
    --graphite: #ebe8df;
    --nickel: #9c9f9e;
    --titanium: #8a9092;

    --aluminum: #4d5357;
    --tin: #42474b;
    --cadet-steel: #5d666d;

    --light-steel: #b0c4de;
    --blue-steel: #9eb5c6;
    --tempered-steel: #839aaa;
    --brushed-steel: #718694;
    --pale-steel: #c9d5dc;
    --dark-steel: #b4c8d4;

    --copper: #c98e7d;
    --aged-copper: #d7a091;
    --bronze: #afa49c;
    --verdigris: #a7b99d;
    --smoked-steel: #b9a9bb;
    --rust: #c7837d;

    --blue-steel-rgb: 158 181 198;
    --tempered-steel-rgb: 201 213 220;
    --gunmetal-rgb: 12 14 15;
    --platinum-glint-rgb: 235 232 223;
    --steel-selection: rgb(158 181 198 / 0.22);

    --tempered-steel-line: rgb(201 213 220 / 0.08);
    --soft-tempered-steel-line: rgb(201 213 220 / 0.075);

    --pewter-rgb: 41 43 45;

    --blue-steel-bg-opacity: 0.105;
    --blue-steel-bg-filter: grayscale(0.82) saturate(0.3) contrast(0.58) brightness(0.78);
    --blue-steel-bg-blur: 1px;
    --blue-steel-grain-opacity: 0.055;
    --blue-steel-mask-max: 1;

    --blue-steel-top-fade: 16rem;
    --blue-steel-left-fade: 46rem;

    --code-pewter: #252729;
    --code-zinc: #1d1f20;
    --code-graphite: #d8d5cd;
    --code-wrought-iron: var(--wrought-iron);
    --code-tempered-steel: var(--tempered-steel);
    --code-verdigris: var(--verdigris);

    --code-nickel: #8f918c;
    --code-blue-steel: #b4c8d4;
    --code-smoked-steel: #c9b7cc;
    --code-gunmetal: #ebe8df;
    --code-oxidized-steel: #b8ced8;
    --code-titanium: #b3bdc8;
    --code-copper: #d0aa9b;
    --code-dark-steel: #c9d5dc;
    --code-iron: #c9c8c2;
    --code-dull-tin: #8f918c;
    --code-patina: #b6c9aa;
    --code-burnished-copper: #d1b3c4;

    --scrollbar-tempered-steel: var(--titanium);
    --scrollbar-zinc: var(--zinc);

    --iron-shadow: 205deg 8% 18%;
    --lattice-bg-width: min(58vw, 48rem);

    --lattice-spacing: 28px;
    --lattice-line-width: 1px;

    --lattice-platinum-line: rgb(235 232 223 / 0.055);
    --lattice-blue-steel-line: rgb(158 181 198 / 0.045);
    --lattice-iron-shadow: rgb(0 0 0 / 0.18);

    --lattice-metal-base: rgb(64 70 74 / 0.24);
    --lattice-metal-edge: rgb(96 104 109 / 0.22);
    --lattice-metal-glow: rgb(158 181 198 / 0.065);
}

*,
::after,
::before {
    box-sizing: border-box;
}

* {
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-color: var(--scrollbar-tempered-steel) var(--scrollbar-zinc);
    font-family: var(--ff-sans);
    font-size: 18px;
    font-weight: var(--font-weight-regular);
    font-style: normal;
    line-height: var(--lh-body);
    color: var(--wrought-iron);
    overflow-wrap: anywhere;
    background-color: var(--pewter);
}

body {
    font-size: var(--fs-body);
    --grid-size: 1.75rem;
    margin: 0 auto;
    padding: 0;
    max-width: 100rem;
    overscroll-behavior: none;
    background-image: url(../icons/steel_02.webp);
    background-size: contain;
}

img {
    max-width: 100%;
}

::selection {
    background-color: var(--steel-selection);
}

@media (pointer: fine) {
    body {
        cursor: url(../cursors/aero_arrow_xl.cur), default;
    }

    
  [role="button"],
  a,
  button {
      cursor: url(../cursors/aero_link_xl.cur), pointer !important;
  }
}

[title]:not(a):not(button) {
    cursor: help;
}

h1 {
    margin: var(--sp-6) 0 var(--sp-4);
    font-family: var(--ff-drawing);
    font-size: var(--fs-h1);
    font-style: normal;
    line-height: var(--lh-tight);
    font-weight: normal;
}

h3,
.h3 {
    margin: var(--sp-5) 0 var(--sp-3);
    font-family: var(--ff-sans);
    font-size: var(--fs-h3);
    font-weight: var(--font-weight-regular);
    line-height: var(--lh-heading);
}

.h3 {
    margin: 0;
    font-size: var(--fs-h4);
}

.h-label {
    border-bottom: unset;
    font-family: var(--ff-sans);
    font-size: var(--fs-label);
    font-weight: var(--font-weight-regular);
    font-style: normal;
    line-height: var(--lh-label);
    color: var(--wrought-iron);
}

h3.h-label {
    margin: 0;
}

.h-label--lined {
    display: block;
    width: 100%;
    line-height: var(--lh-body);
    background-image: linear-gradient(to bottom,
        transparent 96%,
        var(--aluminum) 100%,
        var(--aluminum) 96%,
        transparent 100%);
    background-size: 100% 1.55em;
    background-repeat: repeat-y;
}

p {
    margin: var(--sp-4) auto;
}

b,
strong {
    font-weight: 700;
    color: var(--graphite);
}


i {
    font-style: italic;
}

mark {
    padding: 5px 10px;
    border-radius: 3px;
    color: var(--graphite);
    background-color: rgb(var(--blue-steel-rgb) / 0.13);
}

details div {
    border: 1px solid var(--aluminum);
    border-radius: 10px;
    padding: 0 1em;
}

summary {
    color: var(--dark-steel);
}

var {
    border: 1px solid;
    color: var(--code-graphite);
    font-size: var(--fs-xs);
    padding: 0.15em 0.35em;
    border-radius: 4px;
    font-style: normal;
}

a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: var(--titanium);
    text-decoration-thickness: 0.07em;
    text-underline-offset: 0.15em;
    transition:
        color 0.15s ease,
        text-decoration-color 0.15s ease;
}

a:hover {
    color: var(--graphite);
    text-decoration-color: var(--blue-steel);
}

a.button {
    display: inline-block;
    margin: 5px;
    text-decoration: none;
    font-family: var(--ff-sans);
    font-size: var(--fs-label);
    color: var(--wrought-iron);
    border-bottom: 1.5px solid var(--copper);
    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

a.button:hover {
    color: var(--copper);
    border-color: var(--dark-steel);
    text-decoration: none;
}

.container {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: var(--sp-8);
    min-height: 100vh;
    container-type: inline-size;
    container-name: layout;
}

.container>* {
    margin-block: 0;
}

.container>*+* {
    margin-block-start: var(--gap-section);
}

.content {
    display: flex;
    flex: 1;
    gap: var(--gap-section);
    width: 100%;
    box-sizing: border-box;
}

.sidebar {
    display: flex;
    flex-direction: column;
}

.right-stack {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1;
}

.right-stack svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.right-stack>* {
    margin-block: 0;
}

.right-stack>*+* {
    margin-block-start: var(--gap-section);
}

.right-stack>h1+* {
    margin-block-start: var(--sp-6);
}

.main,
.right {
    position: relative;
    padding: var(--sp-7);
    box-sizing: border-box;
    background-color: var(--platinum);
    color: var(--wrought-iron);
}

.profile-left> :first-child,
.chalkboard> :first-child,
.chalkboard> :first-child> :first-child,
.main> :first-child,
.right> :first-child {
    margin-top: 0;
}

.profile-left> :last-child,
.chalkboard> :last-child,
.main> :last-child,
.right> :last-child {
    margin-bottom: 0;
}

.navigation {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    position: sticky;
    top: 80px;
    z-index: 1000;
    width: 400px;
}

.sidenav-links {
    display: inline-block;
    width: 100%;
    margin-top: 1.5em;
    padding: 0;
    list-style: none;
    text-align: right;
    font-size: 1.4rem;
    z-index: 9999;
}

.sidenav-links a {
    color: var(--wrought-iron);
    text-decoration: none;
    text-decoration-color: inherit;
    border: none;
    box-shadow: unset;
}

.sidenav-links a:hover {
    background: unset;
    border-radius: unset;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 0.6em 0;
}

.nav-label {
    font-family: var(--ff-sans);
    font-size: var(--fs-h2);
    line-height: 1.33;
    font-weight: var(--font-weight-regular);
    font-style: normal;
    color: var(--wrought-iron);
}

.nav-item:hover .nav-label {
    color: inherit;
}

.top-header {
    display: none;
}

body.top-nav-layout .top-header {
    display: block;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--pewter);
    padding: var(--sp-4) var(--sp-8);
}


body.top-nav-layout .menu,
body.top-nav-layout .navigation,
body.top-nav-layout .sidebar,
body.top-nav-layout .sidenav-links {
    display: none !important;
}

body.top-nav-layout .container {
    padding: 0;
}

body.top-nav-layout .content {
    display: block;
    padding: var(--sp-8);
    margin: 0 auto;
}

body.top-nav-layout .right-stack {
    width: 100%;
    margin: 0 auto;
}

body.top-nav-layout html {
    scroll-padding-top: 80px;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: right;
    gap: 2rem;
    margin: 0 auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a,
.nav-links button {
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    font-family: var(--ff-sans);
    font-size: var(--fs-h4);
    text-decoration: none;
    color: var(--wrought-iron);
    background: 0 0;
    border: none;
    border-radius: 9999px;
    box-shadow: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-links li:has(.theme-toggle-topnav) {
    display: flex;
    align-items: center;
}

.topnav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    margin-left: auto;
    gap: 5px;
    width: var(--sp-6);
    height: var(--sp-8);
    padding: 0;
    background: 0 0;
    border: none;
    cursor: pointer;
}

.topnav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--wrought-iron);
    border-radius: 2px;
    transition:
        transform 0.3s ease,
        opacity 0.2s ease;
    transform-origin: center;
}

.topnav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.topnav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.topnav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.topnav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 998;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--pewter);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.topnav-dropdown.open {
    max-height: 400px;
    display: flex;
}

.topnav-dropdown a {
    display: block;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-family: var(--ff-sans);
    font-size: var(--fs-h3);
    color: var(--wrought-iron);
    text-decoration: none;
    border: none;
    border-bottom: 1px solid var(--zinc);
    box-shadow: none;
    background: 0 0;
    text-align: left;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.topnav-dropdown a:last-of-type {
    border-bottom: none;
}

.topnav-dropdown-theme-row {
    display: flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-top: 1px solid var(--zinc);
}

.theme-toggle {
    --theme-toggle__lightbulb--duration: 500ms;
    display: inline-block;
    font-size: 1.5rem;
    color: var(--wrought-iron);
    background: 0 0;
    border: none;
}

.theme-toggle__lightbulb {
    width: 1.5em;
    height: 1.5em;
}

.theme-toggle__lightbulb .theme-toggle__lightbulb__coil,
.theme-toggle__lightbulb .theme-toggle__lightbulb__rays * {
    stroke-dasharray: 1.1;
    stroke-dashoffset: 0;
    opacity: 1;
    transition-property: stroke-dashoffset, opacity;
    transition-duration: var(--theme-toggle__lightbulb--duration);
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle:not(.theme-toggle--force-motion) * {
        transition: none !important;
    }
}

.theme-toggle-topnav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: 0 0;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle-topnav:hover,
html.dark-mode .theme-toggle-topnav:hover {
    background: rgb(var(--blue-steel-rgb) / 0.08);
}

.theme-toggle-topnav:hover {
    transform: rotate(20deg);
}

.theme-toggle-topnav svg {
    width: 20px;
    height: 20px;
    color: var(--wrought-iron);
    position: absolute;
    transition:
        transform 0.4s ease-out,
        opacity 0.2s ease-in-out;
    transform-origin: 50% 200%;
}

html:not(.dark-mode) .theme-toggle__moon {
    transform: rotate(60deg);
    opacity: 0;
}

html:not(.dark-mode) .theme-toggle__sun {
    transform: rotate(0);
    opacity: 1;
}

html.dark-mode .theme-toggle__sun {
    transform: rotate(-60deg);
    opacity: 0;
}

html.dark-mode .theme-toggle__moon {
    transform: rotate(0);
    opacity: 1;
}

.hand {
    height: 1.25px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center left;
}

.profile {
    display: flex;
    align-items: initial;
    justify-content: center;
    gap: 0;
    padding-top: 1rem;
}

.profile-left,
.profile-right {
    flex: 1;
    padding: 10px 0 0;
}

.profile-left {
    position: relative;
    padding: 2.5rem 2rem 2rem;
    height: fit-content;
    background: var(--platinum);
    z-index: 1;
}

.profile-left::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(20px / 2);
    transform: translateY(-100%);
    pointer-events: none;
    background: radial-gradient(calc(20px / 2) at top,
        transparent 90%,
        var(--platinum) 100%);
    background-position: 0 0;
    background-repeat: repeat-x;
    background-size: calc(20px * 1.5) calc(20px / 2);
}

.profile-left p {
    display: block;
    width: 100%;
    line-height: var(--lh-body);
    background-image: linear-gradient(to bottom,
        transparent 96%,
        var(--aluminum) 100%,
        var(--aluminum) 96%,
        transparent 100%);
    background-size: 100% 1.55em;
    background-repeat: repeat-y;
}

.profile-right img {
    display: block;
    width: auto;
    height: auto;
    max-height: 600px;
    margin: 0 auto;
    transition: 0.2s;
}

.profile-right img:hover {
    transform: rotate(3deg);
}

.profile-right p {
    display: block;
    width: 100%;
    margin: 1em 0 0;
    z-index: 100;
    text-align: right;
    text-align-last: right;
}

.update h3 {
    font-family: var(--ff-sans);
    font-size: var(--fs-label);
    font-style: normal;
    color: var(--wrought-iron);
    margin: unset;
    border-bottom: unset;
}

@keyframes pop {
  0% {
      transform: scale(0.7);
      opacity: 0.5;
  }

  80% {
      transform: scale(1.2);
      opacity: 1;
  }

  100% {
      transform: scale(1);
      opacity: 1;
  }
}

html.dark-mode .main,
html.dark-mode .right {
    background-color: var(--platinum);
}

html.dark-mode .chalkboard {
    background-color: transparent;
}

html.dark-mode mark {
    color: var(--graphite);
    background-color: rgb(var(--blue-steel-rgb) / 0.1);
}

html.dark-mode body {
    --grid-size: 1.75rem;
    --lattice-size: calc(var(--grid-size) * 3);

    --lattice-platinum-line: rgb(201 200 194 / 0.105);
    --lattice-blue-steel-line: rgb(158 181 198 / 0.075);
    --lattice-iron-shadow: rgb(0 0 0 / 0.22);
    --lattice-metal-wash: rgb(158 181 198 / 0.045);

    background-color: var(--pewter);

    background-image:
        linear-gradient(to bottom,
            var(--pewter) 0,
            var(--pewter) calc(var(--grid-size) * 2),
            rgb(41 43 45 / 0.92) calc(var(--grid-size) * 4),
            rgb(41 43 45 / 0) calc(var(--grid-size) * 8)),
        linear-gradient(to right,
            var(--pewter) 0,
            var(--pewter) calc(var(--grid-size) * 2),
            rgb(41 43 45 / 0.88) calc(var(--grid-size) * 6),
            rgb(41 43 45 / 0) calc(var(--grid-size) * 14)),
        linear-gradient(105deg,
            var(--pewter) 0%,
            var(--pewter) 18%,
            rgb(41 43 45 / 0.74) 38%,
            rgb(41 43 45 / 0) 72%),
        linear-gradient(45deg,
            transparent calc(50% - 1.2px),
            var(--lattice-platinum-line) calc(50% - 1.2px),
            var(--lattice-platinum-line) calc(50% + 0.2px),
            transparent calc(50% + 0.2px)),
        linear-gradient(-45deg,
            transparent calc(50% - 1.2px),
            var(--lattice-blue-steel-line) calc(50% - 1.2px),
            var(--lattice-blue-steel-line) calc(50% + 0.2px),
            transparent calc(50% + 0.2px)),
        linear-gradient(45deg,
            transparent calc(50% + 0.2px),
            var(--lattice-iron-shadow) calc(50% + 0.2px),
            var(--lattice-iron-shadow) calc(50% + 1.4px),
            transparent calc(50% + 1.4px)),
        linear-gradient(-45deg,
            transparent calc(50% + 0.2px),
            var(--lattice-iron-shadow) calc(50% + 0.2px),
            var(--lattice-iron-shadow) calc(50% + 1.4px),
            transparent calc(50% + 1.4px));

    background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    var(--lattice-size) var(--lattice-size),
    var(--lattice-size) var(--lattice-size),
    var(--lattice-size) var(--lattice-size),
    var(--lattice-size) var(--lattice-size);

    background-position:
        top left,
        top left,
        top left,
        top left,
        top left,
        top left,
        top left;

    background-repeat:
        no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, repeat;
}

@container layout (max-width: 1024px) {

    body,
  html {
      overflow-x: clip;
  }

    .container {
        padding: var(--sp-8);
    }

    .content {
        flex-direction: column;
        margin: auto;
    }

    .right-stack,
  .sidebar {
      flex-basis: 100%;
      position: static;
      margin: 0;
      min-height: 125px;
  }

    .navigation {
        width: 100%;
        margin: 0 auto;
    }

    .profile {
        flex-direction: column;
    }

    .profile-left {
        margin-right: 0;
        max-width: 100%;
    }

    .profile-right img {
        margin-top: auto;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 15px;
    }

    :root {
        --fs-body: clamp(1rem, 0.92rem + 0.4vw, 1.05rem);
        --fs-label: clamp(1rem, 0.95rem + 0.4vw, 1.1rem);
        --mobile-header-height: 56px;
    }

    body,
  html {
      overflow-x: clip;
  }

    body {
        font-size: var(--fs-body);
        background-size: 200%;
        background-position: top;
        background-repeat: repeat-y;
    }

    .container {
        padding: var(--sp-6);
    }

    .main,
  .right {
      padding: var(--sp-6);
  }

    body:has(.floating-return) .container {
        padding-top: var(--mobile-header-height);
    }

    .top-header {
        height: var(--mobile-header-height);
        padding: 0 var(--sp-4);
    }

    .top-header .top-nav {
        width: 100%;
        margin: 0;
    }

    body:not(.top-nav-layout) .top-header {
        display: flex;
        align-items: center;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: var(--pewter);
    }

    body:not(.top-nav-layout) .top-header .topnav-hamburger {
        display: flex;
    }

    body:not(.top-nav-layout) .top-header+.container {
        padding-top: var(--mobile-header-height);
    }

    body:not(.top-nav-layout) .menu,
  body:not(.top-nav-layout) .sidenav-links {
      display: none !important;
  }

    body:not(.top-nav-layout) .navigation {
        z-index: 1;
    }

    body.top-nav-layout,
  html:has(body.top-nav-layout) {
      overflow-x: clip;
      overflow-y: visible;
  }

    body.top-nav-layout .top-header {
        display: flex;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 0 var(--sp-6);
    }

    body.top-nav-layout {
        padding-top: var(--mobile-header-height);
    }

    body.top-nav-layout .nav-links {
        display: none;
    }

    body.top-nav-layout .topnav-hamburger {
        display: flex;
    }

    body.top-nav-layout .content {
        padding: var(--sp-6);
    }

    .top-nav {
        justify-content: left;
    }

    h1 .break-mobile {
        display: block;
    }

    html.dark-mode body {
        background-image: none;
        background-color: var(--pewter);
    }
}

.nav-logo img {
    height: 64px;
    width: auto;
    display: block;
}
.nav-item .nav-logo img {
    height: 128px;
    width: auto;
    display: block;
    padding-right: 38px;
}

.nav-item #social-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
}

.nav-icon img, .nav-icon svg{
    height: 2rem;
    width: auto;
    display: block;
}


.printer-svg {
    justify-content: center;
    padding: 10px;
    max-width: 100%;
    height: auto;
}

#project-hours {
    text-align: right;
}

/* --- Printer Playing Cards --- */
.printer-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
    width: 100%;
}

.printer-card {
    width: 340px;
    background: var(--platinum);
    border-radius: 10px;
    box-shadow: 0 10px 34px var(--graphite-shadow);
    display: flex;
    flex-direction: row;
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

html.dark-mode .printer-card {
    background-color: var(--platinum);
}

.printer-card:hover {
    transform: translateY(-5px);
}

.printer-name-upright {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: var(--ff-technical);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-steel);
    text-transform: uppercase;
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border-right: 1px solid var(--aluminum);
    padding-right: 15px;
}

.printer-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.printer-photo {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--blue-steel);
    margin-bottom: 12px;
    background: var(--zinc);
}

.printer-type {
    color: var(--wrought-iron);
    font-family: var(--ff-sans);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.printer-stats {
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--smoked-steel);
    margin-bottom: 10px;
}

.printer-desc {
    font-size: 14px;
    color: var(--wrought-iron);
    line-height: 1.4;
}

.printer-filaments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--tempered-steel-rule);
}

.filament-label {
    font-size: 0.8rem;
    font-family: var(--ff-sans);
    font-weight: 600;
    color: var(--nickel);
    width: 100%;
    margin-bottom: 4px;
}

.filament-badge {
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    background-color: var(--zinc);
    color: var(--graphite);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid var(--aluminum);
}

html.dark-mode .filament-badge {
    background-color: var(--tin);
    color: var(--wrought-iron);
    border-color: var(--cadet-steel);
}

/* --- Extracted Page Styles & Components --- */
:root {
    --graphite-shadow: rgb(62 71 79 / 0.15);
    --graphite-shadow-strong: rgb(62 71 79 / 0.24);
    --platinum-gloss: rgb(255 255 255 / 0.34);
    --platinum-gloss-soft: rgb(255 255 255 / 0.12);
    --blue-steel-sheet: rgb(138 158 176 / 0.34);
    --tempered-steel-sheet: rgb(122 142 158 / 0.24);
    --copper-sheet: rgb(183 125 109 / 0.14);
    --blue-steel-highlight: rgb(138 158 176 / 0.12);
    --tempered-steel-glow: rgb(122 142 158 / 0.28);
    --tempered-steel-rule: rgb(122 142 158 / 0.22);
    --graphite-overlay: rgb(62 71 79 / 0.36);
}

html.dark-mode {
    --graphite-shadow: rgb(0 0 0 / 0.28);
    --graphite-shadow-strong: rgb(0 0 0 / 0.38);
    --platinum-gloss: rgb(235 232 223 / 0.16);
    --platinum-gloss-soft: rgb(235 232 223 / 0.07);
    --blue-steel-sheet: rgb(158 181 198 / 0.26);
    --tempered-steel-sheet: rgb(131 154 170 / 0.18);
    --copper-sheet: rgb(201 142 125 / 0.12);
    --blue-steel-highlight: rgb(158 181 198 / 0.11);
    --tempered-steel-glow: rgb(158 181 198 / 0.24);
    --tempered-steel-rule: rgb(158 181 198 / 0.18);
    --graphite-overlay: rgb(0 0 0 / 0.45);
}

.profile-card-center {
    display: flex;
    /* flex-wrap: wrap; */
    justify-content: center;
    position: relative;
}

.profile-card-center:hover::after {
    animation: shine .6s both;
}

.profile-card-center::after {
    content: '';
    width: 325px;
    height: 100%;
    border-radius: 10px;
    position: absolute;
    pointer-events: none;
    background: linear-gradient(120deg,
        transparent 0%,
        transparent 34%,
        var(--platinum-gloss-soft) 40%,
        var(--platinum-gloss) 50%,
        var(--platinum-gloss-soft) 60%,
        transparent 66%,
        transparent 100%);
    background-size: 300% 300%;
    opacity: .55;
    background-position: 0% 0%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.profile-card {
    width: 325px;
    overflow: hidden;
    margin: 20px;
    border-radius: 10px;
    background: var(--platinum);
    position: relative;
    box-shadow: 0 10px 34px var(--graphite-shadow);
    padding: 70px 25px 80px;
    text-align: center;
}

.profile-card::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100px;
    height: 16px;
    margin-left: -50px;
    background: var(--zinc);
    border-radius: 25px;
    box-shadow: inset 0 2px 6px var(--graphite-shadow);
    z-index: 2;
}

.profile-card::before {
    content: "3D4E at UCLA • est. 2016";
    background: linear-gradient(to top right, var(--tempered-steel), var(--dark-steel));
    position: absolute;
    bottom: -0.5px;
    left: 0;
    width: 100%;
    padding: 10px 0;
    text-align: center;
    color: var(--platinum);
    font-family: var(--ff-technical);
    font-size: var(--fs-body);
    font-weight: normal;
    text-transform: uppercase;
}

html.dark-mode .profile-card::before {
    background: linear-gradient(to top right, var(--brushed-steel), var(--tempered-steel));
    color: var(--pewter);
}

.gradient-shapes {
    position: absolute;
    background: linear-gradient(135deg,
        var(--blue-steel-sheet),
        var(--tempered-steel-sheet));
    width: 150%;
    height: 300px;
    top: -80px;
    right: -25%;
    transform: rotate(20deg);
    opacity: 1;
    z-index: 0;
}

.gradient-shapes::before {
    content: "";
    background: linear-gradient(-45deg,
        var(--tempered-steel-sheet),
        var(--copper-sheet));
    width: 150%;
    height: 300px;
    position: absolute;
    transform: rotate(-40deg);
    top: -80px;
    right: -25%;
}

.profile-photo {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    padding: 2px;
    border: 4px solid var(--blue-steel);
    margin: 0 auto 20px;
    overflow: hidden;
    background: var(--zinc);
    display: block;
    position: relative;
    z-index: 1;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.name {
    font: 600 32px;
    margin: 5px 5px 10px;
    color: var(--wrought-iron);
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.country {
    color: var(--dark-steel);
    margin: -5px 5px 15px;
    position: relative;
    z-index: 1;
    font-style: italic;
}

html.dark-mode .country {
    color: var(--blue-steel);
}

.bio {
    font: 400 15px;
    color: var(--wrought-iron);
    margin: 8px 10px 0;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.showcase-image{
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 1.5rem;
    border-radius: var(--radius-lg);
}

section.right.about-box {
    background-color: transparent;
    padding: 0; 
}

.board-lineup {
    flex: 1 1 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.lineup-pitch {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-around;
    gap: var(--sp-4);
    width: 100%;
    min-height: 600px;
    padding: var(--sp-6);
    overflow: hidden;
    border: 2px solid var(--pale-steel);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(0deg, transparent 49.8%, rgb(255 255 255 / 0.38) 50%, transparent 50.2%),
        repeating-linear-gradient(0deg, rgb(113 137 121 / 0.18) 0 75px, rgb(113 137 121 / 0.28) 75px 150px),
        var(--verdigris);
}

.lineup-pitch::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    aspect-ratio: 1;
    border: 2px solid rgb(255 255 255 / 0.38);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.formation-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(110px, 200px);
    justify-content: center;
    gap: var(--sp-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.lineup-member {
    text-align: center;
    color: #f2f1ed;
    text-shadow: 0 1px 3px rgb(0 0 0 / 0.55);
}

.lineup-photo {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto var(--sp-2);
    border: 3px solid rgb(255 255 255 / 0.8);
    border-radius: 50%;
    background: var(--tempered-steel);
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.3);
    font-family: var(--ff-technical);
    overflow: hidden;
}

.lineup-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2) translateY(-12px);
}

.lineup-name {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 700;
}

.formation-row .lineup-photo {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.formation-row.is-active .lineup-photo {
    transform: scale(1.12);
    border-color: var(--copper);
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.42);
}

.position-menu {
    display: flex;
    flex-direction: column;
    flex: 0 1 320px;
    min-width: 200px;
    padding: var(--sp-4);
    border: 1px solid var(--aluminum);
    border-radius: var(--radius-lg);
    background: var(--platinum);
}

.position-menu__viewport {
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    gap: var(--sp-2);
}

.position-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    border: 1px solid var(--aluminum);
    border-radius: var(--radius-m);
    color: var(--wrought-iron);
    background: var(--zinc);
    opacity: 0.72;
    overflow: hidden;
    transition: opacity 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.position-group[open] {
    flex: 1.7;
    justify-content: flex-start;
    opacity: 1;
    background: var(--pale-steel);
    border-color: var(--tempered-steel);
}


.position-group[open] .position-group__title,
.position-group[open] p {
    color: rgb(var(--gunmetal-rgb));
}

.position-group summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    cursor: pointer;
    list-style: none;
}

.position-group summary::-webkit-details-marker {
    display: none;
}

.position-group summary::after {
    content: "+";
    font-size: var(--fs-h4);
    line-height: 1;
}

.position-group[open] summary::after {
    content: "−";
}

.position-group__title {
    font-size: var(--fs-label);
    color: var(--wrought-iron);
}

.position-group p {
    margin: 0;
    padding: 0 var(--sp-4) var(--sp-4);
    font-size: var(--fs-sm);
}

.lineup-intro {
    flex: 1 1; 
    min-width: 250px; 
    background-color: transparent; 
    border: none; 
    padding: 0;
}

.intro-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
}

.notebook-paper {
    flex: 1;
    padding: 0;
    padding-top: calc(20px / 2);
    background: radial-gradient(calc(20px / 2) at top,
        transparent 90%,
        var(--platinum) 100%);
    background-position: 0 0;
    background-repeat: repeat-x;
    background-size: calc(20px * 1.5) calc(20px / 2);
    overflow: hidden;
    min-width: 0;
}

.notebook-content {
    padding: 2.5rem 2rem 2rem;
    background: var(--platinum);
    overflow: hidden;
}

.notebook-content p {
    width: 100%;
    line-height: 1.55em;
    display: block;
    background-image: linear-gradient(to bottom,
        transparent 96%,
        var(--tempered-steel-rule) 100%,
        var(--tempered-steel-rule) 96%,
        transparent 100%);
    background-size: 100% 1.55em;
    background-repeat: repeat-y;
    margin: 1em 0;
}

.notebook-content p:first-child {
    margin-top: 0;
}

.notebook-content p:last-child {
    margin-bottom: 0;
}

.workshop-image-container {
    max-width: 900px; 
    margin: 0 auto; 
    padding: 1rem; 
    flex: 2 1 0%;
    min-width: 0; 
}

.workshop-hero-image {
    width: 100%; 
    height: auto; 
    display: block; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    border: 2px solid var(--wrought-iron);
    border-radius: var(--radius-m);
    object-fit: cover; 
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    width: 100%;
}

.project {
    position: relative;
    border-radius: var(--radius-m, 8px);
    overflow: hidden;
    background: var(--platinum);
    border: 1px solid var(--aluminum, #ccc);
    box-shadow: 0 4px 12px var(--graphite-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--graphite-shadow-strong);
}

.project__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project p {
    padding: 0.75rem 1rem 0;
    margin: 0;
    font-size: var(--fs-body, 1rem);
    color: var(--wrought-iron, #333);
    font-weight: 500;
}

.grid__title {
    padding: 0.25rem 1rem 1rem;
    margin: 0;
    font-size: 0.85rem;
    color: var(--dark-steel, #666);
    font-family: var(--ff-mono, monospace);
}

html.dark-mode .grid__title {
    color: var(--blue-steel);
}

.grid__overlay {
    position: absolute;
    inset: 0;
    background: var(--graphite-overlay, rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project:hover .grid__overlay {
    opacity: 1;
}

.viewbutton {
    padding: 0.6rem 1.2rem;
    background: var(--platinum);
    color: var(--wrought-iron);
    border: 1px solid var(--aluminum);
    border-radius: 4px;
    font-family: var(--ff-mono, monospace);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.viewbutton:hover {
    background: var(--zinc, #eee);
    transform: scale(1.05);
}

.ucla3d4e-overlaypage {
    border: none;
    background-color: rgba(17, 46, 79, 0.95);
    width: 90vw;
    max-width: 1000px;
    height: 85vh;
    border-radius: 8px;
    padding: 1rem;
    color: #fff;
}

.ucla3d4e-overlaypage::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.overlay-exit {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    float: right;
    cursor: pointer;
}

@keyframes shine {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

@keyframes enhancein {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes enhanceout {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

html.dark-mode .profile-card::after {
    background: var(--zinc);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
    width: 100%;
    flex: 1; /* Allows it to size cleanly next to the notebook-paper div */
    min-width: 0;
}

.project-card {
    position: relative;
    border-radius: var(--radius-m);
    overflow: hidden;
    background: var(--platinum);
    border: 1px solid var(--aluminum);
    box-shadow: 0 4px 12px var(--graphite-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--graphite-shadow-strong);
}

.project-card img,
.project-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    display: block;
}

.lab-info {
    display: flex;
    justify-content: center;
}

#about-printout::before, #about-printout::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 44px;
	background-image: radial-gradient(circle, var(--wrought-iron) 11px, transparent 11.5px);
	background-repeat: repeat-y;
	background-size: 100% 66px;
	background-position: center 55px;
}
#about-printout::before {
	left: 0;
}
#about-printout::after {
	right: 0;
}
#about-printout {
	position: relative;
	width: 100%;
	max-width: 1010px;
	background: var(--platinum);
	box-sizing: border-box;
	padding: 56px 66px;
    justify-content:center;
}
.about-printout-inner {
    display: contents; /* Allows it to rely on #about-printout's relative positioning */
}

/* Shared properties for both top and bottom flourishes */
.about-printout-inner::before,
.about-printout-inner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: calc(20px / 2);
    pointer-events: none;
    background-position: 0 0;
    background-repeat: repeat-x;
    background-size: calc(20px * 1.5) calc(20px / 2);
}

.about-printout-inner::before {
    top: 0;
    transform: translateY(-100%);
    background-image: radial-gradient(calc(20px / 2) at top, transparent 90%, var(--platinum) 100%);
}

.about-printout-inner::after {
    bottom: 0;
    transform: translateY(100%);
    background-image: radial-gradient(calc(20px / 2) at bottom, transparent 90%, var(--platinum) 100%);
}
.bold-text {
    text-align: center;
    font-family: var(--ff-mono);
    font-size: var(--fs-h2);
}

/* Remove the obsolete .spec-popup wrapper rules and combine them here */
.spec-sheet {
    /* Layout & Responsiveness */
    display: flex;
    flex-direction: column;
    width: 90vw;            /* Responsive width */
    max-width: 800px;       /* Cap width on desktop */
    height: max-content;
    max-height: 85vh;       /* Cap height so it doesn't bleed off screen */
    margin: auto;           /* Centers the popover */
    
    /* Existing Styles */
    background: var(--platinum);
    font-family: var(--ff-mono);
    font-weight: var(--font-weight-regular);
    color: var(--wrought-iron);
    border: 1px solid var(--aluminum);
    padding: 0;
    
    /* Animations */
    transition: opacity 0.25s, scale 0.25s, overlay 0.25s allow-discrete, display 0.25s allow-discrete;
    opacity: 0;
    scale: 0;
    transform-origin: 50% 50%;
}

.spec-sheet:popover-open {
    opacity: 1;
    scale: 1;
}

/* Optional: Add a backdrop to focus the user's attention on the popover */
.spec-sheet::backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
}

.spec-table-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto; /* Changed from hidden to allow horizontal scrolling on mobile */
}
.spec-sheet-titleblock {
	padding: 1.25rem 1.5rem;
	background: var(--zinc);
}

.titleblock-main {
	margin-bottom: 0.75rem;
}
.titleblock-title {
	font-size: 1.5rem;
	letter-spacing: 1pt;
	color: var(--graphite);
	margin: 0 0 0.25rem 0;
}
.titleblock-subtitle {
	font-size: var(--fs-xs);
	color: var(--nickel);
	letter-spacing: 0.5pt;
	margin: 0;
}

.titleblock-info {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
	padding: 0.5rem 0 0;
	border-top: 1px solid var(--tempered-steel-rule);
}

.info-row {
	font-size: var(--fs-xs);
	white-space: nowrap;
}

.info-label {
	color: var(--nickel);
}

.info-value {
	color: var(--graphite);
}

.spec-table-desktop {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-sm);
	display: table;
}

.spec-popup .spec-table thead {
	position: sticky;
	top: 0;
	z-index: 10;
}

.spec-table thead {
	background: var(--pewter);
}
html.dark-mode .spec-table th {
	color: var(--blue-steel);
}
html.dark-mode .col-item {
	color: var(--blue-steel);
}
.spec-table th {
	padding: 0.75rem 1rem;
	text-align: left;
	font-size: var(--fs-xs);
	color: var(--dark-steel);
	font-weight: var(--font-weight-regular);
}
.col-item {
	color: var(--dark-steel);
	text-align: center;
	width: 72px;
}
.col-designation {
	color: var(--graphite);
}
.col-author {
	color: var(--wrought-iron);
}
.col-year {
	text-align: center;
	color: var(--nickel);
	width: 80px;
}
.spec-table tbody tr {
	border-bottom: 1px solid var(--tempered-steel-rule);
}
.spec-table td {
	padding: 0.75rem 1rem;
	color: var(--wrought-iron);
	vertical-align: top;
}
.spec-popup .spec-sheet-footer {
	flex-shrink: 0;
}

.spec-sheet-footer {
	padding: 1rem 1.5rem;
	background: var(--zinc);
}
.footer-notes {
	font-size: var(--fs-xs);
	line-height: 1.5;
	color: var(--wrought-iron);
	margin: 0 0 1rem 0;
}
html.dark-mode .footer-notes strong {
	color: var(--blue-steel);
}
/* Image Button & Container */
.entrance-btn {
    flex: 1; 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    position: relative; 
    padding: 0;
    border: 2px solid var(--wrought-iron);
    border-radius: var(--radius-m);
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block; 
}

.entrance-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--graphite-shadow-strong);
}

/* Image Styling */
.entrance-btn img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Forces the image to fill the entire square */
    object-fit: cover; /* Prevents the image from squishing or distorting */
    display: block;
    transition: transform 0.3s ease;
    z-index: 1;
}

.entrance-btn:hover img {
    transform: scale(1.05);
}

/* Overlay Text Styling */
.entrance-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem;
    background: var(--graphite-overlay);
    color: #fff;
    font-family: var(--ff-mono);
    font-weight: 600;
    font-size: var(--fs-body);
    text-align: center;
    backdrop-filter: blur(4px);
    z-index: 2; /* Ensures the text stays above the image */
}

/* --- Consolidated Media Queries --- */

@media (prefers-reduced-motion: reduce) {
    .formation-row .lineup-photo,
    .position-group {
        transition: none;
    }
}

@media (max-width: 1284px) {
    .intro-grid {
        flex-direction: column;
        gap: 1.5rem;
    }
    .notebook-paper {
        width: 100%;
        max-width: 100%;
    }
    .notebook-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {

    .nav-logo {
        position: relative;
        top: auto;
        left: auto;
        margin-left: -9px;
    }
    .nav-logo img {
        height: 50px;
        width: auto;
        display: block;
    }
    .top-nav {
        justify-content: space-between;
        width: 100%;
    }

    .project-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: var(--sp-4);
        padding-bottom: var(--sp-3); /* Room for the scroll area */
        
        /* Hide scrollbar for a cleaner look */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .project-grid::-webkit-scrollbar {
        display: none;
    }

    .project-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
    
    .project-card:hover {
        /* Disable hover float effect on touch devices */
        transform: none; 
        box-shadow: 0 4px 12px var(--graphite-shadow);
    }

    .board-lineup {
        flex: 1 1 100%;
        width: 100%;
    }
    .lineup-pitch {
        min-width: 0;
        min-height: 450px; 
        padding: var(--sp-3);
    }
    .formation-row {
        grid-auto-columns: minmax(0, 1fr); 
    }
    .position-menu {
        flex-basis: auto;
        width: 100%;
        min-width: 0;
    }

    .profile-card-center {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding-bottom: var(--sp-3);
        
        /* Hide scrollbars for a clean carousel look */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .profile-card-center::-webkit-scrollbar {
        display: none;
    }

    .profile-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        margin: 10px 15px;
    }
    .spec-sheet-titleblock {
        padding: 1rem;
    }
    
    .spec-table th, 
    .spec-table td {
        padding: 0.5rem; /* Reduce padding to fit more content */
    }
    
    .col-item {
        width: 50px; /* Slim down the step number column */
    }
}

@media (max-width: 480px) {
    .profile-card {
        width: 95%;
        max-width: 325px;
    }
}

@media (min-width: 701px) {
    #about-printout {
        transform: rotate(-1.1deg);
    }
}
@starting-style {
  .spec-sheet {
    &:popover-open {
      opacity: 0;
      scale: 0;
    }
  }
}
