/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #0099ff;
    --accent-color: #7c3aed;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: #1a1a2e;
    --card-hover: #252540;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #2d2d44;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 20px rgba(0, 212, 255, 0.2);
    --shadow-large: 0 15px 35px rgba(0, 0, 0, 0.5);
    --glow-color: rgba(0, 212, 255, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #000000;
    position: relative;
    overflow-x: hidden;
    cursor: none;
}

/* Universe Canvas Background */
#universe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(ellipse at center, #1a0f2e 0%, #000000 100%);
}

/* Galaxy/Nebula Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(124, 58, 237, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(0, 212, 255, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(138, 43, 226, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(147, 51, 234, 0.15) 0%, transparent 30%);
    animation: galaxyShift 30s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes galaxyShift {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: scale(1.05) rotate(1deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.08) rotate(-1deg);
    }
    75% {
        opacity: 0.9;
        transform: scale(1.03) rotate(0.5deg);
    }
}

/* Cursor Glow Effect */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.4) 0%, rgba(124, 58, 237, 0.2) 30%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    filter: blur(40px);
}

/* Custom cursor for interactive elements */
a, button, .btn, .nav-menu a, .contact-link {
    cursor: pointer !important;
}

input, textarea, select {
    cursor: text !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: rgba(26, 26, 46, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.2rem 0;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* Hero Section */
.hero {
    background: transparent;
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at center, var(--accent-color) 0%, transparent 70%);
    opacity: 0.1;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-image {
    flex: 0 0 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-photo {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    object-fit: cover;
    opacity: 0;
    animation: fadeInPhoto 0.8s ease 0.4s forwards;
}

@keyframes fadeInPhoto {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.75;
        transform: translateY(0);
    }
}

.profile-photo:hover {
    opacity: 1;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Name gradient that blends with background */
.name-gradient {
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 25%, #60a5fa 50%, #38bdf8 75%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
    min-height: 3.5rem;
}

/* Typewriter cursor animation */
.cursor {
    color: var(--primary-color);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

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

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-cv {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    position: relative;
    overflow: hidden;
}

.btn-cv::before {
    content: '📄 ';
    margin-right: 5px;
}

.btn-cv:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 212, 255, 0.3);
}

/* About Section */
.about {
    background-color: transparent;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-align: justify;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.8;
}

/* Skills Section */
.skills {
    background-color: transparent;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(26, 26, 46, 0.6) 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, var(--glow-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

.skill-category:hover::before {
    opacity: 0.2;
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Projects Section */
.projects {
    background-color: transparent;
}

.project-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(26, 26, 46, 0.6) 100%);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.5s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, var(--glow-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

.project-card:hover::before {
    opacity: 0.15;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.project-header h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.project-role {
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.tech-tag {
    background-color: var(--card-bg);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.project-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.project-description a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.project-description a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--primary-color);
}

.project-architecture {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.architecture-diagram {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

.architecture-diagram:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.3);
    cursor: pointer;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding: 50px 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: block;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    transition: color 0.3s ease;
    cursor: pointer !important;
    z-index: 10001;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary-color);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
    font-size: 1.1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.project-highlights,
.project-challenges {
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.project-highlights h4,
.project-challenges h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 212, 255, 0.3);
}

.project-highlights ul,
.project-challenges ul {
    list-style-position: outside;
    color: var(--text-secondary);
    padding-left: 1.5rem;
}

.project-highlights li,
.project-challenges li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Contact Section */
.contact {
    background-color: transparent;
    text-align: center;
}

.contact-intro {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.contact-link:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
    color: var(--primary-color);
}

.contact-link .icon {
    font-size: 1.5rem;
}

/* Footer */
.footer {
    background-color: transparent;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Re-enable default cursor on mobile */
    body {
        cursor: auto !important;
    }

    .cursor-glow {
        display: none;
    }

    .hero-content {
        flex-direction: column-reverse;
        gap: 2rem;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .hero-image {
        flex: 0 0 250px;
    }

    .profile-photo {
        max-width: 250px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.8rem;
        min-height: 2.5rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

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

    .nav-menu {
        gap: 1rem;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

    .hero-image {
        flex: 0 0 200px;
    }

    .profile-photo {
        max-width: 200px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
