/* Styling guidelines: Slate dark theme with HSL colors */
:root {
    --bg: #09090b;
    --card-bg: #09090b;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-subtle: #52525b;
    --border: #27272a;
    
    --accent: #d4d4d8;
    --accent-hover: #ffffff;
    
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    overflow: hidden; /* Prevent scrolling */
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
}

/* Base Card container fitting in single viewport */
.card-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 520px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.version {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-subtle);
}

/* Lang button styles */
.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.2rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: #ffffff;
    border-color: var(--text-muted);
}

/* Divider */
.divider {
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
}

/* Intro Section */
.intro h2 {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.4;
    color: #ffffff;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Labels */
.label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-subtle);
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

/* Tech stack */
.stack {
    padding: 0.25rem 0;
}

.stack-items {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    line-height: 1.4;
}

/* Work section */
.work {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    padding: 0.5rem 0;
}

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-decoration: none;
    color: inherit;
    padding: 0.15rem 0;
    transition: color 0.2s ease;
}

.project-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
}

.project-desc {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-align: right;
    transition: color 0.2s ease;
}

.project-item:hover .project-name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.project-item:hover .project-desc {
    color: #ffffff;
}

#dynamic-city {
    display: inline-block;
    transition: opacity 0.2s ease;
    border-bottom: 1px dotted var(--text-muted);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    color: var(--text-subtle);
    font-family: var(--font-mono);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #ffffff;
}

.kaomoji {
    color: var(--text-subtle);
    font-family: var(--font-sans);
}

/* Handle heights that are too short to fit 520px card gracefully */
@media (max-height: 560px) {
    body {
        padding: 0.5rem;
        overflow-y: auto; /* Fallback scroll for micro-viewports */
    }
    .card-container {
        min-height: auto;
        padding: 1.5rem;
    }
}
