/* Spotify embed styling */
.spotify-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.spotify-embed {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spotify-embed:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.spotify-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* Remove height specifications from CSS since we're setting it directly in the iframe */
.spotify-embed.playlist iframe,
.spotify-embed.episode iframe,
.spotify-embed.track iframe {
  /* Heights now controlled by the height attribute in the iframe */
}

/* For track embeds - shortest */
.spotify-embed.track iframe {
  height: 80px;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .spotify-grid {
    grid-template-columns: 1fr;
  }
}

/* Custom CSS Variables */
:root {
    color-scheme: light dark;
    /* Put non-color variables here */
    --transition-duration: 0.2s;
    
    /* Container width variables for different screen sizes */
    --container-width-desktop: 66%;
    --container-width-tablet: 85%;
    --container-width-mobile: 92%;
    
    /* Typography scale - Stripe-inspired logarithmic scale */
    --font-size-h1: clamp(3rem, 8vw, 5rem);
    --font-size-h2: clamp(2rem, 5vw, 3rem);
    --font-size-h3: clamp(1.5rem, 3vw, 2rem);
    --font-size-h4: clamp(1.25rem, 2vw, 1.5rem);
    --font-size-h5: clamp(1.1rem, 1.5vw, 1.25rem);
    --font-size-h6: clamp(1rem, 1vw, 1.1rem);
    --font-size-body: 1rem;
    
    /* Header spacing */
    --header-spacing-bottom: 0.5em;
    --header-spacing-top: 1.2em;
}

:root:not([data-theme=dark]), 
[data-theme=light] {
    /* Main colors - inspired by Anthropic & Stripe */
    --color-bg: #ffffff;
    --color-text: #2e2e2e;
    --color-subtext: #4f566b;
    
    /* Accent colors */
    --primary: #1155cc;
    --primary-hover: #0d47a1;
    --color-orange: #ff7849;
    --color-highlight: #ffe0b2;
    --color-highlight-border: #ffb74d;
    
    /* UI colors */
    --color-gray: #f0f7ff;
    --color-gray-border: #e0ebf7;
    --color-footer-bg: #f8f9fa;
    --color-footer-text: #4f566b;
    
    /* Link colors */
    --link-color: #0066cc;
    --link-hover-color: #004c99;
    
    /* Code colors */
    --color-code-bg: #f5f7ff;
    --color-code-text: #3c4257;
    --color-code-border: #e4e8ff;
    
    /* Blockquote colors */
    --color-blockquote-border: #1155cc;
    --color-blockquote-bg: #f9faff;
    
    /* Favicon */
    --favicon: url('/img/favicon.svg');
}

[data-theme=dark] {
    /* Main colors - inspired by Anthropic & Stripe dark modes */
    --color-bg: #0a0c14;
    --color-text: #f7fafc;
    --color-subtext: #a3acb9;
    
    /* Accent colors */
    --primary: #4d8eee;
    --primary-hover: #6fa5f1;
    --color-orange: #ff9d70;
    --color-highlight: #3a3552;
    --color-highlight-border: #1155cc;
    
    /* UI colors */
    --color-gray: #1a1f36;
    --color-gray-border: #2a3149;
    --color-footer-bg: #0a0c14;
    --color-footer-text: #a3acb9;
    
    /* Link colors */
    --link-color: #4d8eee;
    --link-hover-color: #6fa5f1;
    
    /* Code colors */
    --color-code-bg: #1a1f36;
    --color-code-text: #e3e8ee;
    --color-code-border: #2a3149;
    
    /* Blockquote colors */
    --color-blockquote-border: #4d8eee;
    --color-blockquote-bg: #1a1f36;
    
    /* Favicon */
    --favicon: url('/img/favicon-dark.svg');
}

[data-theme=dark] a {
    color: var(--link-color);
}

[data-theme=dark] a:hover {
    color: var(--link-hover-color);
}

[data-theme=dark] nav a.active {
    color: var(--link-color);
}

[data-theme=dark] nav a.active::after {
    background-color: var(--link-color);
}

/* Fix for extra space on mobile devices */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    font-family: 'Work Sans', sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: background-color var(--transition-duration), 
    color var(--transition-duration);
    width: 100%;
    margin: 0 auto;
    line-height: 1.6;
    font-size: var(--font-size-body);
    position: relative;
}

