/* ============================================
   DESIGN TOKENS - CSS CUSTOM PROPERTIES
   ============================================ */

body.theme-f1 {
  --primary: #b30400;
  --primary-container: #e10600;
  --surface: #f9f9f9;
  --surface-container: #eeeeee;
  --surface-container-low: #f4f4f4;
  --surface-container-lowest: #ffffff;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --on-surface: #1a1c1c;
  --on-surface-variant: #44474e;
  --secondary: #5f5e5e;
  --tertiary: #3a6ea5;
  --outline: #74777f;
  --outline-variant: #e9bcb5;
  --error: #ba1a1a;
  --font-headline: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --speed-gradient: linear-gradient(135deg, #b30400 0%, #e10600 100%);
  --carbon-texture: radial-gradient(#5f5e5e 0.5px, transparent 0.5px);
  --carbon-size: 4px 4px;
  --navbar-bg: rgba(255, 255, 255, 0.8);
  --navbar-border: 2px solid #b30400;
  --card-bg: #ffffff;
  --card-border: 1px solid #dde0e0;
  --card-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05);
  --card-shadow-hover: 0 10px 28px rgba(179, 4, 0, 0.13), 0 4px 12px rgba(0,0,0,0.09);
}

body.theme-office {
  --primary: #f2ca50;
  --primary-container: #d4af37;
  --surface: #0f0f0f;
  --surface-container: #242423;
  --surface-container-low: #1a1a19;
  --surface-container-high: #303030;
  --surface-container-highest: #3e3e3d;
  --surface-container-lowest: #080808;
  --on-surface: #eceae9;
  --on-surface-variant: #d8cdb7;
  --secondary: #a8a880;
  --tertiary: #bfcdff;
  --outline: #6a6256;
  --outline-variant: #38322a;
  --error: #ffb4ab;
  --font-headline: 'Newsreader', serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --speed-gradient: linear-gradient(135deg, #d4af37 0%, #f2ca50 100%);
  --carbon-texture: none;
  --carbon-size: 0;
  --navbar-bg: rgba(15, 15, 15, 0.85);
  --navbar-border: 1px solid rgba(255,255,255,0.06);
  --card-bg: #242423;
  --card-border: 1px solid rgba(255,255,255,0.07);
  --card-shadow: 0 2px 16px rgba(0,0,0,0.55);
  --card-shadow-hover: 0 12px 32px rgba(242, 202, 80, 0.1), 0 4px 16px rgba(0,0,0,0.55);
}


/* ============================================
   GLOBAL / RESET
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  transition: background-color 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Theme visibility toggles */
body.theme-f1 .office-only { display: none !important; }
body.theme-office .f1-only { display: none !important; }

/* Smooth fade for theme-specific elements */
.f1-only, .office-only {
  transition: opacity 0.4s ease;
}

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

a {
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}


/* ============================================
   NAVBAR
   ============================================ */

#navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--navbar-border);
  transition: background 0.5s ease, border-bottom 0.5s ease, box-shadow 0.5s ease;
}

body.theme-office #navbar {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.nav-link {
  font-family: var(--font-headline);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary);
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--on-surface);
  border-bottom: 1px solid var(--outline-variant);
  font-family: var(--font-body);
}

.mobile-nav-link:hover {
  color: var(--primary);
}

/* Theme toggle button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--primary);
  background: var(--surface-container);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--primary);
  position: relative;
}

.theme-toggle-btn .material-symbols-outlined {
  color: var(--primary) !important;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.theme-toggle-btn:hover {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-container));
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 18%, transparent);
}

.theme-toggle-btn:hover .material-symbols-outlined {
  color: var(--primary) !important;
}

.toggle-switch-track {
  width: 28px;
  height: 14px;
  border-radius: 999px;
  background: var(--outline-variant);
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.toggle-switch-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

body.theme-office .toggle-switch-thumb {
  transform: translateX(14px);
}

body.theme-office .toggle-switch-track {
  background: var(--primary-container);
}

/* Hamburger */
.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
  transition: background 0.3s ease;
}


