/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --bg-alt: #111118;
    --surface: #18181f;
    --border: #252530;
    --text: #e4e4ec;
    --text-muted: #8b8b9e;
    --gradient-1: #6366f1;
    --gradient-2: #a855f7;
    --accent: #6366f1;
    --green: #22c55e;
    --radius: 12px;
    --max-width: 1100px;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    padding: 140px 24px 100px;
    text-align: center;
}

.hero-container {
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: inline-block;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: var(--surface);
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 24px;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 48px;
}

/* ===== PROJECT CARDS ===== */
.projects-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.25s, transform 0.25s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.project-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.project-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 16px;
}

.project-tech {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.project-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    transition: color 0.2s;
}

.project-link:hover {
    color: var(--gradient-2);
}

/* ===== DESIGN CARDS ===== */
.design-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.design-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.25s, transform 0.25s;
}

.design-card:hover {
    border-color: var(--gradient-2);
    transform: translateY(-2px);
}

.design-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.design-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(168, 85, 247, 0.12);
    color: var(--gradient-2);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.design-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.design-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
}

.design-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.design-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gradient-2);
    transition: color 0.2s;
}

.design-link:hover {
    color: #c084fc;
}

/* ===== SKILLS ===== */
.skills-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.skill-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}

.skill-category h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skill-category p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== CERTIFICATES ===== */
.certs-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.cert-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 0.2s;
}

.cert-card:hover {
    border-color: var(--accent);
}

.cert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.cert-info {
    flex: 1;
    min-width: 0;
}

.cert-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cert-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cert-link {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    flex-shrink: 0;
}

.cert-link:hover {
    text-decoration: underline;
}

/* ===== CONTACT ===== */
.contact-grid {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: border-color 0.25s;
    cursor: default;
}

a.contact-card {
    cursor: pointer;
}

a.contact-card:hover {
    border-color: var(--accent);
}

.contact-icon {
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-value {
    font-size: 0.88rem;
    font-weight: 600;
    word-break: break-word;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-stats {
        gap: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .design-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 60px 16px;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .certs-grid {
        grid-template-columns: 1fr;
    }
}