body {
    background-color: #0d0d0d;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: left;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

@font-face {
    font-family: TiemposHeadline-Regular;
    src: url("/assets/fonts/TiemposHeadline-Regular.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: TiemposText-Regular;
    src: url("/assets/fonts/TiemposText-Regular.otf") format("opentype");
    font-display: swap;
}

.content {
    padding: 20px;
    width: 600px;
    max-width: 90%;
    margin: 20px auto;
    box-sizing: border-box;
    text-align: justify;
    font-family: TiemposText-Regular, Georgia, serif;
    position: relative;
    background-color: transparent;
}

body:not(.home) .content {
    margin-top: 30px;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5 {
    font-family: TiemposHeadline-Regular, Georgia, serif;
}

.content h1 {
    font-size: 2em;
    color: #ffffff;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.content h2 {
    font-size: 1.6em;
    color: #f0f0f0;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}

.content h3 {
    font-size: 1.3em;
    color: #e8e8e8;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.content h4,
.content h5 {
    color: #e0e0e0;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.content p {
    text-align: justify;
    text-justify: inter-word;
    margin: 1em 0;
    line-height: 1.7;
}

.content li {
    text-align: justify;
    text-justify: inter-word;
    margin-bottom: 0.5em;
}

.content ul,
.content ol {
    padding-left: 2em;
    margin: 1em 0;
}

.center-content,
.center-content p,
.center-content * {
    text-align: center !important;
    text-justify: none !important;
}

.content p strong {
    font-family: TiemposText-Regular;
}

.content a strong {
    color: inherit;
}

.content a {
    color: #a855f7;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: TiemposText-Regular, Georgia, serif;
}

.content a:hover {
    color: #c084fc;
}

.content a:visited {
    color: #a855f7;
}

.no-bullets {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.no-bullets li {
    margin-bottom: 1.2em;
}

.content ul.no-bullets {
    padding-left: 0;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background-color: #1a1a1a;
    border: 1px solid #333;
}

.content table th {
    background-color: #222;
    color: #ffffff;
    padding: 12px;
    text-align: left;
    border: 1px solid #333;
    font-family: TiemposHeadline-Regular;
}

.content table td {
    padding: 10px 12px;
    border: 1px solid #2a2a2a;
}

.content table tr:nth-child(even) {
    background-color: #151515;
}

.content img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 1.5em 0;
    border: 1px solid #333;
}

.content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    text-align: justify;
    background-color: #1a1a1a;
    border-left: 4px solid #a855f7;
    font-style: italic;
    color: #c0c0c0;
}

.content code:not(pre code) {
    background-color: #1a1a1a;
    color: #f8f8f2;
    padding: 2px 6px;
    font-family: "Fira Code" !important;
    font-size: 0.9em;
    border: 1px solid #333;
}

.code-block-wrapper {
    position: relative;
    margin: 1.5rem 0;
    overflow: hidden;
    background-color: #0f0f0f;
    border: 1px solid #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: #0a0a0a;
    border-bottom: 1px solid #2a2a2a;
}

.code-language {
    font-size: 0.75rem;
    color: #8a7a64;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-copy-button {
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    color: #c0c0c0;
    background-color: #1f1f1f;
    border: 1px solid #3a3a3a;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    width: auto !important;
    margin: 0 !important;
    font-weight: 500;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.code-copy-button:hover {
    background-color: #2a2a2a;
    border-color: #4a4a4a;
}

.code-copy-button:active {
    transform: scale(0.98);
}

.code-copy-button.copy-success {
    background-color: #1a472a;
    border-color: #2d7a4d;
    color: #7ee3a8;
}

.code-copy-button.copy-error {
    background-color: #5c1a1a;
    border-color: #8c2e2e;
    color: #ff9999;
}

.code-block-wrapper pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background-color: #0f0f0f;
}

.code-block-wrapper pre code {
    font-family: "Fira Code" !important;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #d4c4a8;
    background: transparent;
    border: none;
    padding: 0;
}

.code-block-wrapper pre.with-line-numbers {
    display: flex;
    padding: 0;
}

.code-line-numbers {
    flex-shrink: 0;
    padding: 1rem 0.75rem;
    background-color: #0a0a0a;
    border-right: 1px solid #2a2a2a;
    text-align: right;
    user-select: none;
}

.code-line-numbers div {
    font-family: "Fira Code" !important;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #444;
}

.code-block-wrapper pre.with-line-numbers code {
    padding: 1rem;
    overflow-x: auto;
    display: block;
    width: 100%;
}

/* Scrollbar Styles - Default Theme */

/* Body scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background-color: #0d0d0d;
    border-left: 1px solid #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background-color: #2a2a2a;
    border-radius: 6px;
    border: 2px solid #0d0d0d;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #3a3a3a;
}

::-webkit-scrollbar-thumb:active {
    background-color: #4a4a4a;
}

::-webkit-scrollbar-corner {
    background-color: #0d0d0d;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a #0d0d0d;
}

/* Code block scrollbar */
.code-block-wrapper pre::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.code-block-wrapper pre::-webkit-scrollbar-track {
    background-color: #0a0a0a;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb {
    background-color: #3a3a3a;
    border-radius: 5px;
    border: 2px solid #0a0a0a;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb:hover {
    background-color: #4a4a4a;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb:active {
    background-color: #5a5a5a;
}

.code-block-wrapper pre::-webkit-scrollbar-corner {
    background-color: #0a0a0a;
}

.code-block-wrapper pre {
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a #0a0a0a;
}

.code-blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(15, 15, 15, 0.8), #0f0f0f);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.code-blur-overlay.expanded {
    opacity: 0;
    pointer-events: none;
}

.code-expand-button {
    background-color: #1f1f1f;
    color: #c0c0c0;
    border: 1px solid #3a3a3a;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.code-expand-button:hover {
    background-color: #2a2a2a;
    border-color: #4a4a4a;
    color: #e0e0e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.code-expand-button:active {
    transform: translateY(0);
}

.code-expand-button i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.code-expand-button:hover i {
    transform: scale(1.1);
}

.code-preview-mode {
    max-height: calc(1.6em * 15 + 2rem);
    overflow: hidden;
    position: relative;
}

.code-preview-mode code {
    display: block;
    max-height: calc(1.6em * 15);
    overflow: hidden;
}

button,
.post-button,
.press-toggle,
details summary {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid #444;
    border-radius: 0;
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
    margin: 1em auto;
    width: 350px;
    max-width: 350px;
    font-size: 1.1em;
    font-family: TiemposHeadline-Regular;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    text-decoration: none;
    outline: none;
}

button:hover,
.post-button:hover,
.press-toggle:hover,
details summary:hover {
    background-color: #252525;
    border-color: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

button:active,
.post-button:active,
.press-toggle:active,
details summary:active {
    transform: translateY(0);
}

details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

.press-toggle .toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.button-wrapper {
    text-align: center;
    margin: 1em 0;
    display: block;
    width: 100%;
}

.button-wrapper a {
    text-decoration: none;
    color: inherit;
    display: block;
    border: none;
}

h4.post-button {
    display: block !important;
    box-sizing: border-box;
    margin: 0.5em auto;
    text-align: center;
    width: 100%;
}

.button-wrapper.align-left .post-button {
    margin: 1em 0;
}

.button-wrapper.align-right .post-button {
    margin: 1em 0 1em auto;
}

.button-wrapper.align-left > a,
.button-wrapper.align-right > a {
    display: block;
}

.button-wrapper.align-left,
.button-wrapper.align-right {
    text-align: left;
    display: inline-flex;
    width: 50%;
    box-sizing: border-box;
}

.button-wrapper.align-left {
    justify-content: flex-start;
    padding-right: 1.5%;
}

.button-wrapper.align-right {
    justify-content: flex-end;
    padding-left: 1.5%;
}

.button-wrapper.align-left .post-button,
.button-wrapper.align-right .post-button {
    width: 100%;
    max-width: none;
}

@media screen and (max-width: 768px) {
    .button-wrapper.align-left,
    .button-wrapper.align-right {
        display: block;
        width: 100%;
        padding: 0;
    }

    .button-wrapper.align-left .post-button,
    .button-wrapper.align-right .post-button {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

.cta-row {
    display: flex;
    gap: 12px;
    margin: 1.5em 0;
}

.cta-row .button-wrapper {
    margin: 0;
    width: auto;
    flex: 1;
}

.cta-row .post-button.cta-button {
    width: 100%;
    max-width: none;
    margin: 0;
}

@media screen and (max-width: 768px) {
    .cta-row {
        flex-direction: column;
    }
}

.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: #1a1a1a;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0.6;
    color: #e0e0e0;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.theme-toggle:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: #666;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sidenote-container {
    position: relative;
    display: inline;
}

.sidenote-marker {
    color: #a855f7;
    font-size: 0.75em;
    font-weight: bold;
    cursor: pointer;
    vertical-align: super;
    line-height: 0;
    text-decoration: none;
    border: none;
    padding: 0 2px;
    transition: all 0.2s ease;
}

.sidenote-marker:hover {
    color: #c084fc;
}

.sidenote {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 250px;
    padding: 0.8em 1em;
    background-color: #1a1a1a;
    border: 1px solid #333;
    font-size: 0.85em;
    line-height: 1.6;
    color: #c0c0c0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-family: TiemposText-Regular, Georgia, serif;
    z-index: 10;
    text-align: left;
    text-justify: none;
}

.sidenote p {
    margin: 0.5em 0;
    font-size: 1em;
    text-align: left;
    text-justify: none;
}

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

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

.sidenote a {
    color: #a855f7;
    text-decoration: underline;
}

.sidenote a:hover {
    color: #c084fc;
}

@media screen and (min-width: 1200px) {
    .sidenote {
        display: none;
    }

    .sidenote-container:hover .sidenote,
    .sidenote.active {
        display: block;
    }

    .sidenote-marker {
        cursor: pointer;
    }

    .sidenote {
        max-width: min(250px, calc(100vw - 800px));
    }
}

@media screen and (max-width: 1199px) {
    .sidenote {
        position: static;
        width: 100%;
        margin: 1em 0;
        left: auto;
        display: none;
    }

    .sidenote.active {
        display: block;
    }

    .sidenote-marker:hover {
        text-decoration: underline;
    }
}

#my_age {
    display: inline-block;
    width: 103px;
    text-align: left;
}

.code-block {
    overflow-x: auto;
}

.rabbit-hole {
    display: inline-block;
    animation: subtle-shake 1.5s ease-in-out 1s forwards;
}

@keyframes subtle-shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-2px) rotate(-1deg);
    }
    40% {
        transform: translateX(2px) rotate(1deg);
    }
    60% {
        transform: translateX(-2px) rotate(0deg);
    }
    80% {
        transform: translateX(2px) rotate(0deg);
    }
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    margin-right: 0.5em;
    font-size: 0.9em;
}

.tag a {
    color: #a855f7;
    text-decoration: none;
    border: none;
}

hr {
    border: none;
    border-top: 1px solid #333;
    margin: 1.5em 0;
}

.content .twitter-tweet-rendered {
    max-width: 100% !important;
    width: 100% !important;
    margin: 1.5em auto !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
    clear: both !important;
    overflow: visible !important;
}

.content .twitter-tweet-rendered .tweet-embed-wrapper {
    display: block !important;
    width: 560px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    transform-origin: top center !important;
}

.content .twitter-tweet-rendered iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    display: block !important;
    transform-origin: top center !important;
}

