@view-transition { navigation: auto; }

html, body { overflow-x: hidden; }
* { box-sizing: border-box; }

:root {
    color-scheme: dark;
    --width: 900px; 
    --bg: #000000; 
    --text: #ffffff; 
    --text-muted: #0098db;
    --accent: #0ce6f2; 
    --accent-hover: #ffffff;
    --nav-bg: #0f0f1b;
    --border: #203562;
    --accent-glow: rgba(12, 230, 242, 0.15);

    --sh-comment: #6c7893;
    --sh-keyword: #c678dd;
    --sh-string: #98c379;
    --sh-class: #e5c07b;
    --sh-function: #61afef;
    --sh-variable: #e06c75;
    --sh-number: #d19a66;
    --sh-operator: #56b6c2;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f8fb;
    --text: #201533;
    --text-muted: #203562;
    --accent: #1e579c;      
    --accent-hover: #0098db;
    --border: #c4d7e8;      
    --nav-bg: #ffffff;      
    --accent-glow: rgba(30, 87, 156, 0.15);

    --sh-comment: #6e7781;
    --sh-keyword: #cf222e;
    --sh-string: #0a3069;
    --sh-class: #953800;
    --sh-function: #0550ae;
    --sh-variable: #e36209;
    --sh-number: #0550ae;
    --sh-operator: #24292f;
}

body, .footer-card, .profile-img, pre, code, h1, h2, h3, a, blockquote {
    transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace; 
    max-width: var(--width);
    margin: 0 auto;        
    padding: 2rem 1.5rem;
}

main {
    animation: fadeIn 0.4s ease-out;
}

h1, h2, h3 {
    color: var(--text);
    text-shadow: 0 0 10px var(--accent-glow);
    letter-spacing: -1px; 
    margin-top: 0; 
    margin-bottom: 0.5rem;
    font-weight: 800;
}

h1 { margin-bottom: 1.5rem; }
.faded { opacity: 0.4; }

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px var(--accent-glow);
}

body > header {
    display: flex;
    justify-content: center;
    width: 100%;
}

nav { 
    margin-bottom: 2rem; 
    display: flex; 
    align-items: center; 
    background-color: var(--nav-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
    max-width: 100%;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] nav {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
}

.nav-scroll {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
}

.nav-scroll::-webkit-scrollbar {
    display: none;
}

.nav-scroll a {
    display: inline-block;                
    font-weight: 800;
    background: transparent; 
    border: 1px solid transparent;
    padding: 8px 16px;                     
    border-radius: 4px;                    
    color: var(--text);                  
    box-shadow: none; 
    text-transform: uppercase;
    font-size: 0.8em;                     
    letter-spacing: 1px;
    transition: all 0.1s ease;
    text-decoration: none;
    outline: none;
    flex-shrink: 0;
}

.nav-scroll a:hover, .nav-scroll a.active {
    color: var(--accent);                    
    background: var(--accent-glow);
    border: 1px solid var(--accent);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    margin-left: 5px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.1s ease, color 0.1s ease;
}

.theme-toggle:hover {
    background: rgba(12, 230, 242, 0.05);
    color: var(--accent);
    outline: 1px solid var(--accent);
}

.bio-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.profile-img { 
    width: 120px; 
    height: auto;
    border-radius: 8px;
    box-shadow: 4px 4px 0px rgba(42, 161, 152, 0.2); 
    border: 2px solid var(--accent);
    flex-shrink: 0; 
}

.bio-text p {
    margin: 0 0 0.8rem 0;
    line-height: 1.6;
    color: var(--text);
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem;
}

.grid-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 800;
}

ul { list-style: none; padding-left: 0; margin: 0; }
li { margin-bottom: 4px; }

@media (max-width: 600px) {
    .bio-container { flex-direction: column; }
    .grid-container { grid-template-columns: 1fr; }
    .rec-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

footer {
    margin-top: 4rem;
    padding: 0 20px 2rem 20px;
    border-top: none; 
}

.footer-card {
    background-color: var(--nav-bg); 
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4rem 2rem 5rem 2rem; 
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden; 
}

[data-theme="dark"] .footer-card {
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.3);
}

.footer-content {
    position: relative;
    z-index: 2;
}

.copyright {
    font-size: 0.9rem;
    font-weight: 800;
    opacity: 0.9;
    color: var(--accent);
}

.footer-card a {
    color: var(--accent);
    border-bottom: 1px dashed rgba(127, 156, 245, 0.3);
}

