/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Root variables */
:root {
    --primary: #0ea5e9;
    --bg: #f9f9f9;
    --text: #1e293b;
    --muted: #475569;
    --card: #ffffff;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --tag-bg: #e2e8f0;
    /* light chip */
    --tag-text: #0f172a;
    /* dark text on light chip */
    --tag-border: transparent;
    --primary-hover: #0284c7;
}

html[data-theme="dark"] {
    --bg: #0b1220;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --card: #111827;
    --border: #1f2937;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    /* Optional: tweak brand in dark */
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --tag-bg: rgba(255, 255, 255, 0.08);
    /* subtle dark chip */
    --tag-text: #e2e8f0;
    /* light text */
    --tag-border: rgba(255, 255, 255, 0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* Links */
a {
    text-decoration: none;
    color: var(--primary);
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Navbar */
.navbar {
    background: var(--card);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand span {
    font-weight: bold;
    font-size: 22px;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text);
    transition: 0.3s;
}

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

.nav-toggle {
    display: none;
    /* default hidden on desktop */
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: var(--shadow);
    display: none;
    /* keep hidden until mobile */
    align-items: center;
    justify-content: center;
}

.nav-toggle i {
    pointer-events: none;
}

.nav-toggle:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.theme-btn {
    margin-left: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Mobile navbar */
@media(max-width:768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 12px;
        background: var(--card);
        position: absolute;
        right: 16px;
        top: 60px;
        padding: 12px;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-toggle {
        display: inline-flex;
    }
}



/* Hero */
.hero {
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-inner {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.hero-text h3 {
    font-size: 20px;
    color: var(--muted);
    margin-bottom: 16px;
}

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

.hero-img img {
    border-radius: 12px;
    width: 250px;
}

.hero-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    text-align: center;
    transition: 0.3s;
}

.hero-buttons .btn:hover {
    background: var(--primary-hover);
    color: #fff;
}

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

.hero-buttons .btn.btn-primary:hover {
    background: #333;
}

/* Sections */
.section {
    padding-bottom: 30px;
}

@media(max-width:768px) {
    .section {
        padding: 30px 0;
    }
}

.section-title {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Skills chips */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    padding: 6px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-size: 14px;
}

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

.card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary);
}

.card-text {
    color: var(--muted);
    margin-bottom: 8px;
}

.card-tags span {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 12px;
    margin-right: 4px;
    border: 1px solid var(--tag-border);
}

.a-link {
    color: var(--primary);
}

a.card {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.card:hover {
    text-decoration: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Experience & Education */
.experience-item,
.education-item {
    background: var(--card);
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.experience-item h4,
.education-item h4 {
    margin-bottom: 6px;
    font-size: 18px;
    color: var(--primary);
}

.experience-item .period,
.education-item .period {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
}

.experience-item p,
.education-item p {
    color: var(--text);
}

/* Certifications */
#certifications-list {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

.cert-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--primary);
}

.cert-issuer {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 6px;
}

.cert-desc {
    color: var(--text);
    margin-bottom: 8px;
}

.cert-link {
    display: inline-block;
}

/* Achievements (Title, Position, Year) */
#achievements-list {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.achievement-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.achievement-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--primary);
}

.achievement-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badges for position/year */
.ach-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    border: 1px solid #dbe3ef;
}

html[data-theme="dark"] .ach-badge {
    background: rgba(148, 163, 184, 0.16);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.35);
}

.achievement-org {
    color: var(--primary);
    font-size: 14px;

}

.achievement-link {
    margin-top: 8px;
    display: inline-block;
}

@media(max-width:768px) {

    #certifications-list,
    #achievements-list {
        grid-template-columns: 1fr;
    }
}

@media(max-width:768px) {

    #achievements-list,
    #education-list {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Contact */
#contact a {
    color: var(--primary);
}

/* Reveal animation */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Back-to-top button */
#to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: #fff;
    border: none;
    width: 48px;
    /* fixed square for perfect circle */
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 100;
    font-size: 18px;
    box-shadow: var(--shadow);
    display: none;
}

#to-top i {
    pointer-events: none;
}

#to-top.show {
    display: block;
}



/* Footer  */

#footer {
    text-align: center;
    color: #ffffff;
    background-color: var(--primary);
    padding: 10px 0;
}

/* Responsive hero */
@media(max-width:768px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }
}