/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #30363d;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #58a6ff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #8b949e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #58a6ff;
}

.nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #58a6ff;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #21262d 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, #58a6ff22, transparent 50%),
        radial-gradient(circle at 70% 80%, #238636aa, transparent 50%);
    z-index: 1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #c9d1d9, #58a6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: #8b949e;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 5rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #58a6ff;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #238636;
    color: white;
}

.btn-primary:hover {
    background: #2ea043;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 134, 54, 0.3);
}

.btn-linkedin {
    background: #0a66c2;
    color: white;
}

.btn-linkedin:hover {
    background: #1188e6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 102, 194, 0.3);
}

.btn-github {
    background: #171515;
    color: white;
    border: 1px solid #30363d;
}

.btn-github:hover {
    background: #30363d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(48, 54, 61, 0.3);
}

/* Sections */
.section {
    padding: 5rem 0;
    position: relative;
    z-index: 5;
    background-color: #0d1117;
}

.section-alt {
    background: #161b22;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #c9d1d9;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #58a6ff;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #c9d1d9;
    text-align: center;
}

/* Cards */
.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: auto;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
}

.card-header {
    margin-bottom: 1rem;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.card-title i {
    color: #58a6ff;
}

.card-subtitle {
    color: #8b949e;
    font-size: 0.95rem;
}

.card-location {
    color: #8b949e;
    font-size: 0.9rem;
}

.card-content p {
    color: #8b949e;
    line-height: 1.6;
}

/* Grids */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    width: 12px;
    height: 12px;
    background: #58a6ff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #0d1117;
}

.timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2rem;
    width: 2px;
    height: calc(100% - 1rem);
    background: #30363d;
}

/* Project Cards */
.project-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
}

/* Tech Stack & Skills */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
}

.tech-tag.python {
    background: #3572a5;
    color: white;
}
.tech-tag.django {
    background: #092e20;
    color: white;
}
.tech-tag.smtp {
    background: #b19f01;
    color: white;
}
.tech-tag.fastapi {
    background: #009688;
    color: white;
}
.tech-tag.react {
    background: #61dafb;
    color: #0d1117;
}
.tech-tag.devops {
    background: #f0db4f;
    color: #0d1117;
}
.tech-tag.rabbitmq {
    background: #ff6600;
    color: white;
}
.tech-tag.ai-ml {
    background: #f06292;
    color: white;
}
.tech-tag.audio-processing {
    background: #4dd0e1;
    color: white;
}
.tech-tag.ai-integration {
    background: #ba68c8;
    color: white;
}
.tech-tag.ed-tech {
    background: #7986cb;
    color: white;
}
.tech-tag.email-systems {
    background: #a1887f;
    color: white;
}
.tech-tag.backend-dev {
    background: #90a4ae;
    color: white;
}
.tech-tag.redis {
    background: #d82c20;
    color: white;
}
.tech-tag.trading-algo {
    background: #26a69a;
    color: white;
}
.tech-tag.computer-vision {
    background: #ff8a65;
    color: white;
}
.tech-tag.face-recognition {
    background: #e57373;
    color: white;
}
.tech-tag.ai-training {
    background: #fff176;
    color: #0d1117;
}
.tech-tag.sql {
    background: #ffd54f;
    color: #0d1117;
}
.tech-tag.db-integration {
    background: #4db6ac;
    color: white;
}
.tech-tag.rag {
    background: #9575cd;
    color: white;
}
.tech-tag.typescript {
    background: #007acc;
    color: white;
}
.tech-tag.frontend {
    background: #66bb6a;
    color: white;
}
.tech-tag.recommendation-system {
    background: #ffee58;
    color: #0d1117;
}
.tech-tag.email-parsing {
    background: #d4e157;
    color: #0d1117;
}
.tech-tag.rbac {
    background: #ffb74d;
    color: #0d1117;
}
.tech-tag.event-driven {
    background: #f06292;
    color: white;
}
.tech-tag.queuing-system {
    background: #4dd0e1;
    color: white;
}
.tech-tag.audio-recording {
    background: #ba68c8;
    color: white;
}
.tech-tag.transcription {
    background: #7986cb;
    color: white;
}
.tech-tag.ffmpeg {
    background: #a1887f;
    color: white;
}
.tech-tag.personalization {
    background: #90a4ae;
    color: white;
}
.tech-tag.user-onboarding {
    background: #d82c20;
    color: white;
}
.tech-tag.realtime-chatbot {
    background: #26a69a;
    color: white;
}
.tech-tag.fine-tuning {
    background: #ff8a65;
    color: white;
}
.tech-tag.content-moderation {
    background: #e57373;
    color: white;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.2);
}

