:root {
    --ink: #10151f;
    --muted: #657082;
    --line: #dce3ec;
    --paper: #f7f9fc;
    --panel: #ffffff;
    --primary: #126d72;
    --primary-dark: #0d4e52;
    --accent: #d97925;
    --soft: #e9f6f5;
    --shadow: 0 20px 45px rgba(16, 21, 31, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}
a { color: inherit; text-decoration: none; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 22px;
    padding: 14px clamp(18px, 4vw, 58px);
    background: rgba(247, 249, 252, .9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}
.brand { font-weight: 800; }
nav { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
.actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel);
}
.lang-switch a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 12px;
}
.lang-switch img {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(16, 21, 31, .12);
}
.lang-switch .active { background: var(--primary); color: white; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.button.ghost {
    background: white;
    color: var(--primary-dark);
    border: 1px solid var(--line);
}

.hero {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
    padding: clamp(48px, 8vw, 110px) clamp(20px, 6vw, 88px);
    background:
        linear-gradient(115deg, rgba(18, 109, 114, .94), rgba(16, 21, 31, .9)),
        url("hero-background.jpg") center/cover;
    color: white;
}
.hero h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 92px);
    line-height: .95;
    letter-spacing: 0;
}
.hero h2 {
    margin: 18px 0;
    color: #f4c68e;
    font-size: clamp(22px, 3vw, 34px);
}
.hero p { max-width: 760px; font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-panel {
    padding: 28px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 8px;
    background: rgba(255,255,255,.13);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}
.hero-panel span, .hero-panel small { display: block; color: rgba(255,255,255,.8); }
.hero-panel strong { display: block; margin: 12px 0 8px; overflow-wrap: anywhere; font-size: 22px; }
.profile-photo {
    display: block;
    width: min(240px, 70vw);
    aspect-ratio: 1 / 1.16;
    object-fit: cover;
    object-position: center top;
    margin: 0 auto 22px;
    border: 4px solid rgba(255,255,255,.72);
    border-radius: 8px;
    box-shadow: 0 18px 35px rgba(0,0,0,.24);
}
.whatsapp-link,
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.social-link {
    margin-top: 10px;
}
.whatsapp-link img, .social-link img, .footer-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.section {
    padding: clamp(54px, 8vw, 96px) clamp(20px, 6vw, 88px);
}
.split {
    display: grid;
    grid-template-columns: minmax(220px, .42fr) minmax(0, .58fr);
    gap: clamp(24px, 5vw, 62px);
}
.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}
.section h2 {
    margin: 0 0 28px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
}
.skill-grid, .cards, .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.skill-card, .card, .project-card, .contact-form, .admin-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(16, 21, 31, .06);
}
.skill-card { padding: 18px; }
.skill-card div { display: flex; justify-content: space-between; gap: 14px; }
meter {
    width: 100%;
    height: 9px;
    margin-top: 14px;
    accent-color: var(--primary);
}
.timeline { display: grid; gap: 16px; max-width: 980px; }
.timeline-item {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
}
.timeline-item time { color: var(--primary-dark); font-weight: 800; }
.timeline-item h3, .card h3, .project-card h3 { margin: 0 0 8px; }
.timeline-item p, .project-card p, .contact p { color: var(--muted); line-height: 1.65; }
.card, .project-card { padding: 22px; }
.card span { color: var(--accent); font-weight: 800; }
.project-card a { color: var(--primary); font-weight: 800; }
.contact {
    display: grid;
    grid-template-columns: minmax(260px, .45fr) minmax(0, .55fr);
    gap: clamp(24px, 5vw, 64px);
    background: var(--soft);
}
.contact-form { display: grid; gap: 16px; padding: 24px; }
label { display: grid; gap: 8px; font-weight: 800; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
    color: var(--ink);
    background: white;
}
textarea { resize: vertical; }
.notice {
    padding: 12px;
    border-radius: 8px;
    background: #e5f6ea;
    color: #176234;
    font-weight: 800;
}
footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 28px clamp(20px, 6vw, 88px);
    background: var(--ink);
    color: white;
}
footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
}
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

.admin-body { background: #eef2f6; }
.admin-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    padding: 24px;
    background: #17202d;
    color: white;
}
.sidebar h1 { font-size: 22px; }
.sidebar a {
    display: block;
    padding: 11px 0;
    color: rgba(255,255,255,.78);
}
.admin-main { padding: 28px; }
.admin-panel { padding: 22px; margin-bottom: 20px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-grid .wide { grid-column: 1 / -1; }
.table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f4f7fa; }
.admin-photo-preview {
    width: 130px;
    aspect-ratio: 1 / 1.16;
    object-fit: cover;
    object-position: center top;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.login-card, .setup > div {
    width: min(460px, calc(100% - 32px));
    margin: 10vh auto;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .topbar, .hero, .split, .contact, .admin-layout { grid-template-columns: 1fr; }
    nav { display: none; }
    .actions { flex-wrap: wrap; }
    .hero { min-height: auto; }
    .timeline-item { grid-template-columns: 1fr; gap: 8px; }
    .admin-grid { grid-template-columns: 1fr; }
    footer { flex-direction: column; }
    .footer-links { justify-content: flex-start; }
}
