/* ===== Inter (self-hosted) ===== */
@font-face {
    font-family: "Inter";
    src: url("inter-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("inter-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("inter-semibold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ===== Syncopate (existing) ===== */
@font-face {
    font-family: "Syncopate";
    src: url("syncopate-regular.woff2") format("woff2"),
         url("syncopate-regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Syncopate";
    src: url("syncopate-bold.woff2") format("woff2"),
         url("syncopate-bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== Theme tokens ===== */
:root {
    --bg: #18181b;
    --fg: #e4e4e7;
    --fg-muted: #a1a1aa;
    --rule: #27272a;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
:root.light {
    --bg: #fafafa;
    --fg: #18181b;
    --fg-muted: #52525b;
    --rule: #e4e4e7;
}

/* ===== Reset & base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--fg);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.005em;
    min-height: 100vh;
    min-height: 100dvh;
    transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Stage: centered on the viewport ===== */
.stage {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 32px;
    padding: 48px 24px;
    max-width: 680px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Brand mark ===== */
.brand { margin: 0; padding: 0; display: flex; justify-content: center; }
.brand img {
    display: block;
    width: 280px;
    height: auto;
    max-width: 100%;
    transition: filter var(--transition);
}
:root.light .brand img {
    filter: invert(1);
}

/* ===== Hairline rule ===== */
.rule {
    border: 0;
    border-top: 1px solid var(--rule);
    width: 64px;
    margin: 0;
    transition: border-color var(--transition);
}

/* ===== Positioning line ===== */
.positioning {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: -0.015em;
    color: var(--fg);
    max-width: 640px;
    margin: 0 auto;
    text-wrap: balance;
}

/* ===== Contact ===== */
.contact {
    font-style: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}
.contact p { margin: 0; }
.addr {
    font-family: "Syncopate", "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.7;
    color: var(--fg-muted);
    text-transform: lowercase;
    transition: color var(--transition);
    text-align: center;
}
.email-wrap {
    text-align: center;
}
.email {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.005em;
    color: var(--fg);
    text-decoration: none;
    position: relative;
    width: fit-content;
    transition: color var(--transition);
}
.email::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: var(--fg-muted);
    transform-origin: center;
    transition: background var(--transition), transform 0.3s ease;
}
.email:hover::after {
    background: var(--fg);
    transform: scaleX(1.08);
}

/* ===== Mode toggle - top-right, minimal ===== */
#modeToggle {
    position: fixed;
    top: 28px;
    right: 28px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), color var(--transition), background var(--transition), transform 0.2s ease;
    z-index: 10;
}
#modeToggle:hover {
    border-color: var(--fg);
    transform: scale(1.05);
}
#modeToggle:active {
    transform: scale(0.95);
}

#modeToggle .icon-sun { display: block; }
#modeToggle .icon-moon { display: none; }
:root.light #modeToggle .icon-sun { display: none; }
:root.light #modeToggle .icon-moon { display: block; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .stage {
        gap: 28px;
        padding: 40px 20px;
    }
    .brand img { width: 220px; }
    .positioning {
        font-size: 18px;
        line-height: 1.5;
    }
    .addr { font-size: 12px; }
    #modeToggle {
        top: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
    }
}

/* ===== Respect prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .stage { opacity: 1; }
}
