/* =========================================================
   Jhapendra Kandel — personal site
   Vanilla CSS. Navy + gold glassmorphism, ported from the
   "Fableweb" design language. No framework, no build step.
   ========================================================= */

:root {
    --c-bg: #f1f5f9;
    --c-bg-solid: #eef2f7;
    --c-surface: rgba(255, 255, 255, 0.55);
    --c-surface-solid: #ffffff;
    --c-text: #0f172a;
    --c-muted: #475569;
    --c-border: rgba(15, 23, 42, 0.12);
    --gold: #d4af37;
    --gold-soft: rgba(212, 175, 55, 0.14);
    --pub: #15803d;
    --pub-soft: rgba(21, 128, 61, 0.1);
    --indigo: #6366f1;
    --max: 1120px;
    --radius: 20px;
    --font-display: "Cinzel Decorative", serif;
    --font-heading: "Playfair Display", Georgia, serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}

html.dark {
    --c-bg: #0f172a;
    --c-bg-solid: #0f172a;
    --c-surface: rgba(30, 41, 59, 0.45);
    --c-surface-solid: #1e293b;
    --c-text: #e2e8f0;
    --c-muted: #94a3b8;
    --c-border: rgba(212, 175, 55, 0.16);
    --gold-soft: rgba(212, 175, 55, 0.1);
    --pub: #4ade80;
    --pub-soft: rgba(74, 222, 128, 0.12);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--c-bg-solid);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .4s ease, color .4s ease;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.15;
    margin: 0;
    font-weight: 600;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.dot {
    color: var(--gold);
}

.muted {
    color: var(--c-muted);
    font-weight: 400;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 200;
    background: var(--gold);
    color: #0f172a;
    padding: 10px 16px;
    font-weight: 600;
    border-radius: 0 0 10px 0;
}

.skip-link:focus {
    left: 0;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 55;
    background: linear-gradient(90deg, var(--gold), #f0d982);
    box-shadow: 0 0 12px rgba(212, 175, 55, .5);
    transition: width .1s linear;
}

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

/* ---------- Glass primitive ---------- */
.glass {
    background: var(--c-surface);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid var(--c-border);
    box-shadow: 0 8px 32px rgba(2, 6, 23, .28);
}

/* ================= Background layer (z-0) ================= */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora {
    position: absolute;
    border-radius: 9999px;
    filter: blur(90px);
    will-change: transform;
}

.aurora-1 {
    top: -10rem;
    left: -10rem;
    width: 42rem;
    height: 42rem;
    background: rgba(212, 175, 55, .14);
    animation: aurora-1 26s ease-in-out infinite;
}

.aurora-2 {
    top: 33%;
    right: -12rem;
    width: 38rem;
    height: 38rem;
    background: rgba(99, 102, 241, .16);
    animation: aurora-2 34s ease-in-out infinite;
}

.aurora-3 {
    bottom: -12rem;
    left: 25%;
    width: 36rem;
    height: 36rem;
    background: rgba(56, 189, 248, .12);
    animation: aurora-3 30s ease-in-out infinite;
}

html.dark .aurora-1 { background: rgba(212, 175, 55, .1); }
html.dark .aurora-3 { background: rgba(71, 85, 105, .3); }

@keyframes aurora-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(12vw, -8vh) scale(1.2); }
    66% { transform: translate(-6vw, 10vh) scale(.9); }
}

@keyframes aurora-2 {
    0%, 100% { transform: translate(0, 0) scale(1.1); }
    50% { transform: translate(-14vw, 12vh) scale(.85); }
}

@keyframes aurora-3 {
    0%, 100% { transform: translate(0, 0) scale(.9); }
    50% { transform: translate(10vw, -12vh) scale(1.15); }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, .07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, .07) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: grid-pan 18s linear infinite;
}

@keyframes grid-pan {
    from { background-position: 0 0; }
    to { background-position: 64px 64px; }
}

.shape {
    position: absolute;
    display: block;
}

.shape-a {
    top: 18%;
    left: 8%;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    border: 1px solid rgba(212, 175, 55, .4);
    animation: float-a 14s ease-in-out infinite;
}

