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

:root {
    /* Colors from reference design */
    --primary-orange: #E87451;
    --primary-brown: #2D1B1B;
    --card-pink: #E5C5D4;
    --card-yellow: #EDD5A8;
    --card-blue: #A8CAE8;
    --dark-bg: #1A0F0F;
    --dark-card: #2D1B1B;
    --dark-border: #3D2525;
    --text-primary: #FFFFFF;
    --text-secondary: #B5A5A5;
    --text-muted: #8B7B7B;
    --gradient-primary: linear-gradient(135deg, #E87451, #D95F3F);
    --gradient-accent: linear-gradient(135deg, #E87451, #C54F35);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 48px;
}

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

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    position: absolute;
    right: 24px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

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

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.1), transparent 50%);
}

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

.hero-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
}

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

.stat {
    text-align: center;
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(232, 116, 81, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--primary-orange);
    background: rgba(232, 116, 81, 0.1);
}

.btn-project {
    width: 100%;
    margin-top: auto;
    background: var(--dark-card);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
}

.btn-project:hover {
    background: var(--gradient-primary);
    border-color: transparent;
}

.app-store-button {
    display: block;
    width: 100%;
    margin-top: auto;
    text-align: center;
    transition: all 0.3s ease;
}

.app-store-button img {
    width: 100%;
    max-width: 180px;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.app-store-button:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Projects Section */
.projects {
    padding: 80px 0;
    background: linear-gradient(180deg, transparent, rgba(232, 116, 81, 0.02));
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 64px;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.featured-project {
    width: 100%;
}

.other-projects {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.other-projects h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-left: 24px;
}

.projects-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 16px 24px;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-orange) var(--dark-border);
}

.projects-scroll::-webkit-scrollbar {
    height: 8px;
}

.projects-scroll::-webkit-scrollbar-track {
    background: var(--dark-border);
    border-radius: 4px;
}

.projects-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 4px;
}

.projects-scroll::-webkit-scrollbar-thumb:hover {
    background: #D95F3F;
}

.projects-scroll::after {
    content: '';
    display: block;
    min-width: 24px;
    height: 1px;
}

