/* CSS Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

.mobile-only {
    display: none !important;
}

.no-mobile {
    display: inline-block;
}

/* Variables & Font */
:root {
    --container-width: calc(100vw - 74px);
    --container-height: calc(100vh - 80px);
    --interval-width: 9.63px;
    --interval-height: 24px;

    /* Theme 6 default matching p.cv */
    --background: #11111A;
    --foreground: #DDDDDD;

    --copy-text: " [+]";
}

@font-face {
    font-family: 'iaWriter';
    src: url('/iAWriterMonoS-Regular.woff') format('woff'), url('iAWriterMonoS-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

/* 9 Color Themes Matching p.cv + Twilight & Light Lavender Purple */
html[data-theme='1'] {
    --background: #FFFFFF;
    --foreground: #33333A;
}

html[data-theme='2'] {
    --background: #CCCCCF;
    --foreground: #36363E;
}

html[data-theme='3'] {
    --background: #95ABC0;
    --foreground: #2B303B;
}

html[data-theme='4'] {
    --background: #44444C;
    --foreground: #B4B4B7;
}

html[data-theme='5'] {
    --background: #0044FF;
    --foreground: #FFFFFF;
}

html[data-theme='6'] {
    --background: #11111A;
    --foreground: #DDDDDD;
}

html[data-theme='7'] {
    --background: #11111A;
    --foreground: #6ACAC9;
}

html[data-theme='8'] {
    --background: #181028;
    --foreground: #D0A7F5;
}

html[data-theme='9'] {
    --background: #F2EEFA;
    --foreground: #2C124D;
}

html, body {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100%;
    padding: 0;
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-family: 'iaWriter', monospace;
    background: var(--background);
    color: var(--foreground);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Custom "Breaking the Prism" Cursors */
@media (hover: hover) and (pointer: fine) {
    *, html, body, a, button, select, input, textarea {
        cursor: none !important;
    }

    #prism-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 32px;
        height: 32px;
        pointer-events: none;
        z-index: 10000000;
        transform: translate(-1px, -1px);
        opacity: 0;
        transition: opacity 0.1s ease;
    }

    #prism-cursor.visible {
        opacity: 1;
    }

    #prism-cursor.is-pointer {
        transform: translate(-7px, 0px);
    }

    #prism-cursor svg {
        display: block;
        width: 32px;
        height: 32px;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
    }
}

.outer-container {
    width: 100vw;
    height: 100vh;
    display: grid;
    align-items: center;
    justify-content: center;
    min-height: 608px;
}

.inner-container {
    position: relative;
    width: var(--container-width);
    height: calc(100vh - 80px);
    min-height: 480px;
}

