:root {
    --color-primary-text: 17 17 17;
    --color-muted-text: 107 114 128;
    --color-page-bg: 255 255 255;
    --color-border-light: 229 231 235;
    --color-overlay-bg: 255 255 255;
    /* Alpha handled in class or variable */
    --color-nav-link: 17 17 17;
}

html.dark {
    --color-primary-text: 229 231 235;
    --color-muted-text: 156 163 175;
    --color-page-bg: 17 17 17;
    --color-border-light: 55 65 81;
    --color-overlay-bg: 0 0 0;
    --color-nav-link: 255 255 255;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: rgb(var(--color-page-bg));
    color: rgb(var(--color-primary-text));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
.nav-link {
    font-family: 'Space Grotesk', sans-serif;
    /* Use new font for headings */
}

/* Page Transitions */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.page.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.6s ease-out forwards;
}

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

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

/* Aspect Ratio */
.aspect-4-3 {
    position: relative;
    width: 100%;
    /* padding-top: 75%; Removed as per user request to fix spacing */
}

.aspect-4-3-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video Responsive */
.video-responsive {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
}

/* Vertical videos (9:16) */
.video-responsive-vertical {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 177.78%;
    /* 9:16 aspect ratio */
}

@media (min-width: 768px) {
    .video-responsive {
        width: 100%;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .video-responsive-vertical {
        max-width: 350px;
        padding-top: 70%;
        /* Reduced height on desktop */
    }
}

.video-responsive iframe,
.video-responsive-vertical iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Custom link styling */
.nav-link {
    cursor: pointer;
    transition: opacity 0.2s;
    color: rgb(var(--color-nav-link));
}

.nav-link:hover {
    opacity: 0.7;
}

/* Project Text Formatting (Restored) */
.project-text-block p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.project-text-block ul,
.project-text-block ol {
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
    line-height: 1.75;
}

.project-text-block ul {
    list-style-type: disc;
}

.project-text-block ol {
    list-style-type: decimal;
}

.project-text-block *:last-child {
    margin-bottom: 0;
}

/* Pill Button Styling */
.btn-pill {
    display: inline-block;
    /* align-items: center; Removed for text flow */
    /* gap: 0.5rem; Removed for text flow */
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ea3367 0%, #e56e46 100%);
    /* Indigo to Purple */
    color: white;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    /* text-base */
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    line-height: 1.5;
    /* Ensure good line height for wrapped text */
}

.btn-pill:hover {
    transform: translateY(-1px);
    opacity: 0.95;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    /* Override nav-link underline */
}

/* Ensure text color stays white even if nav-link tries to override it */
.btn-pill.nav-link {
    color: white;
}

/* Rich Pill Button (with thumbnail) */
.btn-pill-rich {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1.5rem 0.5rem 0.5rem;
    /* Less padding left for image */
    background: linear-gradient(135deg, #ea3367 0%, #e56e46 100%);
    color: white;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    text-align: left;
}

.btn-pill-rich:hover {
    transform: translateY(-1px);
    opacity: 0.95;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.btn-pill-rich img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.btn-pill-rich .content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Allow text truncate if needed */
}

.btn-pill-rich .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    font-weight: 600;
}

.btn-pill-rich .title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}