/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #fafbfc;
    --bg-alt: #f0f2f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fb;
    --accent: #1e3a5f;
    --accent-dim: rgba(30, 58, 95, 0.08);
    --accent-glow: rgba(30, 58, 95, 0.15);
    --green: #2d6a4f;
    --green-dim: rgba(45, 106, 79, 0.08);
    --text: #1a1a2e;
    --text-dim: #4b5563;
    --text-muted: #9ca3af;
    --border: rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 251, 252, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.03);
}

.nav-cta {
    background: var(--accent-dim) !important;
    color: var(--accent) !important;
    font-weight: 500;
}

.nav-cta:hover {
    background: rgba(30, 58, 95, 0.15) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(30, 58, 95, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 640px;
    text-align: center;
    z-index: 1;
}

.hero-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: 500;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 12px;
    color: var(--text);
}

.hero-title {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    opacity: 0.15;
    pointer-events: none;
}

.hero-svg {
    width: 100%;
    height: 100%;
}

@keyframes pulse {
    0%, 100% { r: 8; opacity: 0.4; }
    50% { r: 20; opacity: 0; }
}

.pulse {
    animation: pulse 3s ease-in-out infinite;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: #2a4f7a;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.25);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.02);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

/* ===== STATS BAR ===== */
.stats-bar {
    padding: 48px 24px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--green);
    letter-spacing: -1px;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ===== ADVANTAGES ===== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.advantage {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: var(--radius);
    transition: var(--transition);
}

.advantage:hover {
    border-color: rgba(30, 58, 95, 0.2);
    border-left-color: var(--green);
}

.advantage-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--green-dim);
    color: var(--green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.advantage h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.advantage p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ===== PROCESS ===== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.process-step {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: 3px solid var(--green);
    border-radius: var(--radius);
    position: relative;
}

.process-number {
    width: 48px;
    height: 48px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 auto 16px;
}

.process-step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.process-step p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ===== CONTACT CTA ===== */
.contact-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 24px;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    text-align: center;
}

.section-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 60px;
}

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: var(--transition);
}

.service-card {
    border-top: 3px solid var(--accent);
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(30, 58, 95, 0.2);
    border-top-color: var(--accent);
    transform: translateY(-2px);
}

.service-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 16px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.service-tags li {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 6px;
    font-weight: 500;
}

/* ===== PROJECTS ===== */
.projects-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.projects-category:first-of-type {
    margin-top: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(30, 58, 95, 0.2);
    transform: translateY(-2px);
}

.project-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
    margin-bottom: 16px;
    opacity: 0.8;
}

.project-icon svg {
    width: 100%;
    height: 100%;
}

.project-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 16px;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.project-tags li {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-muted);
    border-radius: 5px;
    border: 1px solid var(--border);
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.skill-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.skill-group h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    font-size: 0.8rem;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    transition: var(--transition);
}

.skill-tags span:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* ===== TIMELINE ===== */
.timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent) 0%, var(--border) 100%);
}

.timeline-item {
    padding-left: 40px;
    padding-bottom: 40px;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 6px;
    width: 9px;
    height: 9px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(45, 106, 79, 0.3);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-content p {
    font-size: 0.875rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

a.contact-item:hover {
    border-color: rgba(30, 58, 95, 0.2);
    background: var(--bg-card-hover);
}

.contact-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--accent);
}

.contact-item span {
    font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(250, 251, 252, 0.97);
        backdrop-filter: blur(20px);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 12px 16px;
    }

    .services-grid,
    .projects-grid,
    .advantages-grid,
    .process-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-cta {
        flex-direction: column;
        align-items: center;
    }

    .contact-cta .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .section {
        padding: 72px 20px;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* ===== SELECTION ===== */
::selection {
    background: var(--accent);
    color: #fff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}
