/* Premium Modern Academic & Media Typography */
:root {
    --primary-color: #0d3b66;       /* Deep Midnight/Ice Blue */
    --accent-color: #0077b6;        /* Glacier Cyan Accent */
    --podcast-dark: #111827;        /* Sleek Charcoal for Media Callouts */
    --text-main: #2d3748;           /* Soft Dark Gray (easier on eyes than pure black) */
    --text-muted: #718096;
    --bg-light: #f7fafc;            /* Crisp Canvas White */
    --white: #ffffff;
    --border-color: #e2e8f0;
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* Layout Container */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

nav .logo {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* Premium Hero Section */
.hero {
    padding: 90px 0;
    background: radial-gradient(circle at top right, #f0f7fa 0%, #e2eef5 100%);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: var(--primary-color);
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.35rem;
    max-width: 750px;
    margin: 0 0 35px 0;
    color: #4a5568;
    font-weight: 400;
}

/* Interactive Buttons */
.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(13, 59, 102, 0.08);
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(13, 59, 102, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(13, 59, 102, 0.08);
}

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

section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 35px;
    letter-spacing: -0.5px;
    position: relative;
}

section p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #4a5568;
}

/* Modern Media Proof Bar */
.media-row {
    text-align: center;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 25px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

/* Grid & Cards (Research Focus) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 35px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e0;
}

.card h3 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card p {
    font-size: 1rem;
    margin: 0;
    color: #4a5568;
}

/* Premium Media Callout Block (Ways of Ice) */
.podcast-feature {
    background-color: var(--podcast-dark);
    color: var(--white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.podcast-feature h3 {
    margin: 0;
    font-size: 1.8rem;
    color: #38bdf8; /* Soft blue-cyan tint for dark mode */
    letter-spacing: -0.5px;
}

.podcast-feature p {
    color: #cbd5e1;
    font-size: 1.15rem;
    margin: 0;
    max-width: 800px;
}

.podcast-feature .btn {
    background-color: #38bdf8;
    color: var(--podcast-dark);
    align-self: flex-start;
    margin-top: 10px;
}

.podcast-feature .btn:hover {
    background-color: var(--white);
    color: var(--podcast-dark);
}

/* Clean Footer */
footer {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.3rem; }
    .hero p { font-size: 1.15rem; }
    .podcast-feature { padding: 30px; }
    nav { flex-direction: column; gap: 15px; }
}

/* Make the wrapping link behave like a block element */
.card-link {
    text-decoration: none; /* Removes text underlines from the whole card */
    color: inherit;        /* Keeps your text-main color intact */
    display: block;
}

/* Optional: Move your hover effect from .card:hover to the link wrapper */
.card-link:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e0;
}
/* Explicitly strips the default underline from text headers or spans inside the link */
.card-link *, 
.card-link h3, 
.card-link p, 
.card-link span {
    text-decoration: none !important;
}


/* Optional stylistic hint at the bottom of the card */
.read-more {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* Restricts podcast/card artwork from ballooning on large screens */
.card-img {
    width: 240px;            /* Forces a clean, consistent width */
    max-width: 100%;         /* Prevents it from breaking on tiny mobile screens */
    height: 240px;           /* Keeps it perfectly square */
    object-fit: cover;       /* Ensures the image crops beautifully without distortion if needed */
    display: block;
    margin: 0 auto 15px auto; /* Centers the image horizontally and adds bottom spacing */
    border-radius: 6px;      /* Matches the card's smooth corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Adds subtle depth to the artwork */
}

/* Container for the image and caption */
figure.project-image {
    margin: 2rem 0;
    padding: 0;
    /* Use max-content to keep the container bound to the text column */
    max-width: 100% !important; 
    text-align: left;
}

/* Force the image to obey the boundaries */
figure.project-image img {
    display: block;
    width: 70% !important;     /* Forces the image to fill the text column... */
    max-width: 100% !important; /* ...but absolutely forbids it from going wider */
    height: auto !important;    /* Keeps the image aspect ratio perfectly intact */
    border-radius: 4px;
}

/* Caption Styling */
figure.project-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* Keeps anchor links from sliding under the fixed header */
.project-item {
    scroll-margin-top: 120px !important; /* Adjust this number to match the actual height of your header */
}

html {
    scroll-behavior: smooth;
}

/* Force the audio text to exactly match your existing link aesthetics */
.audio-status.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: bold;       /* Makes it pop */
    color: #0074d9;          /* Change this hex code if your site uses a different blue */
    text-decoration: none;
}

/* Optional hover visual cue */
.podcast-card:hover .audio-status.read-more {
    text-decoration: underline; /* Toggles an underline when hovering over the card */
}

/* Changes the mouse arrow to a clickable finger when hovering over the cards */
.podcast-card {
    cursor: pointer;
}

/* Styling for non-graph photography to span full text width */
.photo-full {
    width: 100%;          /* Forces the image to span the full width of its container */
    max-width: 100%;      /* Ensures it never spills out of the text boundaries */
    height: auto;         /* Maintains the photo's original aspect ratio */
    display: block;       /* Removes the default bottom whitespace gap common in inline images */
    margin: 2rem auto;    /* Centers the photo and adds clean breathing room above and below */
    border-radius: 4px;   /* Optional: A very subtle rounding of the sharp edges to match modern UI */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Optional: Soft shadow to give depth to standalone photos */
}

/* Style the figure container to match the width of the paragraph text */
figure.photo-full {
    width: 100%;
    margin: 2rem 0; /* Adds top/bottom space, aligns strictly to the left text edge */
    padding: 0;
}

/* Force the actual image inside that container to fill the text column safely */
figure.photo-full img {
    width: 100%;       /* Spans exactly 100% of the section width */
    height: auto;      /* Keeps the proportions perfectly intact */
    display: block;    /* Removes inline spacing bugs */
    border-radius: 4px; /* Optional: Clean edge softening */
}

/* Style the text underneath the photo */
figure.photo-full figcaption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.6rem;
    line-height: 1.4;
}