/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
* {
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none;
}

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

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

button {
    all: unset;
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    box-shadow: none;
    outline: none;
    touch-action: manipulation;
}

/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
    /* Main */
    --base: #fafafa;
    --surface: #ffffff;
    --overlay: #e8e8e8;
    --muted: #999999;
    --subtle: #666666;
    --text: #1a1a1a;

    --bg-day: #fafafa;
    --bg-night: #666474;

    /* Accents */
    --love: #c65d7b;
    --gold: #d4a574;
    --rose: #d4938f;
    --pine: #4a8fa0;
    --foam: #6db3b8;
    --iris: #9a8fc7;
}

/* ============================================
   FONT FACES
   ============================================ */
@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('fonts/AtkinsonHyperlegibleNext-VariableFont_wght.woff2') format('woff2-variations');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('fonts/AtkinsonHyperlegibleNext-Italic-VariableFont_wght.woff2') format('woff2-variations');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Crimson Text';
    src: url('fonts/crimson-roman-webfont.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Crimson Text';
    src: url('fonts/crimson-bold-webfont.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/JetBrainsMono-VariableFont_wght.woff2') format('woff2-variations');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Lora';
    src: url('fonts/Lora-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Lora';
    src: url('fonts/Lora-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Departure';
    src: url('fonts/DepartureMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Victor Mono';
    src: url('fonts/VictorMono-MediumItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

@font-face {
    font-family: 'Victor Mono';
    src: url('fonts/VictorMono-SemiBoldItalic.woff2') format('woff2');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF;
}

/* ============================================
   BASE ELEMENTS
   ============================================ */
html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-size: 16px;
}

html {
    background-color: var(--bg-day);
}

html.sleeping {
    background-color: var(--bg-night);
}

body {
    background-color: transparent !important;
    color: var(--text);
    cursor: url('/cursors/aero_arrow_xl.cur'), auto;
}

::selection {
    background: #a83d5d;
    color: var(--surface);
}

::-moz-selection {
    background: #a83d5d;
    color: var(--surface);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 {
    margin: 10px 0 0 0;
    font-family: 'Crimson Text', serif;
    font-size: 2.5rem;
    filter: url(#xerox);
}

h2 {
    margin: 5px 0 0 0;
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 400;
    filter: url(#xerox);
}

/* --- CLOAKING (Prevents flash of incorrect text on load) --- */
body.cloak h1,
body.cloak h2,
body.cloak #main-image {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

/* Ensure they fade in nicely when cloak is removed */
h1,
h2,
#main-image {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease;
}

strong,
b {
    font-weight: bold;
}

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */
.matrix {
    width: 100vw;
    height: 100vh;
}

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

/* ============================================
   EFFECTS
   ============================================ */
.xerox-effect {
    filter: url(#xerox);
}

/* ============================================
   CURSORS
   ============================================ */
a,
a:hover {
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
}

button,
.close-btn,
.download-btn,
#min {
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
}

.icon {
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
}

#sitemap .nav-list li {
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
}

[onclick] {
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
}

#page-arrow-left,
#page-arrow-right {
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
}

input[type="text"],
input[type="email"],
textarea,
[contenteditable="true"] {
    cursor: url('/cursors/aero_text_xl.cur'), text;
}

.loading,
[aria-busy="true"] {
    cursor: url('/cursors/aero_busy_xl'), wait;
}

.processing {
    cursor: url('/cursors/aero_working_xl'), progress;
}

.draggable,
[draggable="true"] {
    cursor: url('/cursors/aero_move_xl.cur'), move;
}

.help,
[aria-label*="help" i] {
    cursor: url('/cursors/aero_helpsel_xl.cur'), help;
}

.disabled,
[disabled],
[aria-disabled="true"] {
    cursor: url('/cursors/aero_unavail_xl.cur'), not-allowed;
}

.precise-select {
    cursor: url('/cursors/aero_cross_xl.cur'), crosshair;
}

.resize-ns {
    cursor: url('/cursors/aero_ns_xl.cur'), ns-resize;
}

.resize-ew {
    cursor: url('/cursors/aero_ew_xl.cur'), ew-resize;
}

.resize-nesw {
    cursor: url('/cursors/aero_nesw_xl.cur'), nesw-resize;
}

.resize-nwse {
    cursor: url('/cursors/aero_nwse_xl.cur'), nwse-resize;
}

.up-arrow {
    cursor: url('/cursors/aero_up_xl.cur'), default;
}

.pen-tool {
    cursor: url('/cursors/aero_pen_xl.cur'), default;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.ascii-container {
    text-align: left;
}

.ascii {
    float: left;
    margin-right: 1.5rem;
    overflow: auto;
    shape-outside: inset();
}

.ascii pre {
    display: inline-block;
    margin: 0;
    overflow-x: auto;
    white-space: pre;
    font-family: 'Consolas', monospace;
    font-size: 0.2rem;
    font-weight: bold;
    line-height: 1;
    filter: drop-shadow(1px 1px var(--text));
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* ============================================
   DESKTOP ICONS
   ============================================ */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
    display: grid;
    gap: 20px;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon:hover {
    transform: translateY(-2px);
}

.icon-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.icon-symbol img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: url(#xerox);
}

.icon-label {
    font: 0.9rem 'Departure', monospace;
    text-align: center;
    color: var(--text);
    background: var(--overlay);
    padding: 0px 6px;
}

/* ============================================
   BACKDROP & ZOOM EFFECTS
   ============================================ */
.blurry {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 400;
    display: none;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.blurry.show {
    display: block;
}

.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 410;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
}

.zoomed.show {
    pointer-events: auto;
    animation: enhancein 0.3s ease forwards;
}

.zoomed.hide {
    pointer-events: none;
    animation: enhanceout 0.3s ease forwards;
}

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

    60% {
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

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

    40% {
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        transform: translate(-50%, -50%) scale(0);
    }
}

/* ============================================
   WINDOWS
   ============================================ */

/* --- BIO WINDOW --- */
#bio {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    width: 90vw;
    max-height: 700px;
    height: 70vh;
    border-radius: 20px;
    background: var(--overlay);
    filter: drop-shadow(0px 10px 10px rgba(47, 42, 53, 0.19));
}

#bio .browser-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: calc(100% - 64px);
    margin: 44px 0 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--surface);
}

#bio .page {
    max-width: 110ch;
    margin: 0 16px;
    font: 1rem/1.5 'Lora', serif;
    color: var(--text);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

#bio .page h3 {
    margin: 10px 0 10px 0;
    font-family: 'Crimson Text', serif;
    font-size: 1.6em;
}

#bio .page section {
    margin-bottom: 1.5em;
}

#bio .address {
    position: absolute;
    top: 7px;
    left: 50%;
    display: flex;
    align-items: center;
    width: 55%;
    height: 24px;
    padding: 3px;
    border-radius: 5px;
    background-color: var(--surface);
    transform: translateX(-50%);
}