/* ============================================
   MARQUEE STRIP (F1 only)
   ============================================ */

.marquee-strip {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--speed-gradient);
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .marquee-strip {
    top: 80px;
  }
}

.marquee-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-transform: uppercase;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

body.theme-office .marquee-strip {
  display: none;
}


/* ============================================
   HERO SECTION
   ============================================ */

#hero {
  background-color: var(--surface);
  transition: background-color 0.5s ease;
}

body.theme-f1 #hero {
  padding-top: 96px; /* navbar + marquee */
}

@media (min-width: 768px) {
  body.theme-f1 #hero {
    padding-top: 112px;
  }
}

.hero-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.theme-f1 .hero-texture {
  background-image: var(--carbon-texture);
  background-size: var(--carbon-size);
  opacity: 0.05;
}

body.theme-office .hero-texture {
  background-image:
    radial-gradient(circle at 2px 2px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 40px 40px;
}

body.theme-office .hero-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Stat cards - F1 */
.stat-card-f1 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 24px;
  background: var(--surface-container-lowest);
  border: 1px solid var(--surface-container-high);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.stat-card-f1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--speed-gradient);
}

.stat-card-f1::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--carbon-texture);
  background-size: var(--carbon-size);
  opacity: 0.04;
  pointer-events: none;
}

/* Stat cards - Office */
.stat-card-office {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 24px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
  position: relative;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
}

.stat-value {
  font-family: var(--font-headline);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1;
}

body.theme-office .stat-value {
  color: var(--primary);
}

/* Team radio (F1) */
.team-radio-f1 {
  padding: 16px 20px;
  background: var(--surface-container-lowest);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
}

/* Confidential stamp (Office) */
.confidential-stamp {
  display: inline-block;
  padding: 4px 16px;
  border: 2px solid var(--error);
  color: var(--error);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  margin-bottom: 16px;
  opacity: 0.8;
}

/* Dundie card (Office) */
.dundie-card {
  padding: 20px 24px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

/* Buttons - F1 */
.btn-primary-f1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--speed-gradient);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-f1:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(179, 4, 0, 0.3);
  color: #ffffff;
}

.btn-secondary-f1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-secondary-f1:hover {
  background: rgba(179, 4, 0, 0.06);
  color: var(--primary);
}

/* Buttons - Office */
.btn-primary-office {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--speed-gradient);
  color: #131313;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-office:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(242, 202, 80, 0.25);
  color: #131313;
}

.btn-secondary-office {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-secondary-office:hover {
  background: rgba(242, 202, 80, 0.08);
  color: var(--primary);
}

/* Hero Image */
.hero-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

body.theme-f1 .hero-image-wrapper {
  border: 2px solid var(--surface-container-high);
}

body.theme-office .hero-image-wrapper {
  border: 1px solid var(--outline-variant);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}


/* ============================================
   PROJECTS SECTION
   ============================================ */

#projects {
  background-color: var(--surface-container-lowest);
  transition: background-color 0.5s ease;
}

body.theme-office #projects {
  background-color: var(--surface-container-low);
}

