/* ============================================================
   main.css — base styles + index.html & 404.html
   zyne.github.io
   ============================================================ */

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* ── Smooth scroll ── */
html {
    scroll-behavior: smooth;
}
@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}
/* ── Status badge ── */
.status {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--muted);
    letter-spacing: 0.08em;
}
.status::first-letter {
    color: #4caf50;
    animation: blink 2s ease-in-out infinite;
}
.pgp {
    font-family: var(--mono);
    font-size: 0.58rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-top: 0.3rem;
    display: block;
    filter: opacity(40%);
}
::selection {
    background: var(--text);
    color: var(--bg);
}
/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text);
}
@keyframes glitch {
    0% {
        text-shadow: none;
        transform: none;
    }
    10% {
        text-shadow:
            -2px 0 #ff00cc,
            2px 0 #00ffff;
        transform: skewX(-2deg);
    }
    12% {
        text-shadow: none;
        transform: none;
    }
    20% {
        text-shadow:
            2px 0 #ff00cc,
            -2px 0 #00ffff;
        transform: skewX(1deg);
    }
    22% {
        text-shadow: none;
        transform: none;
    }
    30% {
        text-shadow:
            -1px 0 #ff00cc,
            1px 0 #00ffff;
        transform: skewX(-1deg);
    }
    32% {
        text-shadow: none;
        transform: none;
    }
    100% {
        text-shadow: none;
        transform: none;
    }
}

/* ── Focus ring ── */
:focus-visible {
    outline: 1.5px solid var(--muted);
    outline-offset: 3px;
    border-radius: var(--radius);
}
/* ── Variables: Dark (default) ── */
:root {
    --bg: #0e0e0f;
    --surface: #161618;
    --border: #2a2a2e;
    --text: #e8e8e8;
    --muted: #77777f;
    --highlight: #ffffff;
    --hover-bg: #1c1c1f;
    --hover-bd: #4a4a52;
    --footer: #383840;
    --mono: "Courier New", Courier, monospace;
    --sans:
        -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --radius: 10px;
    --max-width: 520px;
    --trans: 0.2s ease;
    --shimmer-from: #ffffff;
    --shimmer-mid: #777777;
}

/* ── Variables: Light ── */
:root.light {
    --bg: #f4f4f5;
    --surface: #ffffff;
    --border: #e2e2e5;
    --text: #1a1a1a;
    --muted: #888892;
    --highlight: #000000;
    --hover-bg: #f0f0f2;
    --hover-bd: #c0c0c8;
    --footer: #b0b0b8;
    --shimmer-from: #000000;
    --shimmer-mid: #555555;
}

/* ── Smooth theme transitions ── */
body,
.link-item,
.port-card,
.social-pill,
.link-icon,
.toggle-btn {
    transition:
        background-color var(--trans),
        border-color var(--trans),
        color var(--trans);
}

/* ── Base ── */
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
    cursor:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='6' cy='6' r='4' fill='%23111113' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E")
            6 6,
        auto;
}
a,
button,
[role="button"] {
    cursor:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='6' cy='6' r='4' fill='%23111113' stroke='%23ffffff' stroke-width='1.5'/%3E%3Ccircle cx='6' cy='6' r='1.5' fill='%23ffffff'/%3E%3C/svg%3E")
            6 6,
        pointer;
}
/* ── Page wrapper ── */
.card {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    gap: 1.85rem;
}

/* ── Theme toggle ── */
.toggle-btn {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--muted);
    user-select: none;
}
.toggle-btn:hover {
    border-color: var(--hover-bd);
    color: var(--text);
}

/* ── Divider ── */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--border) 20%,
        var(--border) 80%,
        transparent
    );
}

/* ── Section label ── */
.section-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.section-label::before {
    content: "[ ";
    color: var(--border);
}
.section-label::after {
    content: " ]";
    color: var(--border);
}

/* ── Footer ── */
.footer {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--footer);
    text-align: center;
    letter-spacing: 0.06em;
    padding-top: 0.25rem;
}

/* ── INDEX: Header ── */
.handle {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text);
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
    transition: color var(--trans);
    cursor: default;
}
.handle:hover {
    color: var(--text);
}
.name {
    font-family: var(--mono);
    font-size: clamp(2rem, 8vw, 2.75rem);
    font-weight: 700;
    color: var(--highlight);
    letter-spacing: -0.02em;
    line-height: 1.1;
    animation:
        fadein 0.4s ease 0.05s both,
        glitch 1.5s ease 0.8s 1 forwards;
}
.subheading {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.4rem;
    letter-spacing: 0.03em;
}

/* ── INDEX: Intro ── */
.intro {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.8;
}
.intro strong {
    color: var(--text);
    font-weight: 500;
}

/* ── INDEX: Social pills ── */
.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.social-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.05em;
}
.social-pill:hover {
    border-color: var(--hover-bd);
    color: var(--text);
    background: var(--hover-bg);
}

/* ── INDEX: Profile link rows ── */
.links {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 2px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
}
.link-item:hover {
    border-color: var(--hover-bd);
    border-left-color: var(--highlight);
    background: var(--hover-bg);
}
.link-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.link-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    flex-shrink: 0;
}
.link-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.5;
    transition: opacity var(--trans);
}
.link-item:hover .link-icon img {
    opacity: 1;
}
.link-info {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}
.link-name {
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text);
}
.link-handle {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--muted);
}
.link-arrow {
    color: var(--border);
    font-size: 0.9rem;
    transition:
        color var(--trans),
        transform var(--trans);
}
.link-item:hover .link-arrow {
    color: var(--muted);
    transform: translateX(2px);
}

/* ── INDEX: Portfolio preview cards ── */
.port-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.port-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition:
        background-color var(--trans),
        border-color var(--trans);
}
.port-card:hover {
    border-color: var(--hover-bd);
    background: var(--hover-bg);
}
.port-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.port-title {
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text);
}
.port-desc {
    font-size: 0.72rem;
    color: var(--muted);
}
.port-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    margin-left: 0.75rem;
}
.port-tag {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.port-arrow {
    color: var(--border);
    font-size: 0.9rem;
    transition:
        color var(--trans),
        transform var(--trans);
}
.port-card:hover .port-arrow {
    color: var(--muted);
    transform: translateX(2px);
}

/* ── 404 ── */
.code-404 {
    font-family: var(--mono);
    font-size: clamp(3.5rem, 16vw, 5.5rem);
    font-weight: 700;
    color: var(--highlight);
    letter-spacing: -0.04em;
    line-height: 1;
}
.label-404 {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}
.message-404 {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.8;
}
.message-404 strong {
    color: var(--text);
    font-weight: 500;
}
.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text);
    align-self: flex-start;
    transition:
        background-color var(--trans),
        border-color var(--trans);
}
.home-btn:hover {
    border-color: var(--hover-bd);
    background: var(--hover-bg);
}
.home-btn-arrow {
    color: var(--muted);
    transition: transform var(--trans);
}
.home-btn:hover .home-btn-arrow {
    transform: translateX(-2px);
}

/* ── Mobile ── */
@media (max-width: 400px) {
    .link-item,
    .port-card {
        padding: 0.75rem 0.85rem;
    }
    .social-pill {
        font-size: 0.65rem;
        padding: 0.32rem 0.75rem;
    }
}
