/* Reset and base styles */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    font-weight: 300;
}

 :root {
    --bg-light: #ffffff;
    --bg-dark: #121212;
    --text-light: #1a1a1a;
    --text-dark: #f0f0f0;
    --accent: #007bff;
    --accent-dark: #0056b3;
    --card-bg-light: #f9f9f9;
    --card-bg-dark: #1e1e1e;
    --link-hover: #0056b3;
}


/* Theme colors */

[data-theme='light'] {
    background-color: var(--bg-light);
    color: var(--text-light);
}

[data-theme='dark'] {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}


/* Container */

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 2rem 0;
}


/* Header */

header {
    background-color: var(--accent);
    color: white;
    padding: 1.25rem 0;
    animation: slideDown 0.8s ease-out;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-top h1 {
    font-weight: 600;
    font-size: 1.8rem;
    margin: 0;
}

.header-top div {
    display: flex;
    align-items: center;
    gap: 1rem;
}


/* Hamburger menu */

.hamburger {
    display: none;
    font-size: 1.7rem;
    cursor: pointer;
    user-select: none;
}


/* Dark mode toggle switch */

.toggle-wrapper {
    margin-top: 0.3rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: background-color 0.4s ease;
    border-radius: 24px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider::before {
    transform: translateX(26px);
}


/* Navigation */

nav.mobile-nav {
    display: none;
    background-color: var(--accent);
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.2);
}

nav.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

nav.mobile-nav ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

nav.mobile-nav ul li:last-child {
    border-bottom: none;
}

nav.mobile-nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

nav.mobile-nav ul li a:hover,
nav.mobile-nav ul li a:focus {
    background-color: var(--accent-dark);
    outline: none;
}


/* Profile Image */

.profile-pic {
    max-width: 160px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 8px rgb(0 0 0 / 0.15);
    animation: fadeIn 1.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Section headings */

h2 {
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}


/* About Section */

.about p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.8;
}


/* Skills & Projects Grid */

.skill-grid,
.project-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-top: 1rem;
}


/* Individual Skill & Project Card */

.skill,
.project-card {
    background-color: var(--card-bg-light);
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: 500;
    color: var(--text-light);
}

[data-theme='dark'] .skill,
[data-theme='dark'] .project-card {
    background-color: var(--card-bg-dark);
    color: var(--text-dark);
}

.skill:hover,
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgb(0 0 0 / 0.15);
}


/* Project Card Details */

.project-card h3 {
    margin-top: 0;
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: inherit;
}

.project-card a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-card a:hover,
.project-card a:focus {
    color: var(--link-hover);
    outline: none;
}


/* Interests Section */

.interests ul {
    list-style-type: disc;
    max-width: 600px;
    margin: 0 auto;
    padding-left: 1.5rem;
    font-weight: 400;
    font-size: 1.1rem;
    color: inherit;
}

.interests ul li {
    margin-bottom: 0.6rem;
    line-height: 1.5;
}


/* Contact Section */

.contact p {
    font-size: 1.1rem;
    text-align: center;
    margin: 0.4rem 0;
}

.contact a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact a:hover,
.contact a:focus {
    color: var(--link-hover);
    outline: none;
}


/* Footer */

footer {
    background-color: var(--accent);
    color: white;
    text-align: center;
    padding: 1.75rem 0;
    font-weight: 400;
    font-size: 1rem;
    margin-top: 2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}


/* Responsive: Hamburger menu and nav */

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    nav.mobile-nav {
        display: none;
        /* Hidden by default */
    }
    nav.mobile-nav.active {
        display: block;
    }
}


/* Utility focus states */

a:focus,
button:focus,
input:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}