@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;
}

/* Banner & Profile */
.banner {
    position: relative;
}

#banner {
    width: 100%;
    display: block;
    border-bottom: 1px solid white;
    margin-bottom: 5rem;
}

#profile {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    border: 2px solid white;
    border-radius: 100%;
    height: 8rem;
}

#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;
}

/* Project Cards */
.project-card {
    margin: 2rem 0;
    border-top: 1px solid white;
    padding-top: 1.5rem;
}

.project-card h3 {
    margin-top: 0;
}

.project-card h3 a:hover {
    color: var(--accent-color);
}

.project-card img {
    width: 100%;
    display: block;
    margin: 1rem 0;
}

.project-card p {
    color: #ccc;
    line-height: 1.6;
}

/* Blog Cards */
.blog-card {
    margin: 2.5rem 0;
    border-top: 1px solid white;
    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 white;
    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;
}

/* Universal images styling */
.cover-image {
    width: 100%;
    display: block;
    margin: 1.5rem 0;
}

/* 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: 1px solid var(--accent-color);
    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;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.togepi-bubble.show-bubble {
    opacity: 1;
    transform: translateY(0);
}

.footer-pet {
    font-family: var(--font-mono);
    white-space: pre;
    font-size: 1.5px; /* Extremely tiny to render ASCII art like a detailed pixel grid */
    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;
}

.footer-pet:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}