:root {
    --bg-base: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --card-glow: rgba(56, 189, 248, 0.15);
    
    /* Project Colors */
    --color-blue: #38bdf8;
    --color-cyan: #22d3ee;
    --color-purple: #c084fc;
    --color-red: #fb7185;
    --color-green: #4ade80;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
}

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

/* --- Utility --- */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.text-success { color: var(--color-green); }
.text-error { color: var(--color-red); }

/* --- Background Visuals --- */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary-gradient);
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
    animation: drift 20s infinite alternate-reverse ease-in-out;
}

.blob-1 { top: -100px; left: -100px; background: #38bdf8; }
.blob-2 { bottom: -100px; right: -100px; background: #818cf8; animation-delay: -5s; }
.blob-3 { top: 40%; left: 60%; background: #c084fc; width: 300px; height: 300px; animation-delay: -10s; }

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* --- Navigation --- */
.navbar {
    padding: 2.5rem 0;
    width: 100%;
}

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

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--color-blue);
    -webkit-text-fill-color: var(--color-blue);
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav-link {
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.4);
}

.status-badge {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--color-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* --- Hero Section --- */
.hero {
    margin: 2rem 0 6rem;
    padding: 6rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.05;
    letter-spacing: -2px;
}

.gradient-text {
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    font-weight: 300;
}

/* --- Section Shared --- */
.section-container {
    margin-bottom: 8rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -1px;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-wrapper {
    perspective: 1000px;
}

.project-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4);
}

.card-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.project-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.05);
}

.card-body {
    padding: 2.5rem;
    flex-grow: 1;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.project-tagline {
    color: var(--color-blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.project-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-stack span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-footer {
    padding: 1.5rem 2.5rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-top: 1px solid var(--glass-border);
}

.project-card:hover .card-footer {
    color: var(--color-blue);
}

.card-footer i {
    transition: transform 0.3s ease;
}

.project-card:hover .card-footer i {
    transform: translateX(8px);
}

/* --- Blog Section --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
}

.blog-img-wrapper {
    height: 200px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 2rem;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-weight: 600;
    color: var(--color-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 10px 20px -5px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-methods .method {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-main);
}

.contact-methods i {
    color: var(--color-blue);
    font-size: 1.2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-blue);
}

.form-status { margin-top: 1rem; min-height: 24px; font-weight: 500; }

/* --- Footer --- */
.footer {
    margin-top: auto;
    padding: 4rem 0;
    text-align: center;
}

.footer-content {
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    padding-top: 2rem;
}

.footer-bottom-bar {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 10px;
}

/* --- Pagination (CodeIgniter Defaults) --- */
.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    align-items: center;
    justify-content: center;
}

.pagination li a, .pagination li span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination li a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-blue);
}

.pagination li.active a, .pagination li.active span {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.pagination li.disabled a, .pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 3rem;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 2rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }

    .projects-grid, .blog-grid {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 2rem;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }
}