#bio .address::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    background: url("img/favi.png") no-repeat center / contain;
}

#bio .address::after {
    content: "https://yareligonzalez.com/about";
    width: 100%;
    margin-left: 5px;
    margin-right: 38px;
    overflow: hidden;
    white-space: nowrap;
    font: 0.9rem 'Atkinson Hyperlegible', monospace;
}

#bio #min {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--love);
}

#bio #min::before,
#bio #min::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 10%;
    border-radius: 5px;
    background: var(--surface);
}

#bio #min::before {
    transform: rotate(45deg);
}

#bio #min::after {
    transform: rotate(-45deg);
}

/* --- RESUME WINDOW --- */
#resume {
    width: 8.5in;
    height: 11in;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 2px;
    background: #ffffff;
    filter: drop-shadow(0px 10px 10px rgba(47, 42, 53, 0.19));
    display: flex;
    flex-direction: column;
}

#resume::before {
    content: "";
    position: absolute;
    z-index: -2;
    height: 100%;
    width: 100%;
    background: #eee;
    top: 0;
    left: 0;
    transform: rotate(1.5deg);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

#resume.zoomed.show {
    pointer-events: auto;
    animation: enhancein 0.3s ease forwards;
}

#resume.zoomed.hide {
    pointer-events: none;
    animation: enhanceout 0.3s ease forwards;
}

.paperclip {
    box-sizing: border-box;
    display: block;
    top: 5px;
    right: 0;
    height: 80px;
    width: 38px;
    border-radius: 0 0 90px 90px;
    border-top: none;
    position: absolute;
    transform: rotate(30deg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.paperclip::before,
.paperclip::after {
    content: '';
    position: absolute;
    border: 3px groove #DDDDDD;
    border-bottom-width: 3px;
    border-bottom-style: groove;
    border-bottom-color: rgb(221, 221, 221);
}

.paperclip::after {
    top: -30px;
    left: -3px;
    height: 27px;
    width: 20px;
    border-radius: 90px 90px 0 0;
    border-bottom: none !important;
}

.paperclip::before {
    left: 3px;
    height: 50px;
    width: 14px;
    border-radius: 0 0 90px 90px;
    border-top: none;
}

#resume .resume-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5in;
    box-sizing: border-box;
    font-family: 'Lora', serif;
    font-size: 10pt;
    line-height: 1.4;
    background: #ffffff;
}

#resume .resume-header {
    text-align: center;
    margin-bottom: 5pt;
}

