:root {
    /* Colors */
    --bg-color: #0f0f13;
    /* Slightly lighter/bluer black */
    --surface-color: #1a1a20;
    --surface-hover: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #646cff;
    /* Vivid Blue-Purple */
    --accent-secondary: #ff00c8;
    /* Magenta/Pink */
    --accent-gradient: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

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

.global-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 40%, rgba(100, 108, 255, 0.2), transparent 40%),
        radial-gradient(circle at 90% 20%, rgba(255, 0, 200, 0.2), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(0, 255, 242, 0.15), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 108, 255, 0.05), transparent 70%);
    pointer-events: none;
    animation: bg-pulse 8s ease-in-out infinite alternate;
    filter: blur(40px);
}

@keyframes bg-pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Floating Background Icons */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.icon-float {
    position: absolute;
    bottom: -100px;
    animation: floatUp 20s linear infinite;
    opacity: 0.3;
    /* Subtle based opacity */
}

/* Alternate colors */
.icon-float:nth-child(odd) {
    color: var(--accent-primary);
}

.icon-float:nth-child(even) {
    color: var(--accent-secondary);
}

/* Specific icon sizing */
.icon-float svg {
    width: 60px;
    height: 60px;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.2;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

/* Shooting Stars */
.star-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 1);
    animation: shooting 3s linear infinite;
    opacity: 0;
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}

@keyframes shooting {
    0% {
        transform: rotate(-45deg) translateX(0);
        opacity: 1;
    }

    10% {
        transform: rotate(-45deg) translateX(calc(100vw + 300px));
        opacity: 0;
    }

    100% {
        transform: rotate(-45deg) translateX(calc(100vw + 300px));
        opacity: 0;
    }
}

/* Randomize Stars with longer durations for "random" feel */
.star:nth-child(1) {
    top: 0;
    left: -10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.star:nth-child(2) {
    top: 20%;
    left: -20%;
    animation-delay: 4s;
    animation-duration: 15s;
}

.star:nth-child(3) {
    top: 40%;
    left: -10%;
    animation-delay: 8s;
    animation-duration: 13s;
}

.star:nth-child(4) {
    top: 60%;
    left: -30%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.star:nth-child(5) {
    top: 80%;
    left: -10%;
    animation-delay: 11s;
    animation-duration: 16s;
}

.star:nth-child(6) {
    top: 10%;
    left: -40%;
    animation-delay: 6s;
    animation-duration: 14s;
}

.star:nth-child(7) {
    top: 30%;
    left: -50%;
    animation-delay: 1s;
    animation-duration: 17s;
}

.star:nth-child(8) {
    top: 50%;
    left: -20%;
    animation-delay: 9s;
    animation-duration: 15s;
}

.star:nth-child(9) {
    top: 70%;
    left: -10%;
    animation-delay: 3s;
    animation-duration: 19s;
}

.star:nth-child(10) {
    top: 90%;
    left: -30%;
    animation-delay: 7s;
    animation-duration: 12s;
}


h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: table;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    border: none;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(100, 108, 255, 0.2);
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    border-radius: 50px;
    font-weight: 600;
    margin-left: var(--spacing-md);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

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

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

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

.nav-links .btn-primary {
    opacity: 1;
}

.hamburger {
    display: none;
    color: white;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 10% 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.hero-content .subtitle {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.highlight {
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-secondary);
}

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

/* Hero Visual (Sphere) */
.hero-visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 50vw;
    height: 50vw;
    z-index: 1;
    pointer-events: none;
}

.gradient-sphere {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, var(--accent-primary), transparent 60%),
        radial-gradient(circle at 70% 70%, var(--accent-secondary), transparent 60%);
    filter: blur(80px);
    opacity: 0.4;
    animation: pulse-sphere 8s infinite alternate;
}

@keyframes pulse-sphere {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

/* Marquee */
.marquee-container {
    background: var(--surface-color);
    padding: 20px 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 20s linear infinite;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.marquee-content span {
    margin: 0 40px;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.3s ease;
}

.marquee-content span:hover {
    color: var(--accent-primary);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

.service-card .icon {
    font-size: 2.5rem;
    /* Fallback */
    margin-bottom: var(--spacing-md);
    color: var(--accent-primary);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
}

.service-card .icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 80px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-visual {
        width: 100%;
        height: 300px;
        right: 0;
        top: 0;
        opacity: 0.5;
    }

    .nav-links {
        display: none;
        /* Add JS toggle later */
    }

    .hamburger {
        display: block;
        font-size: 1.5rem;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 10px;
        display: block;
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* Hero Socials */
.hero-socials {
    margin-top: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
}

.hero-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.hero-socials a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
    background: rgba(100, 108, 255, 0.1);
}

.hero-socials svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .hero-socials {
        justify-content: center;
    }
}


/* Portfolio Subsections */
.portfolio-subsection {
    margin-bottom: var(--spacing-xl);
}

.subsection-title {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid var(--accent-primary);
    padding-left: 15px;
}

.portfolio-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: var(--spacing-lg);
    align-items: center;
}

.project-details h4 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.role {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.project-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-tools span {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 4px;
    color: white;
}

/* Project Media Grid */
.project-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
}

.project-media.media-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
}

.media-placeholder {
    aspect-ratio: 16/9;
    background: var(--surface-hover);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.media-placeholder:hover {
    border-color: var(--accent-primary);
    background: rgba(100, 108, 255, 0.05);
}

.media-content {
    background: var(--surface-hover);
    border-radius: 8px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.media-content:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(100, 108, 255, 0.2);
    z-index: 10;
    position: relative;
}

@media (max-width: 900px) {
    .portfolio-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-media {
        order: -1;
        /* Show image first on mobile? Optional */
    }
}

/* About Visual */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-visual {
    height: 250px;
    width: 250px;
    border-radius: 50%;
    position: relative;
    /* Needed for pseudo-element positioning */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    z-index: 1;
    /* Ensure image is above border */
}

/* Animated Gradient Border */
.about-visual::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #ff00c8, #646cff, #00fff2, #ff00c8);
    background-size: 400%;
    border-radius: 50%;
    z-index: -1;
    animation: border-glow 20s linear infinite;
    filter: blur(10px);
    /* Soft glow effect */
}

.about-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: var(--surface-color);
    /* Match background to nice cut-out if needed, or just let image cover */
    z-index: -1;
}

@keyframes border-glow {
    0% {
        background-position: 0 0;
    }

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

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

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Ensure image itself is round */
    transition: transform var(--transition-smooth);
    border: 4px solid var(--surface-color);
    /* Small gap/border between image and glow */
}

.about-visual:hover .profile-img {
    transform: scale(1.05);
}

/* Timeline / Formation */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: var(--spacing-lg);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -4px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-date {
    font-family: var(--font-heading);
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.timeline-school {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-secondary);
}

/* Resume Grid (Formation + Skills) */
.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.column-title {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    display: inline-block;
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Skills Styling */
.skill-category {
    margin-bottom: var(--spacing-lg);
}

.skill-category h4 {
    color: var(--accent-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.skill-tags span:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .resume-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Styles */
.contact-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.contact-info {
    background: rgba(26, 26, 32, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.contact-info h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    /* Center items in the card */
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

input,
textarea {
    width: 100%;
    padding: 15px;
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
    transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Social Icons in Project Tools */
.social-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
    position: relative;
    top: -1px;
}

/* Contact Details */

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.contact-item svg {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.social-icon-link {
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon-link:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    width: 100%;
    position: relative;
    z-index: 10;
}