/* ---- Quote Cards ---- */
.quote-card {
  padding: 1.5rem;
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-card:hover {
  transform: translateY(-3px);
}

.quote-card-f1 {
  background: var(--surface-container-low);
  border-left: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quote-card-f1:hover {
  box-shadow: 0 8px 24px rgba(179, 4, 0, 0.1);
}

.quote-avatar-f1 {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-container);
  flex-shrink: 0;
}

.quote-card-office {
  background: var(--surface-container-low);
  border-left: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quote-card-office:hover {
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.15);
}

.quote-avatar-office {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--surface-container-highest);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Carbon Overlay ---- */
.carbon-overlay {
  position: absolute;
  inset: 0;
  background-image: var(--carbon-texture);
  background-size: var(--carbon-size);
  opacity: 0.05;
  pointer-events: none;
}

/* ---- Blueprint Grid Background ---- */
.blueprint-grid-bg {
  background-image: radial-gradient(#e9bcb5 0.5px, transparent 0.5px);
  background-size: 20px 20px;
  min-height: 100%;
  padding: 2rem 0;
}

/* ---- Paper Texture Card ---- */
.paper-texture-card {
  background-color: #fff;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="200" height="200" filter="url(%23n)" opacity="0.04"/></svg>');
}

/* ---- Red Stamp ---- */
.red-stamp {
  transform: rotate(-12deg);
  border: 3px solid #ba1a1a;
  color: #ba1a1a;
  padding: 4px 12px;
  font-family: var(--font-headline);
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0.8;
  font-size: 14px;
}

/* ---- Paper Clip ---- */
.paper-clip {
  position: absolute;
  top: -10px;
  right: 20px;
  width: 30px;
  height: 60px;
  border: 4px solid #c7c6c6;
  border-radius: 20px;
  z-index: 20;
}

.skill-category-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.skill-category-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.project-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.project-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
}

body.theme-office .project-card:hover {
  border-color: var(--primary);
}

.project-image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-content {
  padding: 24px;
  position: relative;
}

.project-accent-bar {
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
}

body.theme-f1 .project-accent-bar {
  background: var(--speed-gradient);
}

body.theme-office .project-accent-bar {
  background: var(--primary);
  opacity: 0.5;
}

.project-title {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--on-surface);
}

body.theme-f1 .project-title {
  font-style: italic;
}

.project-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

body.theme-office .project-subtitle {
  font-family: var(--font-body);
}

.project-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--secondary);
  margin-bottom: 16px;
}

body.theme-office .project-description {
  color: var(--on-surface-variant);
}

.project-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.theme-f1 .project-tag {
  background: rgba(179, 4, 0, 0.06);
  color: var(--primary);
  border: 1px solid rgba(179, 4, 0, 0.12);
}

body.theme-office .project-tag {
  background: rgba(242, 202, 80, 0.08);
  color: var(--primary);
  border: 1px solid var(--outline-variant);
  font-family: var(--font-body);
}

/* Dundie sticker (Office only) */
.dundie-sticker {
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(242, 202, 80, 0.12);
  border: 1px solid var(--outline-variant);
  border-radius: 20px;
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
}


/* ============================================
   EXPERIENCE SECTION
   ============================================ */

#experience {
  background-color: var(--surface);
  position: relative;
  transition: background-color 0.5s ease;
}

.experience-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.theme-f1 .experience-bg {
  background-image: var(--carbon-texture);
  background-size: var(--carbon-size);
  opacity: 0.03;
}

body.theme-office .experience-bg {
  background-image:
    radial-gradient(circle at 2px 2px, rgba(255,255,255,0.02) 1px, transparent 0);
  background-size: 40px 40px;
}

.experience-card {
  position: relative;
}

.experience-date-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.experience-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
}

body.theme-office .experience-date {
  font-family: var(--font-headline);
  font-size: 0.9rem;
}

.experience-stint {
  font-size: 0.7rem;
  color: var(--secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

body.theme-office .experience-stint {
  font-family: var(--font-body);
  color: var(--on-surface-variant);
}

.experience-content-card {
  padding: 28px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: all 0.3s ease;
}

body.theme-f1 .experience-content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--speed-gradient);
  border-radius: 16px 0 0 16px;
}

body.theme-office .experience-content-card {
  border-left: 3px solid var(--primary);
}

.experience-role {
  font-family: var(--font-headline);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--on-surface);
}

body.theme-f1 .experience-role {
  font-style: italic;
}

.experience-company {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

.experience-description {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--secondary);
}

body.theme-office .experience-description {
  color: var(--on-surface-variant);
}

.experience-badge-f1 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: rgba(179, 4, 0, 0.08);
  color: var(--primary);
  border: 1px solid rgba(179, 4, 0, 0.2);
  border-radius: 6px;
}

.experience-badge-office {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  background: rgba(242, 202, 80, 0.1);
  color: var(--primary);
  border: 1px solid var(--outline-variant);
  border-radius: 20px;
  font-family: var(--font-body);
}

/* Skill bars */
.skill-bar-wrapper {
  width: 100%;
}

