/* ==========================================================================
   inder · Mizuki (peach + pink)
   Light + dark themes, shared header, two-column bento, widgets
   ========================================================================== */

/* ---- Fonts -------------------------------------------------------------- */
@font-face {
    font-family: 'Fredoka';
    src: url('./fonts/Fredoka-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('./fonts/Nunito-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('./fonts/Nunito-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 200 1000;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'PlayFairDisplay';
    src: url('./fonts/PlayfairDisp.ttf') format('truetype');
}

bold {
    font-weight: 700;
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
    --font-head: 'Fredoka', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, sans-serif;
    --font-serif: 'PlayFairDisplay', Georgia, serif;

    --max: 1080px;
    --radius: 20px;
    --radius-sm: 12px;
    --t: 0.32s cubic-bezier(0.4, 0, 0.2, 1);

    /* light */
    --bg: linear-gradient(155deg, #ffe8d9 0%, #ffd9e8 46%, #ffc9dd 100%);
    --wash-1: rgba(255, 231, 216, 0.55);
    --wash-2: rgba(255, 201, 222, 0.66);
    --text: #3c2130;
    --text-soft: #654052;
    --muted: #8a6072;
    --accent: #e8608f;
    --accent-2: #ff9ec4;
    --accent-3: #ffb997;
    --accent-deep: #b83e69;
    --card: rgba(255, 255, 255, 0.58);
    --card-2: rgba(255, 255, 255, 0.45);
    --card-strong: rgba(255, 255, 255, 0.82);
    --border: rgba(255, 255, 255, 0.82);
    --shadow: 0 16px 36px rgba(160, 50, 90, 0.14);
    --on-accent: #ffffff;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: linear-gradient(155deg, #1f1220 0%, #2a1830 48%, #341b30 100%);
    --wash-1: rgba(20, 10, 20, 0.74);
    --wash-2: rgba(46, 20, 38, 0.84);
    --text: #ffeaf2;
    --text-soft: #e6c4d2;
    --muted: #bd95a8;
    --accent: #ff8fb8;
    --accent-2: #ffb0cf;
    --accent-3: #ffc2a6;
    --accent-deep: #ffc0d7;
    --card: rgba(255, 255, 255, 0.06);
    --card-2: rgba(255, 255, 255, 0.045);
    --card-strong: rgba(28, 15, 26, 0.74);
    --border: rgba(255, 200, 220, 0.16);
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
    --on-accent: #2a1620;
    color-scheme: dark;
}

/* ---- Base --------------------------------------------------------------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1.02rem;
    color: var(--text);
    background: var(--bg);
    background-attachment: fixed;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: url('./cdn/cursor/Normal.gif') 1 1, url('./cdn/cursor/cursor.png') 4 4, auto;
}

a,
button,
.icon-btn,
.social-btn,
.link-pill,
.btn,
input[type="submit"] {
    cursor: url('./cdn/cursor/Link.gif') 4 1, url('./cdn/cursor/cursor-link.png') 16 16, pointer;
}

a {
    color: var(--accent-deep);
}

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

::selection {
    background: var(--accent-2);
    color: #3c2130;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---- Background image + petals ------------------------------------------ */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(180deg, var(--wash-1) 0%, var(--wash-2) 100%),
        url('./cdn/mizuki-bg.png');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

#petals {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* ---- Shared header ------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 14px;
    z-index: 60;
    width: min(var(--max), calc(100% - 28px));
    margin: 14px auto 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 12px;
    background: var(--card-strong);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 500;
    flex-shrink: 0;
}

.brand-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(232, 96, 143, 0.3);
}

.brand-name {
    font-size: 1.04rem;
    letter-spacing: 0.3px;
}

.nav {
    display: flex;
    gap: 2px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.nav a {
    padding: 6px 13px;
    border-radius: 999px;
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background var(--t), color var(--t);
}

.nav a:hover {
    background: var(--card-2);
    color: var(--accent-deep);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-2);
    color: var(--text);
    display: grid;
    place-items: center;
    padding: 0;
    transition: background var(--t), transform var(--t), border-color var(--t);
}

.icon-btn:hover {
    background: var(--card);
    transform: translateY(-1px);
    border-color: var(--accent-2);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.icon-btn .i-sun {
    display: none;
}

.icon-btn.is-dark .i-sun {
    display: block;
}

.icon-btn.is-dark .i-moon {
    display: none;
}

.local-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 0.84rem;
    color: var(--text-soft);
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
}

/* ---- Layout ------------------------------------------------------------- */
.wrap {
    position: relative;
    z-index: 5;
    width: min(var(--max), calc(100% - 28px));
    margin: 0 auto;
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
    max-width: 720px;
    padding: 48px 4px 30px;
}

.hero-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(2rem, 5.4vw, 2.9rem);
    line-height: 1.08;
    letter-spacing: -0.5px;
    margin: 0 0 14px 0;
    color: var(--text);
}