.shape-b {
    top: 42%;
    right: 10%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, .3);
    animation: float-b 18s ease-in-out infinite;
}

.shape-c {
    top: 64%;
    left: 14%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(212, 175, 55, .3);
    animation: float-c 11s ease-in-out infinite;
}

.shape-d {
    top: 78%;
    right: 22%;
    width: 20px;
    height: 20px;
    transform: rotate(12deg);
    border: 1px solid rgba(212, 175, 55, .25);
    animation: float-b 16s ease-in-out infinite;
}

.shape-e {
    top: 30%;
    left: 46%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(148, 163, 184, .4);
    animation: float-a 13s ease-in-out infinite;
}

@keyframes float-a {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    50% { transform: translate(24px, -40px) rotate(35deg); }
}

@keyframes float-b {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    50% { transform: translate(-30px, 28px) rotate(-25deg); }
}

@keyframes float-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(18px, 34px) scale(1.15); }
}

.mouse-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    opacity: .22;
    filter: blur(100px);
    background: radial-gradient(circle at center, rgba(212, 175, 55, .55), rgba(99, 102, 241, .25) 60%, transparent 75%);
    transform: translate(-50%, -50%);
    will-change: transform;
    display: none;
}

/* ---------- Noise overlay ---------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    opacity: .05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================= Navbar (z-50) ================= */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    padding: 16px;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 8px 18px;
    border-radius: 999px;
    max-width: 100%;
    background: var(--c-surface);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid var(--c-border);
    box-shadow: 0 8px 32px rgba(2, 6, 23, .35);
    animation: nav-drop .6s cubic-bezier(.2, .9, .3, 1.2) both;
}

@keyframes nav-drop {
    from { transform: translateY(-64px); opacity: 0; }
}

.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gold);
    letter-spacing: .04em;
    padding-right: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-links a {
    padding: 8px 13px;
    font-size: .9rem;
    color: var(--c-muted);
    border-radius: 999px;
    transition: color .18s, background .18s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
    background: var(--gold-soft);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--gold);
    font-size: 1.05rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: box-shadow .2s, transform .2s;
}

.theme-toggle:hover {
    box-shadow: 0 0 24px rgba(212, 175, 55, .25);
}

.theme-icon {
    display: inline-block;
    animation: spin-in .3s ease;
}

