:root {
    --bg: #050508;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --accent: #ffffff;
    --text: #e0e0e0;
    --text-muted: #999;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    --glow: 0 0 20px rgba(255, 255, 255, 0.1);
    --radius: 20px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #333 var(--bg);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.025;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.floating-shape {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(120px);
    opacity: 0.04;
    background: #fff;
    top: -250px;
    right: -250px;
    animation: float-shape 12s ease-in-out infinite;
}

@keyframes float-shape {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(60px, 40px) scale(1.1);
    }
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 24px;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: #fff;
}

.logo-dot {
    color: var(--text-muted);
}

nav {
    display: flex;
    gap: 8px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 50px;
    transition: var(--transition);
    border: 1px solid transparent;
    background: transparent;
    letter-spacing: 0.3px;
}

nav a:hover,
nav a.active {
    color: #fff;
    background: var(--glass-hover);
    border-color: var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

nav a.active {
    border-color: #fff;
    color: #fff;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    position: relative;
}

.hero {
    min-height: 100vh;
    padding-top: 100px;
}

.hero-content {
    max-width: 700px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 16px;
}

h1 .highlight {
    font-style: italic;
    color: #fff;
}

.hero-desc {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1.1rem;
    max-width: 500px;
}

.typewriter-wrap {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    min-height: 30px;
}

.typewriter-wrap .cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #fff;
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.btn-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    opacity: 0;
    transition: var(--transition);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

.btn:hover::after {
    opacity: 1;
}

.btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.btn-primary {
    background: #fff;
    color: #000;
    border: none;
    font-weight: 700;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
    border-color: #fff;
}

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 40px;
    line-height: 1.2;
}

.accent-text {
    color: #fff;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card-img {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0.7;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.skills-list {
    margin-top: 12px;
}

.skill-bar {
    margin-bottom: 16px;
}

.skill-bar .info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.skill-bar .bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar .fill {
    height: 100%;
    background: #fff;
    border-radius: 10px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 16px;
    border-radius: var(--radius);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
}

.contact-link:hover {
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.04);
}

.contact-link .icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}

.contact-link:hover .icon-circle {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.contact-link svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.5;
}

.contact-link span {
    font-weight: 600;
    font-size: 1rem;
}

.contact-link small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    transform: translateY(20px);
}

#backToTop.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#backToTop:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    nav {
        display: none;
    }
    .hero-content {
        text-align: center;
    }
    .btn-row {
        justify-content: center;
    }
    section {
        padding: 70px 0 40px;
    }
    .section-title,
    .section-label {
        text-align: center;
        display: block;
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }
    .glass-card {
        padding: 20px;
        border-radius: 16px;
    }
    h1 {
        font-size: 2rem;
        letter-spacing: -1px;
    }
    .btn {
        padding: 11px 20px;
        font-size: 0.85rem;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        gap: 12px;
    }
}
