/* ===== RESET & VARIABLE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #dc2626;
    --primary-light: #fee2e2;
    --primary-dark: #b91c1c;
    --secondary: #1f2937;
    --text-muted: #6b7280;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(220, 38, 38, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--secondary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== BACKGROUND DECORATION ===== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatBlob 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary-light);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: #ffe4e6;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -5s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

/* ===== NAVBAR ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

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

.logo i {
    animation: iconFloat 2.5s ease-in-out infinite;
    color: var(--primary);
    margin-right: 6px;
}

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

.nav-links a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

.nav-links a i {
    margin-right: 5px;
}

/* ===== HAMBURGER MENU (Mobile) ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2.5rem;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.25);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    position: relative;
}

.avatar:hover {
    transform: scale(1.05) rotate(2deg);
}

.avatar-bg-shape {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 24px;
    z-index: 1;
    opacity: 0.1;
    transition: all 0.4s ease;
    animation: shapeMove 4s ease-in-out infinite alternate;
}

.avatar-container:hover .avatar-bg-shape {
    top: 10px;
    left: 10px;
    opacity: 0.2;
}

@keyframes shapeMove {
    0% {
        transform: rotate(-3deg) scale(1);
    }
    100% {
        transform: rotate(3deg) scale(1.05);
    }
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    color: var(--secondary);
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-content h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-content h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(220, 38, 38, 0.15);
    z-index: -1;
    border-radius: 4px;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-content .subtitle i {
    animation: iconSpin 4s linear infinite;
    color: var(--primary);
}

.hero-content .tagline {
    font-size: 1.1rem;
    color: var(--primary);
    font-style: italic;
    font-weight: 600;
    background: var(--primary-light);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    animation: taglinePulse 3s ease-in-out infinite;
}

.hero-content .tagline i {
    animation: iconFloat 2s ease-in-out infinite;
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--secondary);
    position: relative;
}

.section-title i {
    color: var(--primary);
    animation: iconPulse 2s ease-in-out infinite;
    margin-right: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.card h3 i {
    animation: iconFloat 2.5s ease-in-out infinite;
}

.traits {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.trait {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(220, 38, 38, 0.1);
    transition: all 0.3s ease;
    cursor: default;
}

.trait:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: white;
}

.trait i {
    animation: iconFloat 1.5s ease-in-out infinite;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-light);
    animation: dotPulse 2s ease-in-out infinite;
}

.timeline-year {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-year i {
    animation: iconFloat 1.5s ease-in-out infinite;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
}

.timeline-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    text-align: center;
    cursor: default;
}

.skill-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
    transition: all 0.4s ease;
}

.skill-icon i {
    animation: iconFloat 2s ease-in-out infinite;
}

.skill-card:hover .skill-icon {
    background: var(--primary);
    color: white;
    transform: rotateY(180deg);
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.achievement-card {
    overflow: hidden;
    padding: 0;
    cursor: default;
}

.achievement-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    transition: transform 0.5s ease;
}

.achievement-card:hover img {
    transform: scale(1.05);
}

.achievement-body {
    padding: 1.5rem 2rem 2rem;
}

.achievement-body h3 i {
    animation: iconFloat 1.5s ease-in-out infinite;
    color: var(--primary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fef3c7;
    color: #d97706;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 1rem;
}

.badge i {
    animation: iconFloat 1.5s ease-in-out infinite;
}

.badge.national {
    background: #e0e7ff;
    color: #4338ca;
}

/* ===== LIST GROUP ===== */
.list-group {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.list-card ul {
    list-style: none;
}

.list-card li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: var(--secondary);
    transition: all 0.3s ease;
    cursor: default;
}

.list-card li:hover {
    padding-left: 10px;
    color: var(--primary);
}

.list-card li:last-child {
    border-bottom: none;
}

.list-card li i {
    color: var(--primary);
    margin-top: 4px;
    animation: iconFloat 2s ease-in-out infinite;
}

/* ===== FUTURE ===== */
.future-card {
    background: linear-gradient(to right, #fff, var(--primary-light));
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-align: center;
    cursor: default;
}

.future-card h3 i {
    animation: iconFloat 2s ease-in-out infinite;
    color: var(--primary);
}

.goals {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.goal-item {
    background: white;
    border: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    color: var(--secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    cursor: default;
}

.goal-item i {
    animation: iconFloat 2s ease-in-out infinite;
    color: var(--primary);
    margin-right: 6px;
}

.goal-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.1);
}

/* ===== CONTACT ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--secondary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-link i {
    color: var(--primary);
    animation: iconFloat 2s ease-in-out infinite;
    font-size: 1.2rem;
}

.contact-link:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-hover);
}

.location-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    cursor: default;
}

.location-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.location-icon i {
    animation: iconFloat 2s ease-in-out infinite;
}

.location-box:hover .location-icon {
    transform: scale(1.1) rotate(10deg);
    background: var(--primary);
    color: white;
}

/* ===== FOOTER ===== */
footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 2.5rem 5%;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer .highlight {
    color: var(--primary);
    font-weight: 700;
}

footer i {
    animation: iconFloat 2s ease-in-out infinite;
}

footer .star {
    color: var(--primary);
    display: inline-block;
    animation: twinkle 1.8s ease-in-out infinite alternate;
    margin-left: 8px;
}

/* ===== SCROLL TO TOP BUTTON ===== */
#scrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

#scrollTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollTop:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

#scrollTop i {
    animation: iconFloat 1.5s ease-in-out infinite;
}

/* ===== TYPING EFFECT ===== */
.typing-text {
    display: inline-block;
    border-right: 3px solid var(--primary);
    padding-right: 5px;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes iconFloat {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes iconSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes iconPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes dotPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

@keyframes taglinePulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.2);
    }
    50% {
        box-shadow: 0 0 20px 8px rgba(220, 38, 38, 0.08);
    }
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* ===== FADE IN ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 2rem;
        border-bottom: 2px solid var(--primary);
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .avatar {
        width: 150px;
        height: 150px;
        border-radius: 18px;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .achievement-card img {
        height: 200px;
    }

    .list-group {
        grid-template-columns: 1fr;
    }

    section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    #scrollTop {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content .subtitle {
        font-size: 1rem;
    }

    .avatar {
        width: 130px;
        height: 130px;
        border-radius: 16px;
    }

    .card {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}