/* ---------- CSS Variables + Dark Mode ---------- */
:root {
    --brand-purple: #764ba2;
    --brand-blue: #667eea;
    --brand-teal: #14b8a6;
    --bg: #ffffff;
    --bg-soft: #f7f7fb;
    --bg-hero-gradient: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-purple) 100%);
    --text: #0f172a; /* slate-900-ish */
    --text-soft: #475569; /* slate-600-ish */
    --border: #e5e7eb; /* gray-200-ish */
    --muted: #9ca3af; /* gray-400-ish */
    --elev: #ffffff;
    --shadow: 0 10px 25px rgba(0,0,0,.08);
}

.dark {
    --bg: #0b1020;
    --bg-soft: #0e162e;
    --bg-hero-gradient: linear-gradient(135deg, #4c5bd7 0%, #5e3a8f 100%);
    --text: #f3f4f6;
    --text-soft: #cbd5e1;
    --border: #1f2937;
    --muted: #94a3b8;
    --elev: #0f172a;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* ---------- Global ---------- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
/* Header shell */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

/* Layout */
.container.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* Desktop nav */
.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

.nav-link:hover { color: var(--text); background: var(--bg-soft); }
.nav-link.active { color: var(--brand-purple); background: color-mix(in oklab, var(--brand-purple) 12%, transparent); }

/* Buttons */
.theme-btn, .menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--elev);
  color: var(--text);
  transition: transform .15s ease, box-shadow .2s ease, background-color .15s ease, border-color .15s ease;
}

.theme-btn:hover, .menu-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.menu-btn { display: none; }

/* -------- Mobile behavior -------- */
@media (max-width: 768px) {
  .menu-btn { display: inline-flex; margin-left: auto; }
  .theme-btn { order: 3; }                /* keep theme button on the right */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: grid;
    gap: 8px;
    background: var(--elev);
    border-bottom: 1px solid var(--border);
    padding: 10px;
    /* Slide-down */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height .25s ease, opacity .2s ease, transform .2s ease;
  }
  .nav-links.open {
    max-height: 60vh;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg-soft);
  }
  /* Hide desktop spacing push */
  .nav-links:not(.open) { margin-left: 0; }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .theme-btn, .menu-btn, .nav-links { transition: none !important; }
}


/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-hero-gradient);
    color: #fff;
}

.hero-bleed {
    position: absolute;
    inset: 0;
    opacity: .12;
    pointer-events: none;
}

    .hero-bleed .blob {
        position: absolute;
        border-radius: 999px;
        background: #fff;
        filter: blur(32px);
    }

        .hero-bleed .blob.teal {
            background: var(--brand-teal);
            filter: blur(24px);
        }

.hero-inner {
    text-align: center;
    padding: 0 24px;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(42px, 8vw, 96px);
    line-height: 1.05;
    font-weight: 900;
    margin: 0 0 10px;
}

.hero-sub {
    font-size: clamp(18px, 3vw, 24px);
    opacity: .92;
    margin: 0 0 12px;
    font-weight: 300;
}

.hero-line {
    font-size: clamp(16px, 2.5vw, 20px);
    opacity: .85;
    margin: 0 0 36px;
}

/* Buttons */
.btn-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 700;
    border: 2px solid transparent;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    will-change: transform;
}

    .btn:hover {
        transform: scale(1.04);
        box-shadow: 0 12px 24px rgba(0,0,0,.15);
    }

.btn-primary {
    background: #fff;
    color: var(--brand-purple);
}

.btn-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.btn-accent {
    background: var(--brand-teal);
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--brand-purple);
}

/* ---------- Sections ---------- */
.section {
    padding: 80px 0;
}

    .section.soft {
        background: var(--bg-soft);
    }

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin: 0 0 18px;
}

.lead {
    font-size: 18px;
    color: var(--text-soft);
}

/* About grid */
.grid-2 {
    display: grid;
    gap: 32px;
    align-items: center;
}

@media (min-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr 1.4fr;
    }
}

.avatar {
    width: 256px;
    height: 256px;
    object-fit: cover;
    border-radius: 999px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.card {
    background: var(--elev);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow);
}

    .card h3 {
        margin: 0 0 8px;
        font-weight: 700;
        color: var(--brand-purple);
    }

    .card p {
        margin: 0;
        color: var(--text-soft);
        font-size: 14px;
    }

/* ---------- Contact ---------- */
.socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 8px 0 28px;
}

.social-pill {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform .12s ease, filter .2s ease;
    cursor: pointer;
}

    .social-pill:hover {
        transform: scale(1.08);
        filter: brightness(1.05);
    }

.social-ln {
    background: #0a66c2;
}

.social-gh {
    background: #111827;
}

.social-x {
    background: #1d9bf0;
}

.form {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
}

.input, .textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--elev);
    color: var(--text);
    outline: none;
    transition: box-shadow .15s ease, border .15s ease;
}

    .input:focus, .textarea:focus {
        border-color: var(--brand-purple);
        box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand-purple) 25%, transparent);
    }

.grid-2c {
    display: grid;
    gap: 16px;
}

@media (min-width: 768px) {
    .grid-2c {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Loading Screen ---------- */
.loading-screen {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--bg-hero-gradient);
    z-index: 9999;
    transition: opacity .5s ease-out, visibility .5s ease-out;
}

    .loading-screen.hidden {
        opacity: 0;
        visibility: hidden;
    }

.loading-box {
    text-align: center;
    color: #fff;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,.3);
    border-top: 4px solid #fff;
    border-radius: 999px;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-dots {
    display: inline-flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 999px;
    animation: pulse 1.4s ease-in-out infinite both;
}

    .dot:nth-child(1) {
        animation-delay: -.32s;
    }

    .dot:nth-child(2) {
        animation-delay: -.16s;
    }

@keyframes pulse {
    0%,80%,100 {
        transform: scale(0);
        opacity: .5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ---------- Page main-content fade-in ---------- */
.main-content {
    opacity: 0;
    transition: opacity .5s ease-in;
}

    .main-content.visible {
        opacity: 1;
    }
