:root {
    --bg-color: #0f0f0f;
    --text-main: #f0f0f0;
    --text-muted: #888888;
    --accent: #ffffff;
    --spacing-unit: 24px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="light"] {
    --bg-color: #f7f7f7;
    --text-main: #111111;
    --text-muted: #555555;
    --accent: #000000;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent);
}

/* Home Layout - Single Column List */
.home-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Header */
.greeting {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.home-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.theme-toggle:hover {
    color: var(--text-main);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.moon-icon {
    display: none;
}

.sun-icon {
    display: block;
}

:root[data-theme="light"] .moon-icon {
    display: block;
}

:root[data-theme="light"] .sun-icon {
    display: none;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Sections */
.home-section h2 {
    font-size: 1.2rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

/* Work List */
.work-list {
    list-style: none;
}

.work-list li {
    margin-bottom: 0.75rem;
    /* Tighter list */
}

.work-item {
    display: block;
    /* Allow wrapping or flex if needed, but block works for simple text flow */
    font-size: 1rem;
    line-height: 1.5;
}

.work-item .period {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Writing List */
.writing-list {
    list-style: none;
    margin-bottom: 1rem;
}

.writing-list li {
    margin-bottom: 1rem;
}

.post-link {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
}

.post-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--text-muted);
    padding-left: 0.5rem;
}

.post-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.more-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px dotted var(--text-muted);
}

.more-link:hover {
    color: var(--text-main);
    border-bottom-style: solid;
}

/* Contact List */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-list a {
    font-size: 1rem;
    color: var(--text-main);
}

.contact-list a:hover {
    padding-left: 0.5rem;
    /* Shift right */
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--text-muted);
}

/* Mermaid Diagrams */
.mermaid {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    overflow-x: auto;
    display: flex;
    justify-content: center;
}