#resume .resume-header h1 {
    font-family: 'Crimson Text', serif;
    font-size: 1.6em;
    font-weight: normal;
    margin: 10px 0 5pt 0;
    filter: none;
}

#resume .resume-contact {
    font-size: 10pt;
    margin-bottom: 10pt;
    text-align: center;
}

#resume .resume-contact a {
    color: var(--text);
    text-decoration: none;
}

#resume .resume-contact a:hover {
    text-decoration: underline;
}

#resume .resume-section {
    margin-bottom: 10pt;
}

#resume .resume-section h2 {
    font-family: 'Crimson Text', serif;
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 1pt solid var(--text);
    padding-bottom: 1pt;
    margin: 10pt 0 6.5pt 0;
    filter: none;
}

#resume .job-header {
    margin-bottom: 7pt;
}

#resume .job-title {
    font-weight: bold;
}

#resume .location-date {
    float: right;
}

#resume .clear {
    clear: both;
}

#resume .resume-section ul {
    margin-left: 12pt;
    margin-top: 7pt;
    margin-bottom: 18.5pt;
    padding: 0;
}

#resume .resume-section li {
    margin-bottom: 2pt;
    line-height: 1.4;
}

#resume .skills-section p {
    margin-bottom: 4pt;
    line-height: 1.4;
}

#resume .skill-category {
    font-weight: bold;
}

#resume .education-header {
    margin-bottom: 6.5pt;
}

#resume .education-school {
    font-weight: bold;
}

#resume .education-date {
    float: right;
}

#resume .education-degree {
    margin-top: 2pt;
}

#resume .publication {
    margin-bottom: 6.5pt;
    line-height: 1.4;
}

#resume .download-btn {
    position: absolute;
    bottom: -16px;
    right: 50%;
    transform: translateX(50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 20px;
    background: var(--text);
    font: 1rem 'Atkinson Hyperlegible', monospace;
    color: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    text-decoration: none;
    z-index: 10;
}

#resume .download-btn::before {
    content: '⬇';
    font-size: 1.1rem;
}

/* --- RESEARCH WINDOW (TOME) --- */
#tome {
    max-width: 781.25px;
    width: 106.25vw;
    height: 520px;
    padding: 3.75px 10px;
    border-top: 3.75px solid var(--foam);
    border-radius: 4.6875px;
    background: linear-gradient(to right, var(--pine) 50%, var(--foam) 50%);
    background-clip: padding-box;
    font: 0.9375rem/1.625 'Lora', serif;
    color: var(--text);
    will-change: filter;
}

.endpapers {
    position: absolute;
    max-width: 778.75px;
    width: 106.25vw;
    height: 506.25px;
    border-left: 3.75px solid var(--muted);
    border-top: 3.75px solid var(--surface);
    background: linear-gradient(to right, var(--overlay) 50%, var(--surface) 50%);
}

.reading-area {
    position: absolute;
}

#bookmark {
    position: absolute;
    left: 55%;
    width: 15.625px;
    height: 618.75px;
    border-top: 1.25px solid var(--love);
    background-color: var(--love);
    clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 100% 100%, 50% 98%, 0% 100%, 0% 85%);
}

.page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 37.5px 425px 37.5px;
    max-width: 772.5px;
    width: 105vw;
    height: 503.75px;
    border-left: 3.75px solid var(--muted);
    border-top: 3.75px solid var(--surface);
    background: linear-gradient(to right, var(--overlay) 50%, var(--surface) 50%);
}

.research-title {
    font: 3.3em/1.2 'Lora', serif;
    padding: 0 8px;
    width: 100%;
    text-align: center;
    flex-direction: column;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: scroll;
}

.page-title {
    border-bottom: 1px solid var(--text);
    width: 84%;
    margin: 0 8%;
}

.page-content {
    width: 90%;
    margin: 12.5px 18.75px 0;
    overflow-wrap: break-word;
    white-space: normal;
    font: 1.25em/1.4 'Lora', serif;
    flex-direction: column;
    padding: 0 12.5px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: scroll;
}

