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

:root {
    --bg: #0a0a0a;
    --white: #ffffff;
    --font-body: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--white);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Typography */
.font-display { font-family: var(--font-display); }

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass card */
.glass-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Layout */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    transition: all 0.3s ease;
}
#navbar.scrolled {
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #000 !important;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.9; }

/* Sections */
section { padding: 5rem 0; }

.section-label {
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Grid background */
.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 64px 64px;
}

/* Hero */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-radial {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(255,255,255,0.07), rgba(10,10,10,0));
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 1.25rem;
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #000;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.4); color: #fff; }

.hero-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.hero-socials a {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s;
}
.hero-socials a:hover { color: #fff; }

/* About */
#about { border-top: 1px solid rgba(255,255,255,0.06); }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.about-avatar {
    aspect-ratio: 1;
    border-radius: 1.5rem;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    max-width: 380px;
}
.about-text p {
    color: rgba(255,255,255,0.55);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* Skills */
#skills { border-top: 1px solid rgba(255,255,255,0.06); }
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.skill-card {
    padding: 1.5rem;
    border-radius: 1rem;
}
.skill-card h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.skill-tag {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* Projects */
#projects { border-top: 1px solid rgba(255,255,255,0.06); }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.project-card {
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}
.project-thumb {
    aspect-ratio: 16/9;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.project-body { padding: 1.5rem; }
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.project-tag {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}
.project-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.project-desc {
    color: rgba(255,255,255,0.45);
    font-size: 0.875rem;
    line-height: 1.65;
}

/* Contact */
#contact { border-top: 1px solid rgba(255,255,255,0.06); text-align: center; }
.contact-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.contact-link.primary { background: #fff; color: #000; }
.contact-link.primary:hover { opacity: 0.9; }
.contact-link.secondary {
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
}
.contact-link.secondary:hover { border-color: rgba(255,255,255,0.3); color: #fff; }

/* Footer */
footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 2rem 0;
    text-align: center;
}
footer p { color: rgba(255,255,255,0.25); font-size: 0.8rem; }

/* Responsive */
@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .projects-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
}

/* Scroll animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