.content blockquote.twitter-tweet {
    max-width: 100% !important;
    width: 100% !important;
    margin: 1.5em auto 0 !important;
    padding: 1em 1.5em !important;
    background-color: #1a1a1a !important;
    border-left: 4px solid #a855f7 !important;
    border-right: 1px solid #333 !important;
    border-top: 1px solid #333 !important;
    border-bottom: 1px solid #333 !important;
    color: #e0e0e0 !important;
    font-family: TiemposText-Regular, Georgia, serif !important;
    text-align: left !important;
}

.content blockquote.twitter-tweet p {
    margin: 0.5em 0 !important;
    color: #e0e0e0 !important;
}

.content blockquote.twitter-tweet a {
    color: #a855f7 !important;
}

@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    body:not(.home) .content {
        margin-top: 20px;
    }

    .content {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 10px auto;
        overflow-x: hidden;
    }

    .content .twitter-tweet-rendered {
        margin: 1.5em auto 0 !important;
    }

    body:not(.home) .content {
        margin-top: 20px;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        bottom: 15px;
        right: 15px;
    }

    .code-block-wrapper {
        margin: 1rem 0;
    }

    .code-block-header {
        padding: 0.5rem 0.75rem;
    }

    .code-language {
        font-size: 0.8125rem;
    }

    .code-copy-button {
        padding: 0.35rem 0.7rem;
        font-size: 0.8125rem;
        display: flex !important;
        width: auto !important;
        margin: 0 !important;
    }

    button,
    .post-button,
    .press-toggle,
    details summary {
        padding: 12px 25px;
        width: 320px;
        max-width: calc(100% - 30px);
        font-size: 1.05em;
        margin: 1em auto;
    }

    .content blockquote.twitter-tweet {
        max-width: 100% !important;
        padding: 1em !important;
        margin: 1.5em auto 0 !important;
    }
}

