/* ============================================
   BASE STYLES
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Space Grotesk', sans-serif;
    background: #0a0a0f;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00f5ff, #bd00ff);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00c4cc, #9d34ea);
}

/* 3D Canvas Background */
#canvas-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

/* Floating Orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float-orb 20s infinite ease-in-out;
    z-index: -1;
    pointer-events: none;
}
.orb-1 { width: 400px; height: 400px; background: #00f5ff; top: -100px; right: -100px; }
.orb-2 { width: 300px; height: 300px; background: #bd00ff; bottom: -50px; left: -50px; animation-delay: -5s; }

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -50px) scale(1.1); }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-container {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 100; padding: 20px 40px;
    display: flex; justify-content: space-between; align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.nav-container.scrolled {
    padding: 15px 40px;
    background: rgba(10, 10, 15, 0.95);
}
.logo {
    font-size: 1.8rem; font-weight: 700;
    background: linear-gradient(135deg, #00f5ff, #bd00ff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.logo:hover { transform: scale(1.05); }

.nav-links { display: flex; gap: 40px; }
.nav-link {
    position: relative; color: rgba(255, 255, 255, 0.7);
    text-decoration: none; font-weight: 500;
    transition: all 0.3s ease;
    padding: 5px 0;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, #00f5ff, #bd00ff);
    transition: width 0.3s ease;
}
.nav-link:hover { color: #ffffff; }
.nav-link:hover::after { width: 100%; }

/* Buttons */
.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #00f5ff, #00c4cc);
    color: #0a0a0f; border: none; border-radius: 50px;
    font-weight: 600; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.4);
}
.btn-secondary {
    padding: 12px 30px;
    background: transparent; color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 10px;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    border-color: #bd00ff; color: #bd00ff;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(189, 0, 255, 0.3);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid; grid-template-columns: 1fr 1fr;
    align-items: center; padding: 120px 80px 80px;
    gap: 60px; position: relative;
}
.hero-content { position: relative; z-index: 10; }
.hero-badge {
    display: inline-block; padding: 8px 20px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 50px; color: #00f5ff;
    font-size: 0.9rem; margin-bottom: 20px;
    font-family: 'JetBrains Mono', monospace;
}
.hero-title {
    font-size: 4rem; font-weight: 700;
    line-height: 1.1; margin-bottom: 20px;
}
.hero-title .highlight {
    background: linear-gradient(135deg, #00f5ff, #bd00ff, #ff006e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Typing Effect */
.typing-container {
    font-size: 1.2rem; color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px; font-family: 'JetBrains Mono', monospace;
    min-height: 1.5em;
}
.cursor {
    display: inline-block; width: 3px;
    background-color: #00f5ff;
    animation: blink 1s infinite;
    margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* Hero Image */
.hero-image-container { position: relative; display: flex; justify-content: center; }
.hero-image-frame { position: relative; width: 400px; height: 400px; }
.hero-image {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 3px solid rgba(0, 245, 255, 0.3);
    animation: morph-border 8s ease-in-out infinite;
}
.hero-image-glow {
    position: absolute; inset: -20px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(189, 0, 255, 0.3));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(40px); z-index: -1;
    animation: morph-border 8s ease-in-out infinite;
}
@keyframes morph-border {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
}
.floating-element {
    position: absolute; background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px; padding: 10px 20px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
    animation: float-element 6s ease-in-out infinite;
    z-index: 5;
}
.floating-element-1 { top: 10%; right: -20px; animation-delay: 0s; }
.floating-element-2 { bottom: 20%; left: -30px; animation-delay: -2s; }
@keyframes float-element {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 100px 80px; position: relative; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-tag {
    display: inline-block; padding: 8px 20px;
    background: rgba(189, 0, 255, 0.1);
    border: 1px solid rgba(189, 0, 255, 0.3);
    border-radius: 50px; color: #bd00ff;
    font-size: 0.85rem; font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
}
.section-title { font-size: 3rem; font-weight: 700; margin-bottom: 20px; }
.section-subtitle { color: rgba(255, 255, 255, 0.6); font-size: 1.1rem; }

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; max-width: 1400px; margin: 0 auto;
}
.skill-card {
    background: rgba(18, 18, 26, 0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px; padding: 30px;
    transition: all 0.4s ease; position: relative; overflow: hidden;
}
.skill-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 245, 255, 0.3);
    box-shadow: 0 30px 60px rgba(0, 245, 255, 0.15);
}
.skill-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1), rgba(189, 0, 255, 0.1));
    border-radius: 15px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; transition: all 0.4s ease;
}
.skill-card:hover .skill-icon {
    background: linear-gradient(135deg, #00f5ff, #bd00ff);
    transform: rotate(10deg);
}
.skill-icon i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #00f5ff, #bd00ff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.skill-card:hover .skill-icon i { -webkit-text-fill-color: #0a0a0f; }
.skill-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 15px; }
.skill-list { list-style: none; }
.skill-list li {
    padding: 6px 0; color: rgba(255, 255, 255, 0.7);
    display: flex; align-items: center; gap: 10px; font-size: 0.9rem;
}
.skill-list li::before { content: '▹'; color: #00f5ff; }

/* ============================================
   PROJECTS
   ============================================ */
.projects-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; max-width: 1400px; margin: 0 auto;
}
.project-card {
    background: rgba(18, 18, 26, 0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px; overflow: hidden;
    transition: all 0.5s ease;
}
.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(189, 0, 255, 0.3);
    box-shadow: 0 30px 60px rgba(189, 0, 255, 0.2);
}
.project-image { position: relative; height: 200px; overflow: hidden; }
.project-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .project-image img { transform: scale(1.1); }
.project-content { padding: 25px; }
.project-tags { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.project-tag {
    padding: 4px 12px; background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 50px; color: #00f5ff;
    font-size: 0.7rem; font-family: 'JetBrains Mono', monospace;
}
.project-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 10px; }
.project-description { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; margin-bottom: 20px; }
.project-link {
    color: #00f5ff; text-decoration: none;
    font-size: 0.9rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 5px;
    transition: gap 0.3s ease;
}
.project-link:hover { gap: 10px; }

