/* ===== CSS Reset & Base Styles ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Dark Theme */
    --background: hsl(222, 47%, 11%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(220, 40%, 15%);
    --card-foreground: hsl(210, 40%, 98%);
    --primary: hsl(189, 95%, 52%);
    --primary-foreground: hsl(222, 47%, 11%);
    --secondary: hsl(220, 40%, 20%);
    --secondary-foreground: hsl(210, 40%, 98%);
    --muted: hsl(220, 30%, 25%);
    --muted-foreground: hsl(215, 20%, 65%);
    --accent: hsl(189, 95%, 52%);
    --border: hsl(220, 30%, 25%);
    --ring: hsl(189, 95%, 52%);
    --radius: 0.75rem;
    
    /* Fonts */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav.scrolled {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: hsl(189, 95%, 42%);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--foreground);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--foreground);
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 1rem 1.5rem;
    background: var(--card);
    border-top: 1px solid var(--border);
}

.mobile-nav a {
    padding: 0.75rem 0;
    font-weight: 500;
    color: var(--foreground);
    transition: color 0.3s ease;
}

.mobile-nav a:hover {
    color: var(--primary);
}

.mobile-nav.active {
    display: flex;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background: hsl(189, 95%, 42%);
    box-shadow: 0 0 30px hsla(189, 95%, 52%, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid hsla(189, 95%, 52%, 0.5);
    color: var(--foreground);
}

.btn-outline:hover {
    background: hsla(189, 95%, 52%, 0.1);
    border-color: var(--primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-greeting {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 500;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.hero-subtitle .highlight {
    color: var(--primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
}

.social-links a {
    color: var(--muted-foreground);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, hsla(189, 95%, 52%, 0.2), hsla(189, 95%, 52%, 0.1));
    border-radius: 1rem;
    filter: blur(60px);
    animation: glow-pulse 3s ease-in-out infinite;
}

.profile-image {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 2px solid hsla(189, 95%, 52%, 0.3);
    animation: pulse-glow 3s ease-in-out infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    animation: bounce 2s infinite;
}

/* ===== Tech Sparkles & Animations ===== */
.tech-sparkle {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 10px hsla(189, 95%, 52%, 0.8), 0 0 20px hsla(189, 95%, 52%, 0.5);
    pointer-events: none;
}

.orbit-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary), 0 0 20px hsla(189, 95%, 52%, 0.5);
    animation: orbit linear infinite;
}

.twinkle-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--primary), 0 0 12px hsla(189, 95%, 52%, 0.5);
    animation: twinkle ease-in-out infinite;
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--muted-foreground);
}

/* ===== Skills Section ===== */
.skills {
    min-height: 100vh;
    padding: 5rem 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-card:hover {
    border-color: hsla(189, 95%, 52%, 0.5);
    box-shadow: 0 0 30px hsla(189, 95%, 52%, 0.2);
}

.skill-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.skill-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.skill-card:hover .skill-image img {
    transform: scale(1.1);
}

.skill-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--background), transparent);
    opacity: 0.8;
}

.skill-icon {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.skill-icon.cyan { color: #22d3ee; }
.skill-icon.blue { color: #60a5fa; }
.skill-icon.purple { color: #a78bfa; }
.skill-icon.pink { color: #f472b6; }
.skill-icon.green { color: #4ade80; }
.skill-icon.orange { color: #fb923c; }

.skill-content {
    padding: 1.5rem;
}

.skill-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.skill-content > p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.skill-projects {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.projects-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
}

.project-item {
    padding-left: 0.75rem;
    border-left: 2px solid hsla(189, 95%, 52%, 0.3);
    transition: border-color 0.3s ease;
}

.project-item:hover {
    border-color: var(--primary);
}

.project-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    display: block;
    margin-bottom: 0.25rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-radius: 9999px;
}

/* ===== About Section ===== */
.about {
    padding: 5rem 1.5rem;
    background: hsla(189, 95%, 52%, 0.05);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 1.5rem;
    border-left: 4px solid var(--primary);
}

.about-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.8;
}

/* ===== Projects Section ===== */
.projects {
    min-height: 100vh;
    padding: 5rem 1.5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: hsla(189, 95%, 52%, 0.5);
    box-shadow: 0 0 30px hsla(189, 95%, 52%, 0.2);
}

.project-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--card), transparent);
    opacity: 0.6;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.project-content > p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags span {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: hsla(189, 95%, 52%, 0.1);
    color: var(--primary);
    border: 1px solid hsla(189, 95%, 52%, 0.2);
    border-radius: 9999px;
}

.project-buttons {
    display: flex;
    gap: 0.5rem;
}

.project-buttons .btn {
    flex: 1;
}

.project-buttons .btn-small {
    background: hsla(189, 95%, 52%, 0.2);
    color: var(--primary);
}

.project-buttons .btn-small:hover {
    background: var(--primary);
    color: var(--primary-foreground);
}

/* ===== Contact Section ===== */
.contact {
    min-height: 100vh;
    padding: 5rem 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.contact-form-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.form-description {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted-foreground);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.contact-card:hover {
    border-color: hsla(189, 95%, 52%, 0.5);
}

.contact-icon {
    padding: 0.75rem;
    background: hsla(189, 95%, 52%, 0.1);
    border-radius: 0.5rem;
    color: var(--primary);
}

.contact-details h4 {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.contact-details a,
.contact-details p {
    color: var(--muted-foreground);
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--muted-foreground);
}

/* ===== Animations ===== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px hsla(189, 95%, 52%, 0.3), 0 0 40px hsla(189, 95%, 52%, 0.2), 0 0 60px hsla(189, 95%, 52%, 0.1);
    }
    50% {
        box-shadow: 0 0 30px hsla(189, 95%, 52%, 0.5), 0 0 60px hsla(189, 95%, 52%, 0.3), 0 0 90px hsla(189, 95%, 52%, 0.2);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(140px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(140px) rotate(-360deg);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes binary-float {
    0%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    20% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-80px);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out forwards;
    opacity: 0;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .hero-image-container {
        max-width: 300px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}
