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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

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

.nav-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

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

.nav-menu a.nav-cv-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-menu a.nav-cv-link:hover {
    color: #fff;
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 80px;
}

.hero-image {
    flex-shrink: 0;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
    box-shadow: var(--shadow-lg);
}

.hero-text {
    flex: 1;
}

.hero-greeting {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.hero-name {
    font-size: 3.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hero-title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

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

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 14px;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-content strong {
    color: var(--text-primary);
}

.about-highlights {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.highlight {
    text-align: center;
}

.highlight-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.highlight-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-category:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.skill-category h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.skill-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-category:hover .skill-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 114px;
    top: 8px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

.timeline-date {
    flex-shrink: 0;
    width: 100px;
    text-align: right;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    padding-top: 4px;
}

.timeline-content {
    flex: 1;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-content h4 {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 12px;
}

.timeline-content h4 .location {
    color: var(--text-light);
    font-weight: 400;
}

.timeline-content p {
    margin-bottom: 12px;
}

.timeline-content ul {
    margin: 16px 0;
    padding-left: 20px;
}

.timeline-content li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.tech-used {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tech-used span {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Projects Section */
.section.demo-projects {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.16), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.demo-section-intro {
    max-width: 760px;
    margin-bottom: 42px;
}

.demo-section-intro .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.demo-section-intro .section-title::after {
    left: 0;
    transform: none;
}

.demo-section-copy {
    font-size: 1.05rem;
    max-width: 640px;
}

.demo-project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 32px;
    border-radius: 32px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
        rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.demo-project-card + .demo-project-card {
    margin-top: 36px;
}

.demo-project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(300deg, rgba(14, 165, 233, 0.08), transparent 32%);
    pointer-events: none;
}

.demo-project-header,
.demo-project-showcase,
.demo-project-media,
.demo-project-content {
    position: relative;
    z-index: 1;
}

.demo-project-showcase {
    height: 360px;
    border-radius: 26px;
    overflow: hidden;
    background:
        linear-gradient(145deg, #dbeafe 0%, #eff6ff 35%, #f8fafc 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.demo-project-carousel {
    display: flex;
    align-items: stretch;
    height: 100%;
    width: max-content;
    animation: scroll-carousel 36s linear infinite;
}

.demo-project-showcase:hover .demo-project-carousel {
    animation-play-state: paused;
}

.demo-project-carousel img {
    height: 100%;
    width: auto;
    min-width: 190px;
    flex-shrink: 0;
    object-fit: cover;
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.demo-video-shell {
    position: relative;
    width: min(100%, 800px);
    height: 400px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(160deg, #0f172a 0%, #1e3a8a 45%, #0ea5e9 100%);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.28);
}

.demo-video-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0) 60%, rgba(15, 23, 42, 0.18) 100%);
    pointer-events: none;
}

.demo-video-shell iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.demo-project-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.demo-project-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
}

.demo-project-header h3 {
    font-size: 2.3rem;
    line-height: 1.1;
}

.demo-project-description {
    font-size: 1rem;
    line-height: 1.75;
}

.demo-project-link {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.015em;
}

.demo-project-block {
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.demo-project-block-first {
    padding-top: 0;
    border-top: 0;
}

.demo-project-block h4 {
    margin-bottom: 14px;
    color: var(--text-primary);
    font-size: 1rem;
}

.demo-project-block p {
    font-size: 0.97rem;
    line-height: 1.75;
}

.demo-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-tag-list span {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: #334155;
    font-size: 0.87rem;
    line-height: 1.45;
    box-shadow: var(--shadow-sm);
}

.demo-tag-list-stack span {
    background: rgba(239, 246, 255, 0.86);
}

.demo-stack-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.demo-stack-group h5 {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.projects-group + .projects-group {
    margin-top: 40px;
}

.projects-group-title {
    font-size: 2.0rem;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: 0.2px;
}

@media (min-width: 769px) {
    .projects-group.react-native .project-card {
        width: 100%;
        max-width: 380px;
        justify-self: start;
    }
}

.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.project-image {
    height: 300px;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
}

.project-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.project-platform {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.project-carousel {
    display: flex;
    height: 100%;
    width: max-content;
    animation: scroll-carousel 20s linear infinite;
}

.project-carousel:hover {
    animation-play-state: paused;
}

.project-carousel img {
    height: 100%;
    width: auto;
    min-width: 120px;
    flex-shrink: 0;
    object-fit: contain;
    padding: 8px 4px;
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Fallback for single image */
.project-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 28px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-content h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-content p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: auto;
}

.project-tech span {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.project-link:hover {
    text-decoration: underline;
}

.project-link.demo-project-link {
    font-size: 2rem;
    line-height: 1.1;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.testimonial-content {
    flex: 1;
    margin-bottom: 24px;
}

.testimonial-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 12px;
}

.testimonial-content p:last-child {
    margin-bottom: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.author-info h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 4px;
}

.author-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.testimonial-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.linkedin-link {
    color: #0077b5;
    transition: var(--transition);
    padding: 8px;
    border-radius: 50%;
}

.linkedin-link:hover {
    background: rgba(0, 119, 181, 0.1);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Section */
.contact-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary-color);
}

.contact-card h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.contact-card p {
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
}

.footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.visitor-counter {
    margin-top: 15px;
}

.visitor-counter img {
    height: 22px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu a.nav-cv-link {
        width: 100%;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .about-highlights {
        flex-direction: column;
        gap: 30px;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        flex-direction: column;
        gap: 16px;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-date {
        width: auto;
        text-align: left;
    }

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

    .demo-section-intro .section-title {
        text-align: center;
    }

    .demo-section-intro .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .demo-section-intro {
        margin-bottom: 30px;
        text-align: center;
    }

    .demo-project-card {
        padding: 20px;
        border-radius: 24px;
    }

    .demo-project-showcase {
        height: 300px;
    }

    .demo-project-carousel img {
        min-width: 150px;
    }

    .demo-project-header h3 {
        font-size: 1.8rem;
    }

    .demo-video-shell {
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 1;
    }

    .section {
        padding: 60px 0;
    }

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

/* Scroll animations */
.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}