/* ============================================
   CODECOLLAB
   ============================================ */
.codecollab-section {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05), rgba(189, 0, 255, 0.05));
    border-radius: 40px; padding: 60px;
    margin: 0 80px;
}
.codecollab-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
}
.codecollab-image { position: relative; }
.codecollab-image img {
    width: 100%; border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.codecollab-image::before {
    content: ''; position: absolute; inset: -20px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(189, 0, 255, 0.2));
    border-radius: 30px; filter: blur(40px); z-index: -1;
}
.codecollab-features { display: flex; flex-direction: column; gap: 20px; }
.feature-item {
    display: flex; gap: 15px; padding: 20px;
    background: rgba(18, 18, 26, 0.5);
    border-radius: 15px; border-left: 4px solid #00f5ff;
    transition: all 0.3s ease;
}
.feature-item:hover {
    background: rgba(18, 18, 26, 0.8);
    transform: translateX(10px);
    border-left-color: #bd00ff;
}
.feature-icon {
    width: 45px; height: 45px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(189, 0, 255, 0.2));
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.feature-icon i {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #00f5ff, #bd00ff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.feature-item h4 { font-size: 1rem; margin-bottom: 5px; }
.feature-item p { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }

/* ============================================
   TUTORIALS (YouTube - FIXED)
   ============================================ */
.tutorials-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px; max-width: 1400px; margin: 0 auto;
}
/* MERGED: Single .tutorial-card rule */
.tutorial-card {
    background: rgba(18, 18, 26, 0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px; overflow: hidden;
    transition: all 0.4s ease;
    display: flex; flex-direction: column;
}
.tutorial-card:hover {
    border-color: rgba(0, 245, 255, 0.3);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 245, 255, 0.2);
}
/* Responsive Video Wrapper */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    overflow: hidden;
}
.video-thumb-link { display: block; text-decoration: none; }
.yt-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
    opacity: 0.85;
}
.yt-play-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px;
    background: rgba(0,0,0,0.25);
    transition: background 0.3s ease;
}
.yt-play-btn {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
    transition: transform 0.2s ease;
}
.yt-watch-label {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.55);
    padding: 5px 14px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.video-thumb-link:hover .yt-thumb { transform: scale(1.05); opacity: 1; }
