/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.6;
    transition: background 0.4s, color 0.4s;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: auto;
    padding: 20px 0;
}

/* Header */
header {
    background-color: #0f172a;
    color: white;
    padding: 40px 0;
    text-align: center;
    position: relative;
}

/* Dark/Light Toggle Button */
#theme-toggle {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Profile Picture */
.profile-pic {
    display: block;
    margin: 0 auto 20px;
    width: 180px;
    height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 4px solid transparent;
    background: linear-gradient(135deg, #fbbf24);
    padding: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* Headings */
h1, h2 {
    color: #0f172a;
    transition: color 0.3s ease;
}

h2 {
    margin-bottom: 10px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 5px;
}

/* Skills Section */
.skills {
    margin-top: 10px;
}

.skill {
    margin-bottom: 10px;
}

.bar {
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    height: 10px;
}

.fill {
    background: #38bdf8;
    height: 100%;
    width: 0;
    transition: width 1.5s ease;
}

/* Project Cards */
.project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    flex: 1 1 calc(33% - 20px);
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #38bdf8;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 30px rgba(56, 189, 248, 0.25);
}

.card a {
    display: inline-block;
    margin-top: 10px;
    color: white;
    background-color: #38bdf8;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.card a:hover {
    background-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Resume Button */
.resume-btn {
    display: inline-block;
    background-color: #fbbf24;
    color: #0f172a;
    padding: 12px 24px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.resume-btn:hover {
    background-color: #f59e0b;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Contact Links */
#contact a {
    color: #38bdf8;
    font-weight: 500;
}

#contact a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #0f172a;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
    font-size: 14px;
    color: #f1f5f9;
}

/* Fade-in Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* ================= DARK MODE ================= */
body.dark {
    background-color: #0f172a;
    color: #f1f5f9;
}

body.dark header {
    background-color: #1e293b;
}

body.dark footer {
    background-color: #1e293b;
}

/* Headings in Dark Mode */
body.dark h1, 
body.dark h2 {
    color: #38bdf8; /* Bright accent in dark mode */
    border-bottom-color: #38bdf8;
}

/* Card in Dark Mode */
body.dark .card {
    background-color: #1e293b;
    color: #f1f5f9;
}

body.dark .bar {
    background: #334155;
}

body.dark .fill {
    background: #60a5fa;
}

/* Profile Pic in Dark Mode */
body.dark .profile-pic {
    background: linear-gradient(135deg, #60a5fa, #facc15);
    box-shadow: 0 6px 20px rgba(255,255,255,0.1);
}
/* Header text color fix for light mode */
header h1, 
header p {
    color: white;
}

/* Dark mode header text color stays white */
body.dark header h1, 
body.dark header p {
    color: white;
}
