:root {
    --bg-900: #0b0f14;
    --bg-800: #121826;
    --bg-700: #1a2438;
    --surface: #111a2b;
    --card: #141f33;
    --text-100: #e6edf3;
    --text-300: #aab7c6;
    --text-400: #93a0b2;
    --accent: #00c2ff;
    --accent-2: #14f1d9;
    --muted: #283347;
    --ring: hsla(195,100%,50%,0.45);
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-1: 0 10px 30px rgba(0,0,0,.35);
    --shadow-2: 0 20px 40px rgba(0,0,0,.45);
}

/* Global Reset / Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-100);
    background: radial-gradient(1200px 800px at 120% -10%, rgba(0,194,255,.08), transparent 60%), radial-gradient(1200px 800px at -20% 110%, rgba(20,241,217,.06), transparent 60%), var(--bg-900);
    font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    line-height: 1.6;
}

::selection {
    background: rgba(0,194,255,.25);
    color: var(--text-100);
}

img, svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

    a:hover {
        color: var(--accent);
    }

p {
    color: var(--text-300);
    margin: 0 0 1rem;
}

/* Accessibility helpers */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

    .skip-link:focus {
        position: fixed;
        left: 1rem;
        top: 1rem;
        width: auto;
        height: auto;
        background: var(--bg-800);
        color: var(--text-100);
        padding: .6rem 1rem;
        border-radius: 8px;
        z-index: 10000;
        outline: 2px solid var(--accent);
    }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Layout helpers */
.container {
    width: min(1200px, 92vw);
    margin-inline: auto;
}

section {
    padding-block: clamp(56px, 8vw, 104px);
    scroll-margin-top: 90px;
}

.section-header {
    margin-bottom: 2rem;
}

.eyebrow {
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: .8rem;
    color: var(--text-400);
}

h1, h2, h3 {
    font-family: Poppins, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    margin: 0 0 .75rem;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.6rem, 2.2vw, 2rem);
}

h3 {
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 600;
    border-radius: 12px;
    padding: .8rem 1.1rem;
    border: 1px solid var(--muted);
    color: var(--text-100);
    background: linear-gradient(180deg, #162238 0%, #101829 100%);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    will-change: transform;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-1);
        border-color: rgba(255,255,255,.12);
    }

.btn--primary {
    border: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #041018;
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--muted);
    color: var(--text-100);
}

.btn:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

/* Header / Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11,15,20,.7);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 700;
}

.brand-badge {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #05151c;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(0,194,255,.25);
}

.brand .title {
    font-family: Poppins, sans-serif;
    letter-spacing: .3px;
}

/* Desktop menu */
.menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

    .menu a {
        color: var(--text-300);
        font-weight: 500;
        padding: .4rem .5rem;
        border-radius: 8px;
        transition: color .2s ease, background .2s ease;
    }

        .menu a:hover {
            color: var(--text-100);
            background: rgba(255,255,255,.04);
        }

    .menu .cta {
        margin-left: .5rem;
        color: black;
    }

/* Mobile menu (CSS-only toggle) */
#nav-toggle {
    display: none;
}

.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--muted);
    align-items: center;
    justify-content: center;
    color: var(--text-100);
    background: transparent;
    cursor: pointer;
}

    .hamburger svg {
        width: 22px;
        height: 22px;
    }

@media (max-width: 900px) {
    .menu {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-800);
        border-bottom: 1px solid rgba(255,255,255,.06);
        flex-direction: column;
        padding: 1rem;
    }

    #nav-toggle:checked ~ .menu {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}

/* Hero */
.hero {
    padding-top: clamp(32px, 6vw, 60px);
}

.hero-grid {
    display: grid;
    align-items: center;
    gap: 2rem;
    grid-template-columns: 1.1fr .9fr;
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: .75rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    color: var(--text-300);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}

.hero-card {
    background: linear-gradient(180deg, rgba(0,0,0,.0), rgba(255,255,255,.02)), var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-1);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-top: .5rem;
}