@keyframes spin-in {
    from { transform: rotate(-120deg) scale(.4); opacity: 0; }
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.nav-toggle span {
    width: 16px;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Theme wipe (View Transitions API) ---------- */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-new(root) {
    animation: theme-wipe .6s ease-in-out;
}

@keyframes theme-wipe {
    from { clip-path: circle(0% at var(--wipe-x, 50%) var(--wipe-y, 50%)); }
    to { clip-path: circle(150% at var(--wipe-x, 50%) var(--wipe-y, 50%)); }
}

/* ================= Buttons ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .98rem;
    font-family: var(--font-body);
    cursor: pointer;
    border: 1px solid transparent;
    transition: box-shadow .2s, transform .15s, color .2s, background .2s;
}

.btn:active { transform: translateY(1px); }

.btn-gold {
    background: var(--gold);
    color: #0f172a;
    box-shadow: 0 0 0 rgba(212, 175, 55, 0);
}

.btn-gold:hover { box-shadow: 0 0 24px rgba(212, 175, 55, .35); }

.btn-glass {
    background: var(--c-surface);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-color: var(--c-border);
    color: var(--c-text);
}

.btn-glass:hover { color: var(--gold); }

/* ================= Hero ================= */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 10;
}

.hero-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ripple {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.morph-blob {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 34rem;
    max-width: 80vw;
    opacity: .3;
}

html.dark .morph-blob { opacity: .25; }

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 128px 24px;
    width: 100%;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    text-transform: uppercase;
    letter-spacing: .3em;
    font-size: .72rem;
    font-weight: 600;
    color: var(--gold);
    margin: 0 0 22px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    color: var(--c-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    50% { opacity: .35; }
}

.hero-title {
    font-size: clamp(2.5rem, 7.5vw, 4.6rem);
    letter-spacing: -.01em;
}

.weight-shift {
    font-variation-settings: 'wght' 550;
    transition: font-variation-settings .5s cubic-bezier(.22, 1, .36, 1);
}

.weight-shift:hover {
    font-variation-settings: 'wght' 900;
}

.hero-role {
    margin: 18px 0 0;
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.4vw, 1.4rem);
    color: var(--gold);
    min-height: 1.6em;
    font-weight: 400;
}

.cursor-blink {
    color: var(--gold);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-tagline {
    margin: 18px 0 0;
    max-width: 34rem;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    color: var(--c-muted);
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.load-in {
    animation: load-in .7s cubic-bezier(.2, .9, .3, 1.1) both;
    animation-delay: var(--d, 0s);
}

@keyframes load-in {
    from { transform: translateY(-40px); opacity: 0; }
}

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    color: var(--c-muted);
    z-index: 1;
    animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* ================= Sections ================= */
.section {
    position: relative;
    z-index: 10;
    padding: clamp(72px, 12vw, 130px) 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 44px;
}

.section-index {
    font-family: var(--font-display);
    color: var(--gold);
    font-weight: 700;
    font-size: .9rem;
}

.section-head h2 {
    font-size: clamp(1.8rem, 4.5vw, 2.7rem);
}

/* ---------- About ---------- */
.about-card {
    border-radius: var(--radius);
    padding: clamp(28px, 5vw, 48px);
}

.about-text {
    margin: 0;
    font-size: 1.1rem;
    color: var(--c-muted);
}

.about-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    border-radius: var(--radius);
    padding: 26px 28px;
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--gold);
    margin: 0 0 14px;
}

.ticks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.ticks li {
    position: relative;
    padding-left: 22px;
    color: var(--c-muted);
    font-size: .95rem;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--gold);
    transform: rotate(45deg);
}

.stat-row {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-row li {
    border-radius: 16px;
    padding: 20px 18px;
    text-align: center;
}

.stat-row strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--gold);
    line-height: 1;
}

.stat-row strong .s {
    font-size: .8rem;
    vertical-align: super;
}

.stat-row span {
    display: block;
    margin-top: 8px;
    font-size: .78rem;
    color: var(--c-muted);
}

@media (max-width: 780px) {
    .about-cols { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Skills (coloured animated bars) ---------- */
.skills {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 40px;
}

.skills li {
    --c: var(--gold);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 6px 12px;
}

.skill-name {
    font-weight: 600;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.skill-name::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--c);
    box-shadow: 0 0 10px color-mix(in srgb, var(--c) 55%, transparent);
    flex: none;
}

.skill-val {
    font-family: var(--font-display);
    font-size: .78rem;
    color: var(--c-muted);
}

.skill-track {
    grid-column: 1 / -1;
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--c) 14%, transparent);
    overflow: hidden;
}

.skill-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--c) 65%, #000 0%), var(--c));
    transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}

.skills.in-view .skill-fill { width: var(--v); }

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

/* ---------- Projects (text cards) ---------- */
.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.project {
    position: relative;
    border-radius: var(--radius);
    padding: 26px 26px 24px;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.project:hover {
    border-color: rgba(212, 175, 55, .45);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .6), 0 0 24px rgba(212, 175, 55, .12);
}

.project.is-public:hover {
    border-color: var(--pub);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .6), 0 0 24px var(--pub-soft);
}

/* Whole-card link for public projects (stretched over the card) */
.project-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: var(--radius);
    font-size: 0;
    color: transparent;
}

.project-link:focus-visible {
    outline: 2px solid var(--pub);
    outline-offset: 2px;
}

.project .tags,
.project .project-cat { position: relative; z-index: 1; }

.project-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 10px;
}

.project-top h3 {
    font-size: 1.35rem;
}

.project p {
    margin: 0 0 16px;
    color: var(--c-muted);
    font-size: .97rem;
}

.badge {
    flex: none;
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, .4);
    border-radius: 999px;
    padding: 4px 10px;
}

