:root {
    --bg: #0b1020;
    --bg-alt: #10182d;
    --card: rgba(15, 23, 42, 0.72);
    --card-strong: rgba(17, 24, 39, 0.9);
    --text: #e5eefb;
    --muted: #aab7d1;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #7c3aed;
    --accent-2: #22c55e;
    --accent-soft: rgba(124, 58, 237, 0.16);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 24px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family:
        Avenir,
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background:
        radial-gradient(
            circle at top left,
            rgba(124, 58, 237, 0.24),
            transparent 28%
        ),
        radial-gradient(
            circle at top right,
            rgba(34, 197, 94, 0.14),
            transparent 22%
        ),
        linear-gradient(180deg, #060a14, var(--bg) 22%, #060a14 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    opacity: 0.92;
}
img {
    max-width: 100%;
    display: block;
}

.page-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 28px;
}

.topbar {
    position: sticky;
    top: 14px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    margin-bottom: 22px;
    background: rgba(6, 10, 20, 0.72);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand strong,
.brand small {
    display: block;
    line-height: 1.1;
}
.brand small {
    color: var(--muted);
    font-size: 0.84rem;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #5b21b6);
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(124, 58, 237, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav a {
    color: var(--muted);
    font-size: 0.95rem;
}
.nav-cta {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text) !important;
    border: 1px solid rgba(124, 58, 237, 0.35);
}

.hero {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 26px;
    align-items: stretch;
    padding: 28px 0 18px;
}
.hero-copy,
.hero-panel,
.card {
    border: 1px solid var(--line);
    background: var(--card);
    backdrop-filter: blur(18px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-copy {
    padding: 34px;
}
.hero-panel {
    padding: 18px;
    display: grid;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin: 0 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #d7ddf0;
    border: 1px solid var(--line);
    width: fit-content;
}
.hero h1 {
    font-size: 3em;
    line-height: 0.98;
    margin: 0 0 16px;
    letter-spacing: -0.04em;
}
.lead {
    font-size: 1.08rem;
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.75;
}
.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 26px 0 20px;
}
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
}
.primary {
    background: linear-gradient(135deg, var(--accent), #5b21b6);
    color: white;
    box-shadow: 0 16px 28px rgba(124, 58, 237, 0.25);
}
.secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
    color: var(--text);
}
.hero-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-pills span,
.skill-tags span {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: #d8e0f3;
    font-size: 0.92rem;
}
.profile-card {
    display: grid;
    place-content: center;
    gap: 12px;
    text-align: center;
    min-height: 100%;
    padding: 18px;
    border-radius: calc(var(--radius) - 4px);
    background: linear-gradient(
        180deg,
        rgba(124, 58, 237, 0.12),
        rgba(255, 255, 255, 0.03)
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto;
    border-radius: 28px;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(
        135deg,
        rgba(124, 58, 237, 1),
        rgba(34, 197, 94, 0.92)
    );
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.28);
}
.profile-card h2,
.profile-card p {
    margin: 0;
}
.profile-card p {
    color: var(--muted);
}
.mini-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    color: #d8e0f3;
    display: grid;
    gap: 8px;
}
.mini-list li::before {
    content: "•";
    color: var(--accent-2);
    margin-right: 8px;
}

.section {
    padding: 34px 0 10px;
}
.section-heading {
    margin-bottom: 20px;
}
.section-heading p {
    margin: 0 0 8px;
    color: #a8b8dc;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    font-weight: 700;
}
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}
.grid {
    display: grid;
    gap: 18px;
}
.cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
    padding: 22px;
}
.glass {
    background: var(--card-strong);
}
.card h3,
.timeline-item h3 {
    margin-top: 0;
}
.card p {
    color: var(--muted);
    line-height: 1.75;
}
.service-card {
    border-top: 2px solid rgba(124, 58, 237, 0.35);
}
.project-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.project-meta span,
.timeline-year {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #d2ffe3;
    font-size: 0.88rem;
    font-weight: 600;
}
.text-link {
    color: #d8c8ff;
    font-weight: 700;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.timeline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.timeline-item {
    position: relative;
    overflow: hidden;
}
.timeline-item::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.timeline-item {
    padding-left: 24px;
}
.contact-section .contact-grid {
    align-items: start;
}
.contact-details a {
    color: #d8c8ff;
    word-break: break-word;
}
.contact-note {
    margin-top: 20px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.18);
    color: #e7ddff;
}
.contact-form label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}
.contact-form span {
    font-size: 0.94rem;
    color: #d7ddf0;
    font-weight: 600;
}
input,
textarea {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    outline: none;
}
input::placeholder,
textarea::placeholder {
    color: #7080a8;
}
input:focus,
textarea:focus {
    border-color: rgba(124, 58, 237, 0.65);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.16);
}
.alert {
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 14px;
    border: 1px solid transparent;
}
.alert.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.2);
    color: #d2ffe3;
}
.alert.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ffd7d7;
}
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 4px 10px;
    color: var(--muted);
}
.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .hero,
    .about-grid,
    .contact-grid,
    .cards-grid,
    .projects-grid,
    .timeline {
        grid-template-columns: 1fr;
    }
    .topbar {
        border-radius: 24px;
        align-items: flex-start;
        flex-direction: column;
    }
    .nav {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(var(--max), calc(100% - 22px));
    }
    .hero-copy,
    .card {
        padding: 18px;
    }
    .hero h1 {
        font-size: clamp(2.2rem, 11vw, 3.6rem);
    }
    .topbar {
        padding: 16px;
    }
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