.content-container {
    position: absolute;
    z-index: 20;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.content-container > * {
    pointer-events: none;
}

.content-row {
    height: 24px;
    text-transform: uppercase;
    user-select: none;
    width: auto;
    max-width: 48%;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.name-row {
    display: flex;
    align-items: center;
    width: auto;
    max-width: 48%;
    pointer-events: none;
}

.name-row .name-title {
    margin: 0;
    padding-left: 3px;
    pointer-events: auto;
    white-space: pre;
}

.desktop-pad {
    display: inline-block;
    white-space: pre;
    user-select: none;
    pointer-events: none;
}

.about-top-link {
    display: inline-block;
    pointer-events: auto;
    padding-left: 0px !important;
}

.about-top-link:after {
    display: none !important;
    content: "" !important;
}

.about-top-link:hover,
.about-top-link:active,
.about-top-link:focus-visible {
    color: var(--background) !important;
    background: var(--foreground) !important;
    border-radius: 2px;
}

.about-badge {
    display: inline-block;
    white-space: nowrap;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: normal;
}

.info-badge {
    display: none;
    align-items: center;
    color: currentColor;
    text-decoration: none;
}

.info-icon {
    display: inline-block;
    vertical-align: -1px;
    margin: 0 1px;
    fill: currentColor;
}

.content-row-empty {
    height: 24px;
    pointer-events: none;
}

.content-row-bottom {
    position: absolute;
    bottom: 0px;
    left: 0px;
}

.content-row p,
.content-row button,
.content-row a,
.content-link-anchor,
.content-copy,
.content-copy-anchor,
.content-toggle,
.content-switch,
.content-no-link,
.back-link,
.about-container {
    pointer-events: auto;
}

.content-row p {
    display: inline-block;
    border-radius: 2px;
    padding-left: 3px;
    cursor: default;
}

/* Buttons & Links styling */
button,
a.content-link-anchor,
a.content-copy-anchor,
.content-no-link,
.content-toggle,
.misc-item {
    border: none;
    padding: 0px;
    margin: 0px;
    background: none;
    font-family: inherit;
    font-size: 16px;
    line-height: 24px;
    text-transform: uppercase;
    padding-left: 3px;
    border-radius: 2px;
    color: var(--foreground);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.content-no-link {
    cursor: default;
}

.exp-row {
    display: inline-block;
}

.exp-title,
.exp-meta,
.exp-date {
    display: inline;
}

/* Hover bracket indicators matching p.cv design language */
.content-link:focus-visible:after,
.content-link:hover:after,
.content-link:active:after,
.content-link-anchor:focus-visible:after,
.content-link-anchor:hover:after,
.content-link-anchor:active:after {
    display: inline;
    content: " [↗]";
    cursor: pointer;
}

.content-no-link:focus-visible:after,
.content-no-link:hover:after,
.content-no-link:active:after {
    display: inline;
    content: " [-]";
    cursor: default;
}

.content-copy:focus-visible:after,
.content-copy:hover:after,
.content-copy:active:after,
.content-copy-anchor:focus-visible:after,
.content-copy-anchor:hover:after,
.content-copy-anchor:active:after {
    display: inline;
    content: var(--copy-text);
    cursor: pointer;
}

.content-switch:focus-visible:after,
.content-switch:hover:after,
.content-switch:active:after {
    display: inline;
    content: " [⬏]";
    cursor: pointer;
}

.content-toggle:focus-visible:after,
.content-toggle:hover:after,
.content-toggle:active:after {
    display: inline;
    content: " [+]";
    cursor: pointer;
}

.content-toggle.is-open:focus-visible:after,
.content-toggle.is-open:hover:after,
.content-toggle.is-open:active:after {
    display: inline;
    content: " [-]";
    cursor: pointer;
}

button:focus-visible,
a:focus-visible {
    color: var(--background);
    background: var(--foreground);
    outline: none;
}

button:active,
a:active {
    background: var(--foreground);
    color: var(--background);
}

/* Sub-list for MISC */
.misc-dropdown {
    display: flex;
    flex-direction: column;
}

.misc-sub-row {
    height: 24px;
    padding-left: 0;
}

.misc-dropdown,
.misc-sub-row,
.sub-item,
.sub-label {
    text-transform: none !important;
}

.sub-prefix {
    user-select: none;
    opacity: 0.8;
}

.sub-label {
    opacity: 0.95;
}

.sub-item:hover .sub-label {
    opacity: 1;
}

/* Typewriter & Cursor */
.typewriter-wrapper {
    display: inline-block;
    white-space: pre;
}

.cursor {
    display: inline-block;
    font-weight: normal;
    animation: terminal-blink 1s step-start infinite;
    user-select: none;
}

@keyframes terminal-blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* ASCII canvas container */
.ascii-container {
    position: absolute;
    width: 64%;
    height: 100%;
    right: 3px;
    top: 0px;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.ascii-click-container {
    position: absolute;
    width: 64%;
    height: calc(100% + 40px);
    right: 3px;
    top: -40px;
    z-index: 15;
    pointer-events: auto;
}

pre {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: inherit;
    text-align: right;
    user-select: none;
}

.ascii-hint {
    display: none;
    position: absolute;
    top: 0px;
    right: 0px;
    background: var(--background);
    pointer-events: none;
    user-select: none;
    cursor: default;
}

.ascii-hint.show {
    display: block;
}

/* Portfolio Page specific */
.portfolio-center-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.portfolio-center-container > * {
    pointer-events: auto;
}

.portfolio-coming-soon {
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.back-link {
    text-decoration: none;
    color: var(--foreground);
    outline: none;
    display: inline-flex;
    align-items: center;
    border-radius: 2px;
    padding-left: 3px;
    padding-right: 3px;
}

.back-link:hover {
    color: var(--background);
    background: var(--foreground);
}

.back-link:focus-visible {
    color: var(--background);
    background: var(--foreground);
    outline: none;
}

/* Responsive / Mobile Styling */
@media only screen and (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    button.mobile-only,
    a.mobile-only,
    div.mobile-only {
        display: flex !important;
    }

    .no-mobile {
        display: none !important;
    }

    .outer-container {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 28px 16px;
        padding-left: 16px;
        min-width: 320px;
        box-sizing: border-box;
    }

    .inner-container {
        position: relative;
        display: block;
        width: 100%;
        height: 100%;
        min-height: calc(100vh - 56px);
        min-height: calc(100dvh - 56px);
        box-sizing: border-box;
    }

    .content-container {
        position: absolute;
        z-index: 20;
        top: 0px;
        left: 0px;
        width: 100%;
        height: 100%;
        min-height: calc(100vh - 56px);
        min-height: calc(100dvh - 56px);
        box-sizing: border-box;
    }

    .content-row {
        height: auto;
        min-height: 28px;
        padding: 2px 0;
        width: 100% !important;
        max-width: 100% !important;
        display: flex;
        align-items: center;
        box-sizing: border-box;
    }

    .name-row {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .name-row .name-title {
        flex-shrink: 0;
        text-align: left;
        white-space: nowrap;
    }

    .about-top-link {
        width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 0px !important;
        padding-right: 0px !important;
        justify-content: flex-end !important;
        margin-left: auto;
        text-decoration: none;
    }

    .about-badge {
        display: inline-flex !important;
        align-items: center !important;
        color: currentColor !important;
        text-decoration: none;
        white-space: nowrap;
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
        letter-spacing: normal;
    }

    .about-top-link:hover,
    .about-top-link:active,
    .about-top-link:focus-visible {
        color: var(--background) !important;
        background: var(--foreground) !important;
        border-radius: 2px;
    }

    .content-row-empty {
        height: 24px;
    }

    .content-row p {
        padding-left: 3px;
    }

    .mobile-text {
        display: inline-block;
        background: var(--background);
    }

    /* Standard Interactive Row styling on Mobile */
    button,
    a.content-link-anchor,
    a.content-copy-anchor,
    .content-no-link,
    .content-toggle {
        padding: 0px;
        padding-left: 3px;
        padding-right: 0px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
    }

    .button-label {
        flex-grow: 1;
        text-align: left;
        white-space: nowrap;
    }

    /* Experience Rows on Mobile: Left title, Right date + badge */
    .exp-row {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0px !important;
        padding-left: 3px !important;
        padding-right: 0px !important;
        margin: 0px !important;
        text-decoration: none;
        box-sizing: border-box;
    }

    .exp-title {
        flex-shrink: 0;
        text-align: left;
        white-space: nowrap;
    }

    .exp-meta {
        margin-left: auto;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        text-align: right;
        white-space: nowrap;
        flex-shrink: 0;
        padding-right: 0px !important;
    }

    .exp-date {
        white-space: nowrap;
    }

    /* Disable hover brackets on touch/mobile to prevent sticky hover states */
    .content-link:focus-visible:after,
    .content-link:hover:after,
    .content-link:active:after,
    .content-link-anchor:focus-visible:after,
    .content-link-anchor:hover:after,
    .content-link-anchor:active:after,
    .content-no-link:focus-visible:after,
    .content-no-link:hover:after,
    .content-no-link:active:after,
    .content-copy:focus-visible:after,
    .content-copy:hover:after,
    .content-copy:active:after,
    .content-copy-anchor:focus-visible:after,
    .content-copy-anchor:hover:after,
    .content-copy-anchor:active:after,
    .content-switch:focus-visible:after,
    .content-switch:hover:after,
    .content-switch:active:after,
    .content-toggle:focus-visible:after,
    .content-toggle:hover:after,
    .content-toggle:active:after,
    .content-toggle.is-open:focus-visible:after,
    .content-toggle.is-open:hover:after,
    .content-toggle.is-open:active:after,
    .back-link:hover:after {
        display: none !important;
        content: "";
    }

    .content-switch {
        width: auto;
        padding-right: 3px;
    }

    .content-row-bottom {
        position: absolute;
        bottom: 0px;
        left: 0px;
    }

    .ascii-container {
        display: none;
    }

    .ascii-click-container {
        display: none;
    }

    .misc-sub-row {
        height: auto;
        min-height: 26px;
        padding-left: 12px;
    }

    .sub-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media only screen and (max-width: 480px) {
    html, body, button, a, p, span, li {
        font-size: clamp(13px, 3.8vw, 14.5px);
        line-height: 22px;
    }

    .back-link,
    .about-badge {
        font-size: clamp(13px, 3.8vw, 14.5px) !important;
        line-height: 22px !important;
    }

    .about-text {
        font-size: 14px !important;
        line-height: 22px !important;
    }

    .about-beliefs li,
    .about-risks li {
        font-size: 13px !important;
        line-height: 20px !important;
    }
}

/* About Page Specific Styles */
html.about-page,
html.about-page body {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible !important;
}

.about-page .outer-container {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    padding-bottom: 40px;
}

.about-page .inner-container {
    height: auto;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
}

.about-content-container {
    position: relative;
    height: auto;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    padding-bottom: 56px;
    display: flex;
    flex-direction: column;
}

/* About Navigation Row - Sticky at top */
.about-nav-row {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--background);
    padding-top: 8px;
    padding-bottom: 8px;
    width: 100%;
    max-width: 520px;
    height: auto;
    min-height: 36px;
}

/* Headshot Hero Frame - Sticky beneath navigation */
.about-hero {
    position: sticky;
    top: 56px;
    z-index: 5;
    width: 100%;
    max-width: 520px;
    height: calc(85vh - 100px);
    max-height: 580px;
    min-height: 380px;
    margin-top: 16px;
    margin-bottom: 24px;
    pointer-events: auto;
}

.about-photo-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--bracket-hover, rgba(128, 128, 128, 0.25));
    background: var(--background);
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
}

/* About Container - Rising Curtain with Opaque Background */
.about-container {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 520px;
    background: var(--background);
    margin-top: 0px;
    padding-top: 32px;
    padding-bottom: 64px;
    color: var(--foreground);
    user-select: text;
}

.about-page .content-row-bottom {
    z-index: 25;
    pointer-events: auto;
}

.about-header {
    margin-bottom: 24px;
}

.about-name {
    font-size: 16px;
    line-height: 24px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    padding-left: 3px;
}

.about-role {
    font-size: 14px;
    line-height: 24px;
    text-transform: uppercase;
    opacity: 0.75;
    margin: 0;
    padding-left: 3px;
    letter-spacing: 0.04em;
}

.about-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-heading {
    font-size: 15px;
    line-height: 24px;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    padding-left: 3px;
}

.about-text {
    font-size: 15px;
    line-height: 24px;
    text-transform: none;
    margin: 0;
    padding-left: 3px;
    opacity: 0.95;
    word-break: break-word;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.about-beliefs,
.about-risks {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
    display: flex;
    flex-direction: column;
}

.about-beliefs {
    gap: 8px;
}

.about-risks {
    gap: 6px;
}

.about-beliefs li,
.about-risks li {
    font-size: 14px;
    line-height: 22px;
    padding-left: 3px;
    text-transform: none;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.about-beliefs strong,
.about-risks strong {
    font-weight: bold;
    letter-spacing: 0.02em;
}

@media only screen and (max-width: 768px) {
    .about-page .outer-container {
        padding: 32px 24px 56px 21px;
    }

    .about-page .inner-container {
        min-height: calc(100vh - 88px);
        min-height: calc(100dvh - 88px);
    }

    .about-content-container {
        position: relative !important;
        height: auto !important;
        min-height: calc(100vh - 88px) !important;
        min-height: calc(100dvh - 88px) !important;
        padding-bottom: 56px;
    }

    .about-hero {
        top: 48px;
        height: calc(75vh - 80px);
        max-height: 480px;
        min-height: 280px;
        margin-top: 8px;
        margin-bottom: 16px;
    }

    .about-container {
        max-width: 100%;
        padding-top: 24px;
        padding-bottom: 48px;
    }

    .about-role {
        font-size: 13px;
        line-height: 20px;
    }

    .about-heading {
        font-size: 14px;
        line-height: 22px;
    }

    .about-text {
        font-size: 14px !important;
        line-height: 22px !important;
    }

    .about-beliefs li,
    .about-risks li {
        font-size: 13px !important;
        line-height: 20px !important;
    }
}

@media only screen and (max-width: 1024px) {
    .ascii-container,
    .ascii-click-container {
        display: none !important;
    }

    .about-nav-row,
    .about-hero,
    .about-container {
        width: 100% !important;
        max-width: 680px !important;
    }

    .content-row {
        max-width: 100% !important;
    }
}

@media only screen and (min-width: 1025px) {
    .about-page .ascii-container {
        position: fixed !important;
        top: 40px !important;
        right: calc((100vw - var(--container-width)) / 2 + 3px) !important;
        width: 50% !important;
        height: calc(100vh - 80px) !important;
        z-index: 10 !important;
        pointer-events: none !important;
    }

    .about-page .ascii-click-container {
        position: fixed !important;
        top: 0px !important;
        right: calc((100vw - var(--container-width)) / 2 + 3px) !important;
        width: 50% !important;
        height: 100vh !important;
        z-index: 15 !important;
        pointer-events: auto !important;
    }
}