/* Responsive container sizing */
.container {
    width: var(--container-width-desktop);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Typography - Stripe-inspired header hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    line-height: 1.1;
    margin-top: var(--header-spacing-top);
    margin-bottom: var(--header-spacing-bottom);
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 {
    font-size: var(--font-size-h1);
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-top: 0.2em; /* Reduced from 0.5em to 0.2em */
    margin-bottom: 0.4em;
    color: var(--color-text);
}

h2 {
    font-size: var(--font-size-h2);
    letter-spacing: -0.02em;
    margin-top: 1.2em;
    margin-bottom: 0.4em;
}

h3 {
    font-size: var(--font-size-h3);
    letter-spacing: -0.01em;
    margin-top: 1.1em;
    margin-bottom: 0.3em;
}

h4 {
    font-size: var(--font-size-h4);
    margin-top: 1em;
    margin-bottom: 0.3em;
}

h5 {
    font-size: var(--font-size-h5);
    margin-top: 0.9em;
    margin-bottom: 0.2em;
}

h6 {
    font-size: var(--font-size-h6);
    margin-top: 0.8em;
    margin-bottom: 0.2em;
    color: var(--color-subtext);
}

/* Paragraph spacing */
p {
    margin-bottom: 1.2em;
    color: var(--color-text);
    font-size: var(--font-size-body);
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    border-bottom: 1px solid transparent;
    font-weight: 500;
}

a:hover {
    color: var(--link-hover-color);
    border-bottom: 1px solid var(--link-hover-color);
}

/* Navigation styles with icons */
nav {
    padding: 0.5rem 0;
}

nav ul {
    gap: 1.5rem;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: none;
    position: relative;
    transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-container {
    position: relative;
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon, .nav-icon-solid {
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.nav-icon {
    opacity: 1;
}

.nav-icon-solid {
    opacity: 0;
}

nav ul li a:hover .nav-icon {
    opacity: 0;
}

nav ul li a:hover .nav-icon-solid {
    opacity: 1;
}

/* Click effect for nav links - more subtle */
nav ul li a:active {
    transform: translateY(0.5px) scale(0.995);
    background-color: var(--color-gray-border);
    transition: all 0.08s ease;
}

nav ul li a:active .nav-icon-solid {
    opacity: 1;
    color: var(--primary);
}

nav ul li a:active .nav-icon {
    opacity: 0;
}

nav a.active {
    font-weight: 600;
    color: var(--primary);
    position: relative;
}

/* Fix for icon rendering */
.nav-item .icon {
    font-weight: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Show solid icon for active page */
nav a.active .nav-icon {
    opacity: 0;
}

nav a.active .nav-icon-solid {
    opacity: 1;
}

nav a.active::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -2px;
    height: 2px;
    background-color: var(--primary);
    z-index: 1;
}

nav ul li a {
    border-bottom: none;
}

nav ul li a:hover {
    background-color: rgba(var(--color-text), 0.02);
    transform: translateY(-0.5px);
    transition: all 0.2s ease;
    border-bottom: none;
}

nav a.active:hover::after {
    background-color: var(--primary);
}

/* Brand link styling */
nav .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: none;
    position: relative;
    transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

nav .brand:hover {
    background: none;
    transform: none;
    transition: none;
    border-bottom: none;
}

nav .brand:hover .nav-icon {
    opacity: 0;
}

nav .brand:hover .nav-icon-solid {
    opacity: 1;
}

/* Social links styling */
.social-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background-color: var(--color-gray);
    transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-bottom: none;
    line-height: 1;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.social-link:hover {
    background-color: var(--color-gray-border);
    transform: translateY(-2px);
    border-bottom: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.06);
}

/* Click effect for social links */
.social-link:active {
    transform: translateY(0.5px) scale(0.99);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.08s ease;
    background-color: var(--color-gray-border);
}

.social-link:active .icon-solid {
    opacity: 1;
    color: var(--primary);
}

.social-link:active .fi-rr-mailbox,
.social-link:active .fi-rr-id-badge,
.social-link:active .fi-rr-butterfly,
.social-link:active .fi-rr-square-x {
    opacity: 0;
}

.social-link .icon-container {
    position: relative;
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-link i {
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.social-link .fi-rr-mailbox,
.social-link .fi-rr-id-badge,
.social-link .fi-rr-butterfly,
.social-link .fi-rr-square-x {
    opacity: 1;
}

.social-link .icon-solid {
    opacity: 0;
}

.social-link:hover .fi-rr-mailbox,
.social-link:hover .fi-rr-id-badge,
.social-link:hover .fi-rr-butterfly,
.social-link:hover .fi-rr-square-x {
    opacity: 0;
}

.social-link:hover .icon-solid {
    opacity: 1;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Heading icon styling */
h1 .icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 0.1em;
}

h1 .icon-container i {
    font-size: 0.66em;
    position: relative;
    top: -0.05em;
}

/* Headshot image styling */
.headshot {
    display: block;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin: 0 0 2rem 0;
    border: 3px solid var(--color-gray-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Text highlighting - natural highlighter effect with gradient */
mark {
    margin: 0 -0.4em;
    padding: 0.1em 0.4em;
    border-radius: 0.8em 0.3em;
    background: transparent;
    background-image: linear-gradient(
        to right,
        rgba(255, 222, 105, 0.2),
        rgba(255, 222, 105, 0.8) 4%,
        rgba(255, 222, 105, 0.5) 95%,
        rgba(255, 222, 105, 0.3)
    );
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    color: inherit;
}

/* Special styling for links inside highlights */
mark a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--link-color);
    background-image: none;
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
}

mark a:hover {
    color: var(--link-hover-color);
    border-bottom: 1px solid var(--link-hover-color);
    background-image: none;
}

[data-theme=dark] mark {
    background-image: linear-gradient(
        to right,
        rgba(17, 85, 204, 0.2),
        rgba(17, 85, 204, 0.6) 4%,
        rgba(17, 85, 204, 0.4) 95%,
        rgba(17, 85, 204, 0.2)
    );
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--color-blockquote-border);
    padding: 1rem 1.5rem;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.5rem;
    background-color: var(--color-blockquote-bg);
    border-radius: 0 4px 4px 0;
}

blockquote p {
    color: var(--color-subtext);
    margin-bottom: 0.5em;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Code blocks */
pre, code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    border-radius: 4px;
}

pre {
    background-color: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--color-code-border);
    margin-bottom: 1.5rem;
}

code {
    background-color: var(--color-code-bg);
    color: var(--color-code-text);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

pre code {
    padding: 0;
    background-color: transparent;
    border: none;
}

/* Theme Toggle Styles */
#theme-toggle {
    position: fixed;
    right: 2rem;
    bottom: 1.3rem;
    padding: 0.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-gray-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
}

#theme-toggle:hover {
    background-color: var(--color-gray);
    transform: scale(1.1);
}

#theme-toggle svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

[data-theme="dark"] #theme-toggle svg {
    transform: rotate(40deg);
}

/* Main content spacing */
main {
    padding: 0.5rem 0; /* Reduced from 2rem to 0.5rem */
    flex: 1 0 auto;
}

/* Footer styling */
footer {
    margin-top: 1rem; /* Reduced from 3rem to 1rem */
    padding: 1rem 0; /* Reduced from 1.5rem to 1rem */
    font-size: 0.9rem;
    color: var(--color-footer-text);
    /* background-color: var(--color-footer-bg); */
    flex-shrink: 0;
}

/* Horizontal rules */
hr {
    border: 0;
    height: 1px;
    background-color: var(--color-gray-border);
    margin: 2rem 0;
}

/* Lists */
ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1.2em;
    color: var(--color-text);
}

