@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
    /* Colors */
    --color-background: #F9F6F2; /* Slightly warmer off-white */
    --color-text: #2A2A2A; /* Deeper, richer black */
    --color-text-muted: #646464; /* Warmer gray for soft text */
    --color-accent: #915C38; /* Rich, deeper coffee tone */
    --color-accent-secondary: #C18D58; /* Warmer secondary tone */
    --color-accent-light: #D9C2A7; /* Softer highlight tone */
    --color-border: #E8E1D6; /* Warmer border color */
    --color-subtle-bg: #F5F1E9; /* Subtle background for highlights */
    
    /* Gradients */
    --gradient-subtle: linear-gradient(135deg, var(--color-background) 0%, var(--color-subtle-bg) 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(45, 35, 25, 0.05);
    --shadow-md: 0 4px 12px rgba(45, 35, 25, 0.08);
    --shadow-lg: 0 8px 24px rgba(45, 35, 25, 0.1);
    
    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Layout & Spacing */
    --container-width: 1140px;
    --spacing-unit: 8px;
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition-speed: 0.25s;
}

/* --- CSS Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px; /* Add padding to prevent content overlap (adjust value as needed) */
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

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

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

/* --- Base Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.3;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
}

h1 {
    font-size: 2.75rem; /* Larger size */
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em; /* Slightly tighter tracking */
}

h2 {
    font-size: 2rem;
    margin-top: calc(var(--spacing-unit) * 6); 
    margin-bottom: calc(var(--spacing-unit) * 3);
    letter-spacing: -0.01em;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--color-accent-light);
    margin-top: calc(var(--spacing-unit) * 1.5);
}

h3 {
    font-size: 1.4rem;
    margin-top: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

p {
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text-muted); 
    line-height: 1.8; /* Increased line height for readability */
}

p strong {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* Selection styling */
::selection {
    background-color: var(--color-accent-light);
    color: var(--color-text);
}

/* --- Layout --- */
.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: calc(var(--spacing-unit) * 3);
    padding-right: calc(var(--spacing-unit) * 3);
}

/* --- Header / Navigation --- */
.main-header {
    padding: calc(var(--spacing-unit) * 1.5) 0; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(249, 246, 242, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(224, 218, 211, 0.7);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.main-header.scrolled {
    padding: calc(var(--spacing-unit) * 1) 0;
    box-shadow: var(--shadow-md);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-display);
    font-weight: var(--font-weight-semibold);
    font-size: 1.3rem;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
}

.logo .logo-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: #FFF;
    font-weight: var(--font-weight-bold);
    font-size: 0.95rem;
    margin-right: var(--spacing-unit);
    vertical-align: middle;
    box-shadow: var(--shadow-sm);
}

.nav-links ul {
    list-style: none;
    display: flex;
    gap: calc(var(--spacing-unit) * 3);
}

.nav-links a {
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    padding: calc(var(--spacing-unit) * 0.5) 0;
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--gradient-accent);
    transition: width 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
    opacity: 1;
}

/* --- Intro Section (Hero) --- */
.intro-section {
    padding: calc(var(--spacing-unit) * 12) 0; /* More generous padding */
    min-height: 75vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-subtle);
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: radial-gradient(circle at 70% 30%, var(--color-subtle-bg) 0%, transparent 70%);
    opacity: 0.7;
    z-index: 0;
}

.intro-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(var(--spacing-unit) * 6);
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    position: relative;
    z-index: 1;
}

.intro-text {
    flex: 1; /* Allow text to take available space */
    min-width: 300px; /* Prevent text from getting too squished */
}

.intro-text .wave {
    font-size: 2.5rem; /* Style the waving hand emoji */
    display: inline-block;
    margin-right: var(--spacing-unit);
    animation: wave-animation 2s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave-animation {
    0% { transform: rotate( 0.0deg) }
   10% { transform: rotate(14.0deg) }
   20% { transform: rotate(-8.0deg) }
   30% { transform: rotate(14.0deg) }
   40% { transform: rotate(-4.0deg) }
   50% { transform: rotate(10.0deg) }
   60% { transform: rotate( 0.0deg) }
  100% { transform: rotate( 0.0deg) }
}

.intro-text h1 {
    font-size: 3.25rem; /* Larger headline */
    margin-bottom: calc(var(--spacing-unit) * 4);
    line-height: 1.2;
    font-weight: var(--font-weight-bold);
    position: relative;
}

.intro-text h1::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.intro-keywords {
    margin-top: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 4);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-unit);
}