.project-flags {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pstatus {
    flex: none;
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1px solid var(--c-border);
    color: var(--c-muted);
}

.pstatus-public {
    color: var(--pub);
    border-color: var(--pub);
    background: var(--pub-soft);
}

.repo-link {
    flex: none;
    font-size: .82rem;
    color: var(--gold);
}

.repo-link:hover { text-decoration: underline; }

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
}

.tags li {
    font-size: .74rem;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--c-border);
}

.project-cat {
    margin-top: auto !important;
    font-size: .7rem !important;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--c-muted);
}

/* ---------- Journey timeline ---------- */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--gold), transparent);
}

.tl-item {
    position: relative;
    padding: 0 0 40px 40px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-node {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--c-bg-solid);
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 4px var(--gold-soft);
}

.tl-kicker {
    font-family: var(--font-display);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--gold);
    margin: 0 0 6px;
}

.tl-item h3 {
    font-size: clamp(1.3rem, 3.5vw, 1.9rem);
    margin-bottom: 8px;
}

.tl-body {
    margin: 0;
    color: var(--c-muted);
    max-width: 46rem;
}

.chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
}

.chips li {
    font-size: .78rem;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    color: var(--c-muted);
}

.tl-item .btn { margin-top: 16px; }

/* ---------- Credentials ---------- */
.sub-h {
    font-family: var(--font-display);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--gold);
    margin: 40px 0 16px;
}

.sub-h:first-of-type { margin-top: 0; }

.edu-card {
    border-radius: var(--radius);
    padding: 26px 28px;
}

.edu-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.edu-top h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0;
}

.edu-card p {
    margin: 0;
    color: var(--c-muted);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.cert {
    border-radius: 16px;
    padding: 22px 22px 20px;
    transform-style: preserve-3d;
}

.cert h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin: 0 0 10px;
}

.cert-issuer {
    margin: 0;
    color: var(--gold);
    font-size: .88rem;
}

.cert-meta {
    margin: 4px 0 0;
    color: var(--c-muted);
    font-size: .78rem;
}

.comp-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.comp-list li {
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
}

.comp-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.comp-cat {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--c-muted);
}

.comp-result {
    margin-left: auto;
    font-size: .88rem;
    color: var(--gold);
}

@media (max-width: 780px) {
    .cert-grid { grid-template-columns: 1fr; }
    .comp-result { margin-left: 0; }
}

/* ---------- Contact ---------- */
.contact-wrap {
    max-width: 760px;
}

.contact-form {
    display: grid;
    gap: 18px;
    margin-top: 30px;
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 40px);
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 600;
    color: var(--c-muted);
}

.field input,
.field textarea {
    font: inherit;
    color: var(--c-text);
    background: var(--c-bg-solid);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 13px 15px;
    width: 100%;
    resize: vertical;
    transition: border-color .18s, box-shadow .18s;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.contact-form .btn { justify-self: start; }

/* ================= Footer ================= */
.site-footer {
    position: relative;
    z-index: 10;
    padding: 96px 0 48px;
}

.footer-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    pointer-events: none;
}

.footer-orb-a {
    left: 6%;
    top: 10%;
    width: 10rem;
    height: 10rem;
    background: rgba(212, 175, 55, .2);
    animation: float-c 11s ease-in-out infinite;
}

.footer-orb-b {
    right: 8%;
    bottom: 8%;
    width: 12rem;
    height: 12rem;
    background: rgba(56, 189, 248, .12);
    animation: float-b 14s ease-in-out infinite;
}

.footer-card {
    position: relative;
    border-radius: 2rem;
    padding: clamp(28px, 5vw, 48px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
}

.footer-brand .brand {
    font-size: 1.8rem;
    display: inline-block;
    padding: 0;
    margin-bottom: 14px;
}

.footer-tag {
    max-width: 22rem;
    color: var(--c-muted);
    font-size: .92rem;
    margin: 0 0 16px;
}

.footer-mail {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    transition: color .18s;
}

.footer-mail:hover { color: var(--gold); }

.footer-loc {
    margin: 6px 0 0;
    font-size: .8rem;
    color: var(--c-muted);
}

.footer-h {
    font-family: var(--font-display);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .25em;
    color: var(--gold);
    margin: 0 0 16px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.footer-col a {
    font-size: .9rem;
    color: var(--c-muted);
    transition: color .18s;
}

.footer-col a:hover { color: var(--gold); }

.social {
    display: flex;
    gap: 10px;
}

.social a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-muted);
    transition: color .18s, border-color .18s, transform .18s;
}