.stat {
    background: linear-gradient(180deg, #121a2b 0%, #0e1626 100%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    padding: .85rem;
    text-align: center;
}

    .stat .kpi {
        font-weight: 700;
        font-size: 1rem;
    }

    .stat .kplabel {
        font-size: .8rem;
        color: var(--text-400);
    }

/* About */
.about-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: .9fr 1.1fr;
}

@media (max-width: 980px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.avatar {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1/1;
    border-radius: 18px;
    background: radial-gradient(180px 120px at 20% 20%, rgba(0,194,255,.25), transparent 60%), radial-gradient(180px 120px at 80% 80%, rgba(20,241,217,.18), transparent 60%), linear-gradient(180deg, #0f1828, #0b1321);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow-1);
}

.about p {
    font-size: 1.05rem;
}

/* Skills */
.skills-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.skill-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .skill-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-1);
        border-color: rgba(255,255,255,.14);
    }

    .skill-card ul {
        list-style: none;
        padding: 0;
        margin: .4rem 0 0;
        display: flex;
        flex-wrap: wrap;
        gap: .5rem .6rem;
    }

.chip {
    font-size: .85rem;
    color: var(--text-300);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    padding: .35rem .55rem;
    border-radius: 999px;
}

/* Projects */
.projects-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00)), var(--surface);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}

    .project-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-2);
        border-color: rgba(255,255,255,.14);
    }

.thumb {
    aspect-ratio: 16/9;
    width: 100%;
    background: linear-gradient(135deg, rgba(0,194,255,.16), rgba(20,241,217,.12)), linear-gradient(180deg, #0f1828, #0b1321);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.project-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .2rem;
}

.tag {
    font-size: .75rem;
    color: #79e0ff;
    background: rgba(0,194,255,.08);
    border: 1px solid rgba(0,194,255,.25);
    padding: .25rem .45rem;
    border-radius: 6px;
}

.project-actions {
    margin-top: .5rem;
    display: flex;
    gap: .6rem;
}

/* Timeline (Experience & Education) */
.timeline-wrap {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 980px) {
    .timeline-wrap {
        grid-template-columns: 1fr;
    }
}

.timeline {
    position: relative;
    padding-left: 1.25rem;
    border-left: 2px solid rgba(255,255,255,.08);
}

.entry {
    position: relative;
    margin: 0 0 1.25rem 0;
    padding-left: .25rem;
}

    .entry::before {
        content: "";
        position: absolute;
        left: -1.42rem;
        top: .25rem;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        box-shadow: 0 0 0 3px rgba(0,194,255,.15);
    }

.entry-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.entry h3 {
    margin-bottom: .15rem;
}

.entry .sub {
    color: var(--text-400);
    font-size: .95rem;
}

.entry .period {
    color: #79e0ff;
    font-size: .85rem;
    margin-top: .2rem;
}

/* Contact */
.contact-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1.1fr .9fr;
}

@media (max-width: 980px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

form {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: .9rem;
}

label {
    font-weight: 600;
    color: var(--text-100);
}

input, textarea {
    width: 100%;
    background: #0f1726;
    color: var(--text-100);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: .8rem .9rem;
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

    input::placeholder, textarea::placeholder {
        color: var(--text-400);
    }

    input:focus-visible, textarea:focus-visible {
        outline: none;
        border-color: rgba(0,194,255,.45);
        box-shadow: 0 0 0 3px var(--ring);
    }

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem .9rem;
    border-radius: 12px;
    border: 1px solid var(--muted);
    color: var(--text-100);
    background: linear-gradient(180deg, #121a2b, #0e1626);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .icon-btn:hover {
        transform: translateY(-2px);
        border-color: rgba(255,255,255,.14);
        box-shadow: var(--shadow-1);
    }

.icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

/* Footer */
footer {
    border-top: 1px solid rgba(255,255,255,.06);
    background: #0a0e14;
    color: var(--text-300);
    padding: 1.2rem 0;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-400);
    margin-right: .9rem;
}

    .footer-links a:hover {
        color: var(--text-100);
    }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}