/* ---------------- Variables ---------------- */
:root {
    --primary: #396699;
    --secondary: #50547e;
    --bg: #fafafa;
    --text-dark: #333;
    --text-light: #777;
    --max-w: 1200px;
}

/* ---------------- Global ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg);
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------------- Header / Hero ---------------- */
header#hero {
    position: relative;
    min-height: 90vh;
    background: url('../img/hero.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(5px);
}
.logo a { font-size: 1.5rem; font-weight: 600; }
.menu-toggle {
    display: none;
    font-size: 1.75rem;
    background: none;
    border: none;
    cursor: pointer;
}
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a:hover { color: var(--primary); }

.hero-content {
    margin: auto 2rem;
    text-align: left;
    color: #fff;
    /* max-width: var(--max-w); */
}
.hero-content h1 { font-size: clamp(3rem, 7vw, 4.5rem); }
.hero-content p { font-size: 1.25rem; margin: .75rem 0 2rem; }

.btn {
    display: inline-block;
    padding: .75rem 1.5rem;
    border-radius: 30px;
    transition: background .3s, transform .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn:hover { transform: translateY(-3px); }

/* ---------------- Sections ---------------- */
.section {
    padding: 4rem 2rem;
    max-width: var(--max-w);
    margin: auto;
}
h2 { text-align: left; font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 1.5rem; }
p { text-align: left; max-width: 700px; }

/* ---------------- Portfolio Grid ---------------- */
.section--grid .grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,.05);
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,.1); }
.card h3 { margin: .75rem; font-size: 1.25rem; }
.card p { margin: .5rem 1rem 1rem; color: var(--text-light); }

/* ---------------- Contact Form ---------------- */
.contact-form {
    max-width: 600px;
}
.contact-form label { display: block; margin-bottom: .25rem; font-weight: 500; }
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.contact-form button { display: block; width: 100%; }

/* ---------------- Footer ---------------- */
footer {
    text-align: left;
    padding: 2rem 0;
    background: #222;
    color: #fff;
}

/* ---------------- Back to Top ---------------- */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background:   #396699;
    color: #fff;
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
}
#back-to-top.show { display:flex; }

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
    .menu-toggle { display:block; }
    .nav-links { flex-direction: column; }
}