.video-thumb-link:hover .yt-play-overlay { background: rgba(0,0,0,0.4); }
.video-thumb-link:hover .yt-play-btn { transform: scale(1.15); }
.video-thumb-link:hover .yt-watch-label { opacity: 1; transform: translateY(0); }
.tutorial-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.tutorial-info h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.tutorial-info p { color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; margin-bottom: 15px; flex-grow: 1; }
.tutorial-meta {
    display: flex; gap: 20px; font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-container {
    max-width: 800px; margin: 0 auto;
    background: rgba(18, 18, 26, 0.8); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px; padding: 50px;
}
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; color: rgba(255, 255, 255, 0.8); font-size: 0.9rem; }
.form-input {
    width: 100%; padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
}
.form-input:focus {
    outline: none; border-color: #00f5ff;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
    background: rgba(0, 245, 255, 0.05);
}
textarea.form-input { resize: vertical; min-height: 120px; }
.submit-btn {
    width: 100%; padding: 18px;
    background: linear-gradient(135deg, #00f5ff, #bd00ff);
    border: none; border-radius: 12px;
    color: #0a0a0f; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.submit-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.4);
}
.social-links {
    display: flex; justify-content: center; gap: 15px; margin-top: 50px;
}
.social-link {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px; color: #ffffff;
    font-size: 1.2rem; transition: all 0.4s ease;
    text-decoration: none;
}
.social-link:hover {
    background: linear-gradient(135deg, #00f5ff, #bd00ff);
    border-color: transparent; color: #0a0a0f;
    transform: translateY(-5px) rotate(360deg);
}

/* ============================================
   FOOTER & MOBILE
   ============================================ */
.footer {
    padding: 30px 80px; text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5); font-size: 0.9rem;
}
.mobile-menu-btn { display: none; background: none; border: none; color: #ffffff; font-size: 1.5rem; cursor: pointer; }
.mobile-menu {
    position: fixed; top: 0; right: -100%;
    width: 300px; height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px); z-index: 200;
    padding: 80px 30px; transition: right 0.4s ease;
}
.mobile-menu.active { right: 0; }
.mobile-menu-links { display: flex; flex-direction: column; gap: 25px; }
.mobile-menu-links a {
    color: rgba(255, 255, 255, 0.7); text-decoration: none;
    font-size: 1.3rem; font-weight: 600; transition: all 0.3s ease;
}
.mobile-menu-links a:hover { color: #00f5ff; padding-left: 10px; }
.close-menu {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; color: #ffffff;
    font-size: 1.5rem; cursor: pointer;
}

/* Loader */
.loader {
    width: 50px; height: 50px;
    border: 3px solid rgba(0, 245, 255, 0.2);
    border-top-color: #00f5ff; border-radius: 50%;
    animation: spin 1s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; padding: 100px 40px 60px; text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-image-container { order: -1; }
    .hero-image-frame { width: 300px; height: 300px; }
    .codecollab-grid { grid-template-columns: 1fr; gap: 40px; }
    .codecollab-section { margin: 0 40px; padding: 40px; }
}
@media (max-width: 768px) {
    .nav-container { padding: 15px 20px; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-title { font-size: 2.5rem; }
    .section { padding: 60px 20px; }
    .tutorials-grid { grid-template-columns: 1fr; }
    .contact-container { padding: 30px 20px; }
    .footer { padding: 20px; }
    .typing-container { font-size: 1rem; }
    .hero-image-frame { width: 250px; height: 250px; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
    .hero-buttons { flex-direction: column; }
}

/* Selection & Focus */
::selection { background: rgba(0, 245, 255, 0.3); color: #ffffff; }
:focus-visible { outline: 2px solid #00f5ff; outline-offset: 2px; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}