/* Light theme (default) */
:root {
    --bg: #fafafa;
    --fg: #1a1a1a;
    --accent: #b56d0a;
    --dim: #666;
    --card-bg: #ffffff;
    --border: #e0e0e0;
}

/* Dark theme — follows system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0a0a;
        --fg: #e8e8e8;
        --accent: #d4841a;
        --dim: #888;
        --card-bg: #141414;
        --border: #252525;
    }
}

code {
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.85em;
    padding: 1px 5px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.page {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 40px 64px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.main {
    padding: 24px 48px;
    max-width: 900px;
}

section { margin-bottom: 56px; }

/* Sidebar */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0;
    text-align: right;
}

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

.phonetic {
    font-size: 1.1rem;
    color: var(--dim);
    opacity: 0.5;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    text-align: right;
}

.tagline {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 6px;
    text-align: left;
}

.intro {
    font-size: 0.95rem;
    color: var(--dim);
    line-height: 1.7;
    margin-bottom: 32px;
}

.intro a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: border-color 0.2s;
}

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

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-list a {
    color: var(--fg);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.contact-list a:hover { border-color: var(--accent); }

.email-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.email-row a:last-child {
    color: var(--accent) !important;
}

.social-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 14px;
}

.social-row a {
    color: var(--dim) !important;
    font-size: 0.85rem;
}

.social-row a:hover { color: var(--fg) !important; }

.social-row .sep {
    color: var(--border);
    font-size: 0.8rem;
}

.contact-list .location {
    color: var(--dim);
    font-size: 0.85rem;
    text-align: center;
}

.sidebar-footer {
    font-size: 0.8rem;
    color: var(--dim);
    line-height: 1.6;
}

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

/* Language switcher */
.lang-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.lang-switcher button {
    background: none;
    border: 1px solid var(--border);
    color: var(--dim);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.lang-switcher button:hover { border-color: var(--accent); color: var(--fg); }
.lang-switcher button.active { border-color: var(--accent); color: var(--accent); }

/* Breadcrumb nav */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--dim);
    margin-bottom: 32px;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: border-color 0.2s;
}

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

.breadcrumb .sep {
    margin: 0 6px;
    color: var(--border);
}

/* Section headers */
h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--dim);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Cards */
.project, .item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}

.project:hover, .item:hover { border-color: var(--accent); }

.project h3, .item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.project p, .item p {
    color: var(--dim);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

.project p a, .item p a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: border-color 0.2s;
}

.project p a:hover, .item p a:hover { border-color: var(--accent); }

.item .spec {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--dim);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    font-size: 0.72rem;
    padding: 3px 9px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--dim);
}

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.service {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.service:hover { border-color: var(--accent); }

.service h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.service p {
    font-size: 0.85rem;
    color: var(--dim);
    line-height: 1.5;
}

/* Experience rows */
.exp-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.exp-row:last-child { border-bottom: none; }

.exp-role {
    font-weight: 600;
    font-size: 0.9rem;
}

.exp-company {
    color: var(--dim);
    font-size: 0.85rem;
}

.exp-years {
    flex-shrink: 0;
    order: -1;
    min-width: 130px;
}

/* Date range cells */
.date-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.date-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 52px;
    text-align: center;
}

.date-year {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg);
    line-height: 1.2;
}

.date-month {
    font-size: 0.6rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.date-sep {
    color: var(--dim);
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 820px) {
    .page { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        padding: 48px 24px 32px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-footer { display: none; }
    .main { padding: 32px 24px; }
    .services-grid { grid-template-columns: 1fr; }
    .exp-row { flex-direction: column; gap: 4px; align-items: flex-start; }
    .exp-years { order: -1; }
}

@media (min-width: 960px) {
    .page { max-width: 1100px; margin: 0 auto; }
}
