* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0b1021;
    --bg-soft: #11172b;
    --bg-card: rgba(255, 255, 255, 0.04);
    --text: #e8ecf4;
    --text-muted: #aab3c9;
    --accent: #7df0ff;
    --accent-2: #9f7afa;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
    --bg: #f7f8fd;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text: #0f172a;
    --text-muted: #4b5568;
    --accent: #0ea5e9;
    --accent-2: #7c3aed;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

body {
    font-family: 'Manrope', 'Space Grotesk', system-ui, -apple-system, sans-serif;
    background: radial-gradient(1200px circle at 20% 20%, rgba(126, 255, 255, 0.08), transparent 40%),
                radial-gradient(900px circle at 80% 0%, rgba(159, 122, 250, 0.12), transparent 35%),
                var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
}

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

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

/* NAVBAR */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    background: linear-gradient(90deg, rgba(11,16,33,0.8), rgba(11,16,33,0.6));
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4vw;
    gap: 20px;
}

.logo {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 22px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links li a {
    position: relative;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: color 0.3s ease;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.3s ease;
    border-radius: 999px;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-btn {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(120deg, rgba(126, 240, 255, 0.12), rgba(159, 122, 250, 0.12));
    color: var(--text);
    font-weight: 700;
}

.theme-toggle, .menu-toggle {
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
}

.menu-toggle { display: none; }

/* HERO */
.hero {
    position: relative;
    padding: 140px 0 110px;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    filter: blur(120px);
    opacity: 0.7;
    z-index: 0;
}

.hero::before {
    background: #7df0ff;
    top: -120px;
    left: -120px;
}

.hero::after {
    background: #9f7afa;
    bottom: -160px;
    right: -80px;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: clamp(36px, 5vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin: 10px 0 12px;
}

.hero-content h1 span {
    color: var(--accent);
}

.hero-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    letter-spacing: 0.4px;
}

.hero-content p {
    color: var(--text-muted);
    max-width: 650px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 24px 0 12px;
}

.hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hero-visual {
    position: relative;
    display: grid;
    place-items: center;
}

.avatar {
    width: 210px;
    height: 210px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #0a0f1f;
    background: linear-gradient(135deg, #7df0ff, #9f7afa);
    box-shadow: var(--shadow);
}

.floating-card, .floating-badge {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}

.floating-card {
    top: 12%;
    right: -4%;
    max-width: 220px;
}

.floating-card .label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
    color: var(--text-muted);
}

.floating-card h3 {
    margin: 6px 0;
    font-size: 18px;
}

.floating-badge {
    bottom: 8%;
    left: -6%;
    display: grid;
    gap: 4px;
    text-align: left;
}

.big-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

.tiny-text {
    font-size: 12px;
    color: var(--text-muted);
}

.social-icons a {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--bg-card);
    margin-right: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-3px);
    border-color: var(--accent);
}

/* Buttons */
.btn {
    border: none;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(130deg, var(--accent), var(--accent-2));
    color: #0a0f1f;
    box-shadow: 0 12px 30px rgba(126, 240, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

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

.text-link {
    color: var(--accent);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Sections */
.section {
    padding: 90px 0;
}

.section.light {
    background: var(--bg-soft);
}

.section-head {
    margin-bottom: 24px;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
}

.lede {
    color: var(--text-muted);
    max-width: 720px;
    margin: 10px 0 20px;
}

.section h2 { margin-bottom: 10px; }
.section h3 { margin-bottom: 6px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
}

.pill.accent {
    background: rgba(126, 240, 255, 0.12);
    border-color: rgba(126, 240, 255, 0.4);
}

/* Quick links */
.link-overview {
    text-align: center;
}

.link-cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 24px;
}

.link-cards .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.link-cards .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

/* About cards */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    align-items: start;
}

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

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.info-card i {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 18px;
}

.info-card h3 {
    margin-bottom: 6px;
}

.info-card p {
    color: var(--text-muted);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.skill-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.percent {
    color: var(--accent);
}

.progress {
    margin-top: 10px;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    transition: width 1.2s ease;
}

.toolbox .pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.project-card {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
}

.project-card.highlight {
    background: linear-gradient(135deg, rgba(126,240,255,0.12), rgba(159,122,250,0.18));
    border-color: rgba(126, 240, 255, 0.4);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Contact */
.contact-container {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.input-group {
    margin-bottom: 16px;
    text-align: left;
}

.input-group label {
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.input-field {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .input-field {
    background: #f8fafc;
}

.input-field i {
    color: var(--accent);
}

.input-field input,
.input-field textarea {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
    background: transparent;
    color: var(--text);
    font-family: inherit;
}

.success-msg {
    color: #22c55e;
    font-weight: 700;
    margin-top: 8px;
    display: none;
    text-align: center;
}

#contact h2,
.contact-subtitle {
    text-align: center;
}

.contact-subtitle {
    color: var(--text-muted);
    margin-bottom: 18px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 18px 0;
    text-align: center;
    color: var(--text-muted);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.8s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
    .nav-links {
        position: absolute;
        top: 70px;
        right: 16px;
        flex-direction: column;
        align-items: flex-start;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 14px;
        min-width: 220px;
        display: none;
        box-shadow: var(--shadow);
    }

    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 120px;
    }
    .nav-container {
        padding: 14px 5vw;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .avatar {
        width: 180px;
        height: 180px;
    }
    .floating-card { display: none; }
}
