/* 
    PREMIUM PORTFOLIO CSS
    Design: Modern, Clean, Aesthetic with Innovative Animations
    Theme: Dark Mode with Gradient Accents
    Author: Rizkia Ahsan Fahnuri
*/

:root {
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --tertiary-color: #ec4899;
    --bg-dark: #0f0f1e;
    --bg-card: #1a1a2e;
    --bg-light: #16213e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--tertiary-color));
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sora', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
    position: relative;
}

/* ===== ANIMATED BACKGROUND ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-dark);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    filter: blur(80px);
    animation: float-orb 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-color), transparent);
    top: -100px;
    left: -100px;
    animation-duration: 25s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--secondary-color), transparent);
    bottom: 100px;
    right: 50px;
    animation-duration: 30s;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--tertiary-color), transparent);
    top: 50%;
    right: -50px;
    animation-duration: 35s;
    animation-delay: 10s;
}

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

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== NAVIGATION ===== */
nav {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(15, 15, 30, 0.85);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px;
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-greeting {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.greeting-emoji {
    font-size: 2rem;
    animation: wave 0.6s ease-in-out infinite;
    transform-origin: bottom right;
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(15deg); }
    100% { transform: rotate(0deg); }
}

.greeting {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.name {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.name span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 600;
}

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

.description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    backdrop-filter: blur(10px);
    animation: float-card 6s ease-in-out infinite;
}

.card-1 {
    top: 20px;
    left: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    animation-delay: 0s;
}

.card-2 {
    top: 150px;
    right: 30px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    animation-delay: 1s;
}

.card-3 {
    bottom: 30px;
    left: 50px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(99, 102, 241, 0.1));
    animation-delay: 2s;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 26px;
    height: 44px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    position: relative;
    opacity: 0.7;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 25px; }
}

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.personality-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===== SKILLS SECTION ===== */
.skills-container {
    display: grid;
    gap: 60px;
}

.primary-skills {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-row {
    margin-bottom: 35px;
}

.skill-row:last-child {
    margin-bottom: 0;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-main);
}

.skill-value {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.skill-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    position: relative;
    animation: skill-enter 0.8s ease-out;
}

.skill-percentage {
    display: none;
}

@keyframes skill-enter {
    from {
        width: 0% !important;
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tech-stack {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-stack h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text-main);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.tech-chip {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tech-chip:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.tech-chip i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.tech-chip span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.project-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.project-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-img::before {
    opacity: 1;
}

.project-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-tags span {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-link:hover {
    gap: 12px;
}

/* Experience Section */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255,255,255,0.1);
}

.timeline-item {
    margin-bottom: 40px;
    padding-left: 60px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-content {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* ===== CONTACT SECTION ===== */
.contact-wrapper {
    display: grid;
    gap: 40px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.contact-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-card h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.contact-card a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    word-break: break-all;
}

.contact-card a:hover {
    color: var(--primary-color);
}

.contact-message {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 35px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.contact-message h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--text-main);
}

.contact-message ul {
    list-style: none;
}

.contact-message li {
    padding: 12px 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-message li:last-child {
    border-bottom: none;
}

.contact-message strong {
    color: var(--primary-color);
}

/* ===== FOOTER ===== */
footer {
    padding: 50px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 15, 30, 0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.footer-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--text-muted);
}

/* ===== FLOATING SOCIAL SIDEBAR ===== */
.floating-social {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--primary-color);
    transition: var(--transition);
    position: relative;
}

.social-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-10px);
}

.social-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: var(--bg-card);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover::before {
    opacity: 1;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        height: 100vh;
        top: 0;
        background: var(--bg-dark);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        gap: 20px;
    }

    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .name {
        font-size: 3rem;
    }

    .hero-visual {
        height: 250px;
    }

    .floating-card {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .floating-social {
        right: 15px;
        gap: 10px;
    }

    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

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

    .contact-cards {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .name {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .nav-links {
        width: 100%;
    }

    .hero-btns {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .floating-social {
        display: none;
    }

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

    .skill-bar {
        height: 8px;
    }

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

/* Burger Animation */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
    opacity: 0;
}
.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}
