/* ---------- GLOBAL + THEME ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: hsla(44, 70%, 90%, 0.353);
    --text: #222222;
    --muted: #555555;
    --accent: #8a9982;
    --accent-soft: rgba(29, 29, 29, 0.12);
    --card-bg: #ffffff;
    --shadow-soft: 0 3px 15px rgba(0, 0, 0, 0.07);
    --radius-md: 10px;
    --radius-lg: 18px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

/* ---------- NAVBAR ---------- */
.navbar {
    width: 100%;
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #8a9982cf;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #ffffff;
}

.nav-logo {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 26px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.98rem;
    transition: color 0.2s ease;
}

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

/* ---------- HERO ---------- */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    background: radial-gradient(circle at top left, var(--accent-soft), transparent 75%);
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards;
    animation-delay: 0.1s;
}

.hero-inner {
    text-align: left;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    margin-top: 8px;
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 600px;
    min-height: 1.4em;
}

/* ---------- BUTTON ---------- */
.button {
    display: inline-block;
    margin-top: 22px;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 18px rgba(74, 109, 247, 0.4);
}

.button:hover {
    background: #99ae6c;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(51, 255, 0, 0.45);
}

/* ---------- SECTIONS ---------- */
.section {
    padding: 80px 0;
    text-align: center;
    scroll-margin-top: 90px;
}

.section h2 {
    font-size: 2.1rem;
    margin-bottom: 18px;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
    width: 60%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #9b51e0);
}

#about p {
    max-width: 700px;
    margin: 18px auto 0;
    font-size: 1.02rem;
    color: #444;
}

/* ---------- PROJECTS ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
    margin-top: 26px;
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-align: left;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-color: var(--accent-soft);
}

.project-card h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.project-card p {
    margin-bottom: 12px;
    font-size: 0.94rem;
    color: var(--muted);
}

.link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 12px;
}

.link:hover {
    opacity: 0.8;
}

/* ---------- SKILLS ---------- */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 24px;
}

.skills span {
    padding: 10px 18px;
    background: var(--card-bg);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---------- CONTACT ---------- */
#contact p {
    margin-top: 10px;
    margin-bottom: 18px;
    font-size: 1.02rem;
}

/* ---------- CERTIFICATES ---------- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 26px;
}

.cert-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 18px 18px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.04);
    text-align: left;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    border-color: var(--accent-soft);
}

.cert-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;           
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #eee;
}

.cert-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;            
    display: block;
}

.cert-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.cert-card p {
    font-size: 0.9rem;
    color: var(--muted);
}

/* ---------- SCROLL REVEAL ---------- */

/* Base: visible if JS doesn't run */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* When JS is active, start hidden + moved down */
html.enable-animations .reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

/* When element is in view */
html.enable-animations .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- KEYFRAMES ---------- */
@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .navbar {
        padding: 14px 18px;
    }

    .nav-links {
        display: none;
    }

    .hero,
    .hero-inner {
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }
}
