/* =========================================================
   Pablo Lemos — personal site
   Minimal, modern, dependency-free.
   ========================================================= */

:root {
    --bg: #faf8f4;
    --bg-alt: #f1ede4;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-muted: #5a5a5a;
    --border: rgba(0, 0, 0, 0.08);
    --accent: #0f766e;          /* deep teal */
    --accent-dark: #115e59;
    --accent-soft: rgba(15, 118, 110, 0.08);
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.06);
    --container: 1100px;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
}

/* -------- Reset / base -------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(3rem, 8vw, 5.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* -------- Header / nav -------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 18px 0;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
    background: rgba(250, 248, 244, 0.88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

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

.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}
.site-header.scrolled .brand { color: var(--text); }
.brand:hover { color: var(--accent); text-decoration: none; }

.site-header nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    padding: 0;
    margin: 0;
}

.site-header nav a {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.site-header.scrolled nav a { color: var(--text); text-shadow: none; }
.site-header nav a:hover { color: var(--accent); text-decoration: none; }
.site-header nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}
.site-header nav a:hover::after { width: 100%; }

/* -------- Hero -------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 140px 0 100px;
    color: #fff;
    background: #05070d;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        /* Darken center a touch for text legibility, keep edges vivid */
        radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.55) 100%),
        /* Bottom fade to blend into the next section */
        linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(250,248,244,0.0) 85%, var(--bg) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.hero h1 {
    margin: 0 0 0.3em;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.lede {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 640px;
    margin: 0 auto 36px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); border-color: #fff; color: #fff; }

.scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.85;
    animation: bounce 2.2s ease-in-out infinite;
}
.scroll-cue:hover { color: #fff; opacity: 1; }

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 6px); }
}
@media (prefers-reduced-motion: reduce) {
    .scroll-cue { animation: none; }
}

/* -------- Sections -------- */
.section {
    padding: clamp(72px, 10vw, 120px) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-heading {
    position: relative;
    margin-bottom: 24px;
}
.section-heading::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 14px;
}

.section-title {
    text-align: center;
    margin-bottom: 56px;
}
.section-title .section-heading { display: inline-block; }
.section-title .section-heading::after { margin: 14px auto 0; }
.section-title p {
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
}

/* -------- About -------- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.about-copy p { color: var(--text-muted); }
.about-copy p strong { color: var(--text); font-weight: 600; }

@media (max-width: 720px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-photo {
        max-width: 260px;
        margin: 0 auto;
    }
}

/* -------- Project cards -------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.project-card::before {
    /* Subtle top accent bar */
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #5b21b6);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 118, 110, 0.3);
}
.project-card:hover::before { opacity: 1; }

.project-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-dark);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 18px;
    align-self: flex-start;
}

.project-card h3 {
    margin-bottom: 4px;
    font-size: 1.4rem;
}

.project-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 14px;
}

.project-card p:not(.project-sub) {
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.98rem;
}

.card-link {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
    align-self: flex-start;
}
.card-link:hover { color: var(--accent-dark); }

/* -------- Quicklinks row (under projects) -------- */
.quicklinks {
    margin-top: 56px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.quicklinks a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.quicklinks a:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
    background: var(--accent-soft);
    text-decoration: none;
    transform: translateY(-1px);
}

/* -------- Contact -------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.contact p { color: var(--text-muted); }

.email-line a {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}
.email-line a:hover { color: var(--accent); text-decoration: none; }

.socials {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.socials a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text);
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.socials a:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
    text-decoration: none;
}
.socials svg { flex-shrink: 0; }

@media (max-width: 720px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* -------- Footer -------- */
.footer {
    padding: 32px 0 48px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

/* -------- Small screens nav -------- */
@media (max-width: 520px) {
    .site-header nav ul { gap: 18px; }
    .site-header nav a { font-size: 0.9rem; }
}

/* -------- Focus ring (a11y) -------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}
