/* =========================================
   1. BASE RESET AND TYPOGRAPHY
   ========================================= */
:root {
    --color-primary: #007bff;
    --color-secondary: #6c757d;
    --color-background: #f8f9fa;
    --color-text: #343a40;
    --spacing-unit: 1rem; /* Base unit for consistent spacing */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: #fff; /* Pure white background for speed */
}

/* Utility container to constrain content width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2);
}


/* =========================================
   2. COMPONENTS (BUTTONS, HEADER)
   ========================================= */

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-weight: bold;
}

.button--primary {
    background-color: var(--color-primary);
    color: white;
    border: 1px solid var(--color-primary);
}

.button--primary:hover {
    background-color: #0056b3; /* Darker shade */
}

.button--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

/* Header Styling (BEM) */
.header {
    padding: var(--spacing-unit) 0;
    border-bottom: 1px solid #eee;
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--color-primary);
}

.header__nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-unit);
}

.header__nav a {
    text-decoration: none;
    color: var(--color-text);
    padding: 0.5rem 0;
    transition: color 0.1s ease;
}

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


/* =========================================
   3. SECTIONS AND LAYOUTS
   ========================================= */

.section {
    padding: calc(var(--spacing-unit) * 6) 0;
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section__description {
    color: var(--color-secondary);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

/* Hero Specific Styling */
.hero {
    padding: calc(var(--spacing-unit) * 10) 0;
    background-color: var(--color-background);
    text-align: center;
}

.hero__subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-unit);
}


/* Portfolio Grid */
.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 4);
}

.card {
    border: 1px solid #ddd;
    padding: var(--spacing-unit);
    text-align: left;
    transition: box-shadow 0.2s ease;
}

.card--project:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


/* Contact Form Styling */
.contact form {
    max-width: 600px;
    margin: var(--spacing-unit);
    text-align: left;
    padding: calc(var(--spacing-unit) * 4);
    border: 1px solid #eee;
    border-radius: 8px;
}

.form__group {
    margin-bottom: var(--spacing-unit);
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    resize: vertical; /* Allows user to resize vertically only */
}


/* Footer Styling */
.footer {
    background-color: var(--color-text);
    color: white;
    padding: calc(var(--spacing-unit) * 3) 0;
    font-size: 0.9rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    margin-left: var(--spacing-unit);
}
