body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    background: linear-gradient(135deg, #000000 0%, hsl(115, 100%, 40%) 100%);
    background-attachment: fixed; /* Keeps the background from moving if you scroll */
}
.card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 400px;
    text-align: center;
    animation: fadeIn 1s ease-out;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #ddd;
    margin-bottom: 1rem;
    object-fit: cover;
}
h1 {
    margin: 0;
    color: #2c3e50;
}
p {
    color: #7f8c8d;
    margin: 1rem 0;
}
.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex; /* shrink to content, avoids trailing space */
    align-items: center;
    text-align: center;
}

.social-links li {
    display: inline-flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

/* Use a border on subsequent items instead of a ::before pseudo-element
   This keeps spacing tight and avoids extra trailing space */
.social-links li + li {
    padding-left: 6px;
    border-left: 1px solid rgba(0,0,0,0.08);
}

.social-links a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    margin: 0; /* remove anchor margin to avoid double spacing */
    padding: 0 4px; /* tiny space on each side of the link text */
    display: inline-block; /* Required for the transform to work well */
    transition: transform 0.3s ease, color 0.3s ease; /* This makes the change smooth */
}

.social-links a:hover {
    color: #9b59b6; /* Changes color to purple on hover */
    transform: scale(1.2); /* Makes the link 20% larger */
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px); /* Starts 20 pixels lower */
    }
    to {
        opacity: 1;
        transform: translateY(0); /* Ends in its natural position */
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 480px) {
    .card {
        width: 90%; /* Let the card take up most of the screen width */
        padding: 1.5rem; /* Shrink padding slightly to save space */
    }

    .social-links {
        display: flex;
        flex-direction: column; /* Stack links vertically instead of side-by-side */
        gap: 15px; /* Add space between the stacked links */
        align-items: center; /* center items when stacked */
    }

    h1 {
        font-size: 1.5rem; /* Make the text a bit smaller so it doesn't wrap weirdly */
    }
}
.nav-menu {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 10px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    margin: 0 15px;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 1;
}
/* Make the projects card wider than the home card */
.projects-page-card {
    max-width: 600px;
}

/* The Grid Container */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

/* Individual Project Items */
.project-item {
    background: rgba(0, 0, 0, 0.03); /* Subtle contrast */
    padding: 1.5rem;
    border-radius: 12px;
    text-align: left;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-item:hover {
    transform: translateY(-5px);
    background: rgba(52, 152, 219, 0.1);
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.project-item h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.project-item p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.project-item a {
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--link-color);
    font-weight: bold;
}

/* Mobile tweak */
@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Stack on small screens */
    }
}

/* Theme variables and overrides (light by default, dark via data-theme="dark") */
:root {
    --bg-gradient: linear-gradient(135deg, #000000 0%, hsl(115, 100%, 40%) 100%);
    --card-bg: #ffffff;
    --text-color: #333333;
    --muted-color: #7f8c8d;
    --link-color: #3498db;
    --nav-border: rgba(0,0,0,0.1);
    --separator-color: rgba(0,0,0,0.08);
    --card-shadow: rgba(0,0,0,0.1);
    --card-hover-shadow: rgba(0,0,0,0.3);
    --project-item-bg: rgba(0, 0, 0, 0.03);
    --project-item-border: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-gradient: linear-gradient(135deg, #000000 0%, #083f2a 100%);
    --card-bg: #0f1720;
    --text-color: #e6eef6;
    --muted-color: #9aa6ad;
    --link-color: #7dd3fc;
    --nav-border: rgba(255,255,255,0.08);
    --separator-color: rgba(255,255,255,0.06);
    --card-shadow: rgba(0,0,0,0.6);
    --card-hover-shadow: rgba(0,0,0,0.7);
    --project-item-bg: rgba(255,255,255,0.02);
    --project-item-border: rgba(255,255,255,0.04);
}

/* Variable-driven overrides to existing rules */
body {
    color: var(--text-color);
    background: var(--bg-gradient);
}

.card {
    background: var(--card-bg);
    box-shadow: 0 10px 25px var(--card-shadow);
}

.card:hover {
    box-shadow: 0 15px 35px var(--card-hover-shadow);
}

h1 { color: var(--text-color); }
p { color: var(--muted-color); }

.social-links li + li { border-left: 1px solid var(--separator-color); }
.social-links a { color: var(--link-color); }
.nav-menu { border-bottom: 1px solid var(--nav-border); }

.project-item { background: var(--project-item-bg); border: 1px solid var(--project-item-border); }

/* Theme toggle button styling */
.theme-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    color: inherit;
    padding: 0 6px;
}

/* Smooth transitions for theme changes */
/* Transition properties chosen to cover background, color, borders and shadows */
body,
.card,
.nav-menu,
.social-links a,
.project-item,
.project-item a,
.projects-grid {
    transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Slight transition for the theme button to feel responsive */
.theme-btn {
    transition: transform 0.18s ease, opacity 0.18s ease;
}