:root {
    --bg: #0b1220;
    --bg-soft: #101b2d;
    --panel: #121f33;
    --panel-strong: #182845;
    --card: rgba(18, 31, 51, 0.9);
    --card-alt: rgba(255, 255, 255, 0.04);
    --text: #e5edf9;
    --muted: #9aaac4;
    --primary: #5eead4;
    --primary-strong: #2dd4bf;
    --secondary: #60a5fa;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    --badge: rgba(94, 234, 212, 0.12);
    --cta: #111827;
}

body.light-mode {
    --bg: #eef4ff;
    --bg-soft: #f8fbff;
    --panel: #ffffff;
    --panel-strong: #edf6ff;
    --card: #fdfdfd;
    --card-alt: #f1f5f9;
    --text: #10213d;
    --muted: #50607d;
    --primary: #0f766e;
    --primary-strong: #0ea5a4;
    --secondary: #2563eb;
    --border: rgba(16, 33, 61, 0.08);
    --shadow: 0 22px 40px rgba(17, 24, 39, 0.08);
    --badge: rgba(15, 118, 110, 0.12);
    --cta: #0f172a;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    color: var(--text);
    transition: background 0.25s ease, color 0.25s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1150px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(11, 18, 32, 0.72);
    border-bottom: 1px solid var(--border);
}

body.light-mode .site-header {
    background: rgba(238, 244, 255, 0.8);
}

body.light-mode .btn-primary {
    background: linear-gradient(135deg, #14b8a6 0%, #3b82f6 100%);
    color: #f8fbff;
    box-shadow: 0 18px 35px rgba(20, 184, 166, 0.22);
}

body.light-mode .tech-icon:not(.tech-image-wrap) {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(59, 130, 246, 0.18));
    color: #10213d;
    border: 1px solid rgba(59, 130, 246, 0.18);
}

body.light-mode .tech-icon.tech-image-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
}

body.light-mode .tech-image-wrap img {
    background: transparent;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 1rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand span {
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.nav a {
    position: relative;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: var(--text);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.hero {
    padding: 5rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    align-items: center;
    gap: 2rem;
}

.eyebrow,
.section-tag {
    display: inline-block;
    margin: 0 0 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin-top: .7rem;
    color: var(--muted);
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    font-weight: 600;
}

.lead {
    margin: 1.4rem 0 0;
    max-width: 620px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #031326;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.hero-stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0;
    margin: 2rem 0 0;
}

.hero-stats li {
    min-width: 120px;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}

.hero-stats strong {
    display: block;
    font-size: 1.5rem;
}

.hero-stats span {
    color: var(--muted);
    font-size: 0.8rem;
}

.hero-card {
    background: linear-gradient(180deg, rgba(18, 31, 51, 0.9) 0%, rgba(11, 18, 32, 0.95) 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

body.light-mode .hero-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
}

.avatar-box {
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.2), rgba(96, 165, 250, 0.15));
    border-radius: 22px;
    min-height: 260px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #02141d;
    font-size: 2rem;
    font-weight: 800;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-top: 1.2rem;
    color: var(--muted);
}

.profile-meta strong {
    color: var(--text);
    font-size: 1.1rem;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.1rem;
}

.mini-links a {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .5rem .8rem;
    color: var(--text);
    font-size: .85rem;
}

.section {
    padding: 5rem 0;
}

.alt-bg {
    background: rgba(255, 255, 255, 0.02);
}

.two-col {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 2rem;
    align-items: start;
}

.two-col h3,
.section-head h3,
.contact-box h3 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -0.05em;
}

.two-col p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
    font-size: 1.05rem;
}

.section-head {
    margin-bottom: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.project-image {
    height: 230px;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.14), rgba(96, 165, 250, 0.18));
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
}

.project-body {
    padding: 1.25rem;
}

.project-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: .35rem .6rem;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--badge);
    border: 1px solid rgba(94, 234, 212, 0.18);
    color: var(--primary);
    text-transform: capitalize;
}

