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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #020617;
    color: #e2e8f0;
}

/* GLOBAL IMAGES (ONLY DEFINE ONCE) */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* NAV */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #020617;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    gap: 15px;
    list-style: none;
}

nav a {
    color: #e2e8f0;
    text-decoration: none;
}

nav a:hover {
    color: #38bdf8;
}

/* HERO */
.hero {
    text-align: center;
    padding: 70px 20px 30px 20px;
}

.hero h1 {
    font-size: 3rem;
}

.hero p {
    color: #38bdf8;
    margin-top: 10px;
}

.hero-links {
    margin-top: 15px;
}

/* SECTIONS */
section {
    padding: 35px 20px;
    max-width: 1100px;
    margin: auto;
}

/* HEADINGS */
h2 {
    text-align: center;
    border-bottom: 2px solid #38bdf8;
    margin-bottom: 15px;
}

/* ABOUT */
#about {
    text-align: center;
}

#about p {
    max-width: 800px;
    margin: 10px auto;
    text-align: left;
    line-height: 1.6;
}

/* CARDS */
.card {
    background: #1e293b;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden; /* prevents image overflow */
}

/* SKILLS */
#skills .card ul {
    padding-left: 18px;
}

/* PROJECT TITLES */
.project-content h3 {
    color: #38bdf8;
    margin-bottom: 10px;
}

/* PROJECT */
.project-content {
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.project-summary {
    max-width: 750px;
    margin: 0 auto 25px auto;
}

/* SERVICES */
.service-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.service-item {
    background: #0f172a;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* HIGHLIGHTS */
.project-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.highlight-box {
    background: #0f172a;
    padding: 15px;
    border-radius: 10px;
    width: 260px;
    text-align: left;
}

.highlight-box ul {
    padding-left: 18px;
}

.highlight-box li {
    margin-bottom: 6px;
}

/* 🔥 PROJECT GALLERY (FIXED) */
.project-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.project-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    object-fit: cover;
}

/* CERTS */
.cert-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.cert-card {
    background: #0f172a;
    padding: 15px;
    border-radius: 10px;
    width: 180px;
    text-align: center;
}
.cert-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.3;
}

/* Forces the code onto its own line + wraps cleanly */
.cert-meta span {
    display: block;
    word-break: break-all;
    margin-top: 2px;
    font-size: 0.7rem;
    opacity: 0.9;
}
.cert-card img {
    width: 100%;
    max-height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* IN PROGRESS */
.cert-card.in-progress i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #38bdf8;
}

.cert-card.in-progress p {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
}

/* 🔥 MOBILE FIXES */
@media (max-width: 768px) {

    nav {
        flex-direction: column;
        gap: 10px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .project-gallery {
        flex-direction: column;
        align-items: center;
    }

    .project-gallery img {
        max-width: 100%;
    }

    .highlight-box {
        width: 100%;
    }

    .cert-card {
        width: 100%;
        max-width: 250px;
    }
}
