:root {
    --primary: #171717;
    --primary-foreground: #ffffff;
    --background: #ffffff;
    --foreground: #0a0a0a;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --border: #e5e5e5;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --radius: 0.75rem;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Header */
header {
    height: 4rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--foreground);
    text-decoration: none;
}

nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--foreground);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.hero p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto 2rem;
    animation: fadeIn 0.5s ease-out 0.1s backwards;
}

@media (min-width: 768px) {
    .hero {
        padding: 8rem 0;
    }

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

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

.btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeIn 0.5s ease-out 0.2s backwards;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.button.primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.button.primary:hover {
    background-color: #404040;
}

.button.outline {
    border-color: var(--border);
    background-color: transparent;
    color: var(--foreground);
}

.button.outline:hover {
    background-color: var(--muted);
}

/* Projects Section */
#projects {
    padding: 5rem 0;
    background-color: #fafafa;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Project Card */
.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border);
}

.project-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.version {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--muted);
    color: var(--muted-foreground);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.last-updated {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--foreground);
    background: var(--muted);
    border: 1px solid var(--border);
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
}

.project-footer {
    margin-top: auto;
}

.view-btn {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
}

.cta-box {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
}

.cta-box h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-box p {
    opacity: 0.9;
    max-width: 32rem;
    margin: 0 auto 2rem;
}

.cta-box .button {
    background-color: var(--background);
    color: var(--foreground);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Modal Adjustments for Sheet-like feel */
.modal-content {
    background: var(--background);
    width: 100%;
    max-width: 32rem;
    /* Narrower like a sheet */
    height: 100vh;
    margin-left: auto;
    /* Push to right like a sheet */
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
    }
}

.modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.tabs-list {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
}

.tab-trigger {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-trigger.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.features-list {
    list-style: none;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.features-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.features-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.375rem;
    height: 0.375rem;
    background-color: var(--primary);
    border-radius: 50%;
}

.fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

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

.modal-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.policy-section {
    margin-bottom: 2rem;
}

.policy-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.policies-container {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.policy-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: var(--muted);
}

.policy-card h5 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.policy-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}