.badge.featured {
    background: rgba(96, 165, 250, 0.12);
    color: var(--secondary);
    border-color: rgba(96, 165, 250, 0.2);
}

.project-card h4 {
    margin: 0 0 .75rem;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
}

.project-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.tech-list span {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .74rem;
    color: var(--muted);
}

.project-actions {
    display: flex;
    gap: .8rem;
    margin-top: 1.2rem;
}

.project-actions a {
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 16px;
    color: var(--text);
    font-weight: 600;
}

.tech-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #061521;
    font-size: .8rem;
    font-weight: 800;
    overflow: hidden;
}

.tech-icon.tech-image-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
}

.tech-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.contact-section {
    padding-bottom: 5rem;
}

.contact-box {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: 2rem;
    padding: 2rem;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(17, 31, 44, 0.92), rgba(19, 30, 48, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 26px 60px rgba(2, 8, 20, 0.28);
}

.contact-copy {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: .5rem;
}

.contact-info a {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem 1rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.contact-form-wrap {
    background: rgba(15, 23, 37, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    padding: 1.2rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.quick-request-form {
    display: grid;
    gap: .9rem;
}

.form-row {
    display: grid;
    gap: .45rem;
}

.form-row label {
    font-size: .8rem;
    font-weight: 700;
    color: #dfeafc;
    letter-spacing: .02em;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(13, 23, 36, 0.9);
    color: #edf4ff;
    border-radius: 12px;
    padding: .8rem .9rem;
    font: inherit;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.25);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: rgba(223, 234, 252, 0.72);
}

.form-row select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(223,234,252,0.9) 50%), linear-gradient(135deg, rgba(223,234,252,0.9) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #edf4ff;
    padding-right: 2.5rem;
}

.form-row select option {
    background: #101c2d;
    color: #edf4ff;
}

.form-row textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-whatsapp {
    width: 100%;
    margin-top: .4rem;
    border: 1px solid rgba(94, 234, 212, 0.35);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #031326;
    font-weight: 800;
}

body.light-mode .contact-box {
    background: linear-gradient(135deg, rgba(224, 240, 255, 0.96), rgba(237, 246, 255, 0.96));
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

body.light-mode .contact-info a {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 32, 61, 0.08);
    color: #10213d;
}

body.light-mode .contact-form-wrap {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.04);
}

body.light-mode .form-row label {
    color: #1e2d42;
}

body.light-mode .form-row input,
body.light-mode .form-row select,
body.light-mode .form-row textarea {
    background: rgba(255, 255, 255, 0.95);
    color: #10213d;
    border-color: rgba(15, 32, 61, 0.14);
    box-shadow: inset 0 1px 2px rgba(148, 163, 184, 0.12);
}

body.light-mode .form-row input::placeholder,
body.light-mode .form-row textarea::placeholder {
    color: rgba(30, 45, 66, 0.7);
}

body.light-mode .form-row select {
    background-color: #ffffff;
    background-image: linear-gradient(45deg, transparent 50%, rgba(16, 33, 61, 0.8) 50%), linear-gradient(135deg, rgba(16, 33, 61, 0.8) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #10213d;
    border-color: rgba(15, 32, 61, 0.14);
}

body.light-mode .form-row select option {
    background: #ffffff;
    color: #10213d;
}

body.light-mode .btn-whatsapp {
    background: linear-gradient(135deg, #14b8a6, #3b82f6);
    color: #ffffff;
    border-color: rgba(59, 130, 246, 0.2);
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0 2rem;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: .9rem;
}

.empty-state {
    width: 100%;
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 820px) {
    .hero-grid,
    .two-col,
    .contact-box {
        grid-template-columns: 1fr;
        display: grid;
    }

    .nav {
        display: none;
    }

    .site-header {
        position: static;
    }

    .hero {
        padding-top: 3rem;
    }

    .footer-wrap {
        flex-direction: column;
    }
}
