:root {
    --bg-color: #050505;
    --surface-color: rgba(15, 23, 30, 0.4);
    --surface-border: rgba(52, 152, 219, 0.15);
    --primary-color: #3498db; /* Electric Blue */
    --primary-glow: rgba(52, 152, 219, 0.4);
    --secondary-color: #9b59b6; /* Amethyst Purple */
    --text-primary: #f0f0f0;
    --text-secondary: #a0aab2;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

::selection {
    background: var(--primary-color);
    color: #000;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-glow);
}

/* Utilities */
.glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(52, 152, 219, 0.4);
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.1);
    transform: translateY(-5px);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    background: transparent;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    z-index: 1;
}

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

.btn-primary:hover {
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary:hover {
    color: var(--primary-color);
}

/* Layout */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
}

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

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

.nav-links a:not(.btn-primary) {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

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

/* Hero Section */
.hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.greeting {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Interactive Orb */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circuit-orb {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: relative;
    border: 1px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 0 40px rgba(52, 152, 219, 0.1);
}

.inner-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.3;
    animation: pulse 4s ease-in-out infinite alternate;
}

.orbiting-dot {
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
    transform-origin: 0 155px; /* Radius + offset */
    animation: orbit 8s linear infinite;
}

.orbiting-dot.reverse {
    top: 50%;
    left: -5px;
    transform-origin: 155px 0;
    animation: orbit 6s linear infinite reverse;
    background: var(--secondary-color);
    box-shadow: 0 0 10px var(--secondary-color);
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.1; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

@keyframes orbit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Skills Section - Carousel */
.tech-carousel {
    overflow: hidden;
    padding: 2rem 0;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

.tech-carousel::before,
.tech-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tech-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.tech-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.carousel-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.tech-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 3rem;
    margin: 0 1rem;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    user-select: none; /* Prevent text selection while dragging */
}

.tech-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-5px);
    color: var(--primary-color);
}

/* Removed CSS keyframes handled by JS */

/* Resume Section */
.resume-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.resume-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.pdf-viewer {
    width: 100%;
    height: 700px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    background: rgba(0, 0, 0, 0.2);
}

.pdf-viewer object {
    width: 100%;
    height: 100%;
    display: block;
}

.pdf-viewer p {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.pdf-viewer a {
    color: var(--primary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .resume-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .pdf-viewer {
        height: 400px;
    }
}

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

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.project-links a {
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Contact */
.contact-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-primary.large {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

/* Footer */
footer {
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
    }
    .hero-cta {
        justify-content: center;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    footer {
        flex-direction: column;
        gap: 1rem;
    }
}
