html, body {
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
}

@font-face {
    font-family: 'PixelFont', monospace;
    src: url("PixelCode.woff2") format("woff2");
}

@font-face {
    font-family: 'DepartureMono';
    src: local('DepartureMono'),
        url('DepartureMono-Regular.woff2') format('woff2'),
        url('DepartureMono-Regular.woff') format('woff'),
        url('DepartureMono-Regular.otf') format('opentype');
}


@font-face {
    font-family: 'Antilag';
    src: local('Antilag'),
        url('Antilag.woff2') format('woff2');
        url('Antilag.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: 'RetroByte';
    src: local('RetroByte'),
        url('RetroByte.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NeueBit-Bold';
    src: local('NeueBit-Bold'),
        url('PPNeueBit-Bold.woff2') format('woff2');
}

.content {
    min-height: 100dvh; /* Ensures full viewport height */
            z-index: 5;
            position: relative;
            background: rgba(0, 0, 0, 0);
            padding-bottom: 20px;

        }

        .fuzzy-overlay {
            position: fixed;
            background-position-y: top;
            inset: -250%;
            background-image: url("noise.png");
            opacity: 15%;
            z-index: 1;
            pointer-events: none;

            animation: shift 0.2s linear infinite both;
        }

        @keyframes shift {
            0% {
                transform: translateX(10%) translateY(10%);
            }

            100% {
                transform: translateX(-10%) translateY(-10%);
            }
        }


/* Reset/Global */
body {
      background: rgba(0, 0, 0, 1);
    color: #F5F5F5;
  font-family: 'DepartureMono';
    font-style: normal;
    font-size: clamp(12px, 2.2vw, 17px);
}

strong {
    -webkit-text-stroke: .5px currentColor;
    text-shadow: 0 0 0.5px currentColor;
}

/* Container */
.container {
  margin-left: 20px;
  margin-right: 20px;
}

.fuzzcontainer {
    position: relative;
    min-height: 100vh;
}

/* Header */
header {
  font-size: clamp(22px, 3vw, 28px);
  text-align: center;
  font-family: 'RetroByte';
  font-style: normal;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

h1 {
    margin-top: 0;
    margin-bottom: 5px;
    text-transform: uppercase;
}

h2 {
    margin-top: 0;
    text-align: center;
    font-family: 'Antilag';
    font-size: 45px;
    margin-bottom: 0px;
}

h3 {
    text-align: center;
    padding-top: 0px;
    font-size: 3em;
    margin-block: 0px;
    font-family: 'RetroByte';
}


a {
    color: white;
}

.underlined {
    text-decoration: underline;
}

.headersymbol {
    height: 100px;
    width: auto;
    margin: 20px;
}


/* Folders Grid */
.folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Individual Folder Link */
.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #F5F5F5;
  transition: transform 0.2s ease;
}

.folder:hover {
  transform: scale(1.03);
}

/* SVG Container */
.folder .icon {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
}

/* SVG Itself */
.folder .icon svg {
  width: 100%;
  height: 100%;
  fill: #1D1B20; /* Folder color */
}

/* Folder Label */
.folder span {
  text-align: center;
text-transform: uppercase;

}

@media (min-width: 1200px) {
    .content {
        padding-bottom: 0px;
    }
}

@media only screen and (max-width: 800px) {

    .content {
        padding-bottom: 0px;
    }


.headersymbol {
    height: 80px;
    width: auto;
    margin: 15px;
}


/* Header */
header {
  height: auto;
  min-height: 160px;
  overflow: visible;
  padding: 20px 10px;
}

h1 {
  font-size: clamp(20px, 5vw, 28px);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.section-desc {
    font-size: clamp(13px, 3vw, 16px);
    padding: 0 10px;
    margin-top: 5px;
}

h2 {
    text-align: center;
    font-size: clamp(24px, 4vw, 35px);
    text-decoration: underline;
    padding-top: 40px;
}

    /* Folders Grid */
.folders {
  display: inline;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
    font-size: clamp(14px, 2vw, 22px);

}

/* Individual Folder Link */
.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #F5F5F5;
  transition: transform 0.2s ease;
}


.folder:hover {
  transform: scale(1.03);
}

/* SVG Container */
.folder .icon {
  width: 200px;
  height: 200px;
  margin-bottom: 8px;
}

/* SVG Itself */
.folder .icon svg {
  width: 100%;
  height: 100%;
  fill: #1D1B20; /* Folder color */
}

/* Folder Label */
.folder span {
  text-align: center;
text-transform: uppercase;

}

nav.page-nav {
    max-width: 100%;
    padding: 0;
}

nav.page-nav .breadcrumb {
    font-size: clamp(16px, 4.5vw, 22px);
}

nav.page-nav .prev-next {
    font-size: clamp(16px, 4.5vw, 22px);
}

.fuzzy-overlay {
    display: none;
}


.content {
    height: auto;
}

.folder {
    margin-bottom: 50px;
}


}


/* ══════════════════════════════════════════
   VARIADEX FILING CABINET LAYOUT
   (Adapted from lucasch.me)
   ══════════════════════════════════════════ */

/* Page navigation (breadcrumb + prev/next) */
nav.page-nav {
    font-family: 'DepartureMono', monospace;
    font-size: 14px;
    margin: 0 auto 20px;
    padding: 0;
    max-width: 800px;
    text-align: center;
}

nav.page-nav .breadcrumb {
    font-size: clamp(11px, 2vw, 17px);
    color: #888;
    margin-bottom: 10px;
    text-align: center;
}

nav.page-nav .breadcrumb a {
    color: #aaa;
    text-decoration: none;
}

nav.page-nav .breadcrumb a:hover {
    color: #FFCE55;
    text-decoration: underline;
}

nav.page-nav .breadcrumb .bc-sep {
    margin: 0 4px;
    color: #555;
}

nav.page-nav .breadcrumb span:last-child {
    color: #F5F5F5;
}

nav.page-nav .prev-next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #333;
    font-size: clamp(11px, 2vw, 17px);
}

nav.page-nav .nav-prev,
nav.page-nav .nav-next {
    color: #FFCE55;
    text-decoration: none;
    text-transform: uppercase;
    min-width: 40%;
}

nav.page-nav a.nav-prev:hover,
nav.page-nav a.nav-next:hover {
    text-decoration: underline;
}

nav.page-nav .nav-prev { text-align: left; }
nav.page-nav .nav-next { text-align: right; }

/* Section subtitle */
.section-desc {
    font-family: 'DepartureMono', monospace;
    font-size: clamp(13px, 1.2vw, 16px);
    color: #888;
    text-align: center;
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.6;
}

/* Filing box container */
.filing-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto 40px;
    padding: 0;
    perspective: 1000px;
}