@media screen and (max-width: 480px) {
    .content {
        padding: 12px;
        margin: 5px auto;
    }

    body:not(.home) .content {
        margin-top: 5px;
    }

    .content .twitter-tweet-rendered,
    .content blockquote.twitter-tweet {
        margin: 1.2em auto 0 !important;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }

    .code-block-wrapper {
        margin: 1rem 0;
    }

    .code-block-header {
        padding: 0.375rem 0.5rem;
    }

    .code-language {
        font-size: 0.75rem;
    }

    .code-copy-button {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.25rem;
        display: flex !important;
        width: auto !important;
        margin: 0 !important;
    }

    .code-block-wrapper pre,
    .code-block-wrapper pre code {
        font-size: 0.8125rem;
    }

    .code-line-numbers {
        padding: 1rem 0.5rem;
    }

    .code-line-numbers div {
        font-size: 0.8125rem;
    }

    .code-expand-button {
        padding: 0.35rem 0.7rem;
        font-size: 0.7rem;
    }

    button,
    .post-button,
    .press-toggle,
    details summary {
        padding: 12px 20px;
        width: 280px;
        max-width: calc(100% - 20px);
        font-size: 1em;
        margin: 1em auto;
    }
}

@media screen and (min-width: 1024px) {
    .content {
        width: 700px;
    }

    .code-block-wrapper {
        margin: 1.5rem 0;
    }
}

