:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

html {
    scroll-behavior: smooth;
}

/* Background Animation */
.bg-shape {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    border-radius: 50%;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, rgba(15,23,42,0) 70%);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, rgba(15,23,42,0) 70%);
    top: 40%;
    right: -200px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16,185,129,0.2) 0%, rgba(15,23,42,0) 70%);
    bottom: -50px;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(30px, -50px); }
    100% { transform: translate(-20px, 30px); }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 5%;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--glass-shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Base Components */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(to right, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 80px;
    gap: 2rem;
}

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

.greeting {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
    font-family: 'Fira Code', monospace;
}

.glitch-text {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.typing-text {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.typing-text.delay {
    margin-bottom: 2rem;
}

.highlight {
    color: transparent;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Hero Image Section */
.hero-image {
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.hero-image img {
    border-radius: 30px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

/* About Section */
.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
    text-align: justify;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.skill-card img {
    width: 48px;
    height: 48px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.skill-card:hover img {
    transform: scale(1.1) rotate(5deg);
}

.skill-card:hover span {
    color: var(--text-primary);
}

/* Stats Section */
.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem;
}

.stats-img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    filter: drop-shadow(0 0 15px rgba(0,0,0,0.5));
}

/* Contact Section */
.contact {
    text-align: center;
    padding-bottom: 8rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-5px) scale(1.1);
}

.social-icon.github:hover { background: #333; border-color: #333; box-shadow: 0 10px 20px rgba(51, 51, 51, 0.4); }
.social-icon.linkedin:hover { background: #0077b5; border-color: #0077b5; box-shadow: 0 10px 20px rgba(0, 119, 181, 0.4); }
.social-icon.instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); border-color: transparent; box-shadow: 0 10px 20px rgba(214, 36, 159, 0.4); }
.social-icon.whatsapp:hover { background: #25D366; border-color: #25D366; box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4); }
.social-icon.telegram:hover { background: #0088cc; border-color: #0088cc; box-shadow: 0 10px 20px rgba(0, 136, 204, 0.4); }
.social-icon.gmail:hover { background: #ea4335; border-color: #ea4335; box-shadow: 0 10px 20px rgba(234, 67, 53, 0.4); }

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    top: -45px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(10px);
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
}

.tooltip:hover::before {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero { flex-direction: column; justify-content: center; text-align: center; gap: 2rem; }
    .hero-image { max-width: 250px; margin: 0 auto; }
    .hero-buttons { justify-content: center; flex-direction: column; }
    .glitch-text { font-size: 3.5rem; }
    .typing-text { font-size: 1.5rem; }
    .nav-links { display: none; } /* Simple responsive approach */
    .skills-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}
