* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    perspective: 1000px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* ==================== PARTICLES ==================== */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    pointer-events: none;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ==================== GLASS EFFECT ==================== */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    will-change: transform;
    backface-visibility: hidden;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    transform: translateY(-8px) rotateY(5deg);
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 2rem 4rem;
    margin-top: 60px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.2;
    letter-spacing: -1px;
    animation: slideInTitle 0.8s ease-out;
}

@keyframes slideInTitle {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-group {
    display: inline-block;
    animation: slideInLeft 0.6s ease-out;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.title-group:hover {
    transform: scale(1.15);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-card {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.cta-button:hover::before {
    left: 100%;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ==================== SECTIONS ==================== */
section {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    transform-style: preserve-3d;
    will-change: transform;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    position: relative;
    display: inline-block;
}

.header-underline {
    height: 3px;
    width: 100px;
    background: linear-gradient(90deg, transparent 0%, #fff 50%, transparent 100%);
    margin: 1rem auto;
    animation: expandWidth 0.8s ease-out;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

/* ==================== PORTFOLIO SECTION ==================== */
.portfolio {
    background: rgba(255, 255, 255, 0.02);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    text-align: center;
    padding: 2.5rem 2rem;
    animation: fadeInUp 0.6s ease-out backwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0s; }
.portfolio-item:nth-child(2) { animation-delay: 0.1s; }
.portfolio-item:nth-child(3) { animation-delay: 0.2s; }
.portfolio-item:nth-child(4) { animation-delay: 0.3s; }
.portfolio-item:nth-child(5) { animation-delay: 0.4s; }
.portfolio-item:nth-child(6) { animation-delay: 0.5s; }

.portfolio-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin: 0 auto 1.5rem;
    color: #fff;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-placeholder {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1) rotate(5deg);
}

.portfolio-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.portfolio-item p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* ==================== ABOUT SECTION ==================== */
.about {
    background: rgba(0, 0, 0, 0.5);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.about-card {
    animation: fadeInUp 0.6s ease-out backwards;
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-8px) rotateX(5deg) rotateZ(-2deg);
}

.about-card:nth-child(2) {
    animation-delay: 0.2s;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.about-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #fff 50%, transparent 100%);
    animation: expandWidth 0.8s ease-out;
}

.skills-list {
    list-style: none;
}

.skills-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.skills-list li:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(10px) rotateZ(1deg);
}

.skill-icon {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.about-textarea {
    width: 100%;
    min-height: 150px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.about-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.about-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* ==================== DISCORD SECTION ==================== */
.discord {
    background: rgba(255, 255, 255, 0.02);
}

.discord-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.discord-card {
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 0.6s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    will-change: transform;
    transition: all 0.4s ease;
    perspective: 1000px;
}

.discord-card:hover {
    transform: translateY(-12px) rotateY(-8deg) rotateX(3deg);
}

.discord-icon {
    color: #5865F2;
    font-size: 80px;
    animation: float 3s ease-in-out infinite;
}

.discord-card h3 {
    font-size: 1.8rem;
    margin: 0;
}

.discord-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
}

.discord-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, #5865F2 0%, #414fd4 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.discord-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.6);
    background: linear-gradient(135deg, #4752C4 0%, #3a4bb8 100%);
}

@media (max-width: 768px) {
    .discord-card {
        padding: 2rem 1.5rem;
    }

    .discord-card h3 {
        font-size: 1.5rem;
    }

    .discord-button {
        padding: 1rem 2rem;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-subtitle {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1.5rem;
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotateX(0deg);
    }
    50% {
        transform: translateY(-15px) rotateX(2deg);
    }
}

@keyframes rotate3D {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
    }
}

/* Scroll animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}