.skill-bar-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  letter-spacing: 0.02em;
}

body.theme-office .skill-bar-label {
  font-family: var(--font-body);
  color: var(--on-surface-variant);
}

.skill-bar-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

.skill-bar {
  width: 100%;
  height: 6px;
  background: var(--surface-container-high);
  border-radius: 3px;
  overflow: hidden;
}

body.theme-office .skill-bar {
  background: var(--surface-container-highest);
}

.skill-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--speed-gradient);
  transition: width 1.2s ease-out;
  width: 0;
}

.skill-bar-fill.animated {
  /* width set via inline style */
}


/* ============================================
   PUBLICATIONS SECTION
   ============================================ */

#publications {
  background-color: var(--surface-container-lowest);
  transition: background-color 0.5s ease;
}

body.theme-office #publications {
  background-color: var(--surface-container-lowest);
}

.publication-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.publication-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.publication-inner {
  padding: 28px;
  position: relative;
}

body.theme-f1 .publication-inner {
  background-image:
    linear-gradient(rgba(179, 4, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(179, 4, 0, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.publication-stamp-f1 {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  background: var(--speed-gradient);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 4px;
}

.publication-stamp-office {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border: 2px solid var(--error);
  color: var(--error);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  transform: rotate(3deg);
  opacity: 0.7;
}

.publication-title {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 8px;
  padding-right: 80px;
}

body.theme-f1 .publication-title {
  font-style: italic;
}

.publication-venue {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

body.theme-office .publication-venue {
  font-family: var(--font-body);
}

.publication-abstract {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--secondary);
}

body.theme-office .publication-abstract {
  color: var(--on-surface-variant);
}


/* ============================================
   CONTACT SECTION
   ============================================ */

#contact {
  background-color: var(--surface);
  transition: background-color 0.5s ease;
}

.contact-form-card {
  padding: 32px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

body.theme-office .contact-form-card {
  position: relative;
}

body.theme-office .contact-form-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(242, 202, 80, 0.05) 27px,
      rgba(242, 202, 80, 0.05) 28px
    );
  pointer-events: none;
  border-radius: 16px;
}

.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
}

body.theme-office .contact-label {
  font-family: var(--font-body);
  color: var(--on-surface-variant);
}

.contact-input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.contact-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(179, 4, 0, 0.1);
}

body.theme-office .contact-input {
  background: var(--surface-container);
}

body.theme-office .contact-input:focus {
  box-shadow: 0 0 0 3px rgba(242, 202, 80, 0.1);
}

.contact-textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--speed-gradient);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  justify-content: center;
}

body.theme-f1 .contact-submit {
  color: #ffffff;
}

body.theme-f1 .contact-submit:hover {
  box-shadow: 0 6px 16px rgba(179, 4, 0, 0.3);
  transform: translateY(-1px);
}

body.theme-office .contact-submit {
  color: #131313;
}

body.theme-office .contact-submit:hover {
  box-shadow: 0 6px 16px rgba(242, 202, 80, 0.25);
  transform: translateY(-1px);
}

.contact-location-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.contact-socials-card {
  padding: 24px;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

body.theme-office .contact-socials-card {
  position: relative;
  border: 2px dashed var(--outline-variant);
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.social-link:hover {
  background: var(--surface-container);
  border-color: var(--outline-variant);
  color: var(--primary);
}

.social-link .material-symbols-outlined {
  font-size: 20px;
  color: var(--primary);
}


/* ============================================
   FOOTER
   ============================================ */

#footer {
  background-color: var(--surface-container);
  border-top: 3px solid transparent;
  transition: all 0.5s ease;
}

body.theme-f1 #footer {
  border-top-color: var(--primary);
}

body.theme-office #footer {
  border-top-color: var(--primary);
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--secondary);
  transition: color 0.2s ease;
}

body.theme-office .footer-link {
  font-family: var(--font-body);
  color: var(--on-surface-variant);
}

.footer-link:hover {
  color: var(--primary);
}


