:root {
    --blue: #3b82f6;
    --blue-dim: rgba(59, 130, 246, 0.12);
    --blue-border: rgba(59, 130, 246, 0.25);
    --bg: #0d1117;
    --surface: #161b27;
    --surface-raised: #1c2333;
    --border: rgba(255, 255, 255, 0.07);
    --text: #e6edf3;
    --muted: #7d8590;
    --accent-violet: #8b5cf6;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Nav ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ── Hero ── */
.hero {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 2.5rem;
    position: relative;
    z-index: 10;
}

.profile-pic-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-img {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
    outline: 2px solid var(--blue);
    background: var(--surface-raised);
    display: block;
}

.hero-content { flex: 1; min-width: 240px; }

.hero-content h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.title-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.title-tag {
    background: var(--blue-dim);
    color: var(--blue);
    border: 1px solid var(--blue-border);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.title-tag i { margin-right: 0.3rem; opacity: 0.8; }

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.stat-card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 1rem;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

/* ── Social ── */
.social-links {
    display: flex;
    gap: 0.6rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.social-link {
    width: 38px;
    height: 38px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.social-link:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* ── Buttons ── */
.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn {
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

.btn-primary:hover { background: #2563eb; }

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

.btn-outline:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* ── Main layout ── */
.main {
    padding: 3rem 0;
}

/* ── Section ── */
.section {
    margin-bottom: 3.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.section-icon {
    color: var(--blue);
    font-size: 1rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.about-text {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 700px;
    line-height: 1.8;
}

/* ── Skills ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 0.75rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: default;
}

.skill-card:hover {
    border-color: var(--blue);
    background: var(--surface-raised);
}

.skill-icon {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--blue);
}

.skill-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
}

/* ── Projects ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.project-card:hover { border-color: var(--blue); }

.project-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.project-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.project-tech {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--blue);
    margin-bottom: 0.75rem;
}

.project-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--blue);
    text-decoration: none;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: gap 0.2s;
}

.project-link:hover { gap: 0.6rem; }

/* ── Experience ── */
.two-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.exp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    padding: 1.4rem;
}

.exp-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.exp-icon {
    width: 42px;
    height: 42px;
    background: var(--blue-dim);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: var(--blue);
}

.exp-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.exp-company {
    font-size: 0.8rem;
    color: var(--muted);
}

.exp-date {
    font-size: 0.75rem;
    color: var(--blue);
    margin-top: 0.15rem;
}

.exp-list {
    list-style: none;
    margin-top: 0.75rem;
}

.exp-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.exp-list li i {
    color: var(--blue);
    font-size: 0.65rem;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

/* ── Certifications ── */
.cert-img {
    width: 100%;
    max-width: 220px;
    border-radius: 8px;
    margin: 0.75rem auto;
    display: block;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s;
}

.cert-img:hover { border-color: var(--blue); }

.cert-date {
    color: var(--blue);
    margin-top: 0.5rem;
}

.cert-desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 1rem;
}

/* ── Contact ── */
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
}

.contact-card p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.5rem 0 1.5rem;
}

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.contact-item i { color: var(--blue); }

.contact-location {
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-ref {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
}

/* ── Modal ── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal.active { display: flex; }

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    border: 1px solid var(--blue);
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .navbar-inner { padding: 0.75rem 1rem; }
    .nav-links { gap: 1.25rem; }
    
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1.25rem 1.75rem;
    }
    
    .profile-pic-wrapper {
        margin: 0 auto;
    }
    
    .hero-content {
        text-align: center;
        min-width: unset;
        width: 100%;
    }
    
    .hero-content h1 { 
        font-size: 1.45rem; 
        text-align: center;
    }
    
    .title-tags {
        justify-content: center;
    }
    
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .social-links {
        justify-content: center;
    }
    
    .btn-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-links { display: none; }
    .projects-grid { grid-template-columns: 1fr; }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
}