.keyword-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    padding: calc(var(--spacing-unit) * 0.7) calc(var(--spacing-unit) * 1.8);
    background-color: rgba(209, 190, 173, 0.15);
    color: var(--color-accent);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(209, 190, 173, 0.2);
}

.keyword-tag:hover {
    background: var(--gradient-accent);
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.intro-cta {
    margin-top: calc(var(--spacing-unit) * 4);
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
}

.cta-button {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    background-color: var(--color-accent);
    color: var(--color-background);
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--color-accent);
}

.cta-button:hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent-light);
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.cta-button.secondary:hover {
    background-color: rgba(160, 82, 45, 0.05); /* Very subtle coffee background */
    color: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: none;
    transform: translateY(0);
}

.intro-visual {
    flex-basis: 40%; /* Visual takes up roughly 40% */
    max-width: 450px; /* Max width for the visual */
    min-width: 280px;
    /* Add placeholder styling */
    aspect-ratio: 1 / 1; /* Make it square */
    background-color: var(--color-border); /* Placeholder background */
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--color-text-muted);
}

/* --- General Section Styling --- */
main section {
    padding: calc(var(--spacing-unit) * 8) 0;
    border-top: 1px solid var(--color-border);
}

main section:first-child {
    border-top: none;
}

/* --- Footer --- */
.main-footer {
    padding: calc(var(--spacing-unit) * 4) 0;
    margin-top: calc(var(--spacing-unit) * 8);
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    .intro-text h1 { font-size: 2.5rem; }

    /* Stack Experience Columns earlier */
    .experience-columns {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 5); /* Adjust gap for stacked view */
    }
}

@media (max-width: 768px) {
    html { font-size: 15px; }

    .main-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: calc(var(--spacing-unit) * 2);
    }

    .nav-links ul {
        gap: calc(var(--spacing-unit) * 1.5); /* Reduced gap */
        flex-wrap: wrap; /* Allow wrapping just in case */
    }

    .intro-section {
        padding: calc(var(--spacing-unit) * 6) 0;
        text-align: center;
    }

    .intro-content {
        flex-direction: column-reverse; /* Stack visual on top */
        gap: calc(var(--spacing-unit) * 4);
    }

    .intro-text {
        flex-basis: auto;
    }

    .intro-keywords {
        justify-content: center;
    }

    .intro-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .intro-visual {
        flex-basis: auto;
        width: 80%; /* Make visual wider when stacked */
        max-width: 350px;
    }

     h1 { font-size: 2.2rem; }
     .intro-text h1 { font-size: 2.2rem; }
     h2 { font-size: 1.6rem; }
     h3 { font-size: 1.15rem; }

     main section {
        padding: calc(var(--spacing-unit) * 6) 0;
    }

    .personality-layout-grid {
        grid-template-columns: 1fr; /* Stack to single column */
        grid-template-areas:
            "coffee"
            "photo"
            "language"
            "music"
            "spotify"; /* Added spotify area */
        gap: calc(var(--spacing-unit) * 3);
    }

    .layout-item {
        padding: calc(var(--spacing-unit) * 2.5);
    }

    /* Stack Coffee text/map */
    .coffee-map-container {
        flex-direction: column;
        background-color: #FFFBF5; /* Apply background to container now */
        border-radius: var(--border-radius); /* Apply radius to container */
    }
    .coffee-text {
        border-radius: 0; /* Remove specific radius */
    }
    .coffee-map {
        flex-basis: auto; /* Reset basis */
        min-height: 250px; /* Ensure some height */
        border-radius: 0; /* Remove specific radius */
        width: 100%; /* Full width */
    }

    /* Stack Music text/image */
    .indie-music-item {
        flex-direction: column;
        align-items: center; /* Center items when stacked */
    }
    .music-text-content {
        width: 100%; /* Take full width */
        text-align: center; /* Center text */
    }
    .music-image-content {
        flex-basis: auto; /* Reset basis */
        width: 70%; /* Adjust width for stacked view */
        max-width: 250px; /* Limit max width */
        margin-top: var(--spacing-unit) * 2; /* Add space above image */
    }
    .band-list-ordered {
        text-align: left; /* Keep list text left-aligned */
    }

    /* Spotify iframe height on mobile */
    .spotify-embed-container iframe {
        height: 380px; /* Slightly taller on mobile for better visibility */
    }
}