@media screen and (min-width: 1440px) {
    .content {
        width: 800px;
    }
}

@media screen and (min-width: 1920px) {
    .content {
        width: 900px;
    }
}

@media screen and (min-width: 2560px) {
    .content {
        width: 1000px;
        font-size: 1.1em;
    }

    .content h1 {
        font-size: 2.5em;
    }

    .content h2 {
        font-size: 2.1em;
    }

    .content h3 {
        font-size: 1.8em;
    }
}

.content pre {
    width: 100%;
    box-sizing: border-box;
}

.drop-cap-container {
    float: left;
    margin-right: 12px;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1;
    display: block;
    width: var(--drop-cap-width, 80px);
    height: var(--drop-cap-height, calc(1em * 1.7 * 3));

    max-height: calc(var(--drop-cap-height) - 2px);
}

.drop-cap-svg {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
}

.has-drop-cap {
    text-align: justify;
    overflow: visible;
    position: relative;
}

.has-drop-cap::after {
    content: "";
    display: block;
    clear: both;
}

@media screen and (max-width: 768px) {
    .drop-cap-container {
        margin-right: 8px;
        width: var(--drop-cap-width, 70px);
        height: var(--drop-cap-height, calc(1em * 1.7 * 3));
    }
}

@media screen and (max-width: 480px) {
    .drop-cap-container {
        margin-right: 6px;
        width: var(--drop-cap-width, 60px);
        height: var(--drop-cap-height, calc(1em * 1.7 * 3));
    }
}
