@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ══════════════════════════════════════════
   TOKENS
══════════════════════════════════════════ */
:root {
    --bg:      #05050a;
    --surface: #0e0e18;
    --border:  rgba(255,255,255,0.07);
    --purple:  #7c4dff;
    --purple2: #aa7cff;
    --text-hi: #f0eeff;
    --text-lo: #6b68a0;
    --glow:    rgba(124,77,255,0.35);
}

.light-theme {
    --bg:      #f0eeff;
    --surface: #ffffff;
    --border:  rgba(0,0,0,0.07);
    --purple:  #5b2ee8;
    --purple2: #7c4dff;
    --text-hi: #14112e;
    --text-lo: #7a75a8;
    --glow:    rgba(91,46,232,0.18);
}

/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0; padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-hi);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ══════════════════════════════════════════
   AURORA BACKGROUND
══════════════════════════════════════════ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 15%  10%, rgba(124,77,255,0.22) 0%, transparent 55%),
        radial-gradient(ellipse 60% 45% at 85%  80%, rgba(169,124,255,0.14) 0%, transparent 55%),
        radial-gradient(ellipse 50% 55% at 55%  50%, rgba(91,46,232,0.07)  0%, transparent 65%);
    animation: auroraShift 14s ease-in-out infinite alternate;
}

.light-theme body::before { opacity: 0.45; }

@keyframes auroraShift {
    0%   { transform: scale(1)    rotate(0deg)  translate(0,0); }
    40%  { transform: scale(1.08) rotate(2deg)  translate(-20px, 30px); }
    100% { transform: scale(0.96) rotate(-1.5deg) translate(15px,-20px); }
}

/* Big glow orb top-right */
body::after {
    content: '';
    position: fixed;
    width: 560px; height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,77,255,0.13) 0%, transparent 70%);
    top: -180px; right: -180px;
    animation: floatOrb 22s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatOrb {
    0%,100% { transform: translate(0,0)       scale(1); }
    35%     { transform: translate(-70px,90px) scale(1.12); }
    70%     { transform: translate(45px,-50px) scale(0.9); }
}

/* ══════════════════════════════════════════
   GRID OVERLAY TEXTURE
══════════════════════════════════════════ */
.page-wrapper::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 52px 52px;
}

.light-theme .page-wrapper::before {
    background-image:
        linear-gradient(rgba(0,0,0,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.028) 1px, transparent 1px);
}

/* ══════════════════════════════════════════
   PAGE WRAPPER
══════════════════════════════════════════ */
.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 38px 0;
    animation: slideDown 0.8s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
    color: var(--text-hi);
    text-decoration: none;
}

.logo span {
    color: var(--purple);
    position: relative;
}

.logo span::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--purple2));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}

.logo:hover span::after { transform: scaleX(1); }

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

.nav-item {
    text-decoration: none;
    color: var(--text-lo);
    font-weight: 600;
    font-size: 0.87rem;
    letter-spacing: 0.3px;
    transition: color 0.2s;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    left: 0; bottom: -3px;
    width: 0; height: 1.5px;
    background: var(--purple);
    border-radius: 2px;
    transition: width 0.28s ease;
}

.nav-item:hover { color: var(--text-hi); }
.nav-item:hover::after { width: 100%; }

/* Theme toggle */
.theme-toggle {
    background: rgba(124,77,255,0.1);
    color: var(--text-hi);
    border: 1px solid rgba(124,77,255,0.25);
    padding: 10px 14px;
    border-radius: 13px;
    cursor: pointer;
    font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    transition: background 0.25s, box-shadow 0.25s, transform 0.15s, border-color 0.25s;
}

.theme-toggle:hover {
    background: rgba(124,77,255,0.2);
    border-color: rgba(124,77,255,0.5);
    box-shadow: 0 0 20px var(--glow);
    transform: scale(1.08);
}

.theme-toggle:active { transform: scale(0.93); }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
    text-align: center;
    padding: 80px 0 72px;
    animation: fadeUp 1s cubic-bezier(0.22,1,0.36,1) 0.12s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.8rem, 6.5vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -2.5px;
    line-height: 1.04;
    background: linear-gradient(135deg, var(--text-hi) 0%, var(--purple2) 55%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.hero p {
    color: var(--text-lo);
    margin-top: 16px;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}

/* ══════════════════════════════════════════
   SECTION LABEL
══════════════════════════════════════════ */
.section-label {
    text-align: center;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--purple);
    margin-bottom: 12px;
    opacity: 0.85;
}

/* ══════════════════════════════════════════
   GRIDS
══════════════════════════════════════════ */
.app-grid, .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    padding-bottom: 72px;
}

/* ══════════════════════════════════════════
   CARDS — shared styles
══════════════════════════════════════════ */
.app-card, .profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 44px 34px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition:
        transform  0.38s cubic-bezier(0.22,1,0.36,1),
        border-color 0.3s,
        box-shadow 0.38s;
}