.hero-sub {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    line-height: 1.7;
    color: var(--text-soft);
    font-weight: 500;
}

.hero-sub a {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Cards & masonry bento ---------------------------------------------- */
.card {
    background: var(--card);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    backdrop-filter: blur(16px) saturate(1.15);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-2);
    box-shadow: 0 22px 44px rgba(184, 62, 105, 0.2);
}

.card h2,
.card h3 {
    font-family: var(--font-head);
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.2px;
}

.card h2 {
    font-size: 1.18rem;
    margin: 0 0 14px 0;
}

.bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.bento-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

.bento-col > .card {
    margin: 0;
}

/* About */
.about-card p {
    margin: 0 0 12px 0;
    line-height: 1.72;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.about-card p2 {
    margin: 0 0 12px 0;
    line-height: 1.62;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-card .greeting {
    font-family: var(--font-head);
    color: var(--accent-deep);
    font-size: 1.06rem;
    margin-bottom: 14px;
}

/* Social buttons */
.social-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--card-2);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
    transition: background var(--t), color var(--t), transform var(--t);
}

.social-btn span {
    opacity: 0.55;
    font-size: 0.9em;
}

.social-btn:hover {
    background: var(--accent);
    color: var(--on-accent);
    transform: translateY(-2px);
}

.social-btn:hover span {
    opacity: 0.9;
}

/* Quote + art */
.quote-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quote-thumb {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-card:hover .quote-thumb {
    transform: scale(1.04);
}

.quote-card blockquote {
    margin: 0;
    min-width: 0;
}

.quote-card p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--text);
    margin: 0;
}

.quote-card cite {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--muted);
}

/* IST clock card */
.clock-card {
    text-align: center;
}

.clock-big {
    font-family: var(--font-head);
    font-size: clamp(2.1rem, 6vw, 2.7rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    line-height: 1;
    color: var(--text);
    margin: 8px 0 6px;
}

.clock-cap {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-weight: 800;
    color: var(--accent-deep);
}

.clock-date {
    margin-top: 10px;
    font-size: 0.84rem;
    color: var(--muted);
}

/* Now card */
.now-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.now-list li {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.35;
}

.now-list .k {
    flex: 0 0 72px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 800;
    color: var(--accent-deep);
}

/* Mayu counter (inlined SVG, transparent animated GIFs) */
.mayu-strip {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    padding: 30px 0 4px;
}

.mayu {
    display: block;
    width: min(270px, 72vw);
    height: auto;
    image-rendering: pixelated;
    animation: mayu-bob 5s ease-in-out infinite;
}

@keyframes mayu-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ---- Widgets ------------------------------------------------------------ */
.section-head {
    margin: 36px 4px 16px;
}

.section-head h2 {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.5rem;
    margin: 0;
    color: var(--text);
}

.section-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.widget {
    padding: 20px;
}

.widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.widget-head h3 {
    margin: 0;
    font-size: 1rem;
}

.live-badge {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    color: var(--accent-deep);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}

.widget-body {
    font-size: 0.88rem;
    color: var(--text-soft);
}

.widget-body[data-state="loading"] {
    color: var(--muted);
    font-style: italic;
}

/* GitHub widget */
.gh-top {
    display: flex;
    gap: 13px;
    align-items: center;
}

.gh-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.gh-name {
    font-weight: 800;
    color: var(--text);
    font-size: 0.95rem;
}

.gh-login {
    font-size: 0.8rem;
    color: var(--muted);
}

.gh-bio {
    margin: 12px 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-soft);
}

