:root {
    --bg: #04060a;
    --glass: rgba(255, 255, 255, 0.04);
    --muted: rgba(255, 255, 255, 0.6);
    --accent1: #00E5FF;
    --accent2: #7C4DFF;
    --neon: 0 0 30px rgba(124, 77, 255, 0.12);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --gap: 22px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto;
    background: linear-gradient(180deg, var(--bg), #020306 120%);
    color: #eaf3ff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* stars bg */
.bg-stars {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.10), transparent),
        radial-gradient(1px 1px at 80% 70%, rgba(255, 255, 255, 0.06), transparent),
        radial-gradient(1.5px 1.5px at 40% 50%, rgba(255, 255, 255, 0.08), transparent);
    opacity: 0.8;
}

/* Header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    position: relative;
    z-index: 40;
    backdrop-filter: blur(6px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 600
}

.brand .logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #071428;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent1), var(--accent2));
    box-shadow: var(--neon);
}

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

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
}

.nav a:hover {
    color: white;
    opacity: 1
}

.nav a.cta {
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 12px
}

.nav a.active {
    color: white
}

.mobile-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 20px
}

/* Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 24px
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 40px;
    align-items: center;
    margin-top: 18px
}

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

    .hero-right {
        order: -1;
        padding-top: 20px
    }
}

.huge {
    font-size: 48px;
    line-height: 1.02;
    margin: 0
}

@media(max-width:700px) {
    .huge {
        font-size: 32px
    }
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    -webkit-background-clip: text;
    color: transparent
}

.lead {
    color: rgba(234, 243, 255, 0.7);
    margin-top: 12px;
    max-width: 540px
}

.hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600
}

.btn.primary {
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    color: #04121b;
    box-shadow: 0 12px 40px rgba(7, 17, 40, 0.6)
}

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

.btn.small {
    padding: 8px 12px
}

/* hero right scene */
.scene {
    position: relative;
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px
}

.card {
    width: 360px;
    height: 300px;
    border-radius: 18px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    transform-style: preserve-3d;
    transition: transform .25s cubic-bezier(.15, .8, .3, 1);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(8px)
}

.card-large {
    width: 420px;
    height: 340px;
    padding: 22px
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.meta {
    font-size: 13px;
    color: rgba(234, 243, 255, 0.6)
}

.year {
    font-size: 13px;
    color: rgba(234, 243, 255, 0.6)
}

.card-title {
    margin: 18px 0 8px;
    font-size: 20px
}

.card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(234, 243, 255, 0.7);
    font-size: 13px
}

/* rings & core */
.ring-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 8px auto 0;
    display: flex;
    align-items: center;
    justify-content: center
}

.ring {
    position: absolute;
    border-radius: 999px;
    border: 2px solid rgba(124, 77, 255, 0.12);
    box-shadow: var(--neon);
    transform: translateZ(30px)
}

.ring-1 {
    width: 160px;
    height: 160px;
    filter: blur(10px)
}

.ring-2 {
    width: 120px;
    height: 120px;
    transform: translateZ(50px)
}

.ring-3 {
    width: 80px;
    height: 80px;
    transform: translateZ(70px)
}

.core {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--accent1), var(--accent2));
    transform: translateZ(90px);
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.12)
}

/* floating plates */
.floating-plate {
    position: absolute;
    width: 160px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.06), rgba(124, 77, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.03);
    transform: translateZ(80px)
}

.plate-1 {
    right: 8%;
    top: 5%
}

.plate-2 {
    left: 6%;
    bottom: 8%
}

/* ground */
.grid-ground {
    position: absolute;
    left: 50%;
    bottom: -36px;
    transform: translateX(-50%);
    width: 720px;
    height: 80px;
    background: linear-gradient(90deg, transparent, #0d1220, transparent);
    opacity: 0.08;
    border-radius: 40px
}

/* project preview grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px
}

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

.proj {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    transition: transform .25s
}

.proj-inner h4 {
    margin: 0 0 8px
}

.tags {
    margin-top: 12px
}

.tags span {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 8px;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
    color: var(--muted)
}

/* sections */
.section-head {
    margin: 40px 0
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 22px
}

.project-case {
    display: flex;
    gap: 18px;
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 14px;
    padding: 14px;
    border: 1px solid var(--glass-border)
}

.project-case.reverse {
    flex-direction: row-reverse
}

.case-media {
    width: 280px;
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(90deg, #021426 0%, #051423 100%);
    box-shadow: 0 10px 40px rgba(4, 6, 12, 0.6)
}

.case-body h3 {
    margin: 6px 0
}

/* about & contact */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px
}

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

.bio {
    padding: 18px;
    border-radius: 12px
}

.skills {
    padding: 18px;
    border-radius: 12px
}

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

.skill {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04)
}

/* contact form */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    color: inherit;
    resize: vertical
}

.mini-cta {
    margin-top: 14px
}

/* footer */
.site-footer {
    padding: 20px 24px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    opacity: 0.8;
    margin-top: 40px
}

/* tilt helper */
[data-tilt] {
    transform-style: preserve-3d;
    transition: transform .15s cubic-bezier(.2, .9, .3, 1);
    will-change: transform
}