/* ============================================
   ANIMATIONS
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-delay-100 { transition-delay: 0.1s; }
.fade-delay-200 { transition-delay: 0.2s; }
.fade-delay-300 { transition-delay: 0.3s; }


/* ============================================
   SKILL CHIPS
   ============================================ */

.skill-chip-f1 {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-container-high);
  color: var(--on-surface);
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.skill-chip-f1:hover {
  background: var(--primary);
  color: #fff;
}

.skill-chip-office {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-container-highest);
  color: var(--on-surface);
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.skill-chip-office:hover {
  background: var(--primary);
  color: var(--surface);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  font-family: var(--font-body);
}

.toast-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  background: #065f46;
  color: #d1fae5;
}

.toast-error {
  background: #7f1d1d;
  color: #fecaca;
}

/* ============================================
   TEAM RADIO GENERATOR (F1)
   ============================================ */

.radio-bar {
  width: 3px;
  background: var(--primary);
  border-radius: 1px;
  transition: height 0.15s ease;
}

.radio-waveform-idle .radio-bar {
  height: 4px;
  opacity: 0.3;
}

.radio-waveform-active .radio-bar {
  animation: waveform-pulse 0.6s ease-in-out infinite alternate;
  opacity: 1;
}

.radio-bar:nth-child(1)  { animation-delay: 0.00s; }
.radio-bar:nth-child(2)  { animation-delay: 0.05s; }
.radio-bar:nth-child(3)  { animation-delay: 0.10s; }
.radio-bar:nth-child(4)  { animation-delay: 0.15s; }
.radio-bar:nth-child(5)  { animation-delay: 0.20s; }
.radio-bar:nth-child(6)  { animation-delay: 0.25s; }
.radio-bar:nth-child(7)  { animation-delay: 0.30s; }
.radio-bar:nth-child(8)  { animation-delay: 0.35s; }
.radio-bar:nth-child(9)  { animation-delay: 0.40s; }
.radio-bar:nth-child(10) { animation-delay: 0.45s; }
.radio-bar:nth-child(11) { animation-delay: 0.40s; }
.radio-bar:nth-child(12) { animation-delay: 0.35s; }
.radio-bar:nth-child(13) { animation-delay: 0.30s; }
.radio-bar:nth-child(14) { animation-delay: 0.25s; }
.radio-bar:nth-child(15) { animation-delay: 0.20s; }
.radio-bar:nth-child(16) { animation-delay: 0.15s; }
.radio-bar:nth-child(17) { animation-delay: 0.10s; }
.radio-bar:nth-child(18) { animation-delay: 0.05s; }
.radio-bar:nth-child(19) { animation-delay: 0.00s; }
.radio-bar:nth-child(20) { animation-delay: 0.05s; }

@keyframes waveform-pulse {
  0%   { height: 6px; }
  100% { height: 40px; }
}

/* ============================================
   SUGGESTION BOX (Office)
   ============================================ */

#suggestion-paper {
  transform-origin: top center;
  transform: scaleY(0.05) rotateX(80deg);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 2px 3px 12px rgba(0,0,0,0.15);
  position: relative;
}

#suggestion-paper.note-open {
  transform: scaleY(1) rotateX(0deg);
  opacity: 1;
}

#suggestion-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent, transparent 27px, #e8dcc8 28px);
  opacity: 0.4;
  pointer-events: none;
}

#suggestion-trigger {
  animation: suggestion-hint 2s ease-in-out infinite;
}
#suggestion-trigger:hover { animation: none; }

@keyframes suggestion-hint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 202, 80, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(242, 202, 80, 0); }
}

/* ============================================
   PIT LANE INTERLUDE (F1)
   ============================================ */

.pit-lane-lines {
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--primary) 0px, var(--primary) 12px, transparent 12px, transparent 20px);
  animation: pit-lane-scroll 1.5s linear infinite;
}