/* --- Utility Classes --- */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

/* --- Belief Section Specific Styles --- */
.belief-list {
    /* Optional: Add styling to the container if needed */
    margin-top: calc(var(--spacing-unit) * 4);
}

.belief-point {
    font-size: 1.1rem; /* Slightly larger than standard paragraph */
    line-height: 1.8; /* More spacing between lines */
    margin-bottom: calc(var(--spacing-unit) * 3); /* More space between points */
    padding-left: calc(var(--spacing-unit) * 3); /* Indent slightly */
    border-left: 3px solid var(--color-accent-light); /* Subtle accent border */
    color: var(--color-text); /* Use main text color, not muted */
}

.belief-point strong {
    font-weight: 600; /* Make the bolded part stand out more */
    color: var(--color-text); /* Ensure it's not muted */
}

/* --- Experience Timeline Columns --- */
.experience-columns {
    display: flex;
    gap: calc(var(--spacing-unit) * 8); /* Gap between columns */
    margin-top: calc(var(--spacing-unit) * 4);
}

.experience-column {
    flex: 1; /* Each column takes equal space */
    min-width: 0; /* Prevent flex items from overflowing */
}

.experience-column h3 {
    font-size: 1.4rem; /* Slightly larger than timeline title */
    margin-top: 0; /* Remove default top margin for column titles */
    margin-bottom: calc(var(--spacing-unit) * 4);
    padding-bottom: var(--spacing-unit);
    border-bottom: 1px solid var(--color-border);
}

/* --- Experience Timeline (Adjusted for Columns) --- */
.timeline {
    position: relative;
    margin-top: 0;
    padding-left: calc(var(--spacing-unit) * 5); /* Space for the line and dots */
}

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    left: calc(var(--spacing-unit) * 1.5); /* Position line */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: calc(var(--spacing-unit) * 5); /* Space between items */
    padding-bottom: calc(var(--spacing-unit) * 2);
}

/* The circle marker */
.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(var(--spacing-unit) * -3.5); /* Position dot relative to padding */
    top: 4px; /* Align with text */
    width: 12px;
    height: 12px;
    background-color: var(--color-accent-light);
    border: 2px solid var(--color-background); /* Match background to punch out */
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.timeline-company {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-unit);
}

.timeline-description p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.timeline-description p:not(:last-child) {
    margin-bottom: var(--spacing-unit);
}

/* --- Thinking in Progress Grid --- */
.thinking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: calc(var(--spacing-unit) * 3);
    margin-top: calc(var(--spacing-unit) * 5);
}

.thinking-block {
    display: block;
    background-color: #ffffff; /* White background for blocks */
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    text-decoration: none; /* Remove underline from link */
}

.thinking-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.thinking-image {
    height: 180px; /* Fixed height for images */
    width: 100%; /* Ensure it takes full width of its container */
    object-fit: cover; /* Make the image cover the area, cropping if needed */
    object-position: center; /* Center the image within its box */
    background-color: var(--color-border); /* Placeholder bg - might be less relevant for img tags */
    /* background-size: cover; Remove this, use object-fit */
    /* background-position: center; Remove this, use object-position */
    /* Add specific placeholder styles */
}

/* Specific adjustment for the first blog preview image */
.thinking-grid .thinking-block:first-child .thinking-image {
    object-position: center top; /* Focus on the top-center of the image */
}

