/* home.css — bento landing page. Shared chrome lives in theme.css. */

body {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* aurora blobs */
.aurora .b1 { width: 46vw; height: 46vw; left: -8vw; top: -10vw; background: #5b3bff; animation: drift1 22s ease-in-out infinite; }
.aurora .b2 { width: 40vw; height: 40vw; right: -8vw; top: 10vw; background: #0e7490; animation: drift2 26s ease-in-out infinite; }
.aurora .b3 { width: 38vw; height: 38vw; left: 30vw; bottom: -14vw; background: #0f766e; animation: drift3 30s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vw,4vw) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vw,6vw) scale(1.08); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4vw,-5vw) scale(1.15); } }

/* --- Bento grid --- */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 1180px;
    width: 100%;
}

.card {
    background: var(--surface);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.35s ease, transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.card:nth-child(1) { animation-delay: .05s; }
.card:nth-child(2) { animation-delay: .13s; }
.card:nth-child(3) { animation-delay: .21s; }
.card:nth-child(4) { animation-delay: .29s; }
.card:nth-child(5) { animation-delay: .37s; }
.card:hover { transform: translateY(-4px); }

/* --- Intro --- */
.card-intro { grid-column: span 3; justify-content: center; gap: 8px; isolation: isolate; }

/* Cursor-follow spotlight: a fixed gradient circle moved with transform, so it
   composites on the GPU instead of repainting the backdrop-filtered card. */
.card-intro::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 840px; height: 840px;
    margin: -420px 0 0 -420px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(139,123,255,0.10), transparent 60%);
    transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    will-change: transform;
    z-index: -1;
}
.card-intro:hover::after { opacity: 1; }

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4.4vw, 3.35rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 6px 0 4px;
}

.lead {
    font-size: 1.05rem;
    color: var(--ink-dim);
    line-height: 1.55;
    max-width: 46ch;
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* --- Top-right column (avatar + mini card) --- */
.top-right {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-avatar {
    padding: 8px;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
}
.card-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 20px;
    filter: saturate(1.05);
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.card-avatar:hover img { transform: scale(1.05); }
.avatar-badge {
    position: absolute;
    left: 18px; bottom: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(8,8,11,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-hi);
    color: var(--ink);
}

.card-mini {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 22px;
    min-height: 0;
}
.card-mini .mini-icon {
    width: 42px; height: 42px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 1.35rem; color: var(--cyan);
}
.card-mini .mini-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-dimmer);
}
.card-mini .mini-value { font-weight: 600; font-size: 0.98rem; margin-top: 2px; }

/* --- Featured project --- */
.card-project {
    grid-column: span 1;
    grid-row: span 2;
    justify-content: space-between;
    gap: 18px;
}
.proj-top { display: flex; align-items: center; justify-content: space-between; }
.chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
}
.proj-body { display: flex; flex-direction: column; gap: 10px; }
.proj-body h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 600; }
.proj-body p { color: var(--ink-dim); font-size: 0.95rem; line-height: 1.5; }
.soon {
    position: relative;
    border-radius: 18px;
    border: 1px dashed var(--border-hi);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--ink-dimmer);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    overflow: hidden;
}
.soon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(139,123,255,0.14) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 2.6s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* --- Stack --- */
.card-stack { grid-column: span 3; gap: 16px; justify-content: center; }
.card-head {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-dim);
}
.stack-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.skill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.92rem;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.skill ion-icon { font-size: 1.4rem; color: var(--ink-dim); transition: color 0.25s ease; }
.skill:hover { transform: translateY(-3px); border-color: var(--border-hi); }
.skill:hover ion-icon { color: var(--cyan); }

/* --- Status --- */
.card-status {
    grid-column: span 3;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.status-left { display: flex; align-items: center; gap: 14px; }
.dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: #f87171;
    box-shadow: 0 0 0 0 rgba(248,113,113,0.55);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(248,113,113,0.5); }
    70% { box-shadow: 0 0 0 12px rgba(248,113,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); }
}
.status-left .txt { font-weight: 500; }
.status-left .sub { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--ink-dimmer); margin-top: 2px; }
.socials { display: flex; gap: 10px; }
.socials a {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink-dim);
    font-size: 1.3rem;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.socials a:hover { transform: translateY(-3px); color: var(--ink); border-color: var(--border-hi); }

/* --- Light mode --- */
:root[data-theme="light"] .card-head { color: var(--violet); }
:root[data-theme="light"] .proj-body h2 { color: var(--violet); }
:root[data-theme="light"] .proj-body p,
:root[data-theme="light"] .lead { color: #4a4560; }
:root[data-theme="light"] .skill { color: #2a2350; }
:root[data-theme="light"] .skill ion-icon { color: var(--violet); }
:root[data-theme="light"] .mini-value { color: var(--cyan); }
:root[data-theme="light"] .status-left .txt { color: var(--violet); }
:root[data-theme="light"] .dot { background: #dc2626; }
:root[data-theme="light"] .avatar-badge { background: rgba(255,255,255,0.85); }
:root[data-theme="light"] .socials a { color: var(--violet); }
:root[data-theme="light"] .socials a:hover { color: var(--cyan); }

/* --- Responsive --- */
@media (max-width: 900px) {
    .bento { grid-template-columns: 1fr; }
    .card-intro, .card-avatar, .card-project, .card-stack, .card-status {
        grid-column: auto; grid-row: auto;
    }
    .card-avatar { min-height: 280px; }
    .card-status { flex-direction: column; align-items: flex-start; }
}
