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

:root {
    --color-bg: #ffffff;
    --color-text: #000;
    --color-link: #676767;
    --color-link-hover: #000;
    --color-accent: #1e3ae8;
}

[data-theme="dark"] {
    --color-bg: #121212;
    --color-text: #e0e0e0;
    --color-link: #a0a0a0;
    --color-link-hover: #e0e0e0;
    --color-accent: #5170ff;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.9;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Header */
header {
    margin-bottom: 40px;
}

.header-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 0;
}

h1 {
    font-size: 38px;
    font-weight: 300;
    line-height: 1.4;
    margin-right: 30px;
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
}

.header-right-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-pic {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.nav-links {
    font-size: 13px;
    font-weight: 300;
    color: var(--color-text);
}

.nav-links a {
    font-size: 13px;
    font-weight: 300;
}

.tagline {
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    line-height: 1.9;
}

/* Main Content */
main p {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.9;
    font-weight: 300;
}

main ul {
    margin-left: 28px;
    margin-bottom: 10px;
}

main ul li {
    font-size: 13px;
    line-height: 1.9;
    font-weight: 300;
    margin-bottom: 0;
}

.stacked-list li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.stacked-list li:last-child {
    margin-bottom: 0;
}

.stacked-list li > a,
.stacked-list li > .item-label,
.stacked-list li > .item-desc {
    display: block;
    line-height: 1.4;
}

.inline-list li {
    margin-bottom: 4px;
}

.item-label {
    font-weight: 400;
}

.item-label::after {
    content: " - ";
}

.item-desc {
    color: var(--color-link);
    font-size: 12px;
    margin-top: 1px;
}

.intro {
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 300;
}

a {
    color: var(--color-link);
    text-decoration: underline;
    font-weight: 300;
    transition: color 0.3s;
}

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

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

strong {
    font-weight: 600;
}

/* Alt page design (meltzerai.html) — Archivo type + a touch of line/grid detailing */
.page-alt {
    font-family: 'Archivo', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    position: relative;
}


.page-alt h1 {
    font-weight: 500;
    letter-spacing: -0.02em;
}

.page-alt .tagline {
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.page-alt .tagline-highlight {
    position: relative;
    display: inline-block;
}

.page-alt .tagline-circle {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -5px;
    width: calc(100% + 12px);
    height: calc(100% + 11px);
    color: var(--color-accent);
    pointer-events: none;
}

.page-alt .tagline-circle path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw-in 0.55s cubic-bezier(0.65, 0, 0.35, 1) 0.3s forwards;
}

.page-alt strong {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-alt .header-row {
    align-items: center;
    gap: 14px;
    flex: 1;
    justify-content: space-between;
}

.page-alt .header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-alt .header-text .nav-links {
    color: var(--color-link);
}

.page-alt .header-right-top {
    margin-top: 4px;
}

.page-alt .profile-pic {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
}

.page-alt main p,
.page-alt main ul li,
.page-alt .nav-links,
.page-alt .nav-links a {
    font-size: 15px;
}

.page-alt .item-desc {
    font-size: 13px;
}

.page-alt .tagline {
    font-size: 16px;
}

.page-alt h1 {
    font-size: 20px;
}

.page-alt .intro {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 26px;
}

/* Blueprint accents: golden-ratio ruler, target mark, dot grid */
.page-alt .container {
    position: relative;
}

.page-alt .container::before,
.page-alt .container::after,
.page-alt .corner-mark-tr,
.page-alt .corner-mark-bl {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.page-alt .container::before {
    top: 24px;
    left: 24px;
    border-top: 1px solid var(--color-link);
    border-left: 1px solid var(--color-link);
}

.page-alt .container::after {
    bottom: 24px;
    right: 24px;
    border-bottom: 1px solid var(--color-link);
    border-right: 1px solid var(--color-link);
}

.page-alt .corner-mark-tr {
    top: 24px;
    right: 24px;
    border-top: 1px solid var(--color-link);
    border-right: 1px solid var(--color-link);
}

.page-alt .corner-mark-bl {
    bottom: 24px;
    left: 24px;
    border-bottom: 1px solid var(--color-link);
    border-left: 1px solid var(--color-link);
}

.page-alt header {
    position: relative;
    padding-bottom: 16px;
}

.page-alt header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7px;
    background:
        linear-gradient(var(--color-link), var(--color-link)) left bottom / 100% 1px no-repeat,
        repeating-linear-gradient(to right, var(--color-link), var(--color-link) 1px, transparent 1px, transparent 48px) left bottom / 100% 7px no-repeat;
    opacity: 0.4;
}

.page-alt .header-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.page-alt .header-controls .theme-toggle {
    margin-left: 0;
}

.page-alt main {
    counter-reset: section;
    position: relative;
}

.page-alt main::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: -52px;
    width: 1px;
    background: var(--color-link);
    opacity: 0.35;
    display: none;
}

.page-alt .section-mark {
    position: relative;
}

.page-alt .section-mark::before {
    counter-increment: section;
    content: counter(section, decimal-leading-zero);
    position: absolute;
    left: -32px;
    top: 2px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-accent);
    opacity: 0.9;
    display: none;
}

.page-alt .section-mark::after {
    content: "";
    position: absolute;
    left: -47px;
    top: 8px;
    width: 6px;
    height: 1px;
    background: var(--color-link);
    opacity: 0.7;
    display: none;
}

.page-alt main ul li::marker {
    color: var(--color-link);
    font-family: 'Courier New', monospace;
}

.page-alt .corner-mark-tr,
.page-alt .corner-mark-bl {
    transition: transform 0.35s ease;
}

.page-alt .corner-mark-tr:hover {
    transform: translate(2px, -2px);
}

.page-alt .corner-mark-bl:hover {
    transform: translate(-2px, 2px);
}

/* Micro-animations: scroll reveal + SVG draw-in */
@keyframes draw-in {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.js .page-alt .section-mark,
.js .page-alt .footer-mark {
    opacity: 0;
    transform: translateY(10px);
}

.js .page-alt .section-mark.in-view,
.js .page-alt .footer-mark.in-view {
    animation: fade-up 0.6s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
    .page-alt .section-mark,
    .page-alt .footer-mark,
    .page-alt .tagline-circle path {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
    }
}

.page-alt .meta-stamp {
    margin-top: 24px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: var(--color-link);
    opacity: 0.6;
}

.page-alt .footer-mark {
    margin-top: 24px;
    padding: 20px 0;
}

.page-alt .footer-mark .meta-stamp {
    margin-top: 0;
}

@media (min-width: 900px) {
    .page-alt main::before {
        display: block;
    }

    .page-alt .section-mark::before,
    .page-alt .section-mark::after {
        display: block;
    }
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--color-link);
    color: var(--color-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 300;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.3s, color 0.3s;
    margin-left: auto;
}

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

.page-alt .theme-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 40px 20px;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .header-right {
        padding-top: 0;
    }

    h1 {
        font-size: 28px;
    }

    .page-alt h1 {
        font-size: 18px;
    }

    .page-alt .header-row {
        align-items: flex-start;
        gap: 10px;
    }

    .page-alt header {
        padding-bottom: 14px;
    }

    .page-alt .header-controls {
        gap: 6px;
        position: absolute;
        top: 0;
        right: 0;
    }

    .page-alt .header-text {
        padding-right: 70px;
    }
}