.footer-card a:hover {
    border-bottom: 1px dashed var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

.footer-big-text {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(1.5rem, 6vw, 3.5rem); 
    font-weight: 800;
    white-space: nowrap;
    color: var(--accent);
    opacity: 0.15;
    z-index: 1;
    line-height: 1;
    pointer-events: none;
    letter-spacing: -1px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 1.5rem;
}

.footer-socials a {
    color: var(--accent);
    border-bottom: none;
    transition: transform 0.1s, opacity 0.1s;
    display: flex;
    align-items: center;
}

.footer-socials a:hover {
    transform: translateY(-2px);
    opacity: 1;
    border-bottom: none;
    text-shadow: 0 0 15px var(--accent-glow);
}

.footer-socials svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.blog-post { margin-bottom: 3rem; }
.blog-post h3 { font-size: 1.4rem; margin-bottom: 0.5rem; margin-top: 0; font-weight: 800; }
.blog-post h3 a { color: var(--text); border: none; }
.blog-post h3 a:hover { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

.meta {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    opacity: 0.8;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.excerpt {
    line-height: 1.6;
    color: #b0b8c8; 
    margin-bottom: 1rem;
}

hr { border: 0; border-top: 1px dashed var(--border); margin: 2rem 0; }

pre, code {
    background: var(--nav-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

pre {
    padding: 15px;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    overflow-x: auto; 
}

img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    margin: 1.5rem 0;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2); 
    border: 1px solid var(--border); 
}

blockquote {
    margin: 1.5rem 0;
    padding: 0.5rem 1.5rem;
    border-left: 4px solid var(--accent);
    background-color: var(--nav-bg);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--text);
}

blockquote p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.rec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.rec-category h3 {
    font-size: 1.1rem;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-weight: 800;
}

.rec-category ul {
    list-style: none;
    padding-left: 0;
}

.rec-category li {
    margin-bottom: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.version-link {
    position: relative;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    cursor: help;
}

.version-link::before {
    content: "WEBSITE VERSION";
    position: absolute;
    top: 135%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 10px;
    letter-spacing: 0.5px;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.1s ease;
    background-color: #24292f;
    color: #ffffff;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border: 1px solid var(--border);
}

.version-link::after {
    content: "";
    position: absolute;
    top: 115%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    border: 5px solid transparent;
    border-bottom-color: #24292f;
    opacity: 0;
    visibility: hidden;
    transition: all 0.1s ease;
    z-index: 1000;
}

.version-link:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.version-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .version-link::before {
    background-color: #f0f6fc;
    color: #24292f;
    box-shadow: 4px 4px 0px rgba(240, 246, 252, 0.2);
}

[data-theme="dark"] .version-link::after {
    border-bottom-color: #f0f6fc;
}

div.highlight {
    position: relative;
}

.copy-code-button {
    position: absolute;
    top: 8px;
    right: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.1s ease;
    z-index: 10;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
}

[data-theme="light"] .copy-code-button {
    background-color: #f0f0f0;
    color: #333333;
    border-color: #cccccc;
}

div.highlight:hover .copy-code-button {
    opacity: 0.5;
}

.copy-code-button:hover {
    opacity: 1 !important;
    background-color: rgba(12, 230, 242, 0.05);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.back-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.1s ease, color 0.1s ease;
    font-weight: 800;
}

.back-link:hover {
    opacity: 1;
    color: var(--accent-hover);
    text-shadow: 0 0 8px var(--accent-glow);
}

.grid-item {
    background-color: var(--nav-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .grid-item {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
}

.grid-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(42, 161, 152, 0.2);
    border-color: var(--accent);
}

.grid-item p, .grid-item li {
    color: var(--text-muted);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
    border-left: 1px dashed var(--border);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

.highlight .c, .highlight .cm, .highlight .cp, .highlight .c1, .highlight .cs { color: var(--sh-comment); }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv { color: var(--sh-keyword); }
.highlight .n, .highlight .nx, .highlight .p { color: var(--text); }
.highlight .s, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .s1, .highlight .ss { color: var(--sh-string); }
.highlight .na { color: var(--sh-function); }
.highlight .nc { color: var(--sh-class); }
.highlight .nd { color: var(--sh-keyword); }
.highlight .nv, .highlight .vc, .highlight .vg, .highlight .vi, .highlight .nn { color: var(--sh-variable); }
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo { color: var(--sh-number); }
.highlight .o, .highlight .ow { color: var(--sh-operator); }