.gh-stats {
    display: flex;
    gap: 20px;
    margin: 12px 0;
}

.gh-stat b {
    display: block;
    font-size: 1.06rem;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.gh-stat span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.widget-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--accent-deep);
    text-decoration: none;
}

.widget-link:hover {
    color: var(--accent);
}

/* Presence widget */
.presence-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.presence-avatar {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.presence-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.status-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--card-strong);
}

.status-dot.online { background: #3ba55d; }
.status-dot.idle { background: #faa61a; }
.status-dot.dnd { background: #ed4245; }
.status-dot.offline { background: #80868b; }

.presence-name {
    font-weight: 800;
    color: var(--text);
    font-size: 0.95rem;
}

.presence-status {
    font-size: 0.8rem;
    color: var(--muted);
}

.presence-activity {
    margin: 12px 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-soft);
}

.presence-activity b {
    color: var(--text);
}

/* Listening widget (lastfm-recently-played SVG) */
.lastfm-art {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.lastfm-art[data-broken="true"] {
    display: none;
}

.lastfm-art[data-broken="true"] + .lastfm-fallback {
    display: block;
}

.lastfm-fallback {
    display: none;
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.muted-note {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}

/* ---- Credits ------------------------------------------------------------ */
.credits {
    margin-top: 36px;
}

.credits-card {
    padding: 6px 24px;
}

.credit-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.credit-list li {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
    font-size: 0.87rem;
    line-height: 1.55;
}

.credit-list li:first-child {
    border-top: 0;
}

.credit-list b {
    color: var(--text);
    font-weight: 800;
}

.credit-list span {
    color: var(--text-soft);
}

.credit-list a {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Footer ------------------------------------------------------------- */
.footer {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 44px 16px 40px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer p {
    margin: 0;
}

.footer .footer-fine {
    margin-top: 10px;
    font-size: 0.78rem;
    opacity: 0.8;
}

.footer a {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer .egg {
    text-decoration: none;
    opacity: 0.28;
    margin-left: 4px;
    display: inline-block;
    animation: twinkle 4.5s ease-in-out infinite;
}

.footer .egg:hover {
    opacity: 1;
    animation: none;
}

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.18; }
    50% { opacity: 0.85; }
}

.card,
.link-grid,
.page-head,
.section-head {
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.bento-col > .card:nth-child(2),
.widget:nth-child(2) {
    animation-delay: 0.08s;
}

.widget:nth-child(3) {
    animation-delay: 0.16s;
}

.credits-card {
    animation-delay: 0.1s;
}

.brand-avatar {
    transition: transform var(--t), box-shadow var(--t);
}

.brand:hover .brand-avatar {
    transform: rotate(-8deg) scale(1.06);
    box-shadow: 0 4px 14px rgba(232, 96, 143, 0.45);
}

.social-btn span {
    transition: transform var(--t), opacity var(--t);
}

.social-btn:hover span {
    transform: translate(1px, -1px);
}

/* ==========================================================================
   Shared subpages (links / devices / 404 / secret)
   ========================================================================== */
.page-body {
    position: relative;
    z-index: 5;
    width: min(820px, calc(100% - 28px));
    margin: 0 auto;
    padding: 40px 0 16px;
}

.page-head {
    margin: 0 4px 22px;
}

.page-head h1 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    letter-spacing: -0.5px;
    margin: 0 0 6px;
    color: var(--text);
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* links grid */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 9px;
    margin: 0 4px;
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.link-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 15px;
    border-radius: 12px;
    background: var(--card);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    backdrop-filter: blur(14px) saturate(1.1);
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(160, 50, 90, 0.08);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background var(--t), color var(--t), transform var(--t), border-color var(--t);
}

.link-pill span {
    opacity: 0.5;
    font-size: 0.85em;
    transition: transform var(--t), opacity var(--t);
}

.link-pill:hover {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.link-pill:hover span {
    opacity: 0.9;
    transform: translate(1px, -1px);
}

.link-note {
    margin: 18px 4px 0;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

/* devices */
.devices-card {
    padding: 28px;
}

.devices-card h2 {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--text);
    margin: 14px 0 10px;
    text-align: center;
}

.devices-card .hyw {
    display: block;
    font-family: var(--font-head);
    font-size: 1.15rem;
    color: var(--accent-deep);
    margin-bottom: 8px;
    text-align: center;
}

.devices-card hr {
    border: 0;
    height: 1px;
    width: 100%;
    background: var(--border);
    margin: 18px 0;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 12px 0;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-2);
    text-align: left;
    transition: border-color var(--t), transform var(--t);
}

.grid-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-2);
}

.grid-item p {
    flex: 1;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-soft);
}

.grid-item img {
    max-width: 42%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 16px;
    margin: 10px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-2);
    text-align: left;
}

.box p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-soft);
}

