:root {
  /* Dynamic Palette Definitions */
  --bg-primary: #0F0F14;
  --bg-surface: #17171F;

  --text-primary: #E6E6EB;
  --text-secondary: #A1A1B3;
  --text-tertiary: #6F7082;

  --accent-teal: #2DD4BF;
  --accent-teal-muted: #134E4A;

  --accent-purple: #7C5CFF;
  --accent-purple-dark: #6A4DE6;
  --accent-purple-muted: #2A2540;

  --divider-line: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.16);

  --interaction-light: rgba(124, 92, 255, 0.08);
  --interaction-strong: rgba(124, 92, 255, 0.16);

  --failure-accent: rgba(248, 113, 113, 0.7);
  /* soft red */

  /* Layout constraints */
  --content-max-width: 680px;
  --spacing-base: 1rem;
  --spacing-large: 2.5rem;
  --spacing-xl: 4rem;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: calc(var(--content-max-width) + 20vw + 2rem);
  margin: 0;
  padding: var(--spacing-xl) 2rem var(--spacing-xl) 20vw;
}

/* Typography & Flow */
h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-large);
  color: var(--text-primary);
}

h2 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: var(--spacing-base);
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-purple);
  margin-bottom: var(--spacing-base);
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

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

.large-text {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.teal-accent {
  color: var(--accent-teal);
}

.clean-list {
  list-style-type: none;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.clean-list li {
  margin-bottom: 0.25rem;
  padding-left: 0.5rem;
  /* give list a tiny indent */
}

.quote {
  border-left: 2px solid var(--border-subtle);
  padding-left: 1rem;
  font-style: italic;
  color: var(--text-primary);
  margin: 1.5rem 0;
}

.divider {
  height: 1px;
  background-color: var(--divider-line);
  margin: var(--spacing-xl) 0;
  width: 100%;
  max-width: 120px;
}

.section {
  position: relative;
}

/* Layout cues */
.hero {
  position: relative;
}

/* Hero Identity (Name + Headshot) */
.hero-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: var(--spacing-large);
}

.hero-name {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.profile-anchor {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

/* Headline */
.hero-headline {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--spacing-base);
  line-height: 1.3;
}

/* Subtitle */
.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-large);
  max-width: 600px;
}

/* Identity Line */
.hero-identity-line {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-large);
}

/* -----------------------------
 * NAVIGATION & CONTACT
 * ----------------------------- */

.site-nav {
  position: absolute;
  top: var(--spacing-xl);
  right: 2rem;
  text-align: right;
  z-index: 100;
}

#menu-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

#menu-toggle:hover {
  opacity: 0.8;
}

#menu-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#menu-list.hidden {
  display: none;
}

#menu-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

#menu-list a:hover {
  color: var(--text-primary);
}

.hero-contact-row {
  margin-top: var(--spacing-large);
  display: flex;
  gap: 2rem;
}

.hero-contact-row a {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.hero-contact-row a:hover {
  text-decoration: underline;
}

/* -----------------------------
 * INTERACTIVE DEMO SYSTEM
 * ----------------------------- */

.demo-steps {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-base);
}

.step {
  transition: opacity 0.5s ease, filter 0.5s ease, margin-bottom 0.5s ease;
  position: relative;
  padding: var(--spacing-base) 0;
}

/* States */
.step.hidden {
  display: none;
}

/* The active step gets full attention */
.step.active {
  opacity: 1;
  filter: grayscale(0%);
}

/* Past steps are de-emphasized but visible */
.step.past {
  opacity: 0.35;
  filter: grayscale(100%);
  pointer-events: none;
  /* Make them untappable */
  padding-bottom: 0.5rem;
  /* compress slightly */
}

.step.past p {
  margin-bottom: 0.5rem;
}

.step.past .quote {
  margin: 0.5rem 0;
}

.step.past .next-step-btn {
  display: none;
  /* Hide buttons on past steps */
}

/* Step Buttons */
.next-step-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--accent-purple);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.next-step-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent-purple-dark);
  color: var(--accent-purple-dark);
}

/* Specific Step Visual Tones */

/* Step 3: Failure */
.failure-step.active {
  /* slight tension cue */
}

.failure-step.active h3 {
  color: var(--failure-accent);
}

.text-failure {
  color: var(--failure-accent);
}

.tension {
  border-left-color: rgba(248, 113, 113, 0.4);
}

/* Step 4: Resolution / Calm */
.resolution-step.active {
  /* calm, cleaner */
}

.resolution-step.active h3 {
  color: var(--accent-teal);
}

.resolution-step.active .quote.calm {
  border-left-color: var(--accent-teal);
}

.resolution-badge {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.4rem 0.8rem;
  background-color: var(--accent-teal-muted);
  color: var(--accent-teal);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  opacity: 0;
  animation: fadeInBadge 1s forwards 0.5s;
}

@keyframes fadeInBadge {
  to {
    opacity: 1;
  }
}

/* Responsive constraints */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-large) 2rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: var(--spacing-large) 1.5rem;
  }

  .hero-name {
    font-size: 2.25rem;
  }

  .profile-anchor {
    width: 60px;
    height: 60px;
  }

  .hero-headline {
    font-size: 1.35rem;
  }
}

