/* ========================================
   Global Styles & Animations
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --dark-bg: #0F1419;
    --light-text: #FFFFFF;
    --gray-text: #B8B8B8;
    --accent: #FFD93D;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Particle Canvas Background */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
    padding: 1rem 0;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

@media (min-width: 901px) {
    .navbar .nav-menu {
        flex-direction: row;
        gap: 3rem;
        padding: 0;
    }
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 7px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    margin: 5px 0;
    transition: 0.3s;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    max-width: 100%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    max-width: 100%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    right: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-50px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-text {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: typewriter 4s steps(50, end) infinite;
}

@keyframes typewriter {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cta-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    animation: popIn 1.2s ease;
}

.hero-resume-link {
    display: inline-flex;
    align-items: center;
    margin: 12px;
    color: #1a1008;
    text-decoration: none;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.5);
}

.cta-btn:active {
    transform: translateY(-1px);
}

/* ========================================
   Sections
   ======================================== */
section {
    padding: 6rem 2rem;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ========================================
   About Section
   ======================================== */
.about {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
}

.about-kicker {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-align: center;
    text-transform: uppercase;
}

.about .section-title {
    max-width: 800px;
    margin-inline: auto;
    font-size: clamp(2.1rem, 4.4vw, 3.5rem);
    line-height: 1.12;
    text-wrap: balance;
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    animation: slideInLeft 0.8s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-box {
    position: relative;
    background: rgba(255, 107, 107, 0.1);
    min-width: 0;
    min-height: 225px;
    padding: 1.6rem 1.25rem;
    border-radius: 16px;
    text-align: left;
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-box:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 107, 0.2);
    transform: translateY(-10px);
}

.stat-box h3 {
    font-size: clamp(1.25rem, 2vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-box p {
    color: var(--gray-text);
    line-height: 1.65;
}

.stat-step {
    display: block;
    margin-bottom: 32px;
    color: var(--primary-color);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.about-availability {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 24px;
    padding: 15px;
    border: 1px solid rgba(78, 205, 196, .24);
    border-radius: 15px;
    background: rgba(78, 205, 196, .07);
}

.availability-dot {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #4ecdc4;
    box-shadow: 0 0 0 7px rgba(78, 205, 196, .12);
}

.about-availability div {
    display: grid;
    gap: 3px;
}

.about-availability small {
    color: var(--gray-text);
}

.about-principles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.principle-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    color: var(--light-text);
    background: rgba(255, 255, 255, .035);
    cursor: pointer;
}

.principle-chip.is-active {
    color: #130d08;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.principle-detail {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 780px;
    margin: 16px auto 0;
    padding: 18px 20px;
    border: 1px solid rgba(255, 107, 107, .2);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
}

.principle-detail > i {
    flex: 0 0 auto;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.principle-detail p {
    margin: 0;
    color: var(--gray-text);
}

.about-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* ========================================
   Skills Section
   ======================================== */
.skills {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease;
}

.skill-card:hover {
    border-color: var(--secondary-color);
    background: rgba(78, 205, 196, 0.1);
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(78, 205, 196, 0.2);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.skill-card p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    animation: fillProgress 1.5s ease;
}

@keyframes fillProgress {
    from {
        width: 0 !important;
    }
    to {
        width: var(--width) !important;
    }
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.02) 0%, rgba(78, 205, 196, 0.02) 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease;
}

.project-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-20px);
    box-shadow: 0 30px 60px rgba(78, 205, 196, 0.3);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--primary-color);
    background: radial-gradient(circle at center, rgba(255, 107, 107, 0.2), rgba(15, 18, 24, 0.96));
    font-size: 4rem;
}

.project-image-placeholder i {
    font-size: inherit;
}

.project-empty-state {
    padding: 2rem;
    color: var(--gray-text);
    text-align: center;
}

.contact-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    padding: 10px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--light-text);
}

.project-info p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 107, 107, 0.2);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(255, 107, 107, 0.4);
    border-color: var(--primary-color);
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-box {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
    animation: slideInLeft 0.8s ease;
}

.info-box:hover {
    border-color: var(--secondary-color);
    background: rgba(78, 205, 196, 0.1);
    transform: translateX(10px);
}

.info-box i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.info-box h4 {
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.info-box p {
    color: var(--gray-text);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideInRight 0.8s ease;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 10px;
    color: var(--light-text);
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--gray-text);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 107, 107, 0.1);
}

.submit-btn {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.3);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 107, 107, 0.2);
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 50%;
    color: var(--primary-color);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px) scale(1.1);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 900px) {
    .nav-menu {
        display: flex;
        position: fixed;
        top: 72px;
        right: 16px;
        z-index: 1002;
        width: min(340px, calc(100vw - 32px));
        max-height: calc(100svh - 88px);
        overflow-y: auto;
        flex-direction: column;
        gap: 0;
        padding: 10px;
        border: 1px solid rgba(255, 107, 107, .22);
        border-radius: 18px;
        background: rgba(15, 20, 25, .98);
        box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity .2s ease, transform .2s ease;
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 1003;
    }

    .hamburger.active span:first-child {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:last-child {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-menu li,
    .nav-menu a {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 13px 15px;
        border-radius: 11px;
    }

    body.nav-open {
        overflow: hidden;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .typing-text {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    @media (max-width: 600px) {
        .nav-container {
            padding-inline: 18px;
        }

        section {
            padding: 4.5rem 18px;
        }

        .about .section-title {
            font-size: clamp(2rem, 10vw, 2.8rem);
        }

        .about-stats {
            grid-template-columns: 1fr;
        }

        .stat-box {
            min-height: auto;
        }

        .stat-step {
            margin-bottom: 18px;
        }

        .about-availability {
            align-items: flex-start;
        }

        .principle-chip {
            width: 100%;
            justify-content: center;
        }

        .principle-detail {
            align-items: flex-start;
        }

        .about-actions {
            flex-direction: column;
        }

        .about-actions .cta-btn {
            width: 100%;
            text-align: center;
        }
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skill-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        margin-top: 100px;
    }

    .about-text p,
    .stat-box,
    .info-box,
    .contact-form {
        animation-name: fadeInUp;
    }

    .hero::before {
        left: 0;
        right: auto;
        width: 100%;
    }

    .hero::after {
        right: 0;
        left: auto;
        width: 100%;
    }

    .typing-text {
        font-size: 2rem;
    }

    .cta-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    section {
        padding: 3rem 1rem;
    }

    .stat-box {
        padding: 1.5rem 1rem;
    }

    .stat-box h3 {
        font-size: 2rem;
    }
}
