/* Global Styles */
:root {
    --primary: #6200ee;
    --primary-light: #8f3aff;
    --dark: #121212;
    --light: #f8f8f8;
    --gray: #888;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

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

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes gradientBg {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: fadeIn 1s forwards;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.5s ease;
}

.logo:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links li {
    opacity: 0;
    animation: slideUp 0.5s forwards;
}

.nav-links li:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-links li:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-links li:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-links li:nth-child(4) {
    animation-delay: 0.4s;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: center;
    height: 100vh;
    padding: 7.5% 5% 0;
    /* background: linear-gradient(135deg, #0d0d0d 0%, #1a0533 100%); */
    background: black;
    position: relative;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.terminal {
    width: min(640px, 90vw);
    background: #1e1e1e;
    /* background: #1e1e1e05; */
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(98, 0, 238, 0.35);
    overflow: hidden;
    text-align: left;
    /* backdrop-filter: blur(50px); */
    position: relative;
    z-index: 2;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #2d2d2d;
    /* background: #2d2d2d05; */
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
    margin-left: 8px;
    font-size: 0.8rem;
    color: #888;
    font-family: monospace;
}

.terminal-body {
    padding: 20px 24px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    min-height: 180px;
    color: #ccc;
}

.t-line { display: block; }
.t-prompt { color: var(--primary-light); }
.t-output { color: #e0e0e0; padding-left: 1ch; }
.t-cursor {
    display: inline-block;
    width: 9px;
    height: 1.1em;
    background: var(--primary-light);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(98, 0, 238, 0.3);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 2;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(98, 0, 238, 0.4);
}

.btn:hover::before {
    left: 100%;
    transition: 0.5s;
}

/* Projects Section */
.projects {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
}

.section-title.animate {
    animation: slideUp 1s forwards;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: width 1s ease;
}

.section-title.animate::after {
    width: 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.project-card.animate {
    animation: slideUp 0.8s forwards;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    position: relative;
    overflow: hidden;
}

.project-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img::before{
    background-color: rgba(98, 0, 238, 0.05);
}

.project-img img {
    max-width: 100%;
    height: auto;
}

.project-info {
    padding: 1.5rem;
    text-align: center;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.project-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.5s ease;
}

.project-card:hover .project-title::after {
    width: 100%;
}

.project-desc {
    color: var(--gray);
    margin-bottom: 1rem;
    text-align: left;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background-color: rgba(98, 0, 238, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.project-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding-right: 20px;
}

.project-link::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.project-link:hover {
    color: var(--primary-light);
}

.project-link:hover::after {
    transform: translate(5px, -50%);
}

/* About Section */
.about {
    padding: 5rem 5%;
    background-color: var(--dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(98, 0, 238, 0.1) 0%, transparent 50%, rgba(143, 58, 255, 0.1) 100%);
    z-index: 0;
}

.about .section-title {
    position: relative;
    z-index: 1;
}

.about .section-title::after {
    background-color: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-content p {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateX(-30px);
}

.about-content p.animate {
    animation: slideInLeft 0.8s forwards;
}

/* Contact Section */
.contact {
    padding: 5rem 5%;
    text-align: center;
    background-color: var(--light);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(98, 0, 238, 0.05) 0%, transparent 70%);
}

.contact::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(143, 58, 255, 0.05) 0%, transparent 70%);
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 250px;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.contact-method.animate {
    animation: slideUp 0.8s forwards;
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    transition: var(--transition);
}

.contact-method:hover .contact-icon {
    animation: pulse 1s infinite;
}

.contact-method h3 {
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.contact-method h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.5s ease;
}

.contact-method:hover h3::after {
    width: 100%;
}

.contact-method p {
    color: var(--gray);
}

/* Footer */
footer {
    padding: 2rem 5%;
    background-color: var(--dark);
    color: white;
    text-align: center;
    position: relative;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.social-link:hover {
    color: var(--primary-light);
}

.social-link:hover::before {
    transform: scale(1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
    }
}

/* Animation triggers on scroll */
.hidden {
    opacity: 0;
    transform: translateY(30px);
}