/* ============================================
   STYLING SYSTEM & VARIABLES
   ============================================ */
:root {
    --bg-color: #030712;
    --card-bg: rgba(17, 24, 39, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --violet-accent: #a78bfa;
    --emerald: #34d399;
    --amber: #fbbf24;
    --pink: #f472b6;
    --orange: #ff5722;
}

/* ============================================
   BASE STYLES
   ============================================ */
html {
    scroll-behavior: smooth;
    scrollbar-color: var(--accent-color) var(--bg-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   BACKGROUND ANIMATION SYSTEM
   ============================================ */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    overflow: hidden;
}

.mesh-gradient {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(at 10% 10%, rgba(56, 189, 248, 0.2) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(139, 92, 246, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(3, 7, 18, 1) 0px, transparent 80%);
    filter: blur(80px);
    animation: meshFlow 20s linear infinite;
}

@keyframes meshFlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(5%, 5%) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.particle-system {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    bottom: -50px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
    animation: particleFloat 15s linear infinite;
    pointer-events: none;
}

.particle:nth-child(1) { left: 10%; width: 30px; height: 30px; animation-duration: 18s; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: 2s; background: rgba(167, 139, 250, 0.1); }
.particle:nth-child(3) { left: 40%; width: 40px; height: 40px; animation-duration: 22s; animation-delay: 4s; }
.particle:nth-child(4) { left: 55%; width: 25px; height: 25px; animation-duration: 14s; animation-delay: 1s; }
.particle:nth-child(5) { left: 70%; width: 15px; height: 15px; animation-duration: 10s; animation-delay: 5s; }
.particle:nth-child(6) { left: 85%; width: 35px; height: 35px; animation-duration: 20s; animation-delay: 3s; background: rgba(167, 139, 250, 0.1); }
.particle:nth-child(7) { left: 15%; width: 20px; height: 20px; animation-duration: 16s; animation-delay: 8s; }
.particle:nth-child(8) { left: 60%; width: 30px; height: 30px; animation-duration: 19s; animation-delay: 6s; }

@keyframes particleFloat {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-120vh) rotate(360deg) scale(0.5); opacity: 0; }
}

/* ============================================
   DYNAMIC GLOW EFFECT
   ============================================ */
.dynamic-glow {
    position: relative;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.dynamic-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.dynamic-glow:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.dynamic-glow:hover::before {
    opacity: 1;
}

/* ============================================
   BASE LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem 2rem;
}

/* ============================================
   MODERN NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 900px;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.nav-content {
    padding: 0.8rem 1.5rem 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.nav-brand .dot { color: var(--accent-color); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
    background: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--accent-color);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* ============================================
   HERO & SECTION STYLING
   ============================================ */
.hero { text-align: center; padding: 4rem 0 6rem 0; }
.hero h1 { font-size: 4rem; font-weight: 800; line-height: 1; margin-bottom: 1rem; letter-spacing: -2px; }
.hero h2 { font-size: 1.6rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 2rem; }
.hero p { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.highlight { background: linear-gradient(to right, var(--accent-color), var(--violet-accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header.left-aligned { text-align: left; margin-bottom: 2.5rem; }
.section-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--orange); font-weight: 700; }
.section-header h3 { font-size: 2rem; font-weight: 700; margin-top: 0.5rem; }
.section-header .big-heading { font-size: 3.5rem; font-weight: 800; letter-spacing: -2px; margin-top: 0.5rem; }
.divider { width: 40px; height: 3px; background: var(--accent-color); margin: 1rem auto 0 auto; border-radius: 2px; }

/* ============================================
   PROJECT CARDS
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    backdrop-filter: blur(5px);
    z-index: 2;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-content { padding: 2rem; position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; }
.project-num { font-size: 0.8rem; font-weight: 800; color: var(--violet-accent); display: block; margin-bottom: 0.5rem; }
.project-card h4 { font-size: 1.3rem; margin-bottom: 0.8rem; font-weight: 700; }
.project-card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; text-align: left; flex-grow: 1; }
.view-link { color: var(--accent-color); font-size: 0.9rem; font-weight: 700; transition: transform 0.3s ease; display: inline-block; }
.project-card:hover .view-link { transform: translateX(5px); color: var(--text-primary); }

/* Featured Project - Nexus */
.featured-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(167, 139, 250, 0.12));
    border: 1px solid rgba(56, 189, 248, 0.35);
    position: relative;
    overflow: hidden;
}

.featured-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at 20% 30%, rgba(56, 189, 248, 0.15), transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.featured-card .card-content { padding: 2.5rem 2.8rem; }

.featured-card h4 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #f9fafb, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.featured-card p { 
    font-size: 1.05rem; 
    max-width: 680px; 
    color: #cbd5e1; 
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.featured-card .project-num { color: var(--accent-color); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; }
.featured-card .view-link { font-size: 1rem; margin-top: 0; display: inline-block; }

.featured-card:hover {
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.2), 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-6px);
}