@keyframes pit-lane-scroll {
  0%   { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

.pit-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.3;
  animation: pit-dot-blink 1.2s ease-in-out infinite;
}
.pit-dot:nth-child(1) { animation-delay: 0s; }
.pit-dot:nth-child(2) { animation-delay: 0.2s; }
.pit-dot:nth-child(3) { animation-delay: 0.4s; }
.pit-dot:nth-child(4) { animation-delay: 0.6s; }
.pit-dot:nth-child(5) { animation-delay: 0.8s; }

@keyframes pit-dot-blink {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* ============================================
   HOLD MUSIC INTERLUDE (Office)
   ============================================ */

.hold-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: hold-bounce 1.4s ease-in-out infinite;
}
.hold-dot:nth-child(1) { animation-delay: 0s; }
.hold-dot:nth-child(2) { animation-delay: 0.2s; }
.hold-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes hold-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(-6px); opacity: 1; }
}

/* ============================================
   MICRO-INTERACTIONS: CARD HOVER
   ============================================ */

body.theme-f1 #projects .group:hover {
  transform: translateY(-4px) rotate(-0.3deg);
}

body.theme-office #projects .group:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(242,202,80,0.12);
}

/* ---- Office dark theme: component contrast & readability ---- */

/* Project cards — lift off the background */
body.theme-office #projects .office-only .group {
  background: var(--surface-container) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 4px 20px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-left: 3px solid var(--primary) !important;
}

/* Alternating section backgrounds so page has depth */
body.theme-office #experience {
  background: var(--surface-container-lowest);
}
body.theme-office #skills {
  background: var(--surface-container-lowest);
}
body.theme-office #contact {
  background: var(--surface-container-lowest);
}

/* Experience content cards — more separation */
body.theme-office .experience-content-card {
  background: var(--surface-container) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-left: 3px solid var(--primary) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

/* Quote / Water Cooler cards */
body.theme-office .quote-card-office {
  background: var(--surface-container) !important;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

/* Skill bars section cards */
body.theme-office .skill-bar {
  background: var(--surface-container-high);
}

/* Publications paper cards — target the shadow-lg divs used as paper cards */
body.theme-office #publications .shadow-lg {
  background: var(--surface-container) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.55) !important;
}
body.theme-office #publications .shadow-lg:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 1px rgba(242,202,80,0.1) !important;
  transform: translateY(-2px);
  transition: all 0.3s ease;
}
/* Publications sidebar widgets */
body.theme-office #publications [style*="surface-container-low"] {
  box-shadow: 0 2px 14px rgba(0,0,0,0.45);
}
/* HR Investigation / Steward's Inquiry fun panel */
body.theme-office #publications [style*="surface-container-highest"] {
  background: var(--surface-container-high) !important;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

/* ---- F1 light theme: component contrast & separation ---- */

/* F1 project cards — stronger lift from the background */
body.theme-f1 #projects .f1-only .group {
  box-shadow: 0 2px 12px rgba(0,0,0,0.09), 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #dde0e0;
}
body.theme-f1 #projects .f1-only .group:hover {
  box-shadow: 0 14px 36px rgba(179,4,0,0.13), 0 4px 12px rgba(0,0,0,0.09);
}

/* F1 section alternation — white sections pop out from grey body */
body.theme-f1 #publications {
  background-color: var(--surface-container-lowest); /* #ffffff */
}
body.theme-f1 #experience {
  background-color: var(--surface-container-lowest);
}

/* F1 publication paper cards — stronger shadow and border */
body.theme-f1 #publications .shadow-xl {
  border: 1px solid #dde0e0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
body.theme-f1 #publications .shadow-xl:hover {
  box-shadow: 0 14px 36px rgba(179,4,0,0.12), 0 4px 12px rgba(0,0,0,0.08) !important;
  transform: translateY(-2px);
}
/* F1 publications sidebar widgets */
body.theme-f1 #publications [style*="surface-container-low"] {
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

/* F1 section top-edge dividers */
body.theme-f1 #projects,
body.theme-f1 #experience,
body.theme-f1 #skills,
body.theme-f1 #publications,
body.theme-f1 #contact {
  border-top: 1px solid rgba(0,0,0,0.07);
}

/* Section top-edge dividers for visual separation */
body.theme-office #projects,
body.theme-office #experience,
body.theme-office #skills,
body.theme-office #publications,
body.theme-office #contact {
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ============================================
   EASTER EGG
   ============================================ */