.social a:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.back-top {
    margin-top: 14px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-muted);
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
    transition: color .18s, border-color .18s;
}

.back-top:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.footer-base {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--c-border);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-base p {
    margin: 0;
    font-size: .78rem;
    color: var(--c-muted);
}

/* ================= Custom cursor (z-60) ================= */
.cursor-layer {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    display: none;
}

.cursor-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
}

.cursor-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, .5);
    transition: width .2s, height .2s, border-color .2s;
}

body.cursor-on,
body.cursor-on a,
body.cursor-on button {
    cursor: none;
}

/* ================= Reveal ================= */
.reveal {
    opacity: 0;
    transform: translateY(38px) scale(.97);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

/* ================= Responsive ================= */
@media (max-width: 960px) {
    .projects { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
    .nav-toggle { display: flex; }

    .navbar { gap: 4px; padding-left: 16px; }

    .nav-links {
        position: fixed;
        inset: 84px 16px auto 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 14px;
        border-radius: 20px;
        background: var(--c-surface-solid);
        border: 1px solid var(--c-border);
        box-shadow: 0 20px 50px rgba(2, 6, 23, .4);
        transform: translateY(-140%);
        transition: transform .3s ease;
    }

    .nav-links.open { transform: none; }

    .nav-links a {
        padding: 13px 14px;
        font-size: 1rem;
    }
}

@media (max-width: 620px) {
    .footer-grid { grid-template-columns: 1fr; }
    body { font-size: 16px; }
}

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

    .reveal { opacity: 1; transform: none; }

    .aurora, .bg-grid, .shape, .morph-blob path animate { animation: none !important; }

    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none !important; }
}

/* ================= Hack Me challenge box ================= */
#hackme .wrap { padding-top: 0; }

.hackme-box {
    display: flex;
    align-items: center;
    gap: clamp(16px, 4vw, 32px);
    padding: clamp(20px, 4vw, 34px);
    border-radius: 18px;
    text-decoration: none;
    color: var(--c-text, #e2e8f0);
    border-color: rgba(0, 255, 156, 0.28);
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.hackme-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 140% at 100% 0%, rgba(0, 255, 156, 0.10), transparent 60%);
    pointer-events: none;
}

.hackme-box:hover,
.hackme-box:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 156, 0.6);
    box-shadow: 0 12px 40px rgba(2, 6, 23, .35), 0 0 30px rgba(0, 255, 156, 0.18);
}

.hackme-glyph {
    flex: 0 0 auto;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    font-weight: 700;
    color: #00ff9c;
    text-shadow: 0 0 14px rgba(0, 255, 156, 0.5);
    width: clamp(56px, 14vw, 76px);
    height: clamp(56px, 14vw, 76px);
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 255, 156, 0.4);
    border-radius: 14px;
    background: rgba(0, 255, 156, 0.06);
}

.hackme-copy { flex: 1 1 auto; min-width: 0; }

.hackme-kicker {
    display: inline-block;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #00ff9c;
    margin-bottom: 6px;
}

.hackme-copy h3 {
    margin: 0 0 6px;
    font-size: clamp(1.3rem, 4.5vw, 1.7rem);
}

.hackme-copy p {
    margin: 0;
    color: var(--c-muted, #94a3b8);
    font-size: .95rem;
    line-height: 1.6;
}

.hackme-cta {
    flex: 0 0 auto;
    align-self: center;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #00ff9c;
    border: 1px solid rgba(0, 255, 156, 0.45);
    border-radius: 999px;
    padding: 10px 18px;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}

.hackme-box:hover .hackme-cta,
.hackme-box:focus-visible .hackme-cta {
    background: #00ff9c;
    color: #02120c;
}

@media (max-width: 640px) {
    .hackme-box {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .hackme-cta { align-self: stretch; text-align: center; }
}
