/* RESET & BASE STYLES - Remove browser defaults and set foundation */
* {
    margin: 0;  /* Remove default spacing */
    padding: 0;  /* Remove default padding */
    box-sizing: border-box;  /* Makes width/height calculations easier */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;  /* Clean, modern font */
    line-height: 1.6;  /* Space between lines of text */
    color: #333;  /* Dark gray text */
    background-color: #f4f4f4;  /* Light gray background */
}

/* NAVIGATION BAR - Sticky header at top */
header {
    background-color: #2c3e50;  /* Dark blue-gray */
    color: white;
    padding: 1rem 0;  /* 1rem = 16px, padding top/bottom */
    position: sticky;  /* Stays at top when scrolling */
    top: 0;  /* Stick to the very top */
    z-index: 100;  /* Appears above other content */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);  /* Subtle shadow for depth */
}

nav {
    max-width: 1200px;  /* Don't stretch too wide on large screens */
    margin: 0 auto;  /* Center the nav horizontally */
    padding: 0 2rem;  /* Spacing on left/right */
    display: flex;  /* Flexbox layout */
    justify-content: space-between;  /* Push h1 left, ul right */
    align-items: center;  /* Vertically center items */
}

nav h1 {
    font-size: 1.5rem;
}

nav ul {
    list-style: none;  /* Remove bullet points */
    display: flex;  /* Lay out items horizontally */
    gap: 2rem;  /* Space between nav items */
}

nav a {
    color: white;
    text-decoration: none;  /* Remove underline */
    transition: color 0.3s;  /* Smooth color change on hover */
}

nav a:hover {
    color: #3498db;  /* Light blue on hover */
}

/* HERO SECTION - Big intro banner */
#hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);  /* Purple gradient */
    color: white;
    padding: 8rem 2rem;  /* Large vertical padding */
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;  /* Large heading */
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* BUTTONS - Reusable button styles */
.btn {
    display: inline-block;  /* Allows padding to work properly */
    background-color: white;
    color: #667eea;
    padding: 0.8rem 2rem;
    border-radius: 5px;  /* Rounded corners */
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;  /* Smooth animation */
}

.btn:hover {
    transform: translateY(-2px);  /* Lift up slightly */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);  /* Add shadow on hover */
}

.btn-small {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-small:hover {
    background-color: #2980b9;  /* Darker blue on hover */
}

/* SECTIONS - General styles for all content sections */
section {
    max-width: 1200px;
    margin: 4rem auto;  /* Vertical spacing between sections, centered horizontally */
    padding: 0 2rem;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
}

/* ABOUT SECTION */
#about p {
    font-size: 1.2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;  /* Center the paragraph */
    color: #555;
}

/* SKILLS SECTION - Grid layout for skill cards */
.skills-grid {
    display: grid;  /* CSS Grid layout */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));  /* Responsive columns */
    gap: 2rem;  /* Space between cards */
    margin-top: 2rem;
}

.skill-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;  /* Rounded corners */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);  /* Subtle shadow */
    text-align: center;
    transition: transform 0.3s;  /* Smooth animation */
}

.skill-card:hover {
    transform: translateY(-5px);  /* Lift card on hover */
}

.skill-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

/* PROJECTS SECTION */
.project-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.project-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.project-card p {
    color: #555;
    margin-bottom: 1rem;
}

/* CONTACT SECTION */
#contact {
    text-align: center;
    background-color: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

#contact p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

#contact a {
    color: #3498db;
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* FOOTER */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}