.thinking-image.placeholder-1 { background-color: #e0e7ff; } /* Example placeholder colors */
.thinking-image.placeholder-2 { background-color: #f3e8ff; }
.thinking-image.placeholder-3 { background-color: #ffe4e6; }

.thinking-content {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2.5);
}

.thinking-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0;
    margin-bottom: var(--spacing-unit);
    line-height: 1.4;
}

.coming-soon {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Who I Am Section - Asymmetrical Grid Layout --- */
.personality-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-template-areas:
        "coffee coffee"   /* Coffee/Map spans top row */
        "photo language" /* Photo left, Language right */
        "music music"    /* Music spans full width */
        "spotify spotify"; /* Spotify spans full width */
    gap: calc(var(--spacing-unit) * 5);
    margin-top: calc(var(--spacing-unit) * 6);
}

.layout-item {
    padding: calc(var(--spacing-unit) * 3.5);
    border-radius: var(--border-radius-lg);
    background-color: #FFFBF5; 
    min-height: 150px;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(224, 218, 211, 0.5);
    box-shadow: var(--shadow-sm);
}

.layout-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(224, 218, 211, 0.8);
}

/* Assign grid areas */
.coffee-item { 
    grid-area: coffee; 
    padding: 0; 
    background: linear-gradient(135deg, #FFFBF7 0%, #F5F1E9 100%);
}
.photo-item { 
    grid-area: photo; 
    background: linear-gradient(135deg, #FFFBF7 0%, #F2EFE8 100%);
}
.language-item { 
    grid-area: language; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: linear-gradient(135deg, #FFFBF7 0%, #F2EFE8 100%);
}
.indie-music-item { 
    grid-area: music;
    display: flex;
    gap: calc(var(--spacing-unit) * 5);
    align-items: flex-start;
    background: linear-gradient(135deg, #FFFBF7 0%, #F2EFE8 100%);
}

.spotify-item {
    grid-area: spotify;
    background: linear-gradient(135deg, #FFFBF7 0%, #F2EFE8 100%);
}

/* Coffee Item Internal Layout */
.coffee-map-container {
    display: flex;
    background-color: transparent; /* Remove background from container */
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.coffee-text {
    flex: 1; /* Text takes up available space */
    padding: calc(var(--spacing-unit) * 3.5); /* Add padding back to text */
    background-color: #FFFBF5; /* Apply bg to text part */
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg); /* Round left corners */
}

.coffee-map {
    flex-basis: 40%; /* Map takes ~40% width */
    min-width: 250px;
    height: auto; /* Let height be determined by content/aspect ratio */
    min-height: 350px; /* Ensure map has decent height */
    border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0; /* Round right corners */
    overflow: hidden; /* Clip map to rounded corners */
    z-index: 0;
}

.layout-item h3 {
    font-family: var(--font-display);
    font-size: 1.4rem; /* Slightly larger headings */
    margin-top: 0;
    margin-bottom: calc(var(--spacing-unit) * 3);
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

.layout-item p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--spacing-unit) * 1.5;
}

.layout-item p strong {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

.subtle-heading {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-unit);
    display: block; /* Ensure it takes its own line */
}

/* Tag List Style (Used for Coffee Shops) */
.tag-list {
    list-style: none;
    padding: 0;
    margin-top: var(--spacing-unit);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-unit);
}

.tag-list li a {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 0.7) calc(var(--spacing-unit) * 1.8);
    background-color: rgba(209, 190, 173, 0.15);
    color: var(--color-accent);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(209, 190, 173, 0.2);
}

.tag-list li a:hover {
    background: var(--gradient-accent);
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Language List Style */
.language-list {
    list-style: none; /* Remove default bullets */
    padding: 0;
    margin: var(--spacing-unit) 0;
    color: var(--color-text-muted);
}

.language-list li {
    margin-bottom: calc(var(--spacing-unit) * 0.5);
    font-size: 0.95rem;
}

/* --- Responsive Adjustments for Personality Grid --- */
@media (max-width: 992px) {
    .personality-layout-grid {
        grid-template-columns: repeat(2, 1fr); /* Switch to 2 columns */
        grid-template-areas:
            "coffee coffee"   /* Coffee spans full width */
            "photo language"  /* Photo and Language side-by-side */
            "music music"     /* Music spans full width */
            "spotify spotify"; /* Spotify spans full width */
    }
}

@media (max-width: 768px) {
    .personality-layout-grid {
        grid-template-columns: 1fr; /* Stack to single column */
        grid-template-areas:
            "coffee"
            "photo"
            "language"
            "music"
            "spotify"; /* Added spotify area */
        gap: calc(var(--spacing-unit) * 3);
    }

    .layout-item {
        padding: calc(var(--spacing-unit) * 2.5);
    }
}

/* Keep existing responsive adjustments */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
}

/* Photo Slider Styles */
.photo-slider-container {
    position: relative; /* For positioning buttons */
    margin-top: calc(var(--spacing-unit) * 2);
    overflow: hidden; /* Optional: if image transitions are added */
    border-radius: var(--border-radius);
}

.slider-image {
    display: block;
    width: 100%;
    max-height: 400px; /* Limit height */
    object-fit: cover; /* Cover the area */
    border-radius: var(--border-radius);
    cursor: pointer; /* Indicate clickable for modal */
    transition: opacity 0.3s ease; /* For fade effect if needed */
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5);
    border-radius: 50%; /* Circle buttons */
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.slider-btn.prev {
    left: var(--spacing-unit);
}

.slider-btn.next {
    right: var(--spacing-unit);
}

/* Photo Modal Styles */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Dark overlay */
    z-index: 1000; /* Ensure it's on top */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#modal-image {
    display: block;
    max-width: 100%;
    max-height: 90vh; /* Limit image height */
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -10px;
    right: 0px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
}
.modal-close:hover {
    color: #ccc;
}

.layout-item h3 {
    font-size: 1.3rem; /* Slightly larger headings */
}

.lang-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
    font-weight: var(--font-weight-medium);
    margin: 0 4px 4px 0;
    color: var(--color-text);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.3);
}

