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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: #1d1d1f;
    background: #ffffff;
    min-height: 100vh;
    font-weight: 400;
    font-feature-settings: 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 20%;
    right: -10%;
    width: 40%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(0, 122, 255, 0.03) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

/* Removed decorative background elements for minimal design */

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.nav-brand .brand-link {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.nav-brand .brand-link:hover {
    color: #007aff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #86868b;
    font-weight: 400;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    color: #1d1d1f;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: #007aff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

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

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: #111827;
    margin: 2px 0;
    transition: 0.3s;
    border-radius: 1px;
}

/* Hero Section */
.hero {
    background: #ffffff;
    padding: 120px 0 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 122, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.08), transparent);
}

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



.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 20px;
    letter-spacing: -0.025em;
    line-height: 1.05;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.keyword-link {
    color: #007aff;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

.keyword-link:hover {
    color: #0056b3;
    border-bottom-color: #007aff;
}

.keyword-link strong {
    font-weight: 600;
}

.tooltip {
    position: absolute;
    background: #1d1d1f;
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 320px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    font-size: 14px;
    line-height: 1.5;
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #007aff;
}

.tooltip p {
    margin: 0;
    color: #f5f5f7;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1d1d1f;
    transform: rotate(45deg);
    border-radius: 2px;
}

.hero-description {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: #86868b;
    line-height: 1.5;
    margin-bottom: 28px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-description strong {
    color: #1d1d1f;
    font-weight: 600;
}

.hero-description em {
    color: #515154;
    font-style: italic;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.hero-tag {
    background: #f5f5f7;
    color: #86868b;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.01em;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.hero-tag:hover {
    background: #e5e7eb;
    color: #1d1d1f;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    letter-spacing: -0.01em;
    min-width: 120px;
    justify-content: center;
}

.hero-btn.primary {
    background: #007aff;
    color: #ffffff;
    border-color: #007aff;
}

.hero-btn.primary:hover {
    background: #0056cc;
    border-color: #0056cc;
}

.hero-btn.secondary {
    background: transparent;
    color: #007aff;
    border-color: #007aff;
}

.hero-btn.secondary:hover {
    background: #007aff;
    color: #ffffff;
}

/* Approach Section */
.approach {
    padding: 80px 0;
    background: #f9fafb;
}

.approach-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.approach-title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.approach-description {
    font-size: 1.125rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 32px;
}

.approach-description strong {
    color: #111827;
    font-weight: 600;
}

.approach-description em {
    color: #3b82f6;
    font-style: normal;
    font-weight: 500;
}

.approach-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.approach-tag {
    background: #f3f4f6;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.approach-tag:hover {
    background: #e5e7eb;
    color: #374151;
}

.hero-content {
    max-width: 800px;
    padding: 0 24px;
}



/* Buttons - Legacy styles for other sections */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.2;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #86868b;
    margin-bottom: 48px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.5;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.service-card {
    background: #ffffff;
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 20px;
    color: white;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.service-title .keyword-link {
    color: #1d1d1f;
    text-decoration: none;
    transition: all 0.3s ease;
}

.service-title .keyword-link:hover {
    color: #007aff;
    border-bottom-color: #007aff;
}

.service-title .keyword-link strong {
    font-weight: 600;
}

.service-description {
    color: #6e6e73;
    line-height: 1.6;
    font-size: 0.9375rem;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

/* Projects Section */
.projects {
    padding: 120px 0 80px 0;
    background: #ffffff;
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.project-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

.project-image {
    width: 100%;
    height: 180px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 32px;
}

.project-content {
    padding: 28px;
}

.project-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
}

.project-description {
    color: #6e6e73;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.9375rem;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

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

.tech-tag {
    background: #f5f5f7;
    color: #6e6e73;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #007aff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0, 122, 255, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

.project-link:hover {
    background: #007aff;
    color: #ffffff;
    border-color: #007aff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #f9fafb;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-top: 32px;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #111827;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.form-submit:hover {
    background: #2563eb;
}

.contact-links {
    padding: 40px 0;
}

.contact-links h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f5f5f7;
    border-radius: 12px;
    text-decoration: none;
    color: #1d1d1f;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.social-link:hover {
    background: #0071e3;
    color: white;
    transform: translateX(4px);
}

.social-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #0071e3;
    transition: color 0.3s ease;
}

.social-link:hover i {
    color: white;
}

/* Footer */
.footer {
    background: #1d1d1f;
    color: #86868b;
    padding: 40px 0;
    text-align: center;
}

.footer-text {
    margin-bottom: 16px;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.footer-link {
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.footer-link:hover {
    color: #0077ed;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 64px;
    color: #86868b;
    font-size: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #f5f5f7;
    border-top: 2px solid #0071e3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 64px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 64px);
        background: rgba(250, 250, 250, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 40px;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

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

    .section-subtitle {
        font-size: 18px;
    }

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

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

    .hero {
        padding: 60px 20px;
        min-height: 85vh;
    }

    .nav {
        padding: 10px 20px;
    }
    
    .services,
    .projects,
    .contact {
        padding: 60px 0;
    }

    .container {
        padding: 0 16px;
    }

    .nav {
        padding: 16px;
    }

    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero-btn {
        width: 100%;
        max-width: 280px;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .service-card,
    .project-card {
        padding: 24px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .contact-form {
        padding: 24px;
    }

    .contact-links {
        padding: 24px 0;
    }
}



/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.btn:focus,
.hero-btn:focus,
.nav-link:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-card,
    .project-card {
        border-color: #1d1d1f;
    }
    
    .btn-primary {
        background: #000;
    }
    
    .nav-link:hover {
        background: #f5f5f7;
    }
}