:root {
    --bg-1: #0f1720;
    --bg-2: #11131a;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-strong: rgba(255, 255, 255, 0.10);
    --muted: rgba(255, 255, 255, 0.78);
    --accent-1: 94, 87, 255;
    --accent-2: 0, 200, 150;
    --card-radius: 16px;
    --card-padding: 28px;
    --max-width: 1100px;
}

* { box-sizing: border-box }

html, body { height: 100% }

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background:
        radial-gradient(800px 400px at 6% 8%, rgba(var(--accent-1), 0.12), transparent 8%),
        radial-gradient(700px 350px at 96% 92%, rgba(var(--accent-2), 0.08), transparent 8%),
        linear-gradient(180deg, var(--bg-1), var(--bg-2));
    color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 36px 18px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.wrapper {
    width: 100%;
    max-width: var(--max-width);
}

/* ── Badges ── */
.badge {
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 2px 10px;
    margin-left: 8px;
    vertical-align: middle;
    user-select: none;
    display: inline-block;
}

.badge-warning {
    background-color: rgba(255, 165, 0, 0.15);
    color: orange;
    border: 1px solid orange;
}

.badge-completed {
    background-color: rgba(50, 205, 50, 0.15);
    color: limegreen;
    border: 1px solid limegreen;
}

/* IMPROVEMENT 1 — added badge-success */
.badge-success {
    background-color: rgba(0, 200, 100, 0.15);
    color: #00c864;
    border: 1px solid #00c864;
}

/* ── Header / Nav ── */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.brand {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.2px;
    color: white;
}

nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navlink {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background .18s, color .18s, transform .12s;
}

.navlink:hover,
.navlink:focus {
    background: rgba(255, 255, 255, 0.03);
    color: white;
    outline: none;
}

.cta {
    background: linear-gradient(90deg, rgba(var(--accent-1), 1), rgba(var(--accent-2), 1));
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

/* ── Hero stage ── */
.stage {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 34px;
    align-items: start;
}

@media (max-width: 980px) {
    .stage { grid-template-columns: 1fr; }
}

/* ── Cards ── */
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: var(--card-radius);
    padding: var(--card-padding);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
}

/* ── Headline ── */
.headline {
    font-size: clamp(28px, 4.8vw, 42px);
    font-weight: 800;
    margin: 6px 0 12px;
    line-height: 1.02;
    background: linear-gradient(90deg, rgba(var(--accent-1), 1), rgba(var(--accent-2), 1));
    -webkit-background-clip: text;
    color: transparent;
}

.lead {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 18px;
    line-height: 1.65;
}

.muted { color: rgba(255, 255, 255, 0.75); }

/* ── Chips ── */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.chip {
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
    transition: background .18s, color .18s, border-color .18s;
}

/* IMPROVEMENT 3 — chip hover accent */
.chip:hover {
    background: rgba(var(--accent-1), 0.15);
    border-color: rgba(var(--accent-1), 0.4);
    color: rgba(180, 176, 255, 1);
    cursor: default;
}

/* ── Profile column ── */
.profile {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.profile-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(8px) saturate(120%);
}

.photo-wrap {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(120deg, rgba(var(--accent-1), 0.05), rgba(var(--accent-2), 0.05));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    display: block;
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .9s cubic-bezier(.2, .9, .2, 1), filter .45s;
    transform-origin: center;
}

.photo-wrap:hover .photo {
    transform: scale(1.04) rotate(.6deg);
    filter: saturate(1.06) contrast(1.02);
}

.p-meta {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.p-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.p-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: white;
}

.p-role {
    color: var(--muted);
    font-size: 0.92rem;
}

.p-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: center;
}

/* ── Buttons ── */
.btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--muted);
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: background .18s, transform .12s;
}

.btn.primary {
    background: linear-gradient(90deg, rgba(var(--accent-1), 1), rgba(var(--accent-2), 1));
    color: white;
}

.btn:hover { transform: translateY(-3px); }