/* Tech tags inside featured card */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.tech-tags span {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-color);
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.tech-tags span:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.placeholder-card { opacity: 0.7; border-style: dashed; }
.placeholder-card:hover { opacity: 1; }

/* ============================================
   SKILLS SECTION — CATEGORY CARDS WITH GRID
   ============================================ */
.skills-section {
    padding: 2rem 0 4rem 0;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Individual category card */
.skill-category-card {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem 1.75rem;
    backdrop-filter: blur(10px);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.06), transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-category-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(56, 189, 248, 0.08);
    transform: translateY(-4px);
}

.skill-category-card:hover::before {
    opacity: 1;
}

/* Category header */
.category-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(167, 139, 250, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--accent-color);
    flex-shrink: 0;
}

.category-header h4 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Skill grid — 3 columns */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem 0.75rem;
}

/* Individual skill item */
.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-3px);
}

/* Icon box — square with rounded corners, dark bg */
.skill-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-icon-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.skill-icon-box i,
.skill-icon-box svg {
    font-size: 1.8rem;
    color: #ffffff;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6));
    position: relative;
    z-index: 1;
    transition: transform 0.35s ease, filter 0.35s ease;
    width: 28px;
    height: 28px;
}

.skill-icon-box svg {
    stroke: #ffffff;
    stroke-width: 1.8;
}

.skill-item:hover .skill-icon-box {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 
        0 0 20px rgba(56, 189, 248, 0.3),
        0 0 40px rgba(56, 189, 248, 0.1);
    transform: scale(1.06);
}

.skill-item:hover .skill-icon-box::before {
    opacity: 1;
}

.skill-item:hover .skill-icon-box i,
.skill-item:hover .skill-icon-box svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

/* Colored variants per category */
.skill-category-card:nth-child(1) .skill-item:hover .skill-icon-box {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35), 0 0 40px rgba(56, 189, 248, 0.12);
}
.skill-category-card:nth-child(2) .skill-item:hover .skill-icon-box {
    border-color: rgba(52, 211, 153, 0.6);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.35), 0 0 40px rgba(52, 211, 153, 0.12);
}
.skill-category-card:nth-child(3) .skill-item:hover .skill-icon-box {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.35), 0 0 40px rgba(251, 191, 36, 0.12);
}

/* Skill label */
.skill-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.2px;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.skill-item:hover .skill-name {
    color: var(--text-primary);
}

/* Signature skill — typing speed, subtle multi-color */
.signature-item .skill-icon-box {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.2), rgba(244, 114, 182, 0.15));
    border-color: rgba(103, 232, 249, 0.4);
}

.signature-item .skill-icon-box svg {
    stroke: #67e8f9;
    filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.6));
}

.signature-item:hover .skill-icon-box {
    border-color: #67e8f9;
    box-shadow: 0 0 25px rgba(103, 232, 249, 0.5), 0 0 50px rgba(167, 139, 250, 0.25);
}

.signature-item .skill-name {
    background: linear-gradient(to right, #67e8f9, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* ============================================
   RESPONSIVE — SKILLS
   ============================================ */
@media (max-width: 1000px) {
    .skills-categories {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .skill-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .skill-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .skill-icon-box {
        width: 52px;
        height: 52px;
    }
    .skill-icon-box i,
    .skill-icon-box svg {
        font-size: 1.5rem;
        width: 24px;
        height: 24px;
    }
    .skill-name {
        font-size: 0.65rem;
    }
    .section-header .big-heading {
        font-size: 2.5rem;
    }
}

/* ============================================
   SOCIAL BUTTON
   ============================================ */
.links-section { text-align: center; margin-bottom: 4rem; }
.social-links { display: flex; justify-content: center; margin-top: 2rem; }
.social-btn {
    display: inline-flex;
    background: var(--card-bg);
    padding: 1rem 2.5rem;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    z-index: 2;
    border: 1px solid var(--card-border);
}
.social-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */
footer { text-align: center; padding: 4rem 0; border-top: 1px solid var(--card-border); font-size: 0.9rem; color: var(--text-secondary); }

/* ============================================
   ENTRANCE ANIMATIONS
   ============================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 1.2s ease forwards; }
.slide-up { opacity: 0; animation: slideUp 1s ease 0.2s forwards; }
.slide-up-delayed { opacity: 0; animation: slideUp 1s ease 0.4s forwards; }

/* ============================================
   RESPONSIVE — GENERAL
   ============================================ */
@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .hero h1 { font-size: 2.8rem; }
    .container { padding-top: 7rem; }
    .featured-card .card-content { padding: 2rem 1.8rem; }
    .featured-card h4 { font-size: 1.6rem; }
    .section-header h3 { font-size: 1.6rem; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .hero h2 { font-size: 1.2rem; }
    .container { padding: 6rem 1.2rem 3rem 1.2rem; }
    .social-btn { padding: 0.9rem 1.8rem; }
    .featured-card .card-content { padding: 1.75rem 1.4rem; }
    .tech-tags span { font-size: 0.7rem; padding: 0.3rem 0.7rem; }
}