/* Section color coding */
.filing-box[data-section="core"]  { --section-color: #5B4CFF; --section-dark: #483DCC; --card-text: #F5F5F5; }
.filing-box[data-section="start"] { --section-color: #FFFFFF; --section-dark: #CCCCCC; --card-text: #0a0a0a; }
.filing-box[data-section="aff"]   { --section-color: #D4A0A0; --section-dark: #AA8080; --card-text: #0a0a0a; }
.filing-box[data-section="ugd"]   { --section-color: #CC1100; --section-dark: #A30D00; --card-text: #F5F5F5; }
.filing-box[data-section="ugs"]   { --section-color: #BF00FF; --section-dark: #9900CC; --card-text: #F5F5F5; }
.filing-box[data-section="ugsu"]  { --section-color: #FF6600; --section-dark: #CC5200; --card-text: #0a0a0a; }
.filing-box[data-section="agd"]   { --section-color: #00DDFF; --section-dark: #00B1CC; --card-text: #0a0a0a; }
.filing-box[data-section="ags"]   { --section-color: #FFE000; --section-dark: #CCB300; --card-text: #0a0a0a; }
.filing-box[data-section="agsu"]  { --section-color: #ACDE70; --section-dark: #8AB259; --card-text: #0a0a0a; }
.filing-box[data-section="tools"] { --section-color: #383838; --section-dark: #2D2D2D; --card-text: #F5F5F5; }

/* Stack container */
.filing-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    position: relative;
    width: 800px;
    max-width: 100%;
    counter-reset: card-counter -1;
}

/* Card perspective wrapper */
.card-wrap {
    perspective: 1000px;
    counter-increment: card-counter;
}

.card-wrap + .card-wrap {
    margin-top: -353px;
}

/* Z-ordering for 3D stacking */
.card-wrap:nth-child(1)  { --z: 0px; }
.card-wrap:nth-child(2)  { --z: 2px; }
.card-wrap:nth-child(3)  { --z: 4px; }
.card-wrap:nth-child(4)  { --z: 6px; }
.card-wrap:nth-child(5)  { --z: 8px; }
.card-wrap:nth-child(6)  { --z: 10px; }
.card-wrap:nth-child(7)  { --z: 12px; }
.card-wrap:nth-child(8)  { --z: 14px; }
.card-wrap:nth-child(9)  { --z: 16px; }
.card-wrap:nth-child(10) { --z: 18px; }

/* The actual card */
.tab-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 700px;
    height: 400px;
    padding: 10px 24px 24px;
    transform-style: preserve-3d;
    transform: translateZ(var(--z, 0px)) rotateX(-20deg);
    user-select: none;
    transition: transform 0.4s ease;
    text-decoration: none;
    color: var(--card-text, #0a0a0a);
    cursor: pointer;
    box-sizing: border-box;
}
.tab-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--section-dark);
    clip-path: polygon(
        0 8px, 2px 8px, 2px 6px, 4px 6px, 4px 4px, 6px 4px, 6px 2px, 8px 2px, 8px 0,
        calc(100% - 8px) 0, calc(100% - 8px) 2px, calc(100% - 6px) 2px, calc(100% - 6px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 6px, calc(100% - 2px) 6px, calc(100% - 2px) 8px, 100% 8px,
        100% calc(100% - 8px), calc(100% - 2px) calc(100% - 8px), calc(100% - 2px) calc(100% - 6px), calc(100% - 4px) calc(100% - 6px), calc(100% - 4px) calc(100% - 4px), calc(100% - 6px) calc(100% - 4px), calc(100% - 6px) calc(100% - 2px), calc(100% - 8px) calc(100% - 2px), calc(100% - 8px) 100%,
        8px 100%, 8px calc(100% - 2px), 6px calc(100% - 2px), 6px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 6px), 2px calc(100% - 6px), 2px calc(100% - 8px), 0 calc(100% - 8px)
    );
}
.tab-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--section-color, #FFCE55);
    clip-path: polygon(
        0 6px, 2px 6px, 2px 4px, 4px 4px, 4px 2px, 6px 2px, 6px 0,
        calc(100% - 6px) 0, calc(100% - 6px) 2px, calc(100% - 4px) 2px, calc(100% - 4px) 4px, calc(100% - 2px) 4px, calc(100% - 2px) 6px, 100% 6px,
        100% calc(100% - 6px), calc(100% - 2px) calc(100% - 6px), calc(100% - 2px) calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) calc(100% - 2px), calc(100% - 6px) calc(100% - 2px), calc(100% - 6px) 100%,
        6px 100%, 6px calc(100% - 2px), 4px calc(100% - 2px), 4px calc(100% - 4px), 2px calc(100% - 4px), 2px calc(100% - 6px), 0 calc(100% - 6px)
    );
}

/* Hover: lift card out of stack */
.card-wrap:hover .tab-card {
    transform: translateZ(var(--z, 0px)) rotateX(-20deg) translateY(-40px);
    z-index: 100;
}

/* Last card (highest z-index): no clipping needed */
.card-wrap:last-child .tab-card {
    z-index: 50;
}

/* Tab title — absolutely positioned, tilts with card */
.tab-title {
    position: absolute;
    top: -31px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 200px;
    height: 32px;
    padding: 0 16px;
    font-family: 'RetroByte', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    box-sizing: border-box;
    cursor: pointer;
    white-space: nowrap;
    transform-style: preserve-3d;
}
.tab-title::before {
    content: '';
    position: absolute;
    inset: 0 0 1px 0;
    background: var(--section-dark);
    clip-path: polygon(
        0 6px, 2px 6px, 2px 4px, 4px 4px, 4px 2px, 6px 2px, 6px 0,
        calc(100% - 6px) 0, calc(100% - 6px) 2px, calc(100% - 4px) 2px, calc(100% - 4px) 4px, calc(100% - 2px) 4px, calc(100% - 2px) 6px, 100% 6px,
        100% 100%, 0 100%
    );
}
.tab-title::after {
    content: '';
    position: absolute;
    inset: 2px;
    inset-block-end: 0;
    background: var(--section-color, #FFCE55);
    clip-path: polygon(
        0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0,
        calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px,
        100% 100%, 0 100%
    );
}
.tab-name {
    position: relative;
    z-index: 1;
}

/* Tab number removed */

/* Tab name text */
.tab-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: right;
    text-transform: uppercase;
    transform: translateZ(4px) rotateX(20deg);
}

/* Three-column tab positions */
.tab-left .tab-title    { left: 60px; }
.tab-center .tab-title  { left: 250px; }
.tab-right .tab-title   { left: 440px; }

/* All cards use the same lighter section color */

/* Card body content */
.card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 8px;
    transform-style: preserve-3d;
}

/* Description text */
.tab-desc {
    font-family: 'DepartureMono', monospace;
    font-size: clamp(12px, 1.1vw, 14px);
    padding: 8px 0;
    margin: 0;
    transform: translateZ(4px) rotateX(20deg);
    transform-origin: top center;
}

/* Cabinet box — same as a card but no tab, no hover */
.cabinet-frame {
    position: relative;
    z-index: 60;
    width: 700px;
    max-width: 100%;
    height: 384px;
    margin-top: -369px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 24px;
    background: var(--section-color, #FFCE55);
    border: 2px solid var(--section-dark);
    transform-style: preserve-3d;
    transform: translateZ(20px) rotateX(-20deg);
    pointer-events: none;
    clip-path: polygon(
        0 6px, 2px 6px, 2px 4px, 4px 4px, 4px 2px, 6px 2px, 6px 0,
        calc(100% - 6px) 0, calc(100% - 6px) 2px, calc(100% - 4px) 2px, calc(100% - 4px) 4px, calc(100% - 2px) 4px, calc(100% - 2px) 6px, 100% 6px,
        100% calc(100% - 6px), calc(100% - 2px) calc(100% - 6px), calc(100% - 2px) calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) calc(100% - 2px), calc(100% - 6px) calc(100% - 2px), calc(100% - 6px) 100%,
        6px 100%, 6px calc(100% - 2px), 4px calc(100% - 2px), 4px calc(100% - 4px), 2px calc(100% - 4px), 2px calc(100% - 6px), 0 calc(100% - 6px)
    );
}

/* Hide unused sub-elements */
.cabinet-top-line {
    display: none;
}

/* Section title label */
.cabinet-label {
    pointer-events: auto;
    font-family: 'RetroByte', monospace;
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 500;
    color: var(--card-text, #0a0a0a);
    text-align: center;
    text-transform: uppercase;
}

/* ── Mobile: fully expanded cards, no 3D ── */
@media only screen and (max-width: 800px) {
    .filing-box {
        max-width: 100%;
    }

    .filing-stack {
        padding: 10px 0 0;
        gap: 16px;
        clip-path: none;
        counter-reset: none;
    }

    .card-wrap {
        perspective: none;
        width: 100%;
        height: auto;
    }

    .card-wrap + .card-wrap {
        margin-top: 0;
    }

    .tab-card {
        width: 100%;
        height: auto;
        min-height: 80px;
        transform: none !important;
        transform-style: flat;
        padding: 0;
        user-select: auto;
        background: var(--section-color, #FFCE55);
        color: var(--card-text, #0a0a0a);
        border-radius: 8px;
        overflow: hidden;
    }

    .card-wrap:hover .tab-card {
        transform: none !important;
    }

    .tab-title {
        position: relative;
        top: 0;
        left: 0 !important;
        width: 100%;
        height: auto;
        transform: none;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
        background: transparent;
        padding: 12px 16px;
        font-size: clamp(15px, 3.5vw, 18px);
        overflow: visible;
        white-space: normal;
    }

    .tab-card::before,
    .tab-card::after,
    .tab-title::before,
    .tab-title::after {
        content: none;
    }

    .card-body {
        padding: 0 16px 16px;
    }

    .tab-desc {
        font-size: clamp(13px, 3vw, 15px);
        max-width: none;
        padding: 8px 0;
        transform: none;
    }

    .tab-name {
        transform: none;
    }

    .cabinet-frame {
        display: none;
    }

    .section-desc {
        margin: 0 auto 20px;
        padding: 0 10px;
    }
}

/* ── Tablet: touch devices above mobile breakpoint ── */
@media (hover: none) and (min-width: 801px) {
    .card-wrap:hover .tab-card {
        transform: translateZ(var(--z, 0px)) rotateX(-20deg);
        z-index: auto;
    }
}

/* ── Group headings (h2) in .writtencontents ── */
.writtencontents h2 {
    font-family: 'RetroByte', sans-serif;
    font-size: clamp(24px, 5vw, 36px);
    line-height: 1.2;
    margin-top: 40px;
    margin-bottom: 10px;
}
.writtencontents h2:first-of-type {
    margin-top: 0;
}

/* ── Section headings (h3) in .writtencontents ── */
.writtencontents h3 {
    font-family: 'DepartureMono', monospace;
    font-size: clamp(14px, 2.5vw, 18px);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--section-color, #FFCE55);
    border-bottom: 1px solid rgba(255, 206, 85, 0.3);
    padding-bottom: 6px;
    margin-top: 25px;
    margin-bottom: 8px;
}

/* ── Accordion headings in .writtencontents ── */
.writtencontents h3.accordion-toggle {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 30px;
    transition: color 0.2s;
}
.writtencontents h3.accordion-toggle::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'DepartureMono', monospace;
    font-size: 0.8em;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.writtencontents h3.accordion-toggle.accordion-open::after {
    content: '\2212';
    opacity: 0.7;
}
.writtencontents h3.accordion-toggle:hover {
    color: #FFCE55;
}
.writtencontents h3.accordion-toggle:hover::after {
    opacity: 0.8;
}
.writtencontents .accordion-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}
.writtencontents .accordion-body.accordion-open {
    max-height: 3000px;
    opacity: 1;
}