.page-grid .publication {
    margin-bottom: 15px;
}

.page-grid .pub-title {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-grid .pub-authors {
    font-size: 0.8em;
    margin-bottom: 4px;
    line-height: 1.5;
}

.page-grid .pub-journal {
    font-size: 0.7em;
    font-style: italic;
    color: var(--subtle);
    margin-bottom: 12px;
}

.page-grid .pub-description {
    font-size: 0.75em;
    line-height: 1.6;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.small {
    margin: 0;
    font: 0.6em/1 'Lora', serif;
    font-variant: small-caps;
}

#page-number {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

#page-arrow-left,
#page-arrow-right {
    position: absolute;
    font-size: 1.2em;
}

#page-arrow-left {
    left: 10px;
}

#page-arrow-right {
    right: 10px;
}

#page-num-text {
    display: inline-block;
}

figcaption {
    font-size: 0.7em;
    font-style: italic;
    color: var(--subtle);
    margin: 12px 0;
}

/* --- CONTACT WINDOW --- */
#contact {
    border: 5px solid var(--overlay);
    border-radius: 30px;
    filter: drop-shadow(0px 10px 10px rgba(47, 42, 53, 0.19));
}

#contact .screen {
    max-width: 400px;
    width: 80vw;
    height: 80vh;
    padding: 5px;
    border: 5px solid var(--text);
    border-radius: 25px;
    overflow-y: scroll;
    background: linear-gradient(-45deg, var(--foam), var(--pine), var(--iris), var(--iris), var(--rose), var(--love)) fixed;
    font: 1.2rem/1.5 'JetBrains Mono', monospace;
}

#contact .card {
    margin-bottom: 10px;
    padding: 20px;
    border-radius: 15px;
    background: var(--surface);
    font-size: 0.8em;
    color: var(--text);
}

#contact .card:last-of-type {
    margin-bottom: 0;
}

#contact .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-family: 'Victor Mono', monospace;
    font-style: italic;
    font-weight: 600;
}

#contact .card-content {
    margin-top: 10px;
    overflow-wrap: break-word;
}

#contact .close-btn {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--text);
    font: 1rem 'Atkinson Hyperlegible', monospace;
    color: var(--surface);
}

#contact .close-btn::after {
    content: '\2715';
}

/* ============================================
   NAVIGATION
   ============================================ */

/* --- TASKBAR --- */
#taskbar {
    position: fixed;
    bottom: 0;
    z-index: 99;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    border-top: 1px solid var(--text);
    background: var(--surface);
    font: 1.2rem/1.5 'Departure', monospace;
}

#taskbar .taskbar-content {
    max-width: 100%;
    min-width: 100%;
    height: 40px;
    margin: 0 !important;
    padding: 0;
}

#taskbar .bar-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

#taskbar li {
    line-height: 40px;
    list-style: none;
}

#brand {
    display: flex;
    align-items: center;
    min-width: 200px;
    height: 40px;
    margin: 0;
    padding: 0 16px;
    border-right: solid 1px var(--text);
    background: transparent;
    font-size: 12px;
    font-weight: 400;
    color: var(--text);
    list-style: none;
}

#brand:hover {
    background: var(--overlay);
}

#date-time {
    display: flex;
    justify-content: space-between;
    min-width: 150px;
    margin: 0;
    padding: 0 16px;
    padding-left: 12px;
    border-left: solid 1px var(--text);
    font-size: 12px;
    list-style: none;
}

/* --- SITEMAP --- */
#sitemap {
    position: fixed;
    bottom: 40px;
    left: -1px;
    max-height: 0;
    width: 233px;
    padding: 0 16px;
    box-sizing: border-box;
    border-right: solid 1px var(--text);
    border-bottom: none;
    border-left: solid 1px var(--text);
    overflow: hidden;
    background: var(--surface);
    transform-origin: bottom left;
    transition: max-height 0.3s ease-out;
}

#sitemap.show {
    max-height: 300px;
    border-top: solid 1px var(--text);
}

#sitemap h3 {
    margin: 0;
    padding: 12px 0;
    font-size: 14px;
}

.nav-list {
    margin: 0;
    padding: 0;
    padding-bottom: 12px;
    list-style: none;
    border-left: solid 1.5px var(--text);
}

.nav-list li {
    padding: 6px 0;
    font-size: 12px;
    line-height: 16px;
    transition: color 0.2s;
    text-decoration: underline;
    padding-left: 12px;
    text-indent: -12px;
}

