/* ---------------- GENERAL ---------------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

#scrollTopBtn:hover {
    background-color: #0f2027;
    transform: translateY(-2px);
}

/* picture */
.project-img {
    width: 250px;   /* set desired width */
    height: 250px;   /* keeps aspect ratio */
    border-radius: 15px; /* optional */
    display: block;
    margin: 0 auto; /* centers the image */
}


#dark-mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

/* ---------------- HEADER ---------------- */
.top-header {
    background-color: #2c5364;
    text-align: right;
    padding: 10px 30px;
}

.top-header .social-icons a {
    color: #fff;
    font-size: 1.4rem;
    margin-left: 15px;
    text-decoration: none;
    transition: 0.3s;
}
.top-header .social-icons a:hover {
    color: #00acee;
}

/* Hero Section */
header.hero {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: white;
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

/* ---------------- NAV ---------------- */
nav {
    background-color: #2c5364;
    text-align: center;
    padding: 12px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
nav ul li {
    display: inline-block;
    margin: 0 25px;
}
nav ul li a {
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    transition: 0.3s;
}
nav ul li a:hover {
    background-color: #ffffff;
    color: #2c5364;
    border-radius: 5px;
}

/* ---------------- SECTIONS ---------------- */
section {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid #2c5364;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    animation: fadeIn 1s ease-in;
}
section h2 {
    color: #2c5364;
    font-size: 24px;
    border-bottom: 2px solid #2c5364;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* ---------------- PROJECTS ---------------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* 🔹 smaller cards */
    gap: 15px;
    padding-top: 10px;
}
.project-card {
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card i {
    font-size: 28px;
    color: #2c5364;
    margin-bottom: 10px;
}
.project-card h3 {
    font-size: 18px;
    color: #2c5364;
    margin-bottom: 8px;
}
.project-card p {
    font-size: 14px;
    color: #555;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #2c5364;
}

/* ---------------- CONTACT ---------------- */
#contact p {
    margin: 10px 0;
}
a {
    color: #0f4c75;
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
}

/* ---------------- FOOTER ---------------- */
footer {
    background-color: #1b262c;
    color: #cccccc;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    font-size: 14px;
}

/* Scroll-to-Top Button */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2c5364;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- DARK MODE ---------------- */
body.dark-mode {
    background-color: #121212;
    color: #f1f1f1;
}
body.dark-mode section {
    background-color: #1e1e1e;
    border-color: #444;
}
body.dark-mode nav {
    background-color: #111;
}
body.dark-mode nav ul li a {
    color: #ddd;
}
body.dark-mode nav ul li a:hover {
    background-color: #333;
    color: #fff;
}
body.dark-mode footer {
    background-color: #000;
    color: #aaa;
}
body.dark-mode .project-card {
    background: #1c1c1c;
    border-color: #444;
    box-shadow: 0 4px 6px rgba(255,255,255,0.05);
}
