/* 
   Portfolio Overhaul - New Design System 
   Theme: Sci-Fi / Modern / Cool Colors
*/

:root {
    /* Color Palette */
    --bg-dark: #050510;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);

    /* Accents */
    --color-cyan: #00f3ff;
    --color-purple: #bc13fe;
    --color-blue: #2d5af5;

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--color-cyan), var(--color-purple));
    --gradient-glow: linear-gradient(135deg, rgba(0, 243, 255, 0.2), rgba(188, 19, 254, 0.2));

    /* Typography */
    --font-heading: 'Orbitron', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Layout */
    --container-width: 1400px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    background: var(--bg-dark);
}

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

/* Custom Selection */
::selection {
    background: var(--color-cyan);
    color: #000;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* --- Layout Components --- */

/* Canvas for Three.js Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* Overlay to ensure text readability over 3D bg */
.overlay-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 90%);
    z-index: 1;
    pointer-events: none;
}

.main-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(5, 5, 16, 0.5);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.3));
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

.logo span {
    color: var(--color-purple);
}

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    box-shadow: 0 0 10px var(--color-cyan);
    transition: width 0.3s ease;
}

nav a:hover {
    color: #fff;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background: var(--color-cyan);
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-primary {
    background: transparent;
    color: #fff;
    border: 1px solid var(--color-cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--gradient-main);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
    border-color: transparent;
    transform: translateY(-5px);
}

.btn-glow {
    background: var(--gradient-main);
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.4);
    border: none;
}

.btn-glow:hover {
    box-shadow: 0 0 50px rgba(188, 19, 254, 0.7);
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text {
    z-index: 2;
}

.hero-glitch {
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 800;
    color: #fff;
    position: relative;
    text-transform: none;
    margin-bottom: 30px;
    line-height: 1.3;
    letter-spacing: 1px;
}

.hero-glitch .typing-text {
    background: linear-gradient(135deg, var(--color-cyan), var(--color-purple), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-glitch .cursor-blink {
    border-right: 3px solid var(--color-cyan);
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-cyan);
    letter-spacing: 5px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* 3D Image Wrapper */
.hero-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    width: 400px;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 243, 255, 0.3);
    border: 3px solid var(--color-cyan);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 5;
}

.hero-img:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 243, 255, 0.5);
}

/* --- Sections --- */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title span {
    color: var(--color-cyan);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-main);
}

/* --- Cards (Work/Services) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(10, 10, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--color-purple);
    box-shadow: 0 10px 40px rgba(188, 19, 254, 0.15);
}

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

.card-icon {
    font-size: 2.5rem;
    color: var(--color-cyan);
    margin-bottom: 20px;
}

/* --- Footer --- */
footer {
    padding: 80px 0 30px;
    background: linear-gradient(to top, #020205, transparent);
    text-align: center;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #fff;
}

.social-link:hover {
    background: var(--gradient-main);
    border-color: transparent;
    transform: translateY(-5px) rotate(360deg);
}

/* Custom cursor removed as per user request */

/* Mobile Responsive */
@media (max-width: 768px) {
    header {
        padding: 0 4%;
        height: 70px;
    }

    .logo {
        font-size: 1.2rem;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 16, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
        z-index: 1000;
    }

    nav ul.active {
        right: 0;
    }

    nav a {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 50px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-text {
        order: 2;
    }

    .hero-img-container {
        order: 1;
    }

    .hero-img {
        width: 100%;
        max-width: 300px;
        height: 350px;
        margin: 0 auto;
    }

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

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }

    .hero-desc {
        font-size: 1rem;
        padding: 0 10px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    section {
        padding: 60px 0;
    }

    .btn {
        padding: 12px 28px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    /* Contact page mobile */
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    /* About page mobile */
    .about-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .hero-glitch {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.7rem;
    }
}