.nav-list li::before {
    content: "————o";
    display: inline-block;
    text-decoration: none;
    padding-right: 6px;
    letter-spacing: -2px;
    font-size: 12px;
    line-height: 18px;
    padding-left: 12px;
}

.nav-list li:hover {
    color: var(--love);
}

/* ============================================
   NIGHT MODE & SLEEP MODE
   ============================================ */

body.sleeping h1,
body.sleeping h2 {
    color: #222030;
}

/* --- SLEEP TOGGLE --- */
.sleep-toggle {
    margin-top: 2rem;
    position: relative;
    z-index: 10000;
    opacity: 0.35;
}

.sleep-toggle.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.toggle-switch {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    cursor: url('/cursors/aero_link_xl.cur'), pointer;
    z-index: 10;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
    background: #9893a5;
    border-radius: 50%;
    transition: all 0.2s ease;
    filter: url(#xerox);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 16px;
    left: 50%;
    top: 26%;
    transform: translateX(-50%);
    background: #000;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.toggle-switch:hover .toggle-slider {
    transform: translateY(-2px);
    background: var(--foam);
}

.toggle-switch:hover .toggle-slider::before {
    border-color: var(--surface);
    border-top-color: transparent;
}

.toggle-switch:hover .toggle-slider::after {
    background: var(--surface);
}

/* --- LIGHTSON SWITCH --- */
.desktop-power-btn {
    display: block;
}

.mobile-power-btn {
    display: none;
}

.lightson {
    position: relative;
    width: 60px;
    height: 34px;
    background: #363348;
    border-radius: 34px;
    border-bottom: 1px solid var(--muted);
    border-right: 1px solid var(--muted);
    cursor: pointer;
    border: none;
    padding: 0;
    filter: url(#xerox);
    z-index: 9999;
}

.lightson::before {
    display: flex;
    align-items: center;
    justify-content: center;
    content: "☼";
    font-size: 1.4rem;
    left: 4px;
    top: 4px;
    width: 26px;
    height: 26px;
    position: absolute;
    background: #d4ceff;
    border-radius: 50%;
    border-top: 1px solid var(--base);
    border-left: 1px solid var(--base);
    transition: transform 0.3s ease;
}

.lightson.active {
    background: var(--surface);
}

.lightson.active::before {
    transform: translateX(26px);
}

/* --- SLEEPING STATE --- */
.desktop-icons.sleeping,
#taskbar.sleeping {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* --- STARFIELD --- */

.starpath {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    animation: rotate 2400s linear infinite;
    pointer-events: none;
}

#sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 0;
    font-family: 'Atkinson Hyperlegible', sans-serif;
    color: #fff;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
    animation: glow 2s infinite ease-in-out;
    filter: url(#xerox);
}

/* Default: stars hidden */
.starpath,
#sky {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* When body is sleeping: show stars */
body.sleeping .starpath,
body.sleeping #sky {
    opacity: 1;
    visibility: visible;
}

.star1 {
    grid-area: 1 / 2 / 2 / 3;
}

.star2 {
    grid-area: 1 / 5 / 2 / 6;
}

.star3 {
    grid-area: 1 / 6 / 2 / 7;
}

.star5 {
    grid-area: 2 / 3 / 3 / 4;
}

.star6,
.star13,
.star19 {
    grid-area: 2 / 6 / 3 / 7;
    text-align: left;
}

.star7,
.star11,
.star18 {
    grid-area: 2 / 7 / 3 / 8;
    text-align: right;
}

.star8 {
    grid-area: 3 / 1 / 4 / 2;
}

.star9 {
    grid-area: 4 / 2 / 5 / 3;
}

.star10 {
    grid-area: 5 / 1 / 6 / 2;
}

.star11 {
    grid-area: 6 / 1 / 7 / 2;
}

.star12 {
    grid-area: 3 / 7 / 4 / 8;
}

.star13 {
    grid-area: 4 / 8 / 5 / 9;
}

.star14 {
    grid-area: 5 / 8 / 6 / 9;
}

.star15 {
    grid-area: 6 / 7 / 7 / 8;
}

.star16 {
    grid-area: 7 / 2 / 8 / 3;
}

.star17 {
    grid-area: 7 / 4 / 8 / 4;
}

.star18 {
    grid-area: 7 / 5 / 8 / 6;
}

.star19 {
    grid-area: 7 / 7 / 8 / 8;
}

.star20 {
    grid-area: 8 / 3 / 9 / 4;
}

.star21 {
    grid-area: 8 / 5 / 9 / 6;
}

.star22 {
    grid-area: 8 / 9 / 9 / 7;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
    }

    50% {
        text-shadow: 0 0 6px #fff;
    }
}

