/* ---------- Theme colors ---------- */
:root {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-text: #0f172a;
    --border: #334155;
}

body.light {
    --bg: #f8fafc;
    --bg-alt: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --accent: #0284c7;
    --accent-text: #ffffff;
    --border: #e2e8f0;
}

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

html {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

main {
    flex: 1;
}

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

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 6%;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.navbar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    list-style: none;
}

.navbar ul a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.navbar ul a:hover,
.navbar ul a.active {
    color: var(--accent);
    border-color: var(--accent);
}

#themeBtn {
    padding: 8px 16px;
    border: 1px solid var(--accent);
    border-radius: 20px;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#themeBtn:hover {
    background: var(--accent);
    color: var(--accent-text);
}

/* ---------- Hero (Home page) ---------- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 80px 6%;
    min-height: calc(100vh - 140px);
}

.hero-text {
    flex: 1;
}

.welcome {
    color: var(--accent);
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-text h1 {
    font-size: 2.6rem;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-text h1 span {
    color: var(--accent);
}

.hero-text h2 {
    font-size: 1.3rem;
    color: var(--muted);
    margin-bottom: 18px;
}

.hero-text p {
    max-width: 560px;
    margin-bottom: 26px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: var(--accent-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: transform 0.2s, opacity 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.profile-container {
    flex: 0 0 auto;
}

.profile-container img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--accent);
    background: var(--bg-alt);
}

/* ---------- Inner pages ---------- */
.page-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 70px 6%;
    text-align: center;
}

.page-section h2 {
    font-size: 2.1rem;
    margin-bottom: 18px;
    color: var(--accent);
}

.page-section > p {
    max-width: 700px;
    margin: 0 auto 14px;
}

/* ---------- Cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 36px;
    text-align: left;
}

.card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 26px;
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card h3 {
    color: var(--accent);
    margin-bottom: 8px;
}

.card p {
    color: var(--muted);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 20px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
    .navbar {
        justify-content: center;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 50px 6%;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .profile-container img {
        width: 220px;
        height: 220px;
    }
}
