/* --- Global Styles --- */
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- Navigation --- */
nav {
    background: #2c3e50;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li { margin-right: 20px; }

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover { color: #3498db; }

.control-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
    transition: all 0.3s;
}

.control-btn:hover {
    background: white;
    color: #2c3e50;
}

/* --- Header & Profile Picture --- */
/* --- Header & Profile Picture --- */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 60px 20px;
    
    /* Flexbox Magic */
    display: flex;
    align-items: center; /* Centers items vertically */
    justify-content: center; /* Centers everything horizontally */
    gap: 40px; /* Adds space between photo and text */
}

.header-text {
    text-align: left; /* Aligns text to the left of its container */
}

header h1 {
    margin-top: 0; /* Removes default space above name */
    margin-bottom: 5px; /* Tucks the subtitle closer */
}

.profile-pic {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top; /* <-- THIS IS THE MAGIC FIX */
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* --- Main Layout & Cards --- */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

section { margin-bottom: 40px; }

h2 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    display: inline-block;
    padding-bottom: 5px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    transition: background-color 0.4s ease;
}

.border-left-blue { border-left: 5px solid #3498db; }
.text-center { text-align: center; }

ul { padding-left: 20px; }
li { margin-bottom: 10px; }

a.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

/* --- Skills Grid --- */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.skill-category {
    flex: 1 1 250px;
    margin-bottom: 0;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Dark Mode --- */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme .card { background-color: #1e1e1e; color: #e0e0e0; }
body.dark-theme h2 { color: #3498db; }
body.dark-theme header { background: linear-gradient(135deg, #1a252f, #2980b9); }
/* --- Certification Link Styles --- */


/* --- Mobile Responsive --- */
/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    nav { flex-direction: column; text-align: center; }
    nav ul { margin-bottom: 15px; flex-wrap: wrap; justify-content: center; }
    
    /* Reverts Header to Centered Column on Mobile */
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .header-text {
        text-align: center;
    }
    .profile-pic { width: 120px; height: 120px; }
}