:root {
    --bg-page: #ffffff;
    --bg-card: #FAFAFA;
    --border-pink: #DE00CB;
    --text-color: #222222;
    --font-main: 'Mirza', serif;

    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 20px;
    /* Mirza needs a slightly larger base size usually */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: 2rem;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s;
}

a:hover {
    color: var(--border-pink);
    opacity: 1;
}

/* Layout Container */
.app-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    max-width: 1152px;
    margin: 0 auto;
}

/* Sidebar */
.profile-sidebar {
    border: 2px solid var(--border-pink);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    text-align: left;
    background: white;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    flex-direction: column;
    align-items: center;
    width: 360px;
    /* Fixed width for sidebar */
    flex-shrink: 0;
    /* Don't shrink sidebar */
}

/* ... existing styles ... */

/* Sidebar Extras */
.cacao-icon {
    width: 40px;
    /* Adjust based on actual size */
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Rules Section */
.card-full.rules-card {
    flex-direction: column;
    align-items: flex-start;
}

.rules-list {
    counter-reset: rule-counter;
    list-style: none;
    margin-top: 0px;
}

.rules-list li {
    position: relative;
    margin-bottom: 0.5rem;
    padding-left: 2rem;
    font-size: 20px;
    line-height: 1.2;
    color: #DE00CB;
}

.rules-list li::before {
    counter-increment: rule-counter;
    content: counter(rule-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: #DE00CB;
}

/* Mobile App Showcase - unused for now */
/* .mobile-app-showcase { ... } */

/* Adjustments for Cards */
.book-progress-card {
    background-color: #fff0f5;
    /* Light pink tint for differentiation */
}

.rules-card .card-title,
.book-progress-card .card-title {
    font-size: 32px;
    font-weight: 500;
    font-style: normal;
    color: #121212;
    letter-spacing: -1.6px;
    line-height: 38px;
    margin-bottom: 16px;
}


/* Sidebar Images */
.profile-image-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    /* Ensure image is centered if flex parent forces it, but margins auto helps too */
    margin-left: auto;
    margin-right: auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo {
    font-family: "Mirza", serif;
    font-size: 44px;
    font-weight: 500;
    font-style: normal;
    color: #121212;
    letter-spacing: -1.6px;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-align: center;
}

.role-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.feather-icon {
    width: 40px;
    /* Adjust based on actual size */
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

p {
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #666666;
}

.bio-text {
    /* font-size: 1.1rem; REMOVED to allow p tag style to take precedence */
    margin-bottom: 2rem;
    margin-inline: auto;
}

.swirl-icon {
    width: 80px;
    /* Adjust based on actual size */
    height: auto;
    margin-bottom: 2rem;
    display: block;
    opacity: 0.8;
    margin-left: auto;
    margin-right: auto;
}


.bio-text-extended p {
    margin-bottom: 1rem;
}

/* Sidebar Footer Links */
.sidebar-footer-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin-top: auto;
    /* Push to bottom if height allows */
    padding-top: 1rem;
}

.sidebar-link {
    text-decoration: none;
    font-size: 20px;
    color: #333;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.sidebar-link:hover {
    color: var(--border-pink);
    border-color: var(--border-pink);
    opacity: 1;
}

/* Main Content Grid */
/* Main Content - now Flex Column */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    /* Take remaining space */
    min-width: 0;
    /* Prevent flex overflow */
}

/* Card Rows for side-by-side cards */
.card-row {
    display: flex;
    flex-direction: row;
    gap: 24px;
    width: 100%;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.card:hover {
    background-color: #FEEEFC;
}

.card-full {
    width: 100%;
    flex-direction: row;
    /* Horizontal layout for newsletter */
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.newsletter-card .card-text {
    flex: 1;
}

.newsletter-card .card-title {
    font-size: 32px;
    font-weight: 500;
    font-style: normal;
    color: #121212;
    letter-spacing: -1.6px;
    line-height: 38px;
    margin-bottom: 16px;
    /* paragraph-spacing */
}

/* Card Images */
.newsletter-image-container {
    flex-shrink: 0;
}

.newsletter-image {
    width: 180px;
    /* Fixed width from screenshot approx */
    height: auto;
    border-radius: 12px;
}

.work-image-container {
    width: 160px;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
}

.work-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Buttons */
.btn {
    box-sizing: border-box;
    width: min-content;
    height: auto;
    /* Let content dictate height, usually around 50px */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background-color: #333333;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
}

.btn-content {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.btn p {
    margin: 0;
    margin-top: 5px;
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 400;
    /* As observed on live site */
    line-height: 0.5;
    white-space: nowrap;
}

.btn-icon {
    height: 16px;
    width: auto;
    margin-bottom: 4px;
}

.btn:hover {
    transform: translateY(-2px);
    background-color: var(--border-pink);
    /* Pink for default buttons */
    opacity: 1;
}

.btn-substack:hover {
    background-color: #E74D00;
    /* Orange for substack button */
}

.btn-dark {
    background-color: #383838;
}

/* Half Width Cards (Dam & Dimi / Fun Writing) */
.card-half {
    flex: 1;
    /* Grow to fill space in row */
}

.card-half .card-title {
    font-size: 32px;
    font-weight: 500;
    font-style: normal;
    color: #121212;
    letter-spacing: -1.6px;
    line-height: 38px;
    margin-bottom: 16px;
    /* paragraph-spacing */
}

.card-title-link {
    color: inherit;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.card-title-link:hover {
    color: var(--border-pink);
}

.book-cover-container,
.fun-writing-container {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #f0f0f0;
}

.book-cover,
.fun-writing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 1rem;
}

/* Writing Links List */
.writing-links {
    list-style: none;
    margin-top: 1rem;
}

.writing-links li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ebebeb;
    font-size: 20px;
    line-height: 1.2;
    color: #666666;
}

.writing-links a {
    color: #222222;
    transition: color 0.2s;
}

.writing-links a:hover {
    color: var(--border-pink);
}

.writing-links li:last-child {
    border-bottom: none;
}

/* Rules Preview */
.rules-preview {
    margin-top: 1rem;
}

.rules-preview ol {
    margin-left: 1.5rem;
    margin-top: 1rem;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
        /* Stack Sidebar on top */
        gap: 2rem;
        align-items: stretch;
    }

    .profile-sidebar {
        width: 100%;
        /* Full width on mobile */
        position: static;
        /* No sticky on mobile */
        min-height: auto;
    }

    .card-full {
        flex-direction: column-reverse;
        /* Text on top, image bottom usually better, but here column stacks vertically */
        text-align: left;
    }

    .newsletter-image {
        width: 100%;
        height: 200px;
        border-radius: 12px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .card-row {
        flex-direction: column;
        /* Stack cards on small screens */
    }
}