/* ============================================
   MEDIA QUERIES - TABLET/DESKTOP
   ============================================ */
@media (max-width: 768px) {

    /* --- Base Adjustments --- */
    * {
        -webkit-overflow-scrolling: touch;
    }

    html {
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    body {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    /* --- Typography --- */
    h1 {
        font-size: 2.25rem;
        margin: 0 0 12px 0;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.1rem;
        margin: 0;
        color: var(--subtle);
        line-height: 1.5;
        max-width: 90%;
    }

    body.sleeping h2 {
        color: #393747;
    }

    .page h3 {
        text-align: center;
    }

    /* --- Utility Classes --- */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .ascii {
        display: block;
        float: none;
        max-width: 100%;
        margin: 0 auto 1rem auto;
        text-align: center;
    }

    .ascii pre {
        max-width: 100%;
        overflow-x: auto;
    }

    /* --- Main Layout --- */
    .matrix {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        padding: 0;
        position: fixed;
    }

    .matrix>.center:not(.desktop-icons) {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 40px 24px 140px;
        text-align: center;
        overflow: hidden;
    }

    .matrix>.center img {
        height: 200px !important;
        width: auto;
        margin-bottom: 24px;
        flex-shrink: 0;
    }

    /* --- Desktop Icons → iPhone Dock --- */
    .desktop-icons {
        position: fixed;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: calc(100vw - 32px);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 22px;
        padding: 12px 28px;
        background: #cbcbcb;
        backdrop-filter: blur(60px) saturate(180%);
        -webkit-backdrop-filter: blur(60px) saturate(180%);
        border-radius: 32px;
        border: none;
        z-index: 1000;
        margin: 0;
        top: auto;
        right: auto;
        box-shadow: 0 3px 12px rgba(255, 255, 255, 0.12), 0 1px 4px rgba(255, 255, 255, 0.08), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.5);
    }

    .icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 0;
        background: transparent;
        border-radius: 0;
        min-height: auto;
        transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        position: relative;
        width: 70px;
        flex-shrink: 0;
    }

    .icon:active {
        transform: scale(0.88);
    }

    .icon-symbol {
        width: 70px;
        height: 70px;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(230, 230, 235, 0.95);
        border-radius: 18px;
        box-shadow:
            0 3px 12px rgba(0, 0, 0, 0.12),
            0 1px 4px rgba(0, 0, 0, 0.08),
            inset 0 0.5px 0.5px rgba(255, 255, 255, 0.5);
        transition: all 0.2s ease;
        border: none;
    }

    .icon-symbol img {
        width: 46px;
        height: 46px;
        object-fit: contain;
        filter: drop-shadow(0 0.5px 1px rgba(0, 0, 0, 0.05)) url(#xerox);
    }

    .icon-label {
        display: none;
    }

    /* --- Bio Window --- */
    #bio .browser-content {
        overflow-x: hidden;
        overflow-y: auto;
    }

    #bio .page {
        margin: 0 12px;
        max-width: 100%;
    }

    /* --- Resume Window --- */
    #resume {
        width: 85vw !important;
        max-width: 650px !important;
        height: 75vh !important;
        border-radius: 0;
        background: #ffffff;
        box-shadow:
            0 0 0 1px #d0d0d0,
            0 4px 12px rgba(0, 0, 0, 0.15);
        filter: none;
        padding: 0;
    }

    #resume::before {
        display: none;
    }

    .paperclip {
        display: none;
    }

    #resume .resume-container {
        width: 100%;
        height: 100%;
        padding: 0.4in 0.35in;
        margin: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        background: transparent;
        position: relative;
    }

    #resume .resume-header {
        padding: 0;
        margin: 0 0 20px 0;
        text-align: center;
        border: none;
        background: transparent;
    }

    #resume .resume-header h1 {
        font-size: 1.75rem;
        margin: 0 0 8px 0;
        line-height: 1.2;
        color: var(--text);
    }

    #resume .resume-contact {
        font-size: 0.8rem;
        line-height: 1.6;
        color: var(--subtle);
    }

    #resume .resume-section {
        margin: 0 0 18px 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    #resume .resume-section:first-of-type {
        margin-top: 0;
    }

    #resume .resume-section h2 {
        font-size: 1.2rem;
        margin: 0 0 10px 0;
        color: var(--text);
        font-weight: 700;
        border-bottom: 1.5px solid var(--text);
        padding-bottom: 4px;
    }

    #resume .job-header {
        margin-bottom: 8px;
    }

    #resume .job-title {
        font-weight: 600;
    }

    #resume .location-date,
    #resume .education-date {
        float: none;
        display: block;
        margin-top: 4px;
        font-size: 0.8rem;
        color: var(--subtle);
        font-style: italic;
    }

    #resume .resume-section ul {
        margin: 8px 0 16px 18px;
        padding: 0;
    }

    #resume .resume-section li {
        margin-bottom: 8px;
        line-height: 1.5;
        font-size: 0.85rem;
    }

    #resume .skills-section p {
        line-height: 1.6;
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    #resume .publication {
        line-height: 1.5;
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    #resume .download-btn {
        display: none;
    }

    #resume .resume-section:last-of-type {
        padding-bottom: 20px;
        margin-bottom: 0;
    }

    /* --- Research/Tome Window --- */
    #tome {
        max-width: 500px;
        height: 333px;
        padding: 2px 6px;
        border-top: 2px solid var(--foam);
        font: 0.6rem/1.3 'Lora', serif;
    }

    .endpapers {
        max-width: 498px;
        height: 324px;
        border-left: 2px solid var(--muted);
        border-top: 2px solid var(--surface);
    }

    #bookmark {
        top: -18px;
        width: 10px;
        height: 396px;
    }

    .page-grid {
        grid-template-rows: 24px 272px 24px;
        max-width: 494px;
        height: 322px;
        border-left: 2px solid var(--muted);
        border-top: 2px solid var(--surface);
    }

    .research-title {
        font: 3.3em/1.2 'Lora', serif;
        padding: 0 8px;
    }

    .page-content {
        margin: 8px 12px 0;
        font: 1.5em/1.4 'Lora', serif;
        padding: 0 8px;
    }

    .page-grid ul {
        padding: 0 4px 0 16px;
    }

    .page-grid ul li {
        margin: 8px 0;
    }

    .small {
        font: 0.6em/1 'Lora', serif;
    }

    /* --- Contact Window --- */
    #contact .screen {
        font-size: 1rem;
    }

    #contact .card {
        font-size: 0.92em;
    }

    #contact .card-header {
        margin-bottom: 14px;
        font-size: 1.15em;
        line-height: 1.4;
    }

    #contact .card-content {
        line-height: 1.7;
    }

    #contact .card-content p {
        margin: 10px 0;
    }

    #contact .card-content svg {
        margin-right: 10px;
    }

    /* --- Portfolio/Folder (Mobile) --- */
    #portfolio {
        width: 90vw;
        max-width: 500px;
        height: auto;
    }

    .folder-mobile {
        width: 100%;
        margin: 0;
        position: relative;
    }

    .folder-cover {
        width: 100%;
        height: 280px;
        background: var(--pine);
        border-radius: 10px;
        position: relative;
        filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .folder-mobile.open .folder-cover {
        opacity: 0;
        transform: scale(0.95);
        pointer-events: none;
        position: absolute;
        z-index: 1;
    }

    .folder-label {
        font-family: 'Jetbrains Mono', monospace;
        font-size: 1.8rem;
        color: var(--surface);
        text-align: center;
        padding: 20px;
        line-height: 1.4;
    }

    .folder-label small {
        display: block;
        font-size: 0.5em;
        margin-top: 10px;
        opacity: 0.8;
        font-family: 'Jetbrains Mono', monospace;
    }

    .tabs-mobile {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        position: relative;
        z-index: 10;
    }

    .tabs-mobile::-webkit-scrollbar {
        display: none;
    }

    .tab-mobile {
        font-family: 'Jetbrains Mono', monospace;
        text-transform: uppercase;
        line-height: 1;
        display: inline-block;
        margin-left: 0;
        margin-right: 8px;
        filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.3)) brightness(0.9);
        border: none;
        position: relative;
        white-space: nowrap;
        cursor: pointer;
        background: transparent;
        padding: 0;
        z-index: 10;
        transition: transform 0.2s ease, filter 0.2s ease, z-index 0.2s ease;
    }

    .tab-mobile:first-of-type {
        margin-left: 40px;
        z-index: 11;
    }

    .tab-mobile:nth-of-type(2) {
        z-index: 10;
    }

    .tab-mobile:before,
    .tab-mobile:after {
        content: "";
        height: 100%;
        position: absolute;
        background: var(--pine);
        border-radius: 8px 8px 0 0;
        width: 20px;
        top: 0;
        transition: background 0.2s ease;
    }

    .tab-mobile:before {
        right: -12px;
        transform: skew(25deg);
        border-radius: 0 8px 0 0;
    }

    .tab-mobile:after {
        transform: skew(-25deg);
        left: -12px;
        border-radius: 8px 0 0 0;
    }

    .tab-mobile div {
        background: var(--pine);
        padding: 4px 0;
        position: relative;
        z-index: 10;
        transition: background 0.2s ease;
    }

    .tab-mobile span {
        display: inline-block;
        padding: 4px 12px;
        z-index: 5;
        position: relative;
        font-size: 0.75rem;
        color: var(--surface);
        min-width: 4rem;
        transition: all 0.2s ease;
    }

    .tab-mobile.active {
        z-index: 50;
        position: relative;
        filter: drop-shadow(0px -2px 3px rgba(0, 0, 0, 0.15));
        transform: translateY(1px);
    }

    .tab-mobile.active div {
        background: var(--pine);
    }

    .tab-mobile.active span {
        background: var(--surface);
        box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
        border-radius: 5px;
        color: var(--text);
    }

    .folder-content {
        border-radius: 10px;
        position: relative;
        width: 100%;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
        pointer-events: none;
    }

    .folder-mobile.open .folder-content {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
        pointer-events: auto;
    }

    .folder-content__inner {
        display: none;
        background: var(--pine);
        border-radius: 10px;
        padding: 0.8rem;
        filter: drop-shadow(0px -2px 2px rgba(0, 0, 0, 0.1));
        position: relative;
        z-index: 40;
    }

    .folder-content__inner.active {
        display: block;
    }

    .folder-page {
        padding: 1.2rem;
        border-radius: 2px;
        height: 400px;
        overflow-y: auto;
        line-height: 1.6;
        background-color: var(--surface);
        filter: drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.15));
        font-family: 'Lora', serif;
        font-size: 0.85rem;
    }

    .folder-page .publication {
        margin-bottom: 20px;
    }

    .folder-page .pub-title {
        font-size: 1em;
        font-weight: 600;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .folder-page .pub-title a {
        color: var(--text);
        text-decoration: underline;
    }

    .folder-page .pub-authors {
        font-size: 0.85em;
        margin-bottom: 4px;
    }

    .folder-page .pub-journal {
        font-size: 0.8em;
        font-style: italic;
        color: var(--subtle);
        margin-bottom: 12px;
    }

    .folder-page .pub-description {
        font-size: 0.85em;
        line-height: 1.6;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--overlay);
    }

    .folder-page img {
        width: 100%;
        height: auto;
        margin: 15px 0;
        border-radius: 2px;
    }

    .folder-page figcaption {
        font-size: 0.75em;
        font-style: italic;
        color: var(--subtle);
        margin: -10px 0 15px 0;
    }

    /* --- Navigation --- */
    #taskbar {
        display: none;
    }

    #sitemap {
        display: none;
    }

    /* --- Sleep Mode --- */
    .desktop-power-btn {
        display: none;
    }

    .mobile-power-btn {
        display: block;
    }
}

/* ============================================
   MEDIA QUERIES - SMALL MOBILE
   ============================================ */
@media (max-width: 480px) {

    /* --- Desktop Icons/Dock --- */
    .desktop-icons {
        padding: 10px 24px;
        gap: 18px;
        bottom: 20px;
        max-width: calc(100vw - 24px);
        border-radius: 30px;
    }

    .icon {
        width: 64px;
    }

    .icon-symbol {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .icon-symbol img {
        width: 42px;
        height: 42px;
    }

    /* --- Hero Section --- */
    .matrix>.center:not(.desktop-icons) {
        padding: 32px 20px 20px;
    }

    .matrix>.center img {
        height: 280px !important;
    }

    /* --- Typography --- */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.05rem;
    }

    /* --- Windows --- */
    #bio .page,
    .page-content {
        padding: 20px 18px;
        font-size: 0.92rem;
    }

    #bio .page h3 {
        font-size: 1.5rem;
    }

    #resume .resume-container {
        padding: 0.3in 0.25in;
    }

    #resume .resume-header h1 {
        font-size: 1.6rem;
    }
}