li {
    margin-bottom: 0.5em;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-gray-border);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-border);
}

th {
    background-color: var(--color-gray);
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: var(--color-gray);
}

/* Media Queries for Responsive Design */
/* Tablet */
@media (max-width: 992px) {
    .container {
        width: var(--container-width-tablet);
    }
    
    :root {
        --header-spacing-top: 1em;
        --header-spacing-bottom: 0.4em;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        width: var(--container-width-mobile);
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    :root {
        --header-spacing-top: 0.8em;
        --header-spacing-bottom: 0.3em;
        --font-size-body: 1.05rem;
    }
    
    body, p, li {
        font-size: var(--font-size-body);
        line-height: 1.7;
    }
    
    nav ul {
        flex-direction: row;
        gap: 0.5rem;
        margin: 0;
    }
    
    nav ul li {
        margin: 0;
    }
    
    .nav-links {
        display: flex;
        justify-content: center;
        gap: 1rem !important;
    }
    
    .nav-links li a, nav .brand {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        gap: 0.25rem;
    }
    
    .icon-container {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .nav-icon, .nav-icon-solid {
        font-size: 1.5rem;
    }
    
    .nav-text {
        font-size: 0.8rem;
    }
    
    nav a.active::after {
        left: 25%;
        right: 25%;
    }
    
    .social-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .social-link {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 0.5rem;
    }

    #theme-toggle {
        right: 1rem;
        bottom: 1rem;
        width: 40px;
        height: 40px;
    }
    
    main {
        padding: 1.5rem 0;
    }
    
    /* On mobile, center the headshot above the heading */
    .headshot {
        float: none;
        width: 160px;
        height: 160px;
        margin: 0 auto 1.5rem;
        display: block;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        width: 96%;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    :root {
        --header-spacing-top: 0.7em;
        --header-spacing-bottom: 0.25em;
        --font-size-body: 1.1rem;
    }
    
    body, p, li {
        font-size: var(--font-size-body);
        line-height: 1.7;
    }
    
    nav ul li a {
        padding: 0.4rem;
        font-size: 0.95rem;
    }
}

/* Speaker bio callout styles */
.speaker-bio {
  background-color: var(--card-background-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--card-box-shadow);
  position: relative;
}

.bio-title {
  margin-bottom: 0.5rem;
}

.copy-button {
  background-color: var(--primary);
  color: var(--primary-inverse);
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -1rem;
  margin-bottom: 1rem;
}

.copy-button:hover {
  background-color: var(--primary-hover);
}

.copy-button.copied {
  background-color: var(--form-element-valid-border-color);
}

.speaker-photo {
  float: right;
  width: 150px;
  border-radius: var(--border-radius);
  margin-top: -4rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.speaker-photo:hover {
  transform: scale(1.05);
}
/* Speaker bio callout styles */
.speaker-bio {
  background-color: var(--card-background-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 1rem 0 2rem;
  box-shadow: var(--card-box-shadow);
}

.speaker-bio h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.bio-columns {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .bio-columns {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }
  
  .bio-text {
    flex: 1;
    max-width: 50%;
  }
  
  .bio-image {
    flex: 1;
    max-width: 50%;
  }
}

.bio-text p:first-child {
  margin-top: 0;
}

.bio-image {
  margin: 0;
}

.bio-image img {
  width: 100%;
  max-width: 100%;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.3s ease, rotate 0.3s ease, opacity 0.2s ease;
}

.bio-image img:hover {
  transform: scale(1.02) rotate(1deg);
}

.bio-image img:active {
  transform: scale(0.99);
  opacity: 0.95;
}

@media (max-width: 767px) {
  .bio-image {
    margin-top: 1.5rem;
  }
}
