/* ===== DESIGN VARIABLES ===== */
:root {
    --primary-color: #14213D;
    --secondary-color: #FCA311;

    --background-color: #FFFFFF;
    --text-color: #333;

    --card-background: #ffffff;
    --white: #ffffff;

    --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
    line-height: 1.6;
    background: var(--background-color);
    color: var(--text-color);
}

body.dark {
    --background-color: #121212;
    --text-color: #f1f1f1;
    --card-background: #1e1e1e;
}

/* ===== HEADER ===== */
header {
    position:relative;
    background: var(--primary-color);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

#darkModeToggle {
    position: absolute;
    top: 20px;
    right: 20px;

    padding: 8px 12px;
    border: none;
    border-radius: 50%;

    background: var(--secondary-color);
    color: white;
    cursor: pointer;

    font-size: 18px;
    transition: 0.3s;
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;
}

#darkModeToggle:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

/* ===== NAVIGATION ===== */
nav a {
    color: var(--white);
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

nav a:hover {
    color: var(--secondary-color);
}

/* ===== LAYOUT ===== */
.container {
    width: 90%;
    max-width: 1000px; /* added for better readability on large screens */
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

section {
    margin-bottom: 60px;
}

h2 {
    color: var(--primary-color);
}

.hero {
    text-align: center;
    padding: 60px 20px;
}

/* ===== PROJECT GRID ===== */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ===== PROJECT CARD ===== */
.project {
    background: var(--card-background);
    padding: 15px;
    border-radius: 8px;
    border-left: none;
    border-top: 8px solid var(--secondary-color);
    box-shadow: var(--shadow);
    transition: 0.3s; /* moved here for smoother animation */
}

.project h3 {
    color: var(--primary-color);
}

.project:hover {
    transform: translateY(-8px) scale(1.01);
    cursor: pointer;
}

/* ===== LINKS ===== */
a {
    color: var(--secondary-color);
    transition: 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 10px 0;
}