@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&family=Zen+Kaku+Gothic+New:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #08080c;
    --text-primary: #f0f0f5;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-glow: rgba(88, 166, 255, 0.5);
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Zen Kaku Gothic New', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    /* Noise Texture Overlay */
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

/* Fluid Background Animation */
.fluid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #080a11;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 50vw;
    height: 50vw;
    background: #1a2a44;
    animation-delay: -2s;
}

.blob:nth-child(2) {
    bottom: 20%;
    right: 10%;
    width: 40vw;
    height: 40vw;
    background: #1d1b38;
    animation-delay: -5s;
}

.blob:nth-child(3) {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: #0f2c30;
    animation-delay: -8s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, -50px) scale(1.1);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.15s ease-out;
    /* Slight lag */
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(5px);
    transition: background 0.3s ease;
}

.header.scrolled {
    background: rgba(8, 8, 12, 0.8);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 60px;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.05;
    margin-bottom: 30px;
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    /* Animated in JS */
    transform: translateY(30px);
}

.hero-title span {
    display: block;
    font-size: 6rem;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    -webkit-text-fill-color: transparent;
    background: none;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #fff, transparent);
}

/* Portfolio Grid - Glassmorphism */
.portfolio {
    padding: 150px 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 80px;
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0.7;
}

.section-title::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, var(--glass-border), transparent);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    backdrop-filter: blur(10px);
    opacity: 0;
    /* For scroll animation */
    transform: translateY(30px);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    background: var(--glass-highlight);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-image-placeholder {
    height: 220px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    font-family: var(--font-heading);
    transition: color 0.3s ease;
}

.card:hover .card-image-placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #fff;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    flex-grow: 1;
    font-weight: 300;
}

.card-link {
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.card:hover .card-link {
    opacity: 1;
    gap: 15px;
}

/* Footer */
.footer {
    padding: 80px 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
}

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-title span {
        font-size: 3.5rem;
    }

    .blob {
        filter: blur(50px);
    }

    /* Mobile Cursor Reset */
    * {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}