/* -----------------------------
 * RESUME STYLES
 * ----------------------------- */

/* Header */
.resume-header {
  margin-bottom: 1.5rem;
}

/* Reduce margin on dividers when used in the resume */
.resume-header+.divider,
.resume-section+.divider {
  margin: 2rem 0;
}

.resume-header *,
.resume-section * {
  color: #e5e7eb !important;
}

.resume-name {
  font-size: 1.15rem;
  /* Slightly larger than 16px body text */
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 0.25rem;
}

.resume-title {
  font-size: 1rem;
  font-weight: 500;
  color: #e5e7eb;
  margin-bottom: 0.25rem;
}

.resume-subtitle {
  font-size: 1rem;
  color: #e5e7eb;
  margin-bottom: 1rem;
}

.resume-contact {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.resume-contact a {
  color: #e5e7eb;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.resume-contact a:hover {
  text-decoration: underline;
}

/* Sections */
.resume-section {
  margin-bottom: 1.5rem;
}

.resume-h2 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e5e7eb;
  margin-bottom: 1.5rem;
}

.resume-item {
  margin-bottom: 1.5rem;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.resume-item-header {
  margin-bottom: 0.5rem;
}

.resume-h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 0.25rem;
}

.resume-meta {
  display: block;
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 1rem;
}

.resume-context {
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.resume-impact {
  color: #e5e7eb;
  margin-top: 1rem;
  border-left: 2px solid var(--accent-purple);
  padding-left: 1rem;
  font-weight: 500;
}

/* Lists */
.plain-list li {
  padding-left: 0;
}

.education-item p {
  margin-bottom: 0.25rem;
  color: #e5e7eb;
}

.education-item p strong {
  color: #e5e7eb;
  font-weight: 500;
}



/* -----------------------------
 * CONTACT PAGE
 * ----------------------------- */

.contact-page-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-email {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.15rem;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-linkedin {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
  display: inline-block;
  width: fit-content;
}

.contact-linkedin:hover {
  color: var(--accent-purple);
}

/* -----------------------------
 * PUBS TWO-COLUMN CARD SYSTEM
 * ----------------------------- */

.pubs-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-large);
}

.pubs-card {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background-color: transparent;
  transition: border-color 0.3s ease;
  overflow: hidden;
}

.pubs-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

/* Left Panel */
.pubs-left {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pubs-left-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
}

.pubs-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.pubs-card:hover .pubs-title {
  color: var(--accent-purple);
}

.pubs-expand-icon {
  font-size: 1.5rem;
  color: var(--text-tertiary);
  transition: transform 0.3s ease, color 0.3s ease;
  line-height: 1;
  display: flex;
  align-items: center;
}

.pubs-left.is-open .pubs-expand-icon {
  transform: rotate(45deg);
  color: var(--accent-purple);
}

.pubs-left-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
  opacity: 0;
  padding: 0 1.5rem;
}

.pubs-left.is-open .pubs-left-content {
  max-height: 1200px;
  opacity: 1;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.pubs-left-content .clean-list {
  margin: 0;
}

/* Arrow Separator */
.pubs-arrow-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  background-color: rgba(255, 255, 255, 0.02);
  width: 3.5rem;
  flex-shrink: 0;
}

.pubs-arrow-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: opacity 0.2s ease, color 0.2s ease;
  width: 100%;
  height: 100%;
}

.pubs-arrow-btn:hover {
  opacity: 0.8;
  color: var(--accent-purple);
}

.pubs-card.right-open .pubs-arrow-btn {
  color: var(--accent-purple);
}

.pubs-arrow-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.4s ease;
}

/* Right Panel */
.pubs-right {
  width: 0;
  opacity: 0;
  overflow: hidden;
  background-color: var(--accent-purple-muted);
  transition: width 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
  display: flex;
  align-items: center;
}

.pubs-card.right-open .pubs-right {
  width: 45%;
  opacity: 1;
  padding: 1.5rem;
}

.pubs-right-content {
  min-width: 200px;
}

.pubs-principle {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

/* Infographic Layout styling */
.infographic-container {
  margin: var(--spacing-large) 0;
  width: 100%;
  max-width: var(--content-max-width);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--bg-surface);
}

.infographic-container a {
  display: block;
  cursor: zoom-in;
}

.infographic-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.infographic-container a:hover .infographic-img {
  opacity: 0.85;
}

/* Responsive Overrides */
@media (min-width: 769px) {
  .pubs-arrow-icon {
    transform: rotate(0deg); /* Points right */
  }
  .pubs-card.right-open .pubs-arrow-icon {
    transform: rotate(180deg); /* Points left */
  }
}

@media (max-width: 768px) {
  .pubs-card {
    flex-direction: column;
  }
  
  .pubs-arrow-container {
    width: 100%;
    height: 3rem;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .pubs-arrow-icon {
    transform: rotate(90deg); /* Points down */
  }
  .pubs-card.right-open .pubs-arrow-icon {
    transform: rotate(-90deg); /* Points up */
  }
  
  .pubs-right {
    width: 100%;
    max-height: 0;
    padding: 0 1.5rem;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
  }
  
  .pubs-card.right-open .pubs-right {
    width: 100%;
    max-height: 300px;
    padding: 1.5rem;
  }
}