/*
  MAIN.CSS
  - Dark, modern aesthetic using jrh color palette
  - Yellow, storm, slate against near-black background
  - Consistent styling across all templates
*/

/* --- Base & Variables --- */
:root {
    --jrh-peach: #F09B69;
    --jrh-blblk: #161c23;
    --jrh-blue: #383E48;
    --jrh-black: #060607;
    --jrh-coal: #303435;
    --jrh-slate: #334f58;
    --jrh-storm: #986062;
    --jrh-teal: #007f7f;
    --jrh-material-black: #121212;
    --jrh-yellow: #F2F990;
    --jrh-tan: #f9e3c8;

    /* Main color assignments */
    --bg-color: var(--jrh-black);
    --surface-color: var(--jrh-blblk);
    --primary-text-color: var(--jrh-yellow);
    --secondary-text-color: var(--jrh-tan);
    --accent-color: var(--jrh-storm);
    --accent-hover-color: var(--jrh-slate);
    --border-color: var(--jrh-coal);

    --font-serif: 'Newsreader', serif;
    --font-mono: 'Space Grotesk', monospace;
}

/* --- Global Reset & Body --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--jrh-storm);
    font-family: 'Quicksand', sans-serif;
    line-height: 1.2;
    font-size: 18px;
}


blockquote {
	position: relative;
	font-size: 2rem;
        padding: 1rem 0 0 2rem;
	color: var(--jrh-yellow);
        border-radius: 25px;
	background-color: var(--jrh-coal);
}

blockquote:before, 
blockquote:after {
	content: "";
	position: absolute;
	width: 3.5rem;
	height: 4.5rem;
	top: 3rem;
	left: -1rem;
	transform: rotate(5deg) scale(1.15);
	background: 
		radial-gradient(circle at 1.75rem 3rem, var(--c2) 1.5rem, #fff0 calc(1.5rem + 1px)), 
		radial-gradient(circle at 3.5rem 1.5rem, #fff0 2rem, var(--c2) calc(2rem + 1px) calc(4rem + 1px), #fff0 calc(4rem + 2px));
	filter: drop-shadow(3.5rem -0.5rem 0px var(--c2));
	border-radius: 100%;
}

blockquote:after {
	top: inherit;
	bottom: 3rem;
	transform: rotate(195deg) scale(1.15);
	right: -1rem;
	left: inherit;
}

blockquote p {
	font-weight: bold;
        
}

blockquote p:after {
	margin-right: 2rem;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: flex-start;
	content: " ";
	display: inline-flex;
	background: #f000;
	width: 8rem;
	height: 3rem;
}



blockquote cite {
	font-weight: bold;
	position: absolute;
	bottom: 2.5rem;
	background: var(--c2);
	color: var(--c1);
	right: 8rem;
	padding: 0.5rem 1rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poiret One', cursive;
    color: var(--primary-text-color);
    font-weight: 400;
    line-height: 1.2;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.6rem; }

p {
    margin-bottom: 1em;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover-color);
    text-decoration: underline;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--surface-color);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    font-family: 'Poiret One', cursive;
}

.logo a {
    text-decoration: none;
    color: var(--primary-text-color);
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--accent-color);
    letter-spacing: 0.1em;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-text-color);
    text-decoration: none;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--surface-color);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin-top: 4rem;
}

.site-footer span {
    font-size: 2rem;
}

/* --- Section Pages (List of Items) --- */
.section-main {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

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

.section-header h1 {
    margin-bottom: 0.25em;
    color: var(--primary-text-color);
    font-size: 3rem;
}

.section-description {
    font-size: 1.2rem;
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.item-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center; /* Center the grid items */
}

.list-item {
    flex: 1 1 calc(33.333% - 2rem); /* 3 columns on desktop, accounting for gap */
    max-width: calc(33.333% - 2rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.list-item:hover {
    background-color: var(--jrh-coal);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.list-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-image-container {
    width: 100%;
        /* Creates a 3:2 aspect ratio for the image container */
    padding-bottom: 66.67%; 
    position: relative;
    overflow: hidden;
    background-color: var(--jrh-coal);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.featured-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 100%;
    max-height: 50vh;
    object-fit: cover;
}

.image-fallback {
    /* Styles for the fallback text */
    padding: 2rem;
    text-align: center;
    color: var(--secondary-text-color);
}

.item-content-wrapper {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-text-color);
    font-size: 1.2rem;
    font-family: 'Space Grotesk', cursive;
}

.item-summary {
    color: var(--secondary-text-color);
    line-height: 1.6;
    flex-grow: 1; /* Pushes the title to the top and summary to fill space */
}

.no-content {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary-text-color);
    font-style: italic;
}

/* --- Content Pages --- */
.content-main {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.content-article {
    max-width: 1200px; /* MODIFIED for consistency */
    margin: 0 auto;
    padding: 0 2rem;
}

/* Style for item lists (e.g., audio tracks) on single content pages */
.content-article > .item-list {
    flex-direction: column; /* Stacks items vertically */
    gap: 1rem; /* Adjusts the gap for vertical stacking */
    margin-top: 3rem;
}

.content-article > .item-list .list-item {
    max-width: 20%; /* Allows items to take up the full width */
    flex: 1 1 100%;
}

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

.content-title {
    margin: 1rem 0;
    color: var(--primary-text-color);
    font-size: 3rem;
    font-family: 'Poiret One', cursive;
}

.content-main .featured-image-container { /* specificity for content page main image */
    margin: 0 auto 2rem; /* Center and add bottom margin */
    text-align: center; /* For figcaption centering */
    width: auto; /* Reset width for individual image display */
    padding-bottom: 0; /* No aspect ratio hack needed here */
}

.content-main .featured-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: static; /* Reset absolute positioning */
}

.content-main .featured-image-container figcaption {
    margin-top: 1rem;
    color: var(--secondary-text-color);
    font-style: italic;
    font-size: 0.9rem;
}

.content-body {
    line-height: 1.8;
    font-size: 1.4rem;}

hr
{
margin-bottom: 2rem;
}
/* Styles for the new featured cards */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.featured-card a {
    display: block;
    text-decoration: none;
    color: #333;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.featured-card a:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.featured-card .card-image-container {
    width: 100%;
    /* This creates a square aspect ratio for the image area */
    aspect-ratio: 1 / 1; 
}

.featured-card .card-image-container img {
    width: 100%;
    height: 100%;
    /* This ensures the image covers the container without being stretched */
    object-fit: cover; 
}

.featured-card .card-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #888;
}

.featured-card .card-header {
    padding: 1rem;
}

.featured-card .card-title {
    margin: 0;
    font-size: 1.1rem;
}
/* --- Reusable Poem Styling --- */
.poem-styling {
    /* Preserves all whitespace and line breaks from your editor */
    white-space: pre-wrap; 

    /* Typographic styles for readability */
    font-family: 'Space Grotesk', monospace;
    font-size: 1.3rem;
    line-height: 1.7; /* Increased for better readability */
    letter-spacing: 0.05em;
    color: var(--jrh-tan);
    text-align: left;

    /* Visual container styles */
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 20px;
    position: relative; 
}

/* This class is now only used for layout within the poem container */
.poem-text-content {
    /* This ensures the text container takes up the majority of the space in a two-column layout */
    flex: 1 1 60%; 
}
/* --- Poem Layouts --- */

.poem-container {
    margin: 4rem auto;
    padding: 0 2rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.two-column-layout .poem-text-content {
    flex: 1 1 60%;
    /* This ensures the text content takes up 60% of the available space */
}

.two-column-layout .poem-image-container {
    flex: 1 1 40%;
    /* This ensures the image container takes up 40% of the available space */
}

/* Reverses the order of the items for the left-aligned image */
.reverse-layout {
    flex-direction: row-reverse;
}

/*
    Media queries to stack the image and text on smaller screens.
    This ensures your design is responsive.
*/
@media (max-width: 768px) {
    .poem-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .two-column-layout .poem-text-content,
    .two-column-layout .poem-image-container {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
/* This is the new rule that creates a single, clean border line using a pseudo-element 
.poem-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px; /* Adjust this to match your desired border thickness */
    background-color: var(--jrh-coal);

} 

*/

.content-summary {
    background-color: var(--jrh-teal);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 2rem;

}

.content-summary p {
    margin: 0;
    color: var(--jrh-peach);
font-size: 1.6rem;
}

.additional-images {
    margin: 3rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.additional-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.related-content {
    background-color: var(--);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.related-content h3 {
    margin-top: 0;
    color: var(--primary-text-color);
    font-size: 1.2rem;
}

.related-content ul {
    list-style: none;
    padding: 0;
}

.related-content li {
    margin: 0.5rem 0;
}

.related-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.related-content a:hover {
    color: var(--accent-hover-color);
    text-decoration: underline;
}

/* --- Hero Landing Section (Index Page) --- */
.hero-landing {
    display: flex;
    height: 100vh;
    width: 100%;
    background-color: var(--jrh-black);
    position: relative;
    margin-bottom: 4rem;
}

.hero-text-container {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 2rem;
    text-align: left;
}

.hero-text-content {
    max-width: 500px;
}

.hero-text-container h1 {
    font-family: 'Poiret One', sans-serif;
    font-size: 5rem;
    line-height: 1.25;
    color: var(--jrh-yellow);
    margin: 0 0 1.5rem 0;
    font-weight: 400;
}

.hero-text-container p {
    font-family: 'Quicksand', sans-serif;
    font-size: 2rem;
    line-height: 1.7;
    color: var(--jrh-tan);
    font-weight: 300;
}

.hero-image-container {
    width: 50%;
    height: 100vh;
    background-color: var(--jrh-blblk);
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-nav {
    position: absolute;
    top: 2rem;
    left: 4rem;
    z-index: 10;
}

.top-nav ul { 
    list-style: none;
    display: flex; 
    gap: 2rem; 
    margin: 0;
    padding: 0;
}

.top-nav a {
    color: var(--jrh-storm);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.top-nav a:hover { 
    color: var(--jrh-yellow);
}
        
/* --- Featured Works Section (Index Page) --- */

/* Featured Card Styles */
.featured-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--jrh-slate);
    transition: all 0.3s ease;
    background-color: var(--jrh-coal);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--jrh-storm);
}

.featured-card a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
}

.card-header {
    background-image: linear-gradient(69deg, var(--jrh-blue), rgb(12,12,12,0.9));
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid var(--jrh-coal);
}

.card-title {
    font-family: 'Rammetto One', cursive;
    font-size: 1.8rem;
    color: var(--jrh-storm);
    text-transform: lowercase;
    font-weight: 400;
    margin: 0;
}

.card-image-container {
    /* Change the height from a fixed value to auto to prevent cropping */
    height: auto;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--jrh-blblk); /* Fallback if no image */
}
/* --- Profile Page Specific Styles --- */
.profile-main {
    padding: 4rem 0;
    background-color: var(--bg-color);
}

.profile-card {
    max-width: 900px; /* Adjust as needed */
    margin: 0 auto;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: var(--primary-text-color);
    border: 3px solid var(--jrh-yellow);
    box-shadow: 0 0 15px rgba(242,249,144,0.3); /* Subtle glow */
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area and is cropped */
    border-radius: 20%; /* Apply border-radius directly to the image as well for safety */
}
    
.profile-info {
    flex-grow: 1;
}

.profile-name {
    font-size: 3rem;
    margin: 0;
    color: var(--primary-text-color);
    font-family: 'Poiret One', cursive;
}

.profile-nexus-id,
.profile-status {
    font-family: 'Space Grotesk', monospace;
    font-size: 1rem;
    color: var(--secondary-text-color);
    margin: 0.5rem 0;
}

.profile-bio {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--secondary-text-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin-top: 0;
}

.profile-stats h3,
.profile-sections h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--jrh-coal);
    padding-bottom: 0.5rem;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.profile-stat-item {
    background-color: var(--jrh-coal);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.profile-stat-item i {
    font-size: 2.5rem;
    color: var(--primary-text-color);
}

.profile-stat-item .stat-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--jrh-yellow);
}

