/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.3);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* ========================================
   Custom Cursor
======================================== */
.cursor,
.cursor-follower {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    width: 32px;
    height: 32px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-follower.hover {
    width: 50px;
    height: 50px;
    background: rgba(56, 189, 248, 0.1);
}

@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none;
    }
    body {
        cursor: auto;
    }
}

/* ========================================
   Particle Canvas
======================================== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   Scrollbar
======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========================================
   Utility Classes
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: none;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ========================================
   Navigation
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 15, 28, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

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

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        background: var(--bg-secondary);
        padding: 40px;
        transition: right var(--transition-normal);
    }

    .nav-links.active {
        right: 0;
    }
}

/* ========================================
   Hero Section
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 1024px) {
    .hero {
        padding: 0 24px;
    }

    .hero-content {
        text-align: left;
        margin: 0;
        padding-right: 60px;
    }

    .hero {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        max-width: 1200px;
        margin: 0 auto;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    margin-bottom: 16px;
}

.title-line {
    display: block;
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.title-name {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

.hero-stats {
    display: flex;
    gap: 32px;
    justify-content: center;
}

@media (min-width: 1024px) {
    .hero-stats {
        justify-content: flex-start;
    }
}

.stat {
    text-align: center;
}

@media (min-width: 1024px) {
    .stat {
        text-align: left;
    }
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-plus {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
    display: none;
}

@media (min-width: 1024px) {
    .hero-visual {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.hero-image-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero-image-glow {
    position: absolute;
    inset: -20px;
    background: var(--accent-gradient);
    opacity: 0.3;
    filter: blur(60px);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.avatar-placeholder svg {
    width: 40%;
    height: 40%;
    color: var(--text-muted);
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    animation: float 4s ease-in-out infinite;
}

.floating-card svg {
    color: var(--accent-primary);
}

.card-1 {
    top: 20%;
    left: -30px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    right: -30px;
    animation-delay: 2s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.5; height: 60px; }
    50% { opacity: 1; height: 80px; }
}

@media (max-width: 768px) {
    .scroll-indicator {
        display: none;
    }
}

/* ========================================
   Sections
======================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   About Section
======================================== */
.about-content {
    display: grid;
    gap: 60px;
    align-items: center;
}

@media (min-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-intro {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-highlights {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.highlight svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    width: 300px;
    height: 350px;
}

.frame-decoration {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    opacity: 0.3;
}

.about-avatar {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.about-avatar svg {
    width: 40%;
    height: 40%;
    color: var(--text-muted);
}

/* ========================================
   Skills Section
======================================== */
.skills-grid {
    display: grid;
    gap: 32px;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skill-category {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.category-title svg {
    color: var(--accent-primary);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    position: relative;
}

.skill-name {
    display: block;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    width: 0;
    transition: width 1.5s ease-out;
}

/* ========================================
   Projects Section
======================================== */
.projects-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.projects-grid {
    display: grid;
    gap: 32px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.project-card.hidden {
    display: none;
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.project-placeholder svg {
    width: 60px;
    height: 60px;
    color: var(--text-muted);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 28, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.project-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.project-content {
    padding: 24px;
}

.project-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tech span {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Experience Section
======================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
}

@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 48px;
}

@media (min-width: 768px) {
    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 40px;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-left: 40px;
        padding-right: 0;
    }
}

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

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
}

@media (min-width: 768px) {
    .timeline-marker {
        left: auto;
        right: -7px;
    }

    .timeline-item:nth-child(even) .timeline-marker {
        left: -7px;
        right: auto;
    }
}

.timeline-content {
    padding: 24px;
}

.timeline-date {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--accent-secondary);
    margin-bottom: 12px;
    display: block;
}

.timeline-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Contact Section
======================================== */
.contact-content {
    display: grid;
    gap: 48px;
}

@media (min-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-fast);
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-content a,
.info-content span:not(.info-label) {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.info-content a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-4px);
}

/* ========================================
   Footer
======================================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-tagline {
    margin-top: 8px;
    font-size: 0.85rem;
}

/* ========================================
   Animations
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure sections are visible on small screens even if JS fails
   (prevents sections like Projects from remaining hidden) */
@media (max-width: 768px) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
