@font-face {
    font-family: 'Geist Pixel Square';
    src: url('https://cdn.jsdelivr.net/npm/geist@latest/dist/fonts/geist-pixel/GeistPixel-Square.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Pixel Circle';
    src: url('https://cdn.jsdelivr.net/npm/geist@latest/dist/fonts/geist-pixel/GeistPixel-Circle.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Pixel Line';
    src: url('https://cdn.jsdelivr.net/npm/geist@latest/dist/fonts/geist-pixel/GeistPixel-Line.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-muted: #888888;
    --accent-color: #10b981;
    /* Sleek, curated emerald green instead of plain green */
    --font-mono: "Geist Mono", "Source Code Pro", monospace;
    --font-sans: "Geist", sans-serif;
    --font-pixel-square: "Geist Pixel Square", "Geist Mono", monospace;
    --font-pixel-circle: "Geist Pixel Circle", "Geist Mono", monospace;
    --font-pixel-line: "Geist Pixel Line", "Geist Mono", monospace;
}

* {
    box-sizing: border-box;
}

body {
    padding: 0;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    font-family: var(--font-mono);
    min-height: 100vh;
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6,
.source-code-pro-body,
.project-card h3,
.blog-card h3,
.exp-role,
.exp-sub-role {
    font-family: var(--font-mono);
    letter-spacing: normal;
}

/* Specific elements using Geist Pixel variations for accent/highlights */
#name,
.source-code-pro-heading {
    font-family: var(--font-pixel-square) !important;
    font-weight: 900;
    letter-spacing: 1px;
}

.nav ul a,
.source-code-pro-heading2 {
    font-family: var(--font-pixel-circle);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.exp-company-name,
.source-code-pro-heading3 {
    font-family: var(--font-pixel-line) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Layout container */
.container {
    max-width: 810px;
    width: 90%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.profile-name-container {
    margin: 0 10%;
}

.info {
    margin: 0 10% 5rem;
}

/* Banner & Profile */
.banner {
    position: relative;
    margin-top: 2.5rem;
}

#banner {
    width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 5rem;
    overflow: hidden;
    object-fit: cover;
}

#profile {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    border: 2px solid white;
    border-radius: 100%;
    height: 8rem;
    z-index: 2;
}

#name {
    display: block;
    text-align: center;
    margin-bottom: 0;
    font-size: 2rem;
}

#bio {
    margin: auto;
    text-align: justify;
    line-height: 1.6;
}

/* Tab/Section Switching */
.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.show {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Links */
a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s ease;
}

/* Navbar */
.nav {
    display: block;
    margin: 2rem auto;
}

ul {
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: wrap;
}

ul a {
    position: relative;
    padding-bottom: 2px;
}

ul a:hover {
    color: var(--accent-color);
}

.active {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Projects Layout */
.projects.section.show {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 600px) {
    .projects.section.show {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.project-card {
    margin: 0;
    border-top: none;
    padding-top: 0;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
}

.project-card h3 a:hover {
    color: var(--accent-color);
}

.project-card img {
    width: 100%;
    display: block;
    margin: 0.5rem 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover img {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-card p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

/* Blog Cards */
.blog-card {
    margin: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
}

.blog-card h3 {
    margin: 0 0 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.blog-quote {
    color: #ccc;
    line-height: 1.6;
    margin-top: 1rem;
    font-style: italic;
    font-size: 1.05rem;
    text-align: center;
}

/* Experience styling */
.exp-item {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exp-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.exp-logo {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
    background-color: #111;
    overflow: hidden;
    /* Ensure rounded/square images don't leak out of the border */
}

.exp-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.exp-details {
    display: flex;
    flex-direction: column;
}

.exp-role {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.exp-company {
    font-size: 0.95rem;
    color: var(--accent-color);
}

.exp-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.exp-description {
    margin: 0.5rem 0 0 0 !important;
    color: #ccc;
    line-height: 1.6;
}

.exp-type {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.exp-divider {
    border: none;
    border-top: 1px solid #222;
    margin: 2.5rem 0;
}

.exp-footer-text {
    line-height: 1.6;
    margin-top: 1.5rem;
}

/* Timeline nesting styling */
.exp-item.nested {
    position: relative;
}

.exp-company-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.exp-total-duration {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.exp-sub-items {
    margin-left: 23.5px;
    /* Align 1px timeline line with center of 48px logo */
    border-left: 1px solid #333;
    /* Clean thin vertical line */
    padding-left: 24px;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exp-sub-item {
    position: relative;
}

.exp-sub-item::before {
    content: "";
    position: absolute;
    left: -24px;
    /* Start at the vertical line */
    top: 10px;
    /* Align with the text line height */
    width: 12px;
    /* Branch width */
    height: 1px;
    /* Thinner horizontal connector */
    background-color: #333;
}

.exp-sub-details {
    display: flex;
    flex-direction: column;
}

.profile-quote {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0.5rem 0 1.5rem 0;
    line-height: 1.4;
}

/* Skills Section & Tech Badges */
.skills-section {
    margin-top: 2rem;
}

.tech-badges {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.tech-badges .badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    padding: 4px 8px;
    transition: all 0.15s ease;
    user-select: none;
}

.tech-badges .badge .tech-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    display: inline-block;
    filter: grayscale(1) opacity(0.5);
    transition: filter 0.15s ease;
}

.tech-badges .badge:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.tech-badges .badge:hover .tech-icon {
    filter: grayscale(0) opacity(1);
}

/* Services List */
.services-list {
    margin: 1.25rem 0;
    padding-left: 1.25rem;
    list-style-type: square;
    line-height: 1.7;
    color: #ccc;
}

.services-list li {
    margin-bottom: 0.5rem;
}

.services-list li strong {
    color: var(--text-color);
}

/* Universal images styling */
.cover-image {
    width: 100%;
    display: block;
    margin: 1.5rem 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
    position: relative;
    /* Support absolute pet positioning */
    margin-top: auto;
    padding: 2rem 0 3rem;
    border-top: 1px solid #222;
}

.footer ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

.footer a:hover {
    color: var(--accent-color);
}

.pet-container {
    position: absolute;
    right: 0;
    bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.togepi-bubble {
    background-color: #111;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    border-radius: 4px;
    margin-bottom: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.togepi-bubble.show-bubble {
    opacity: 1;
    transform: translateY(0);
}

.pet-scale-wrapper {
    width: 135px;
    height: 98px;
    position: relative;
    overflow: hidden;
}

.footer-pet {
    font-family: var(--font-mono);
    white-space: pre;
    font-size: 12px;
    /* Use 12px base to bypass browser/webview minimum font-size limitations completely */
    line-height: 0.85;
    /* Squish slightly to align pixels horizontally */
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    user-select: none;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%) scale(0.125);
    /* Scale from 12px down to 1.5px (1.5 / 12 = 0.125) */
    transform-origin: top center;
    width: max-content;
}

.footer-pet:hover {
    color: var(--accent-color);
    transform: translateX(-50%) scale(0.125) translateY(-16px);
    /* -16px unscaled translates to -2px scaled bounce effect */
}

/* Mobile responsive adjustments for the footer and Togepi pet */
@media (max-width: 600px) {
    html {
        font-size: 15px;
    }

    .container {
        width: 94%;
    }

    .profile-name-container {
        margin: 0 4%;
    }

    .info {
        margin: 0 4% 5rem;
    }

    .footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 2rem 0;
    }

    .footer ul {
        margin: 0;
        padding: 0;
    }

    .pet-container {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 0.5rem;
    }
}

/* Nav shortcut key hint */
.nav-key {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-right: 2px;
    font-weight: normal;
}

/* Project Tech Badges & Links */
.project-tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0 0.4rem 0;
}

.project-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 2px 6px;
    font-family: var(--font-mono);
}

.project-links {
    margin-top: 0.5rem;
}

.project-link {
    font-size: 0.82rem;
    color: var(--accent-color);
    text-decoration: underline;
    font-family: var(--font-mono);
}

.project-link:hover {
    color: #ffffff;
}

/* Anime & Manga Recommendations Section */
.interests-category {
    margin-bottom: 2.5rem;
}

.category-divider {
    font-family: var(--font-pixel-line);
    font-size: 0.82rem;
    color: var(--accent-color);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 1rem;
    user-select: none;
}

/* Dither Image Effect & Halftone Dot Overlay */
.dither-img-wrapper {
    position: relative;
    margin-top: 0.75rem;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dither-img-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0, 0, 0, 0.8) 1.2px, transparent 0);
    background-size: 3px 3px;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.dither-img {
    filter: grayscale(100%) contrast(175%) brightness(85%);
    margin: 0 !important;
    border: none !important;
    transition: filter 0.3s ease, transform 0.3s ease;
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.anime-list li:hover .dither-img,
.dither-img-wrapper:hover .dither-img {
    filter: grayscale(0%) contrast(100%) brightness(100%);
    transform: scale(1.01);
}

.anime-list li:hover .dither-img-wrapper::after,
.dither-img-wrapper:hover::after {
    opacity: 0.1;
}

/* Side-by-side square thumbnail media layout */
.media-item-side {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
}

.side-thumb {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    margin-top: 0 !important;
}

.side-thumb .dither-img {
    width: 100%;
    height: 100%;
    max-height: 140px;
    object-fit: cover;
}

.media-side-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 600px) {
    .media-item-side {
        flex-direction: column;
        align-items: flex-start;
    }

    .side-thumb {
        width: 100%;
        height: 200px;
    }

    .side-thumb .dither-img {
        max-height: 200px;
    }
}

.anime-section {
    margin-top: 2rem;
}

.anime-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.anime-list li {
    border-left: 2px solid #222;
    padding-left: 1rem;
    transition: border-color 0.2s ease;
}

.anime-list li:hover {
    border-color: var(--accent-color);
}

.anime-item-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.anime-desc {
    margin: 0;
    color: #ccc;
    font-size: 0.88rem;
    line-height: 1.5;
}

.anime-tag {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anime-tag.master {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.anime-tag.fav {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.anime-tag.highly-rec, .anime-tag.rec {
    background-color: #111;
    color: var(--text-muted);
    border: 1px solid #333;
}

/* Blog Article Reader View */
.blog-read-btn {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    margin-top: 0.75rem;
    text-decoration: underline;
}

.blog-read-btn:hover {
    color: #fff;
}

.article-reader {
    margin-top: 1rem;
}

.back-to-blogs-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--accent-color);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 0;
    cursor: pointer;
    margin-bottom: 2rem;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.back-to-blogs-btn:hover {
    color: #fff;
}

.full-article {
    line-height: 1.8;
    color: #ddd;
}

.full-article h2 {
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-family: var(--font-pixel-square);
}

.full-article .article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #222;
    padding-bottom: 1rem;
}

.full-article p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.full-article blockquote {
    border-left: 3px solid var(--accent-color);
    margin: 1.5rem 0;
    padding-left: 1rem;
    color: #bbb;
    font-style: italic;
    background: #080808;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Footer Clock & Command Palette Hint */
.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.live-clock {
    font-family: var(--font-mono);
    color: var(--accent-color);
    letter-spacing: 1px;
}

.cmd-hint {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.cmd-hint:hover {
    color: #fff;
}

.cmd-hint kbd {
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 1px 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #fff;
}

/* Terminal Command Palette Modal */
.cmd-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
}

.cmd-palette-modal {
    width: 90%;
    max-width: 520px;
    background-color: #0a0a0a;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cmd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background-color: #111;
    border-bottom: 1px solid #222;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cmd-close {
    cursor: pointer;
}

.cmd-close:hover {
    color: #fff;
}

.cmd-input-wrapper {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #222;
    background-color: #000;
}

.cmd-prompt {
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

#cmd-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    width: 100%;
}

.cmd-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 260px;
    overflow-y: auto;
}

.cmd-list li {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #111;
    transition: background-color 0.15s ease;
}

.cmd-list li:hover, .cmd-list li.selected {
    background-color: #181818;
    color: var(--accent-color);
}

.cmd-key {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-family: var(--font-mono);
}

.cmd-text {
    font-size: 0.88rem;
    color: #ddd;
}

/* Privacy Modal Specific Styling */
.privacy-modal-card {
    max-width: 480px;
}

.privacy-modal-body {
    padding: 1.25rem 1.5rem;
    color: #ccc;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.6;
}

.privacy-modal-heading {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #fff;
    font-size: 1.1rem;
}

.privacy-list {
    margin: 1rem 0;
    padding-left: 1.2rem;
    list-style-type: square;
}

.privacy-list li {
    margin-bottom: 0.6rem;
    color: #ddd;
}

.privacy-list li strong {
    color: var(--accent-color);
}

.privacy-date {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid #1a1a1a;
    padding-top: 0.75rem;
}

/* Responsive Mobile Sizing for Profile & Name */
@media (max-width: 600px) {
    #profile {
        height: 5.5rem;
    }
    
    #name {
        font-size: 1.5rem;
    }

    #banner {
        margin-bottom: 3.5rem;
    }

    .profile-quote {
        font-size: 0.8rem;
    }

    /* Hide Command Palette & Hint Trigger on Mobile */
    #cmd-hint-trigger,
    .cmd-palette-backdrop {
        display: none !important;
    }
}