.project-card {
    background: linear-gradient(145deg, rgba(45, 27, 27, 0.9), rgba(26, 15, 15, 0.95));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 116, 81, 0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    height: 480px;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(232, 116, 81, 0.3), transparent, rgba(232, 116, 81, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(232, 116, 81, 0.4);
    box-shadow:
        0 25px 50px rgba(232, 116, 81, 0.25),
        0 10px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.project-card.featured {
    width: 100%;
    height: auto;
}

.projects-scroll .project-card {
    width: 300px;
    max-width: 90vw;
}

.project-image {
    position: relative;
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--card-pink), #d4a5b8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(26, 15, 15, 0.8), transparent);
    pointer-events: none;
}

/* Different card colors for each project */
.featured-project .project-image {
    background: linear-gradient(135deg, var(--card-pink), #d4a5b8);
}

.projects-scroll .project-card:nth-child(1) .project-image {
    background: linear-gradient(135deg, var(--card-yellow), #d4c088);
}

.projects-scroll .project-card:nth-child(2) .project-image {
    background: linear-gradient(135deg, var(--card-blue), #88a8c8);
}

.projects-scroll .project-card:nth-child(3) .project-image {
    background: linear-gradient(135deg, var(--card-pink), #d4a5b8);
}

.projects-scroll .project-card:nth-child(4) .project-image {
    background: linear-gradient(135deg, var(--card-yellow), #d4c088);
}

.projects-scroll .project-card:nth-child(5) .project-image {
    background: linear-gradient(135deg, var(--card-blue), #88a8c8);
}

.projects-scroll .project-card:nth-child(6) .project-image {
    background: linear-gradient(135deg, #c8b8d8, #a898c8);
}

.projects-scroll .project-card:nth-child(7) .project-image {
    background: linear-gradient(135deg, #b8d8c8, #98c8a8);
}

.projects-scroll .project-card:nth-child(8) .project-image {
    background: linear-gradient(135deg, var(--card-pink), #d4a5b8);
}

.projects-scroll .project-card:nth-child(9) .project-image {
    background: linear-gradient(135deg, var(--card-yellow), #d4c088);
}

.project-card.featured .project-image {
    height: 300px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
}

.project-badge {
    background: var(--gradient-accent);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.project-tagline {
    color: var(--primary-orange);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 14px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(232, 116, 81, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

.feature-icon {
    font-size: 18px;
}

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

.tech-tag {
    padding: 4px 10px;
    background: rgba(232, 116, 81, 0.1);
    border: 1px solid rgba(232, 116, 81, 0.2);
    border-radius: 20px;
    font-size: 11px;
    color: var(--primary-orange);
    font-weight: 500;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--dark-bg);
}

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

.about-intro {
    text-align: center;
    margin-bottom: 48px;
}

.about-text h3 {
    font-size: 32px;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-lead {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
}

.about-text h4 {
    font-size: 24px;
    margin-top: 48px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.about-text h5 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-orange);
}

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

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.achievement-card {
    background: linear-gradient(145deg, rgba(45, 27, 27, 0.9), rgba(26, 15, 15, 0.95));
    border: 1px solid rgba(232, 116, 81, 0.2);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-orange);
    box-shadow: 0 20px 40px rgba(232, 116, 81, 0.2);
}

.achievement-number {
    display: block;
    font-size: 42px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.achievement-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* Experience Timeline */
.experience-timeline {
    position: relative;
    padding-left: 40px;
    margin-top: 24px;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-orange), rgba(232, 116, 81, 0.2));
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

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

.timeline-marker {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--primary-orange);
    border-radius: 50%;
    border: 3px solid var(--dark-bg);
    box-shadow: 0 0 0 3px rgba(232, 116, 81, 0.2);
}

.timeline-content h5 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.timeline-content .company {
    color: var(--primary-orange);
    font-size: 14px;
    margin-bottom: 12px;
}

.experience-list {
    list-style: none;
    padding: 0;
}

.experience-list li {
    color: var(--text-secondary);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 15px;
}

.experience-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-orange);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.skill-category {
    background: linear-gradient(145deg, rgba(45, 27, 27, 0.6), rgba(26, 15, 15, 0.8));
    border: 1px solid rgba(232, 116, 81, 0.15);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: rgba(232, 116, 81, 0.3);
    transform: translateY(-4px);
}

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

.skill-category li {
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

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

.skill-category li::before {
    content: "▹ ";
    color: var(--primary-orange);
    font-weight: bold;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: linear-gradient(180deg, transparent, rgba(232, 116, 81, 0.02));
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.contact-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-orange);
    box-shadow: 0 20px 40px rgba(232, 116, 81, 0.3);
}

.contact-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

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

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

/* Footer */
.footer {
    background: var(--dark-card);
    border-top: 1px solid var(--dark-border);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    margin: 8px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--dark-card);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    max-width: 900px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    color: var(--text-muted);
    float: right;
    font-size: 36px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--dark-card);
        border-bottom: 1px solid var(--dark-border);
        padding: 24px;
        gap: 16px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-title {
        font-size: 32px;
    }

    .other-projects h3 {
        font-size: 24px;
    }

    .projects-scroll .project-card {
        width: 280px;
        height: 420px;
    }

    .project-features {
        grid-template-columns: 1fr;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .achievement-card {
        padding: 20px 16px;
    }

    .achievement-number {
        font-size: 32px;
    }

    .experience-timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -26px;
    }

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

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% 16px;
        padding: 24px;
    }
}

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

    .hero-title {
        font-size: 28px;
    }

    .stat-number {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .project-title {
        font-size: 20px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Selection */
::selection {
    background: var(--primary-purple);
    color: white;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}