/* -------------------------------------------------
   Global Styles
------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px base */
}

body {
    background-color: #000;
    color: #fff;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -------------------------------------------------
   Layout Helpers
------------------------------------------------- */
.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------------------------------------
   Header & Navigation
------------------------------------------------- */
header {
    background: transparent;
    padding: 1rem 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

nav a {
    color: #ff4d4d;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav a:hover,
nav a:focus {
    opacity: 0.8;
}

/* -------------------------------------------------
   Hero Section
------------------------------------------------- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    flex-grow: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

/* Button used in hero */
.btn {
    display: inline-block;
    background: #ff4d4d;
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn:hover,
.btn:focus {
    background: #e04444;
}

/* -------------------------------------------------
   Sections
------------------------------------------------- */
section {
    padding: 3rem 1rem;
}

section h2 {
    border-bottom: 2px solid #ff4d4d;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* -------------------------------------------------
   Skills List
------------------------------------------------- */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill {
    background: #ff4d4d;
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.95rem;
}

/* -------------------------------------------------
   Projects Grid
------------------------------------------------- */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s;
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-4px);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.project-card div {
    padding: 1rem;
    flex-grow: 1;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: #ff4d4d;
    font-size: 1.2rem;
}

/* -------------------------------------------------
   Footer
------------------------------------------------- */
footer {
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #222;
    padding: 1rem 0;
    margin-top: auto; /* pushes footer to bottom */
}

/* -------------------------------------------------
   Responsive Adjustments
------------------------------------------------- */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .projects {
        grid-template-columns: 1fr;
    }
}