/* IMPROVEMENT 6 — social icon buttons in profile card */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: background .18s, transform .12s, border-color .18s;
}

.btn-icon:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
}

/* ── Sections ── */
.section {
    margin-top: 22px;
    display: grid;
    gap: 12px;
}

.section h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.section p {
    color: var(--muted);
    margin: 0 0 8px 0;
}

/* IMPROVEMENT 5 — sub-section label for About */
.sub-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin: 10px 0 5px;
}

/* ── Grid tiles ── */
.grid-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.tile {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--muted);
    transition: transform .18s, background .18s;
}

.tile:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
}

/* ── Projects ── */
.project {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: border-color .18s, background .18s;
}

.project:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
}

.project h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.project p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

/* IMPROVEMENT 4 — tech stack tags on project cards */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(var(--accent-1), 0.10);
    color: rgba(180, 176, 255, 0.85);
    border: 0.5px solid rgba(var(--accent-1), 0.22);
}

.linkClickHere {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

/* ── Contact form ── */
.contact-form {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

input[type="text"],
input[type="email"],
textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: white;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    resize: vertical;
}

textarea { min-height: 120px; }

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.small {
    font-size: 0.88rem;
    color: var(--muted);
}

/* ── Footer ── */
footer {
    margin-top: 30px;
    margin-bottom: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .photo-wrap { height: 220px; }
    .profile { max-width: 100%; }
    .stage { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .photo, .btn, .btn-icon, .tile, .project, .chip {
        transition: none !important;
        transform: none !important;
    }
}

/* ── Contact form — status pill ── */
.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: opacity .25s, transform .25s;
    opacity: 1;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* idle — subtle, no border */
.status-idle {
    color: rgba(255, 255, 255, 0.45);
    border-color: transparent;
    background: transparent;
}
.status-idle .status-dot, .dot-idle { display: none; }

/* sending — indigo pulse */
.status-sending {
    background: rgba(94, 87, 255, 0.10);
    border-color: rgba(94, 87, 255, 0.30);
    color: #a09aff;
}
.dot-sending {
    background: #a09aff;
    animation: dotPulse 1s ease-in-out infinite;
}

/* warn — orange */
.status-warn {
    background: rgba(255, 165, 0, 0.10);
    border-color: rgba(255, 165, 0, 0.30);
    color: #ffb347;
}
.dot-warn { background: #ffb347; }

/* error — red */
.status-error {
    background: rgba(255, 80, 80, 0.10);
    border-color: rgba(255, 80, 80, 0.30);
    color: #ff7070;
}
.dot-error { background: #ff7070; }

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.35; transform: scale(0.65); }
}

/* submit button arrow nudge */
.btn.primary svg {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    transition: transform .2s;
}
.btn.primary:not(:disabled):hover svg {
    transform: translateX(3px) translateY(-2px);
}
.btn.primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* ── Contact success overlay ── */
.contact-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px 28px;
    gap: 14px;
}

.contact-success.visible {
    display: flex;
    animation: successFadeIn .4s ease both;
}

@keyframes successFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.success-check {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 200, 100, 0.10);
    border: 1.5px solid rgba(0, 200, 100, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-title {
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.success-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    max-width: 340px;
    line-height: 1.6;
}

.success-reset {
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.6);
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s, color .18s, transform .15s;
}

.success-reset:hover {
    background: rgba(255, 255, 255, 0.09);
    color: white;
    transform: translateY(-2px);
}

/* ── Mobile nav toggle ── */
.nav-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px 12px;
    user-select: none;
}

@media (max-width: 640px) {
    header { position: relative; }

    .nav-toggle { display: block; }

    nav.nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-1);
        border-radius: 0 0 var(--card-radius) var(--card-radius);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
        flex-direction: column;
        display: none;
        padding: 10px 0;
        z-index: 1000;
    }

    nav.nav.open { display: flex; }

    nav.nav a {
        padding: 12px 18px;
        border-radius: 0;
    }

    nav.nav .cta { margin: 8px 18px 0; }

    .navlink:hover,
    .navlink:focus {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
}