.box bold {
    font-size: 1.08rem;
    color: var(--accent-deep);
}

/* 404 */
.center-page {
    position: relative;
    z-index: 5;
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.error-card {
    text-align: center;
    max-width: 520px;
    padding: 40px 32px;
}

.error-card .big {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(3.4rem, 12vw, 5.4rem);
    line-height: 1;
    margin: 0;
    color: var(--accent);
}

.error-card h2 {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 1.4rem;
    margin: 10px 0 12px;
    color: var(--text);
}

.error-card p {
    color: var(--text-soft);
    line-height: 1.7;
    margin: 0 0 24px;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    background: var(--card-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    transition: background var(--t), color var(--t), transform var(--t);
}

.btn:hover {
    background: var(--accent);
    color: var(--on-accent);
    transform: translateY(-2px);
}

/* optical / secret page */
.center-content {
    position: relative;
    z-index: 5;
    width: min(680px, calc(100% - 28px));
    margin: 0 auto;
    padding: 56px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.center-content .card {
    text-align: center;
}

.center-content h1 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.8rem;
    margin: 0 0 6px;
    color: var(--text);
}

.center-content p {
    color: var(--text-soft);
    margin: 0 0 18px;
    line-height: 1.6;
}

.center-content a {
    display: block;
    padding: 14px 20px;
    margin: 8px 0;
    border-radius: var(--radius-sm);
    background: var(--card-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    transition: background var(--t), color var(--t), transform var(--t);
}

.center-content a:hover {
    background: var(--accent);
    color: var(--on-accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 720px) {
    .grid-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .grid-item .hyw {
        flex: 0 0 32%;
    }

    .grid-item p {
        flex: 1 1 auto;
        padding: 0 16px;
    }

    .grid-item img {
        flex: 0 0 auto;
        max-width: 150px;
    }
}

@media (max-width: 900px) {
    .bento {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-header {
        top: 10px;
        margin-top: 10px;
        flex-wrap: wrap;
        padding: 10px;
        border-radius: 20px;
    }

    .brand {
        order: 1;
    }

    .header-actions {
        order: 2;
        margin-left: auto;
    }

    .nav {
        order: 3;
        width: 100%;
        margin-top: 6px;
    }

    .hero {
        padding: 34px 4px 24px;
    }

    .card {
        padding: 20px;
    }

    .devices-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.98rem;
    }

    .brand-name {
        font-size: 0.98rem;
    }

    .local-clock {
        font-size: 0.76rem;
        padding: 5px 9px;
    }

    .icon-btn {
        width: 34px;
        height: 34px;
    }

    .social-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quote-thumb {
        width: 80px;
        height: 80px;
        flex-basis: 80px;
    }

    .gh-stats {
        gap: 14px;
    }

    .credit-list li {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 11px 0;
    }

    .footer {
        padding: 32px 14px 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
