@property --bg {
    syntax: "<color>";
    inherits: true;
    initial-value: #ffffff;
}
@property --ink {
    syntax: "<color>";
    inherits: true;
    initial-value: #13100e;
}
@property --muted {
    syntax: "<color>";
    inherits: true;
    initial-value: #3d3d3d;
}
@property --rule {
    syntax: "<color>";
    inherits: true;
    initial-value: #777777;
}
@property --accent {
    syntax: "<color>";
    inherits: true;
    initial-value: #b14628;
}

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

:root {
    --bg: #ffffff;
    --ink: #13100e;
    --muted: #3d3d3d;
    --rule: #777777;
    --accent: #b14628;
    transition:
        --bg 0.4s ease,
        --ink 0.4s ease,
        --muted 0.4s ease,
        --rule 0.4s ease,
        --accent 0.4s ease;
}

:root[data-theme="dark"] {
    --bg: #0f0f0f;
    --ink: #f2f2f2;
    --muted: #c8c8c8;
    --rule: #6b6b6b;
    --accent: #e8714f;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.35s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.corner {
    view-transition-name: corner-controls;
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.75;
    padding: 3rem 2rem;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.name {
    font-family: inherit;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.05;
    margin-bottom: 0.5rem;
}

.role {
    color: var(--muted);
    font-size: 11.2px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}

.section-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 0.5rem;
    margin: 2.6rem 0 0.3rem;
}

.project {
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
    transition: background 0.25s ease;
}

.project:last-child {
    border-bottom: none;
}

.project:hover .proj-name {
    color: var(--accent);
}

.proj-name {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.proj-stack {
    font-size: 10.8px;
    color: var(--muted);
    letter-spacing: 0.03em;
    margin-top: 0.25rem;
    font-weight: 400;
}

footer {
    border-top: 1px solid var(--rule);
    padding-top: 1.3rem;
    margin-top: auto;
    font-size: 10.2px;
    color: var(--muted);
    letter-spacing: 0.06em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.7rem;
}

footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: inherit;
}

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

footer address {
    font-style: normal;
}

.corner {
    position: fixed;
    top: 1.6rem;
    right: 1.6rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rule);
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg);
    z-index: 100;
}

.lang-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.theme-toggle {
    border-top: 1px solid var(--rule);
}

.corner button {
    width: 2.6rem;
    height: 1.9rem;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-toggle button {
    background: none;
    border: none;
    padding: 0.38rem 0.7rem;
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.lang-toggle button:first-child {
    border-right: 1px solid var(--rule);
}

.lang-toggle button.active {
    background: var(--ink);
    color: var(--bg);
}

.lang-toggle button:not(.active):hover {
    color: var(--ink);
    background: rgba(26, 23, 20, 0.05);
}

:root[data-theme="dark"] .lang-toggle button:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
}

:root.theme-anim * {
    transition: none !important;
}

.theme-toggle svg {
    width: 13px;
    height: 13px;
    display: block;
}