/* Staggered entrance */
.app-card:nth-child(1),
.profile-card:nth-child(1) { animation: cardIn 0.9s cubic-bezier(0.22,1,0.36,1) 0.22s both; }
.app-card:nth-child(2),
.profile-card:nth-child(2) { animation: cardIn 0.9s cubic-bezier(0.22,1,0.36,1) 0.38s both; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(48px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shimmer sweep */
.app-card::before, .profile-card::before {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 55%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transform: skewX(-12deg);
    transition: left 0.65s ease;
    pointer-events: none;
}

/* Top-right glow orb */
.app-card::after, .profile-card::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,77,255,0.18) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

/* Hover state */
.app-card:hover, .profile-card:hover {
    border-color: rgba(124,77,255,0.5);
    box-shadow:
        0 0 0 1px rgba(124,77,255,0.18),
        0 24px 64px rgba(0,0,0,0.42),
        0 0 48px var(--glow);
    transform: translateY(-8px) scale(1.015);
}

.app-card:hover::before, .profile-card:hover::before { left: 150%; }
.app-card:hover::after, .profile-card:hover::after   { opacity: 1; }

/* ── Logo box ── */
.logo-box {
    width: 86px; height: 86px;
    margin: 0 auto 24px;
    background: rgba(124,77,255,0.08);
    border: 1px solid rgba(124,77,255,0.18);
    border-radius: 22px;
    padding: 15px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s, box-shadow 0.3s;
}

.app-card:hover .logo-box {
    background: rgba(124,77,255,0.15);
    box-shadow: 0 0 24px rgba(124,77,255,0.28);
}

.project-icon {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ── Tags ── */
.category-tag, .role-tag {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--purple);
    letter-spacing: 1.6px;
    opacity: 0.9;
}

/* ── Headings ── */
.app-info h3, .profile-card h3 {
    font-family: 'Syne', sans-serif;
    margin: 14px 0 10px;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-hi);
}

/* ── Body text ── */
.app-info p {
    color: var(--text-lo);
    font-size: 0.93rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* ── CTA button ── */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple2) 100%);
    color: #fff;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    box-shadow: 0 10px 32px rgba(124,77,255,0.5);
    transform: translateY(-2px);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

/* ══════════════════════════════════════════
   AVATAR  (about page)
══════════════════════════════════════════ */
.avatar-wrap {
    width: 110px; height: 110px;
    margin: 0 auto 24px;
    border-radius: 50%;
    border: 3px solid transparent;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(135deg, var(--purple), var(--purple2)) border-box;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    transition: box-shadow 0.35s;
}

.profile-card:hover .avatar-wrap {
    box-shadow: 0 0 32px rgba(124,77,255,0.42);
}

.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }

.avatar-initials {
    font-family: 'Syne', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--purple);
}

/* ── Quote ── */
.profile-quote {
    color: var(--text-lo);
    font-size: 0.93rem;
    line-height: 1.72;
    font-style: italic;
    margin: 14px 0 24px;
    position: relative;
    padding: 0 12px;
}

.profile-quote::before {
    content: '"';
    position: absolute;
    top: -22px; left: -6px;
    font-size: 4.5rem;
    color: var(--purple);
    opacity: 0.18;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ── Skill pills ── */
.skill-pills {
    display: flex; flex-wrap: wrap;
    justify-content: center;
    gap: 8px; margin-top: 6px;
}

.pill {
    background: rgba(124,77,255,0.07);
    border: 1px solid rgba(124,77,255,0.18);
    color: var(--text-lo);
    font-size: 0.73rem;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.22s;
}

.pill:hover {
    background: rgba(124,77,255,0.18);
    border-color: rgba(124,77,255,0.5);
    color: var(--purple2);
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════ */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 52px 0;
    position: relative;
}

.divider::after {
    content: '';
    position: absolute;
    top: -1.5px; left: 50%;
    transform: translateX(-50%);
    width: 72px; height: 2.5px;
    background: linear-gradient(90deg, transparent, var(--purple), var(--purple2), transparent);
    border-radius: 2px;
}

/* ══════════════════════════════════════════
   MISSION BLOCK
══════════════════════════════════════════ */
.mission-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 58px 50px;
    text-align: center;
    margin-bottom: 72px;
    position: relative;
    overflow: hidden;
    animation: fadeUp 1s cubic-bezier(0.22,1,0.36,1) 0.5s both;
}

.mission-block::before {
    content: '';
    position: absolute;
    bottom: -80px; left: 50%;
    transform: translateX(-50%);
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,77,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.mission-block h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.95rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--text-hi), var(--purple2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mission-block p {
    color: var(--text-lo);
    font-size: 1rem;
    line-height: 1.82;
    max-width: 560px;
    margin: 0 auto;
}

/* ══════════════════════════════════════════
   BACK LINK
══════════════════════════════════════════ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-lo);
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 600;
    margin-bottom: 42px;
    transition: color 0.22s, gap 0.22s;
}

.back-link::before {
    content: '←';
    font-size: 1rem;
    display: inline-block;
    transition: transform 0.22s;
}

.back-link:hover { color: var(--purple2); gap: 13px; }
.back-link:hover::before { transform: translateX(-4px); }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 620px) {
    .hero { padding: 60px 0 54px; }
    .hero h1 { font-size: 2.5rem; letter-spacing: -1.5px; }
    .app-grid, .team-grid { grid-template-columns: 1fr; }
    .main-nav { padding: 24px 0; }
    .mission-block { padding: 36px 22px; }
    .mission-block h2 { font-size: 1.5rem; }
    .app-card, .profile-card { padding: 34px 24px; }
}