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

body {
    font-family: "Inter", sans-serif;
    background: #050505;
    color: #f5f5f7;
    overflow-x: hidden;
    opacity: 0;
    animation: pageEnter 1s ease forwards;
}

@keyframes pageEnter {
    to { opacity: 1; }
}

/* =========================================
   BACKGROUND GRAPHICS & GLOWS
========================================= */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 70px 70px;
    pointer-events: none;
    z-index: -2;
}

.glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.glow-one { background: #00e5ff; top: -250px; left: -200px; }
.glow-two { background: #ff3cac; bottom: -250px; right: -200px; }

/* =========================================
   PREMIUM INTRO LOADER
========================================= */
#introLoader {
    position: fixed;
    inset: 0;
    background: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    overflow: hidden;
}

.loader-bg span {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .25;
}

.blob1 { width: 400px; height: 400px; background: #00e5ff; top: -150px; left: -150px; animation: moveBlob 8s infinite alternate; }
.blob2 { width: 350px; height: 350px; background: #7c4dff; right: -120px; top: 30%; animation: moveBlob2 10s infinite alternate; }
.blob3 { width: 300px; height: 300px; background: #ff3cac; bottom: -120px; left: 40%; animation: moveBlob3 12s infinite alternate; }

.particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: .4;
    animation: particleFloat 8s infinite ease-in-out;
}
.particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particles span:nth-child(2) { left: 25%; top: 70%; animation-delay: 1s; }
.particles span:nth-child(3) { left: 70%; top: 20%; animation-delay: 2s; }
.particles span:nth-child(4) { left: 85%; top: 60%; animation-delay: 1.5s; }
.particles span:nth-child(5) { left: 50%; top: 80%; animation-delay: 3s; }

.loader-center { text-align: center; position: relative; z-index: 2; }
.ring {
    width: 160px;
    height: 160px;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00e5ff, #7c4dff, #ff3cac, #ffd54f);
    background-size: 300%;
    animation: rotateRing 4s linear infinite, gradientMove 5s linear infinite;
    margin: 0 auto;
}
.logo-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-circle h1 {
    font-size: 60px;
    font-weight: 900;
    background: linear-gradient(135deg, white, #777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.loader-name { margin-top: 30px; font-size: 26px; letter-spacing: 6px; font-weight: 800; }
.loader-name span { display: inline-block; opacity: 0; animation: letterShow .5s forwards; }
.loader-name span:nth-child(n) { animation-delay: calc(0.1s * var(--i, 2)); }

.loader-text { margin-top: 15px; color: #888; letter-spacing: 2px; font-size: 11px; }
.loading-bar { width: 200px; height: 3px; background: #222; margin: 25px auto; border-radius: 20px; overflow: hidden; }
.loading-progress { height: 100%; width: 0; background: linear-gradient(90deg, #00e5ff, #ff3cac); animation: loading 3s cubic-bezier(0.1, 0.85, 0.25, 1) forwards; }

#introLoader.hide { animation: loaderExit 1s forwards ease-in; pointer-events: none; }

@keyframes loading { to { width: 100%; } }
@keyframes rotateRing { to { transform: rotate(360deg); } }
@keyframes letterShow { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes particleFloat { 50% { transform: translateY(-60px) scale(1.3); opacity: 0.7; } }
@keyframes moveBlob { to { transform: translate(100px, 50px); } }
@keyframes moveBlob2 { to { transform: translate(-80px, 40px); } }
@keyframes moveBlob3 { to { transform: translate(60px, -50px); } }
@keyframes loaderExit { to { opacity: 0; visibility: hidden; transform: scale(1.1); } }

/* =========================================
   NAVBAR
========================================= */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -100px);
    width: min(1100px, calc(100% - 40px));
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(0,229,255,.05), rgba(124,77,255,.05), rgba(255,60,172,.05));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: padding 0.4s ease, transform 0.4s ease, background 0.4s ease;
}
.navbar.scrolled {
    padding: 10px 20px;
    background: rgba(10,10,10,0.85);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.logo {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}
.logo:hover {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 0 20px #00E5FF, 0 0 40px #7C4DFF;
}
.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    position: relative;
    padding-bottom: 4px;
    transition: 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: #ffffff; }
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #00E5FF, #7C4DFF, #FF3CAC);
    transition: 0.4s;
    border-radius: 10px;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.menu-btn { display: none; background: none; border: none; color: white; font-size: 22px; cursor: pointer; }

/* =========================================
   HERO SECTION
========================================= */
.hero {
    min-height: 100vh;
    width: min(1200px, calc(100% - 60px));
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding-top: 120px;
}
.hero-content { max-width: 650px; }
.hello { color: #888; letter-spacing: 4px; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.hero h1 { font-size: clamp(60px, 8vw, 120px); line-height: 0.9; letter-spacing: -5px; font-weight: 800; }
.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, #666666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lastname { letter-spacing: 10px; font-size: 16px; color: #666; margin-top: 5px; font-weight: 700; }
.hero h2 { margin-top: 25px; font-size: clamp(24px, 3.5vw, 42px); letter-spacing: -1px; font-weight: 500; }
.hero-description { max-width: 520px; margin-top: 20px; color: #888; line-height: 1.8; font-size: 16px; }
.hero-buttons { display: flex; gap: 15px; margin-top: 35px; }

.primary-btn, .secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.primary-btn {
    background: linear-gradient(90deg, #00E5FF, #7C4DFF, #FF3CAC);
    background-size: 200%;
    color: white;
}
.primary-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.3);
    background-position: right center;
}
.secondary-btn { border: 1px solid #333; color: white; }
.secondary-btn:hover { background: #151515; transform: translateY(-5px); border-color: #666; }

/* HERO VISUALS */
.hero-visual { position: relative; width: 400px; height: 400px; display: grid; place-items: center; }
.profile-orb {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #00E5FF, #7C4DFF, #FF3CAC);
    box-shadow: 0 0 40px rgba(124, 77, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.orb-inner {
    width: 100%; height: 100%; border-radius: 50%;
    display: grid; place-items: center;
    background: radial-gradient(circle at 30% 20%, #222, #050505 80%);
}
.orb-inner span { font-size: 100px; font-weight: 800; color: #fff; opacity: 0.85; }
.floating-card {
    position: absolute; padding: 12px 20px; display: flex; align-items: center; gap: 8px;
    background: rgba(20, 20, 20, 0.6); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px; backdrop-filter: blur(10px); font-size: 13px; font-weight: 500;
}
.card-one { top: 40px; left: -20px; }
.card-two { right: -20px; bottom: 60px; }
.card-icon { font-size: 16px; }

.scroll-indicator { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #555; font-size: 11px; margin: 40px auto 0; width: fit-content; }
.scroll-indicator span { width: 2px; height: 40px; background: linear-gradient(#555, transparent); animation: scrollMove 2s infinite; }
@keyframes scrollMove { 0% { transform: scaleY(0.3); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0.3); transform-origin: bottom; } }

/* =========================================
   GENERIC SECTION ARCHITECTURE
========================================= */
.section { width: min(1100px, calc(100% - 60px)); margin: auto; padding: 120px 0; }
.section-heading p { color: #888; letter-spacing: 3px; font-size: 11px; font-weight: 600; margin-bottom: 12px; }
.section-heading h2 { font-size: clamp(36px, 6vw, 64px); max-width: 700px; line-height: 1.1; letter-spacing: -3px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 50px; }
.about-text p { color: #888; line-height: 1.8; margin-bottom: 20px; font-size: 17px; }

.skills { display: flex; flex-direction: column; gap: 16px; }
.skill-card { padding: 20px 24px; border: 1px solid #1a1a1a; background: rgba(15,15,15,0.4); border-radius: 16px; transition: 0.3s ease; }
.skill-card:hover { transform: translateX(8px); border-color: #333; background: rgba(255,255,255,0.02); }
.skill-card span { color: #555; font-size: 12px; font-weight: 700; }
.skill-card h3 { margin-top: 8px; font-size: 18px; font-weight: 600; }
.skill-card p { color: #777; margin-top: 4px; font-size: 14px; }

/* =========================================
   PREMIUM PROJECTS SECTION
========================================= */
.projects-section { position: relative; border-top: 1px solid #111; }
.projects-section::before, .projects-section::after {
    content: ""; position: absolute; width: 400px; height: 400px; filter: blur(150px); opacity: 0.08; pointer-events: none;
}
.projects-section::before { background: #00e5ff; top: -100px; left: -100px; }
.projects-section::after { background: #ff3cac; bottom: -100px; right: -100px; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 60px; }
.project-card {
    position: relative; padding: 24px; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 450px; background: rgba(15, 15, 15, 0.65); border-radius: 24px; overflow: hidden;
    cursor: pointer; transform-style: preserve-3d; transition: transform 0.5s ease, box-shadow 0.5s ease;
    border: 1px solid rgba(255,255,255,0.05);
}
.project-card::before {
    content: ""; position: absolute; inset: -1px;
    background: linear-gradient(45deg, #00E5FF, #7C4DFF, #FF3CAC, #FFD54F);
    background-size: 400%; z-index: -2; border-radius: 24px; opacity: 0.3; transition: 0.4s;
}
.project-card:hover::before { opacity: 1; animation: borderGlow 6s linear infinite; }
.project-card::after { content: ""; position: absolute; inset: 1px; background: #0d0d0d; border-radius: 23px; z-index: -1; }

@keyframes borderGlow { 100% { background-position: 400%; } }

.project-card:hover {
    transform: perspective(1000px) rotateX(6deg) rotateY(-6deg) translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 229, 255, 0.15), 0 30px 60px rgba(255, 60, 172, 0.1);
}
.project-image { height: 180px; overflow: hidden; border-radius: 14px; margin-bottom: 20px; border: 1px solid #222; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s ease; }
.project-card:hover .project-image img { transform: scale(1.08); }

.project-glow {
    position: absolute; width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    pointer-events: none; left: var(--x, 0px); top: var(--y, 0px);
    transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.3s;
}
.project-card:hover .project-glow { opacity: 1; }

.project-number {
    font-size: 44px; font-weight: 800; 
    background: linear-gradient(90deg, #00E5FF, #7C4DFF, #FF3CAC);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    opacity: 0.3; margin-bottom: 10px;
}
.project-content h3 { font-size: 24px; margin-bottom: 10px; font-weight: 700; }
.project-content p { color: #777; font-size: 14px; line-height: 1.6; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.project-tags span {
    padding: 5px 12px; border: 1px solid #222; background: #111; border-radius: 20px;
    color: #888; font-size: 11px; transition: 0.3s ease;
}
.project-tags span:hover {
    transform: translateY(-3px); background: #00E5FF; color: #000; box-shadow: 0 0 15px #00E5FF;
}
.project-link {
    color: #00e5ff; text-decoration: none; font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px; margin-top: auto; width: fit-content;
}

/* =========================================
   PREMIUM NEOMORPHIC/DYNAMIC CONTACT FORM
========================================= */
.contact-section { padding: 120px 0; position: relative; overflow: hidden; border-top: 1px solid #111; }
.contact-bg {
    position: absolute; width: 600px; height: 600px; left: 50%; top: 50%;
    transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(0, 229, 255, 0.08), transparent 75%);
    filter: blur(80px); pointer-events: none;
}
.contact-content { max-width: 700px; margin: 0 auto; text-align: center; }
.contact-content h2 { font-size: clamp(36px, 7vw, 72px); letter-spacing: -3px; line-height: 1.1; }
.contact-content > p { color: #777; margin: 20px auto 40px; font-size: 16px; max-width: 480px; }

.contact-form {
    width: 100%; padding: 40px; border-radius: 24px; background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(20px); border: 2px solid transparent;
    background-image: linear-gradient(#0d0d0d, #0d0d0d), linear-gradient(135deg, #00E5FF, #6C63FF, #FF3CAC);
    background-origin: border-box; background-clip: padding-box, border-box;
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.05);
    display: flex; flex-direction: column; gap: 24px; text-align: left; margin-bottom: 30px;
}

.input-group { position: relative; }
.input-group input, .input-group textarea {
    width: 100%; padding: 16px; background: rgba(255, 255, 255, 0.03);
    border: 1px solid #222; border-radius: 12px; color: white; font-size: 15px;
    outline: none; transition: 0.3s ease;
}
.input-group textarea { resize: none; }
.input-group input:focus, .input-group textarea:focus {
    border-color: #00e5ff; box-shadow: 0 0 15px rgba(0, 229, 255, 0.2); background: rgba(255,255,255,0.05);
}
.input-group label {
    position: absolute; left: 16px; top: 16px; color: #666;
    pointer-events: none; transition: 0.3s ease; font-size: 15px;
}
.input-group input:focus + label, .input-group input:valid + label,
.input-group textarea:focus + label, .input-group textarea:valid + label {
    top: -10px; left: 12px; padding: 2px 8px; background: #0d0d0d; color: #00e5ff; font-size: 12px; border-radius: 4px;
}

.send-btn {
    position: relative; width: 100%; padding: 16px; font-size: 16px; font-weight: 700;
    border: none; border-radius: 14px; color: white; cursor: pointer; overflow: hidden;
    background: linear-gradient(90deg, #00e5ff, #6a5cff, #ff4ecd); background-size: 200%;
    transition: 0.4s ease; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.send-btn:hover {
    transform: translateY(-4px); box-shadow: 0 15px 30px rgba(0, 212, 255, 0.3); background-position: right center;
}
.send-btn:hover .rocket { animation: rocketMove 0.8s infinite ease-in-out; }
@keyframes rocketMove { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, -4px); } }

.send-glow {
    position: absolute; width: 150px; height: 150px; background: white; opacity: .15;
    border-radius: 50%; top: -50px; left: -150px; filter: blur(30px); pointer-events: none;
    transition: 0.6s ease;
}
.send-btn:hover .send-glow { left: 110%; }

/* =========================================
   FOOTER
========================================= */
footer {
    width: min(1100px, calc(100% - 60px)); margin: auto; padding: 40px 0;
    border-top: 1px solid #111; display: flex; justify-content: space-between;
    align-items: center; color: #555; font-size: 13px;
}
.social-links a { color: #666; text-decoration: none; transition: 0.3s; }
.social-links a:hover { color: #fff; }

/* =========================================
   RESPONSIVE DESIGN INTERFACES
========================================= */
@media (max-width: 968px) {
    .hero { flex-direction: column-reverse; text-align: center; justify-content: center; padding-top: 140px; }
    .hero-description { margin: 20px auto 0; }
    .hero-buttons { justify-content: center; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 668px) {
    .navbar { width: calc(100% - 30px); }
    .nav-links {
        position: absolute; top: 75px; left: 0; width: 100%; padding: 24px;
        display: none; flex-direction: column; align-items: center;
        background: rgba(10, 10, 10, 0.96); border-radius: 20px; border: 1px solid #222; gap: 20px;
    }
    .nav-links.show { display: flex; }
    .menu-btn { display: block; }
    .projects-grid { grid-template-columns: 1fr; }
    .contact-form { padding: 24px; }
    footer { flex-direction: column; gap: 16px; text-align: center; }
}