.skill-tag.python {
    background: #3572a5;
    color: white;
}
.skill-tag.django {
    background: #092e20;
    color: white;
}
.skill-tag.fastapi {
    background: #009688;
    color: white;
}
.skill-tag.react {
    background: #61dafb;
    color: #0d1117;
}
.skill-tag.devops {
    background: #f0db4f;
    color: #0d1117;
}
.skill-tag.rabbitmq {
    background: #ff6600;
    color: white;
}
.skill-tag.typescript {
    background: #007acc;
    color: white;
}
.skill-tag.javascript {
    background: #f7df1e;
    color: #0d1117;
}
.skill-tag.postgresql {
    background: #336791;
    color: white;
}
.skill-tag.mongodb {
    background: #47a248;
    color: white;
}
.skill-tag.redis {
    background: #d82c20;
    color: white;
}
.skill-tag.git {
    background: #f05032;
    color: white;
}
.skill-tag.machine-learning {
    background: #8e44ad;
    color: white;
}
.skill-tag.ai-integration {
    background: #ba68c8;
    color: white;
}
.skill-tag.rest-apis {
    background: #778899;
    color: white;
}
.skill-tag.websocket {
    background: #87ceeb;
    color: #0d1117;
}
.skill-tag.soft.problem-solving {
    background: #29b6f6;
    color: white;
}
.skill-tag.soft.quick-learner {
    background: #66bb6a;
    color: white;
}
.skill-tag.soft.self-driven {
    background: #ffa726;
    color: white;
}
.skill-tag.soft.team-collaboration {
    background: #ef5350;
    color: white;
}
.skill-tag.soft.analytical-thinking {
    background: #ab47bc;
    color: white;
}

/* Contact */
.profile-pic-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #30363d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
    border-color: #58a6ff;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    color: #58a6ff;
    width: 20px;
}

/* Hobbies */
.hobbies {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.hobby-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    transition: all 0.3s ease;
    min-width: 150px;
}

.hobby-item:hover {
    background: rgba(88, 166, 255, 0.15);
    border-color: #58a6ff;
    transform: translateY(-2px);
}

.hobby-item i {
    font-size: 2rem;
    color: #58a6ff;
    margin-bottom: 0.5rem;
}

.hobby-item span {
    color: #c9d1d9;
    font-weight: 500;
    text-align: center;
}

/* Lists */
.highlight-list {
    list-style: none;
    padding: 0;
}

.highlight-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: #8b949e;
}

.highlight-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #58a6ff;
    border-radius: 50%;
    margin-top: 0.6rem;
    flex-shrink: 0;
}

.highlight {
    color: #58a6ff !important;
    font-weight: 600;
}

.badge {
    background: #21262d;
    color: #c9d1d9;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #30363d;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #c9d1d9;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: #0d1117;
    border: 2px solid #30363d;
    border-radius: 8px;
    padding: 0.75rem;
    color: #c9d1d9;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #0d1117;
    border-top: 1px solid #30363d;
    padding: 2rem 0;
    text-align: center;
    color: #8b949e;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Apply initial animation state only when scrolling */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

.animate-on-scroll:not(.visible) {
    opacity: 0;
    transform: translateY(20px);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        justify-content: center;
    }

    .about-grid,
    .skills-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hobbies {
        flex-direction: column;
        gap: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .card {
        padding: 1rem;
    }
}
