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

:root {
    --primary-color: #007AFF;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --background: #ffffff;
    --card-background: #f5f5f7;
    --hero-gradient-start: #f5f5f7;
    --hero-gradient-end: #ffffff;
    --border-radius: 20px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --background: #000000;
    --card-background: #1c1c1e;
    --hero-gradient-start: #1c1c1e;
    --hero-gradient-end: #000000;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
}

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

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.top-nav--absolute .container {
    justify-content: flex-end;
}

[data-theme="dark"] .top-nav {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section Navigation */
.section-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

[data-theme="dark"] .section-nav {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-nav .container {
    display: flex;
    justify-content: center;
    position: relative;
}


.top-nav .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    background: var(--card-background);
    padding: 4px;
    border-radius: 10px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

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

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

.nav-indicator {
    position: absolute;
    height: calc(100% - 8px);
    background: var(--background);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 0;
    top: 4px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--card-background);
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    color: var(--primary-color);
    background: rgba(0, 122, 255, 0.1);
}

.lang-separator {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}

.hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.1;
    text-align: right;
}

.hero .tagline-role {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hero .apple-icon {
    color: var(--text-primary);
    width: 16px;
    height: 20px;
}

.hero .tagline-sub {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 24px;
    text-align: right;
}

/* Experience Section - Timeline */
.experience-section {
    padding: 40px 0;
}

.experience-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: left;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 50px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 50px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.timeline-marker {
    position: absolute;
    left: -42px;
    top: 24px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--background);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.timeline-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    background: #ffffff;
    padding: 6px;
    flex-shrink: 0;
}

.timeline-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary);
    padding: 6px;
}

[data-theme="dark"] .timeline-logo-placeholder {
    background: #3a3a3c;
    color: #8e8e93;
}

.timeline-title {
    flex: 1;
    min-width: 0;
}

.timeline-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 2px 0;
}

.timeline-role {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    background: rgba(0, 122, 255, 0.1);
    padding: 4px 12px;
    border-radius: 100px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.timeline-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Accordion styles */
.timeline-content {
    cursor: pointer;
    user-select: none;
}

.timeline-chevron {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.timeline-item.expanded .timeline-chevron {
    transform: rotate(180deg);
}

.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.timeline-item.expanded .timeline-details {
    max-height: 500px;
    opacity: 1;
    margin-top: 16px;
}

.timeline-details-content {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.8;
    margin: 0;
    padding: 16px;
    background: rgba(0, 122, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    white-space: pre-line;
}

.tech-badge {
    background: var(--card-background);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .tech-badge {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Apps Section */
.apps-section {
    padding: 40px 0 60px;
}

.apps-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: left;
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

/* App Card */
.app-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    display: flex;
    gap: 24px;
    transition: var(--transition), opacity 0.6s ease, transform 0.6s ease;
    opacity: 0;
    transform: translateY(30px);
}

.app-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.app-card.visible:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.app-icon {
    flex-shrink: 0;
}

.app-icon img {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-info {
    display: flex;
    flex-direction: column;
}

.app-info h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.app-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    flex-grow: 1;
    margin-bottom: 12px;
}

.app-meta {
    margin-bottom: 16px;
}

.category {
    display: inline-block;
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.price {
    display: inline-block;
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-left: 8px;
}

.app-store-badge img {
    height: 40px;
    transition: var(--transition);
}

.app-store-badge:hover img {
    opacity: 0.8;
}

/* Card Style: Compact */
.app-card--compact {
    padding: 24px;
    text-align: center;
    flex-direction: column;
    align-items: center;
}

.app-card--compact .app-icon img {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.app-card--compact h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.app-card--compact .category {
    font-size: 0.75rem;
}

.app-card--compact .app-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Card Style: App Store */
.app-card--appstore {
    flex-direction: column;
    padding: 20px;
    position: relative;
}

.app-card--appstore .app-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 140px;
}

.app-card--appstore .app-store-badge {
    position: absolute;
    top: 20px;
    right: 20px;
}

.app-card--appstore .app-icon img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
}

.app-card--appstore .app-card__title {
    flex: 1;
}

.app-card--appstore .app-card__title h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.app-card--appstore .app-store-badge img {
    height: 40px;
}

.app-card--appstore .app-card__title .category {
    background: none;
    padding: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.app-card--appstore .app-card__get {
    background: var(--primary-color);
    color: white;
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.app-card--appstore .app-card__get:hover {
    background: #0066d6;
}

.app-card--appstore .app-description {
    font-size: 0.875rem;
    margin: 0;
}

.app-card--appstore .price.free {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
}

/* Style Switcher */
.style-switcher {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.style-btn {
    background: var(--background);
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

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

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

/* Footer */
footer {
    padding: 48px 0;
    background: var(--background);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* App Modal */
.app-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--background);
    border-radius: 24px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.app-modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--card-background);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
    z-index: 10;
}

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

.modal-body {
    display: flex;
    gap: 40px;
    padding: 32px;
    align-items: center;
}

.modal-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.modal-screenshots-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.modal-screenshots {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-screenshot {
    max-height: 480px;
    width: auto;
    object-fit: contain;
    border-radius: 16px;
    opacity: 0;
    position: absolute;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-screenshot.active {
    opacity: 1;
    position: relative;
}

.modal-nav {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--card-background);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
    flex-shrink: 0;
}

.modal-nav:hover {
    background: var(--primary-color);
    color: white;
}

.modal-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.modal-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: var(--card-background);
    cursor: pointer;
    transition: var(--transition);
}

.modal-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.modal-placeholder {
    width: 100%;
    height: 350px;
    background: var(--card-background);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-secondary);
}

.modal-placeholder svg {
    opacity: 0.4;
}

.modal-placeholder span {
    font-size: 0.875rem;
}

.modal-right {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.modal-info {
    flex: 1;
}

.modal-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.modal-category {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.modal-description {
    flex: 1;
}

.modal-description p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
}

.modal-badge {
    align-self: flex-end;
}

.modal-badge img {
    height: 44px;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        flex-direction: column;
        padding: 24px;
        padding-top: 56px;
        gap: 24px;
    }

    .modal-left {
        width: 100%;
        order: 2;
    }

    .modal-right {
        flex: none;
        width: 100%;
        order: 1;
    }

    .modal-screenshots-container {
        width: 100%;
    }

    .modal-screenshot {
        max-height: 350px;
        max-width: 100%;
    }

    .modal-placeholder {
        height: 200px;
    }

    .modal-nav {
        width: 32px;
        height: 32px;
    }

    .modal-header {
        flex-wrap: wrap;
    }

    .modal-badge {
        align-self: flex-start;
        margin-top: 8px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 80px 0 60px;
    }

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

    .hero .tagline {
        font-size: 1.25rem;
    }

    .hero .intro {
        font-size: 1.1rem;
    }

    .apps-section {
        padding: 60px 0;
    }

    .apps-section h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .app-card {
        padding: 24px;
    }

    .app-icon img {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }

    .timeline {
        padding-left: 35px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-marker {
        left: -30px;
        width: 10px;
        height: 10px;
    }

    .timeline-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .timeline-date {
        order: -1;
        width: 100%;
        text-align: right;
    }

    .experience-section h2 {
        padding-left: 35px;
    }
}

@media (max-width: 480px) {
    .app-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .app-card--appstore .app-card__header {
        padding-right: 100px;
        width: 100%;
    }

    .app-card--appstore .app-store-badge {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .app-card--appstore .app-store-badge img {
        height: 32px;
    }

    .app-description {
        text-align: left;
    }
}
