/* 1. Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 2. Set base typography */
body {
    font-family: var(--font-body);
    font-size: var(--font-base);
    line-height: 1.6;
    color:black;
}

/* 3. Style headings */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
}
/* Task 3.2: Box Model Card Layout */
.profile-card {
    max-width: 500px;
    margin: 20px auto;
    padding: 15px;
    border: 2px solid forestgreen;
}
/* Task 3.3: Custom Properties & Selectors */
:root {
    --color-primary: forestgreen;
    --color-text: black;
    --color-background: honeydew;
}

/* Pseudo-class selection rule */
nav ul li a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
/* Task 3.4: Semantic Layout Elements */
header {
    background-color: var(--color-background);
    padding: 20px;
    border-bottom: 1px solid var(--color-primary);
}

nav ul {
    list-style-type: none;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}



/* Heading sizes */
h1 { font-size: var(--font-4xl); }
h2 { font-size: var(--font-3xl); }
h3 { font-size: var(--font-2xl); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Task 3.3: Typography system */
:root {
    --font-heading: "Poppins", sans-serif;
    --font-body: "Open Sans", sans-serif;

    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

small {
    font-size: var(--font-sm);
}

/* Task 3.4: Color scheme */
:root {
    --color-secondary: #e9a23b;
    --color-muted: #6b7280;
    --color-primary-light: #4caf50;
    --color-primary-dark: #145a14;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-primary-dark);
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-dark);
}

button {
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: var(--color-primary-dark);
}

small {
    color: var(--color-muted);
}

footer {
    border-top: 3px solid var(--color-secondary);
}

/* Task 4.3: Mobile-first responsive design */
img { max-width: 100%; height: auto; }

.site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}
.logo { font-weight: 700; font-size: var(--font-xl); text-decoration: none; }
.menu-toggle { display: none; }
.menu-button { font-size: 1.75rem; cursor: pointer; }
.site-header nav { display: none; width: 100%; }
.menu-toggle:checked ~ nav { display: block; }
.site-header nav ul { list-style: none; }
.site-header nav li a { display: block; padding: 10px 0; text-decoration: none; }

.projects-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.projects-grid section { border: 1px solid var(--color-muted); padding: 20px; }

/* Tablet */
@media (min-width: 768px) {
    .menu-button { display: none; }
    .site-header nav { display: block; width: auto; }
    .site-header nav ul { display: flex; gap: 20px; }
    .site-header nav li a { padding: 0; }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop */
@media (min-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Home page hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px; align-items: center; }

@media (min-width: 1024px) {
    .hero { grid-template-columns: 1fr 1fr; }
}

/* Task 4.4: Polish */
a, button, .projects-grid section {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.projects-grid section:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

a:focus, button:focus, .menu-button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

html { overflow-x: hidden; }

/* Mobile-friendly forms */
form { max-width: 480px; padding: 20px; }
form label { display: block; font-weight: 600; margin: 15px 0 5px; }
form input, form textarea, form select {
    width: 100%;
    padding: 12px;
    font-family: var(--font-body);
    font-size: var(--font-base);
    border: 2px solid var(--color-muted);
    border-radius: 4px;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
form input:focus, form textarea:focus, form select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.25);
}
form input:not(:placeholder-shown):invalid,
form textarea:not(:placeholder-shown):invalid {
    border-color: #d32f2f;
}
form input[type="submit"], form button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
form input[type="submit"]:hover, form button[type="submit"]:hover {
    background: var(--color-primary-dark);
}
form input[type="radio"], form input[type="checkbox"] { width: auto; }

main { padding: 20px; }