/* --- Contact Section Links --- */
.contact-links {
    margin-top: calc(var(--spacing-unit) * 4);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: calc(var(--spacing-unit) * 2);
}

.contact-link-button {
    display: inline-flex; /* Use flex to align icon/text if added later */
    align-items: center;
    gap: var(--spacing-unit);
    padding: calc(var(--spacing-unit) * 1.2) calc(var(--spacing-unit) * 2.5);
    border: 1px solid var(--color-border);
    background-color: #ffffff;
    color: var(--color-text-muted);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.contact-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-color: var(--color-accent-light);
    color: var(--color-accent);
    background-color: #fffbf5; /* Subtle coffee tint on hover */
}

/* Optional: Add specific hover colors if desired */
/*
.contact-link-button.linkedin:hover { ... }
.contact-link-button.github:hover { ... }
.contact-link-button.email:hover { ... }
*/

.lang-tag.lang-hak { background-color: #f3e8ff; } /* Light purple */

/* Simple Background Animation */
.animated-background {
    width: 100%;
    flex-grow: 1; /* Allow it to take remaining space */
    min-height: 100px; /* Keep a minimum height */
    background: linear-gradient(-45deg, #FFFBF5, #fdf1e7, #FAF7F2, #f5f1fc);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    margin-top: auto; /* Push to bottom or use calc(var(--spacing-unit) * 2) for spacing */
    border-radius: var(--border-radius); /* Add border radius */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Adjust line height for paragraph containing language tags */
.languages-paragraph {
    line-height: 2.0; /* Increase line height */
}

/* Specific language colors (adjust as desired) */
.lang-tag.lang-en { background-color: #e0f2fe; } /* Light blue */
.lang-tag.lang-zh { background-color: #fee2e2; } /* Light red */
.lang-tag.lang-ms { background-color: #dcfce7; } /* Light green */
.lang-tag.lang-yue { background-color: #fef3c7; } /* Light yellow */
.lang-tag.lang-hak { background-color: #f3e8ff; } /* Light purple */

/* Modal Navigation Buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    font-size: 2rem; /* Larger font size for modal nav */
    padding: var(--spacing-unit) calc(var(--spacing-unit) * 1.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    line-height: 1;
    width: 50px; /* Slightly larger buttons */
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1010; /* Above modal image, below close button */
    opacity: 0.7;
}

.modal-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.modal-nav-btn.prev {
    left: calc(var(--spacing-unit) * 2); /* Position inside modal */
}

.modal-nav-btn.next {
    right: calc(var(--spacing-unit) * 2); /* Position inside modal */
}

/* Creative Ordered List Styling */
.band-list-ordered {
    list-style: none;
    counter-reset: band-counter;
    padding-left: 0;
    margin-top: calc(var(--spacing-unit) * 2.5);
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}

.band-list-ordered li {
    counter-increment: band-counter;
    margin-bottom: calc(var(--spacing-unit) * 2);
    position: relative;
    padding-left: calc(var(--spacing-unit) * 4.5);
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.5;
}

.band-list-ordered li::before {
    content: counter(band-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
    color: #FFF;
    background: var(--gradient-accent);
    border-radius: 50%;
    width: calc(var(--spacing-unit) * 3);
    height: calc(var(--spacing-unit) * 3);
    line-height: calc(var(--spacing-unit) * 3);
    text-align: center;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.band-list-ordered li a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    display: inline;
    font-weight: var(--font-weight-medium);
}

.band-list-ordered li a:hover {
    color: var(--color-accent);
}

/* Tag List Style (Used for Coffee Shops) */
.tag-list {
    list-style: none;
    padding: 0;
    margin-top: var(--spacing-unit);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-unit);
}

.tag-list li a {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 0.7) calc(var(--spacing-unit) * 1.8);
    background-color: rgba(209, 190, 173, 0.15);
    color: var(--color-accent);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(209, 190, 173, 0.2);
}

.tag-list li a:hover {
    background: var(--gradient-accent);
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Language Tags */
.lang-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
    font-weight: var(--font-weight-medium);
    margin: 0 4px 4px 0;
    color: var(--color-text);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.3);
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3.5);
    background: var(--gradient-accent);
    color: #FFF;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-medium);
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.01em;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: #FFF;
}

.cta-button.secondary {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    box-shadow: none;
}

.cta-button.secondary:hover {
    background-color: rgba(209, 190, 173, 0.1);
    color: var(--color-accent);
    border-color: var(--color-accent-secondary);
    transform: translateY(-2px);
}

/* Updated language tag specific colors */
.lang-tag.lang-en { 
    background: linear-gradient(135deg, #e0f2fe 0%, #cae6fc 100%);
}
.lang-tag.lang-zh { 
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}
.lang-tag.lang-ms { 
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}
.lang-tag.lang-yue { 
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}
.lang-tag.lang-hak { 
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient-accent);
    color: #FFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    z-index: 99;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Subtle Section Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main section {
    animation: fadeInUp 0.7s ease forwards;
    opacity: 0;
    animation-delay: 0.1s;
}

/* Staggered animations for grid items */
.layout-item:nth-child(1) {
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.layout-item:nth-child(2) {
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.layout-item:nth-child(3) {
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.layout-item:nth-child(4) {
    animation: fadeInUp 0.7s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

/* Adjust h2::after for all section headings */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--color-accent-light);
    margin-top: calc(var(--spacing-unit) * 1.5);
}

/* Center alignment for h2::after when the heading is centered */
.text-center h2::after {
    margin-left: auto;
    margin-right: auto;
}

/* Spotify embed container styling */
.spotify-embed-container {
    margin-top: calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spotify-embed-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* --- Blog Post Specific Styles --- */
/* .blog-page .main-header { */
    /* No specific styles needed currently beyond .main-header */
/* } */

.blog-post-container {
    padding-top: calc(var(--spacing-unit) * 10); /* Space below header */
    padding-bottom: calc(var(--spacing-unit) * 10);
    background: var(--color-background);
}

.container.narrow {
    max-width: 760px; /* Optimal reading width */
}

.blog-post-header {
    margin-bottom: calc(var(--spacing-unit) * 6);
    text-align: center; /* Center title and meta */
}

.blog-title {
    font-size: 2.8rem;
    font-family: var(--font-display);
    color: var(--color-text);
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    margin-bottom: calc(var(--spacing-unit) * 2);
    letter-spacing: -0.02em;
}

.title-separator {
    width: 80px;
    height: 3px;
    background: var(--gradient-accent);
    margin: calc(var(--spacing-unit) * 3) auto 0 auto; /* Center the separator */
    border-radius: 2px;
}

/* Journal-like blog styling */
.blog-content {
    font-family: var(--font-primary);
}

.blog-content p {
    font-family: var(--font-primary);
    font-size: 1.05rem; /* Slightly larger body text */
    line-height: 1.9; /* Generous line height */
    color: var(--color-text);
    margin-bottom: calc(var(--spacing-unit) * 3);
    /* Enhanced readability characteristics */
    letter-spacing: 0.01em;
    text-align: justify;
    hyphens: auto;
}

/* Refined drop cap styling */
.blog-content p:first-of-type::first-letter {
    font-family: var(--font-display);
    float: left;
    font-size: 3.6em;
    line-height: 0.8;
    padding-top: 6px;
    padding-right: 12px;
    padding-left: 0;
    margin-bottom: 0;
    color: var(--color-accent);
    font-weight: var(--font-weight-bold);
}

/* Lead paragraph - for the opening paragraph */
.blog-content p.lead {
    font-size: 1.15rem;
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* Section divider for visual breaks */
.section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: calc(var(--spacing-unit) * 5) 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.section-divider::before {
    margin-right: calc(var(--spacing-unit) * 2);
}

.section-divider::after {
    margin-left: calc(var(--spacing-unit) * 2);
}

.section-divider span {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-accent);
    padding: 0 calc(var(--spacing-unit) * 1.5);
}

/* Pull quotes styled like journals */
.blog-content blockquote {
    position: relative;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--color-accent);
    padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4);
    margin: calc(var(--spacing-unit) * 5) 0;
    border-left: none;
    line-height: 1.6;
    text-align: center;
    background-color: var(--color-subtle-bg);
    border-radius: var(--border-radius);
}

.blog-content blockquote::before,
.blog-content blockquote::after {
    content: '"';
    position: absolute;
    font-size: 3rem;
    color: var(--color-accent-light);
    opacity: 0.7;
    line-height: 1;
}

.blog-content blockquote::before {
    top: 5px;
    left: 10px;
}

.blog-content blockquote::after {
    bottom: -15px;
    right: 10px;
}

/* Subtitles within blog posts */
.blog-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: var(--font-weight-semibold);
    margin-top: calc(var(--spacing-unit) * 6);
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.blog-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: var(--font-weight-medium);
    font-style: italic;
    margin-top: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--color-accent);
}

/* List styling for blogs */
.blog-content ul, 
.blog-content ol {
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding-left: calc(var(--spacing-unit) * 4);
}

.blog-content li {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    color: var(--color-text);
    line-height: 1.8;
}

.post-meta {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: calc(var(--spacing-unit) * 1.5);
    margin-bottom: calc(var(--spacing-unit) * 0.5); /* Reduced margin below meta */
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: var(--font-weight-medium);
}

/* Image styling refinements */
.blog-image {
    margin-top: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    max-width: 100%; /* Ensure images are responsive by default */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below image */
    box-shadow: var(--shadow-sm);
}

.blog-image.full-width {
    width: 100%;
}

.blog-figure {
    margin: 0; /* Reset default figure margins */
    padding: 0;
}

.blog-figure.side-float-right {
    float: right;
    margin-left: calc(var(--spacing-unit) * 3);
    margin-top: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
}

.image-caption {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--spacing-unit);
    font-style: italic;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-unit);
}

/* Responsive adjustments for blog */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }
    .post-meta {
        font-size: 0.85rem;
    }
    .blog-content p {
        font-size: 1rem;
        line-height: 1.8;
        text-align: left; /* Justified text can look bad on mobile */
        hyphens: none;
    }
    .blog-content p:first-of-type::first-letter {
        font-size: 3.2em;
        padding-top: 4px;
    }
    .blog-image.full-width {
        max-width: 100% !important;
    }
    .blog-figure.side-float-right {
        float: none;
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-top: calc(var(--spacing-unit) * 2);
        margin-bottom: calc(var(--spacing-unit) * 2);
    }
    .blog-figure.side-float-right img {
        max-width: 100%;
    }
    .blog-content blockquote {
        padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2);
        font-size: 1.1rem;
    }
}

.post-link-btn {
  display: inline-block;
  font-size: 0.91rem;
  font-weight: 500;
  background: var(--color-accent);
  color: #fff;
  padding: 5px 13px;
  border-radius: 4px;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(45,35,25,0.06);
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  margin-bottom: 7px;
  margin-right: 7px;
  cursor: pointer;
}
.post-link-btn:hover, .post-link-btn:focus {
  background: var(--color-accent-secondary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45,35,25,0.10);
  text-decoration: none;
}