.checkered-flag-burst {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 9999;
  background: repeating-linear-gradient(90deg, #000 0px, #000 8px, #fff 8px, #fff 16px);
  animation: flag-wave 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes flag-wave {
  0%   { transform: scaleX(0); transform-origin: left; opacity: 1; height: 4px; }
  50%  { transform: scaleX(1); transform-origin: left; opacity: 1; height: 6px; }
  100% { transform: scaleX(1); transform-origin: left; opacity: 0; height: 4px; }
}

.confetti-burst {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-family: var(--font-headline);
  animation: confetti-pop 1s ease-out forwards;
}

@keyframes confetti-pop {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(0.5); }
  50%  { opacity: 1; transform: translateX(-50%) translateY(-30px) scale(1.2); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-60px) scale(1); }
}

/* ============================================
   BLOG FOOTNOTE TOOLTIP
   ============================================ */

.footnote-cite {
  position: relative;
  cursor: help;
  outline: none;
}

.footnote-cite::after {
  content: attr(data-footnote);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: min(320px, 75vw);
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-container-highest);
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 60;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.footnote-cite:hover::after,
.footnote-cite:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE REFINEMENTS
   ============================================ */

@media (max-width: 640px) {
  .theme-toggle-btn {
    height: 32px;
    padding: 0 10px;
    gap: 6px;
    border-width: 1px;
  }

  .theme-toggle-btn .material-symbols-outlined {
    font-size: 16px !important;
  }

  .toggle-switch-track {
    width: 22px;
    height: 12px;
  }

  .toggle-switch-thumb {
    width: 8px;
    height: 8px;
    top: 2px;
    left: 2px;
  }

  body.theme-office .toggle-switch-thumb {
    transform: translateX(10px);
  }

  .stat-card-f1,
  .stat-card-office {
    padding: 12px 16px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .experience-content-card {
    padding: 20px;
  }

  .publication-inner {
    padding: 20px;
  }

  .publication-title {
    padding-right: 0;
  }

  .publication-stamp-f1,
  .publication-stamp-office {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
    transform: none;
  }

  .contact-form-card {
    padding: 24px;
  }
}

/* Disable hover transforms on touch devices */
@media (hover: none) {
  .project-card:hover,
  .publication-card:hover {
    transform: none;
  }
}


/* ============================================
   BLOG POST NAVIGATION (prev / next)
   ============================================ */

.blog-nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--outline-variant);
}

.blog-nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  border: 1px solid var(--outline-variant);
  transition: border-color 0.2s, transform 0.15s;
}

body.theme-f1  .blog-nav-card { background: var(--surface-container-lowest); }
body.theme-office .blog-nav-card { background: var(--surface-container-low); }

.blog-nav-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.blog-nav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
}

body.theme-f1  .blog-nav-label { font-family: var(--font-mono); }
body.theme-office .blog-nav-label { font-family: var(--font-body); }

.blog-nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.4;
}

body.theme-f1  .blog-nav-title { font-family: var(--font-headline); font-style: italic; }
body.theme-office .blog-nav-title { font-family: 'Newsreader', serif; font-style: italic; }

.blog-nav-next { align-items: flex-end; }
.blog-nav-prev { align-items: flex-start; }


/* ============================================
   BLOG RELATED POSTS
   ============================================ */

.blog-related {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.blog-related-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

body.theme-f1  .blog-related-header { font-family: var(--font-mono); }
body.theme-office .blog-related-header { font-family: var(--font-body); }

.blog-rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.blog-rel-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  text-decoration: none;
  border-left: 3px solid var(--primary);
  transition: transform 0.15s, box-shadow 0.15s;
}

body.theme-f1  .blog-rel-card { background: var(--surface-container-lowest); }
body.theme-office .blog-rel-card { background: var(--surface-container-low); }

.blog-rel-card:hover {
  transform: translateY(-3px);
}

body.theme-f1  .blog-rel-card:hover { box-shadow: 0 8px 24px rgba(179,4,0,0.1); }
body.theme-office .blog-rel-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.blog-rel-id {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
}

