:root {
    /* Colors */
    --bg-color: #0a0a15;
    --bg-gradient: linear-gradient(135deg, #0a0a15 0%, #1a1a2e 100%);
    --text-color: #bcbcbc;

    /* Accents */
    --accent-color: #00f260;
    --accent-gradient: linear-gradient(45deg, #00ffc3, #0575e6);
    --logo-blue: #0575e6;
    --logo-cyan: #00ffc3;

    /* Glassmorphism */
    --secondary-bg: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255, 255, 255, 0.0);

    /* Typography & Effects */
    --font-main: 'Inter', sans-serif;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

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

#bg-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
    transform: translateY(-100%);
    opacity: 0;
}

header.scrolled {
    transform: translateY(0);
    opacity: 1;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(10, 10, 21, 0.6) 0%, rgba(26, 26, 46, 0.6) 100%);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 50px;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-left,
.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-icon {
    font-size: 1.2rem;
    color: #fff;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.social-icon:hover {
    color: var(--logo-cyan);
    transform: translateY(-3px);
    text-shadow: 0 0 10px rgba(0, 255, 195, 0.5);
    opacity: 1;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

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

nav a:hover::after {
    width: 100%;
}

section {
    min-height: 100vh;
    padding: 100px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero Section */
.hero {
    align-items: center;
    text-align: center;
    justify-content: flex-start;
    padding-top: 5vh;
}

.hero h1 {
    font-size: 6rem;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.5rem;
    color: #cccccc;
    max-width: 600px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.hero-logo-container {
    margin-bottom: 20px;
    position: relative;
}

.hero-logo-text {
    font-size: 4rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: none;
    margin: 0;
    letter-spacing: -0.02em;
}

.hero-logo-container[data-logo-type="text"] .hero-logo-text {
    display: block;
}

.hero-logo-container[data-logo-type="text"] .hero-logo-img {
    display: none;
}

.hero-logo-img {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: opacity 0.4s ease-out, filter 0.4s ease-out, transform 0.4s ease-out;
    will-change: opacity, filter, transform;
}

.hero-logo-img.dissolving {
    opacity: 0;
    filter: blur(8px) contrast(150%) brightness(1.2);
    transform: scale(1.05);
    image-rendering: pixelated;
}

/* Animations */
@keyframes letterFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(-90deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    animation: letterFadeIn 0.6s ease-out forwards;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
}

.hero-letter:hover {
    transform: scale(1.3) translateY(-10px);
    text-shadow: 0 0 20px var(--accent-color), 0 0 40px var(--accent-color);
    cursor: default;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.show-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* Components */
.btn {
    padding: 12px 30px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 242, 96, 0.3);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.project-card {
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s, background 0.3s;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    padding: 0;
    /* Updated for preview */
}

.project-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.tech-stack {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

/* Project Preview Styles */
.card-preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #000;
}

.card-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    pointer-events: none;
}

.card-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: background 0.3s;
}

.project-card:hover .card-preview-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    background: transparent;
    pointer-events: none;
}

.card-content * {
    pointer-events: auto;
}

/* Featured Project */
#featured-project {
    position: relative;
    border: double 2px transparent;
    background-image: linear-gradient(var(--secondary-bg), var(--secondary-bg)), var(--accent-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 25px rgba(0, 242, 96, 0.15);
}

#featured-project:hover {
    box-shadow: 0 0 35px rgba(0, 242, 96, 0.3);
    transform: translateY(-12px) scale(1.02);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-gradient);
    color: #0a0a15;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* About Section */
.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 60px auto 0;
    width: 100%;
}

.value-card {
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.value-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.value-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.value-card p {
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.5;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

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

/* Loading Symbol */
.water-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.water-loader svg {
    width: 80px;
    height: 80px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Color changing animation for gradient */
@keyframes colorCycle {
    0% {
        stop-color: #00ffc3;
    }
    25% {
        stop-color: #0575e6;
    }
    50% {
        stop-color: #00f260;
    }
    75% {
        stop-color: #e0aaff;
    }
    100% {
        stop-color: #00ffc3;
    }
}

.water-loader #gradient1 stop:first-child {
    animation: colorCycle 4s ease-in-out infinite;
}

.water-loader #gradient1 stop:last-child {
    animation: colorCycle 4s ease-in-out infinite 0.5s;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-logo-text {
        font-size: 2.5rem;
    }

    .hero-logo-img {
        max-width: 100%;
    }

    nav ul {
        display: none;
    }
}