:root {
    --bg: #050816;
    --bg-elevated: #0b1020;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-strong: rgba(59, 130, 246, 0.25);
    --border-subtle: rgba(148, 163, 184, 0.35);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --pill-bg: rgba(15, 23, 42, 0.8);
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.9);
    --radius-lg: 18px;
    --radius-pill: 999px;
    --transition-fast: 180ms ease-out;
    --transition-med: 220ms ease-out;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #0b1120 0, #020617 40%, #000 100%);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.8), transparent 55%);
}

.section-header {
    margin-bottom: 2.75rem;
}

.section-header h2 {
    font-size: 1.9rem;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
}

.section-header p {
    margin: 0;
    color: var(--text-muted);
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.93), rgba(15, 23, 42, 0.82));
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: radial-gradient(circle at top left, #1d4ed8, #020617 72%);
    color: #e5e7eb;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.9);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    padding-bottom: 0.25rem;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    border-radius: 999px;
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: #e5e7eb;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
}

/* Hero */

.hero {
    padding: 4.5rem 0 3.5rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.3rem, 3vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin: 0 0 1rem;
}

.hero-subtitle {
    margin: 0 0 1.75rem;
    color: var(--text-muted);
    max-width: 36rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.75rem;
}

.meta-item {
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(31, 41, 55, 0.8));
    font-size: 0.78rem;
    color: #e5e7eb;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(55, 65, 81, 0.8);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.hero-card {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), rgba(15, 23, 42, 0.98));
    border-radius: 26px;
    padding: 1.7rem 1.6rem;
    border: 1px solid rgba(148, 163, 184, 0.51);
    box-shadow: var(--shadow-soft);
}

.hero-avatar {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #3b82f6, #0b1120);
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
}

.hero-card h2 {
    margin: 0 0 0.3rem;
    font-size: 1.1rem;
}

.hero-role {
    margin: 0 0 0.2rem;
    font-size: 0.9rem;
    color: #cbd5f5;
}

.hero-location {
    margin: 0 0 0.9rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.hero-summary {
    margin: 0;
    font-size: 0.88rem;
    color: #d1d5db;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color var(--transition-med), border-color var(--transition-med), transform var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-med);
}

.btn.primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #e5e7eb;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.6);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.8);
}

.btn.secondary {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.7);
    color: var(--text-main);
}

.btn.secondary:hover {
    background: rgba(15, 23, 42, 0.98);
}

.btn.full-width {
    width: 100%;
}

/* Layout helpers */

.two-column {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: flex-start;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-list li + li {
    margin-top: 0.6rem;
}

.about-list strong {
    color: #e5e7eb;
}

/* Skills */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 1.4rem 1.3rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.card h3 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
}

.card ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Timeline */

.timeline {
    border-left: 1px solid rgba(55, 65, 81, 0.9);
    margin-left: 0.7rem;
    padding-left: 1.6rem;
    display: grid;
    gap: 1.9rem;
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -2.45rem;
    top: 0.25rem;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 2px solid rgba(191, 219, 254, 1);
    background: radial-gradient(circle at top left, #3b82f6, #020617);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

.timeline-content h3 {
    margin: 0 0 0.3rem;
}

.timeline-content h3 span {
    font-weight: 400;
    color: var(--text-muted);
}

.timeline-meta {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-content ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Projects */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem; /* new: pull projects slightly upward */
}

.project-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    margin-top: -1rem;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, var(--accent-soft), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition-med);
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.project-header h3 {
    margin: 0;
    font-size: 1rem;
}

.project-tag {
    font-size: 0.78rem;
    padding: 0.15rem 0.7rem;
    border-radius: var(--radius-pill);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #d1d5db;
}

.project-card p {
    margin: 0.35rem 0 0.8rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
}

.pill-list li {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--pill-bg);
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 0.78rem;
    color: #e5e7eb;
}

/* Contact */

.contact-section {
    border-top: 1px solid rgba(15, 23, 42, 0.9);
    background: radial-gradient(circle at top, rgba(30, 64, 175, 0.55), rgba(15, 23, 42, 0.98));
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr);
    gap: 2.5rem;
    align-items: flex-start;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.1rem;
}

.contact-list li + li {
    margin-top: 0.6rem;
}

.contact-note {
    margin: 0;
    font-size: 0.86rem;
    color: #d1d5db;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.4rem;
}

.contact-card {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, 0.7);
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), rgba(15, 23, 42, 0.98));
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: #e5e7eb;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.95);
    border-color: rgba(191, 219, 254, 1);
}

.contact-card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #bfdbfe;
    margin-bottom: 0.25rem;
}

.contact-card-value {
    font-size: 0.9rem;
    word-break: break-all;
}

.contact-form {
    background: rgba(15, 23, 42, 0.98);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 1.4rem 1.3rem 1.5rem;
    box-shadow: var(--shadow-soft);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.95rem;
}

.form-row label {
    font-size: 0.85rem;
    color: #e5e7eb;
}

.form-row input,
.form-row textarea {
    border-radius: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 0.55rem 0.75rem;
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font: inherit;
    resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7);
}

.form-status {
    margin-top: 0.75rem;
    min-height: 1.2rem;
    font-size: 0.85rem;
}

.form-status.ok {
    color: #4ade80;
}

.form-status.error {
    color: #f97373;
}

/* Footer */

.site-footer {
    padding: 1.6rem 0 1.9rem;
    background: #020617;
    border-top: 1px solid rgba(15, 23, 42, 0.95);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: #e5e7eb;
}

.back-to-top:hover {
    color: #bfdbfe;
}

.back-to-top-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.8rem;
}

/* Responsive */

@media (max-width: 920px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .header-inner {
        padding-inline: 1.1rem;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.22rem;
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.6);
        background: rgba(15, 23, 42, 0.95);
        cursor: pointer;
    }

    .nav-toggle-line {
        width: 1.1rem;
        height: 2px;
        border-radius: 999px;
        background: #e5e7eb;
        transition: transform var(--transition-fast), opacity var(--transition-fast);
    }

    .nav-links {
        position: absolute;
        right: 1.2rem;
        top: calc(100% + 0.7rem);
        flex-direction: column;
        gap: 0.7rem;
        padding: 0.7rem 0.9rem;
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.97);
        border: 1px solid rgba(55, 65, 81, 0.9);
        box-shadow: var(--shadow-soft);
        transform-origin: top right;
        transform: scale(0.95);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition-med), opacity var(--transition-med);
    }

    .nav-links.open {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
    }

    .hero {
        padding-top: 3.6rem;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-card {
        order: -1;
    }

    .two-column {
        grid-template-columns: minmax(0, 1fr);
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-inner {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