body.theme-f1  .blog-rel-id { font-family: var(--font-mono); }

.blog-rel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.35;
}

body.theme-f1  .blog-rel-title { font-family: var(--font-headline); font-style: italic; }
body.theme-office .blog-rel-title { font-family: 'Newsreader', serif; font-style: italic; }

.blog-rel-excerpt {
  font-size: 0.775rem;
  color: var(--secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-rel-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--secondary);
  margin-top: 0.25rem;
}

body.theme-f1  .blog-rel-meta { font-family: var(--font-mono); }

.blog-rel-read { color: var(--primary); font-weight: 700; }

.blog-rel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.blog-rel-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  background: var(--surface-container-high);
  color: var(--secondary);
}

body.theme-f1  .blog-rel-tag { font-family: var(--font-mono); }

@media (max-width: 640px) {
  .blog-nav-row { grid-template-columns: 1fr; }
  .blog-nav-next { align-items: flex-start; }
  .blog-rel-grid { grid-template-columns: 1fr; }
}

/* ============================================
   BLOG PREVIEW SECTION (homepage)
   ============================================ */

#blog-preview {
  background-color: var(--surface-container-low);
  transition: background-color 0.5s ease;
  border-top: 1px solid rgba(0,0,0,0.06);
}
body.theme-office #blog-preview {
  background-color: var(--surface-container);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.blog-prev-skeleton {
  height: 220px;
  background: var(--surface-container);
  animation: shimmer 1.6s infinite;
}
body.theme-office .blog-prev-skeleton {
  background: var(--surface-container-low);
}
@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.blog-prev-card {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.blog-prev-card-inner {
  padding: 28px;
  height: 100%;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.blog-prev-card:hover .blog-prev-card-inner {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary);
}
body.theme-office .blog-prev-card-inner {
  background: var(--surface-container-low);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
body.theme-office .blog-prev-card:hover .blog-prev-card-inner {
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  border-color: var(--primary);
}

/* Animated left accent bar on F1 hover */
body.theme-f1 .blog-prev-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s ease;
}
body.theme-f1 .blog-prev-card:hover .blog-prev-card-inner::before {
  transform: scaleY(1);
}

.blog-prev-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.blog-prev-number {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
}
.blog-prev-time {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.blog-prev-title {
  font-family: var(--font-headline);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--on-surface);
  margin-bottom: 10px;
  flex-shrink: 0;
}
body.theme-f1 .blog-prev-title { font-style: italic; }
body.theme-office .blog-prev-title { font-weight: 600; }

.blog-prev-excerpt {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}
.blog-prev-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.blog-prev-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  background: var(--surface-container-high);
  color: var(--secondary);
}
body.theme-office .blog-prev-tag {
  background: var(--surface-container-highest);
}

/* ============================================
   SKUNKWORKS / SIDE HUSTLES SECTION
   ============================================ */

#skunkworks {
  background-color: var(--surface);
  transition: background-color 0.5s ease;
  border-top: 1px solid rgba(0,0,0,0.06);
}
body.theme-office #skunkworks {
  background-color: var(--surface-container-lowest);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.skunkworks-card {
  padding: 24px;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.skunkworks-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
  border-color: var(--primary);
}
body.theme-office .skunkworks-card {
  background: var(--surface-container-low);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
body.theme-office .skunkworks-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}
.skunkworks-icon {
  font-size: 1.8rem;
  color: var(--primary);
  display: block;
}
.skunkworks-name {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 6px;
}
body.theme-f1 .skunkworks-name {
  text-transform: uppercase;
  font-style: italic;
}
.skunkworks-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--secondary);
  margin-bottom: 14px;
}
.skunkworks-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.skunkworks-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  background: var(--surface-container-high);
  color: var(--secondary);
}
body.theme-office .skunkworks-tag {
  background: var(--surface-container-highest);
}
.skunkworks-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.skunkworks-link:hover { opacity: 0.7; }

/* ============================================
   HERO STATUS LINE
   ============================================ */
.hero-status-line {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}
