/* Variables & Reset */
:root {
    --bg-color: #0a0a0a;
    --card-bg: #171717;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent-color: #6366f1;
    /* Indigo */
    --accent-glow: rgba(99, 102, 241, 0.5);
    --gradient-1: #6366f1;
    --gradient-2: #a855f7;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    display: none;
    /* Hidden on mobile by default */
}

@media (min-width: 992px) {

    .cursor-dot,
    .cursor-outline {
        display: block;
    }
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--text-primary);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    width: 30px;
    height: 30px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.accent {
    color: var(--accent-color);
}

.gradient-text {
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
    color: white;
    border: none;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-primary);
    margin-left: 0;
    /* Mobile reset */
    margin-top: 15px;
    /* Mobile spacing */
}

@media (min-width: 768px) {
    .btn-outline {
        margin-left: 15px;
        margin-top: 0;
    }
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Mobile Nav */
.nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: #111;
    padding-top: 80px;
    transition: var(--transition);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav.active {
    right: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

@media (min-width: 768px) {
    .nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding-top: 0;
        box-shadow: none;
        flex-direction: row;
    }

    .nav-list {
        flex-direction: row;
        gap: 30px;
    }
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    font-size: 1.2rem;
    /* Larger on mobile */
}

@media (min-width: 768px) {
    .nav-link {
        font-size: 1rem;
    }
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: block;
    cursor: pointer;
    z-index: 1001;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 50px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
    text-align: center;
}

@media (min-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        gap: 50px;
    }
}

.hero-subtitle {
    display: inline-block;
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .hero-description {
        margin-left: 0;
        font-size: 1.1rem;
    }
}

.hero-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

@media (min-width: 768px) {
    .hero-btns {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .hero-btns {
        justify-content: flex-start;
    }
}

/* Code Block Visual */
.hero-visual {
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 992px) {
    .hero-visual {
        display: block;
        position: relative;
    }
}

.code-block {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    border: 1px solid #333;
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-visual:hover .code-block {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

pre {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #d4d4d4;
    overflow-x: auto;
}

.keyword {
    color: #c586c0;
}

.variable {
    color: #9cdcfe;
}

.string {
    color: #ce9178;
}

.property {
    color: #dcdcaa;
}

.boolean {
    color: #569cd6;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    filter: blur(100px);
    opacity: 0.2;
    z-index: 0;
}

/* Sections */
.section {
    padding: 60px 0;
}

@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 60px;
    }
}

.section-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-subtitle {
    color: var(--text-secondary);
}

/* About Section */
.about-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
    .about-content {
        padding: 40px;
    }
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

@media (min-width: 576px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.project-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
        padding: 50px;
        gap: 50px;
    }
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: var(--font-main);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animation Utilities */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Animations */
@media (max-width: 768px) {
    .project-card:nth-child(1) {
        transition-delay: 0.1s;
    }

    .project-card:nth-child(2) {
        transition-delay: 0.2s;
    }

    .project-card:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-link {
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.4s ease;
    }

    .nav.active .nav-link {
        opacity: 1;
        transform: translateX(0);
    }

    .nav.active .nav-link:nth-child(1) {
        transition-delay: 0.2s;
    }

    .nav.active .nav-link:nth-child(2) {
        transition-delay: 0.3s;
    }

    .nav.active .nav-link:nth-child(3) {
        transition-delay: 0.4s;
    }

    .nav.active .nav-link:nth-child(4) {
        transition-delay: 0.5s;
    }
}