.profile-stat-item .stat-label {
    font-size: 0.9rem;
    color: var(--jrh-tan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-section {
    background-color: var(--jrh-coal);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.profile-section ul {
    list-style: none;
    padding: 0;
}

.profile-section li {
    margin-bottom: 0.75rem;
    color: var(--secondary-text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-section li i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.profile-section li a {
    color: var(--primary-text-color);
    font-weight: 500;
}

.profile-section li a:hover {
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .container {
        padding: 0 1rem;
    }

    .site-header .container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .main-nav ul {
        justify-content: center;
    }

    /* Hero Landing Section */
    .hero-landing {
        flex-direction: column;
        height: auto;
    }

    .hero-text-container, 
    .hero-image-container {
        width: 100%;
    }

    .hero-text-container {
        padding: 6rem 2rem;
        min-height: 50vh;
        align-items: center;
        text-align: center;
    }

    .hero-image-container {
        height: 50vh;
    }

    /* Profile Page */
    .profile-card {
        padding: 1.5rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-info {
        text-align: center;
    }

    .profile-name {
        font-size: 2.5rem;
    }

    .profile-nexus-id,
    .profile-status {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .section-main,
    .content-main,
    .profile-main { /* Apply padding to profile too */
        padding: 2rem 0;
    }

    .content-article {
        padding: 0 1rem;
    }

    .section-header h1,
    .content-title {
        font-size: 2.5rem;
    }

    .main-nav ul {
        gap: 1rem;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    .list-item {
        flex: 1 1 100%; /* Stacks items on mobile */
        max-width: 100%;
    }


    .hero-text-container h1 {
        font-size: 3rem;
    }

    .hero-text-container p {
        font-size: 1.5rem;
    }

    .top-nav {
        left: 0;
        right: 0;
        justify-content: center;
        text-align: center;
        padding: 0 1rem;
    }

    .top-nav ul {
        justify-content: center;
        gap: 1.5rem;
    }

    /* Profile Page specific adjustments */
 
.profile-avatar {
    /* ... existing styles ... */
    overflow: hidden; /* Crucial for cropping the image */
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area and is cropped */
    border-radius: 20%; /* Apply border-radius directly to the image as well for safety */
}
    .profile-name {
        font-size: 2rem;
    }

    .profile-stats-grid {
        grid-template-columns: 1fr; /* Stack stats on very small screens */
    }

    .profile-stat-item {
        padding: 1rem;
    }

    .profile-stat-item i {
        font-size: 2rem;
    }

    .profile-stat-item .stat-value {
        font-size: 1.2rem;
    }

    .profile-section h3 {
        font-size: 1.5rem;
    }
}
