/* ==========================================================================
   Geist Font Faces
   ========================================================================== */

@font-face {
  font-family: 'Geist Sans';
  src: url('./fonts/GeistVF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('./fonts/GeistMonoVF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
  --font-sans: 'Geist Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Consolas, monospace;
  
  /* Tailwind "neutral" inspired palette (warmer grays) */
  --text-primary: #0a0a0a;   /* neutral-950 */
  --text-body: #404040;      /* neutral-700 */
  --text-secondary: #737373; /* neutral-500 */
  --text-tertiary: #a3a3a3;  /* neutral-400 */
  --bg: #fff;
  --border: #e5e5e5;         /* neutral-200 */
  
  --max-width: 680px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  --site-logo-size: 26px;
}

/* Dark Mode */
:root[data-theme="dark"] {
  --text-primary: #fafafa;   /* neutral-50 */
  --text-body: #e5e5e5;      /* neutral-200 */
  --text-secondary: #a3a3a3; /* neutral-400 */
  --text-tertiary: #737373;  /* neutral-500 */
  --bg: #0a0a0a;             /* neutral-950 */
  --border: #262626;         /* neutral-800 */
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg);
}

/* ==========================================================================
   Logo
   ========================================================================== */

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 10px;
  outline: none;
  margin-bottom: var(--spacing-lg);
}

.site-logo svg {
  width: var(--site-logo-size);
  height: auto;
  display: block;
}

.site-logo:hover {
  opacity: 0.7;
}

.site-logo:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-primary) 18%, transparent);
}

@media (max-width: 600px) {
  :root {
    --site-logo-size: 22px;
  }
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

@media (max-width: 600px) {
  .container {
    padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-lg);
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

p {
  margin-bottom: var(--spacing-md);
}

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

.meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.date {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.page-header {
  margin-bottom: var(--spacing-xl);
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-header .updated {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Bio Section
   ========================================================================== */

.bio {
  margin-bottom: var(--spacing-xl);
  color: var(--text-body);
}

.bio strong,
.bio b {
  color: var(--text-primary);
}

/* ==========================================================================
   Divider
   ========================================================================== */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--spacing-xl) 0;
}

/* ==========================================================================
   Experience Section
   ========================================================================== */

.experience {
  margin-top: calc(var(--spacing-xl) * 1.5);
  margin-bottom: calc(var(--spacing-xl) * 2);
}

.experience-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border);
}

.experience-item:first-of-type {
  padding-top: 0;
}

.experience-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.experience-left {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.experience-item h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0;
}

.experience-item .role {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.experience-item .period {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ==========================================================================
   Features & Appearances Section
   ========================================================================== */

.features-appearances {
  margin-bottom: calc(var(--spacing-xl) * 2);
}

.feature-appearance-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.feature-left {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.feature-appearance-item h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0;
}

.feature-appearance-item .role {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.feature-appearance-item .role-link {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.feature-appearance-item .role-link:hover {
  opacity: 0.6;
}

.feature-appearance-item .year {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ==========================================================================
   Talks & Writing Section
   ========================================================================== */

.talks {
  margin-bottom: var(--spacing-xl);
}

.talk-item {
  display: flex;
  gap: var(--spacing-md);
  align-items: baseline;
}

.talk-item .year {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.talk-item .title {
  color: var(--text-body);
}

.talk-item .title a {
  color: inherit;
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.6;
}

/* Company links in bio - bold with dotted underline */
a.company {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a.company:hover {
  opacity: 0.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-md);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm) var(--spacing-md);
  list-style: none;
}

.copyright {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

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

/* ==========================================================================
   Theme Switcher
   ========================================================================== */

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.theme-switcher {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.theme-switcher button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.theme-switcher button:hover {
  color: var(--text-secondary);
  background-color: var(--border);
}

.theme-switcher button.active {
  color: var(--text-primary);
  background-color: var(--border);
}

.theme-switcher svg {
  width: 16px;
  height: 16px;
}
