: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;
}

/* -----------------------------
 * ACCORDION SYSTEM
 * ----------------------------- */

.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.accordion-item {
  border-top: 1px solid var(--divider-line);
  border-bottom: 1px solid var(--divider-line);
  margin-bottom: -1px; /* collapse sibling borders */
  transition: border-color 0.3s ease, background-color 0.3s ease;
  background-color: transparent;
}

.accordion-item:hover {
  background-color: rgba(255, 255, 255, 0.01);
}

.accordion-item.active {
  border-top-color: var(--border-subtle);
  border-bottom-color: var(--border-subtle);
  position: relative;
  z-index: 1;
}

.accordion-header {
  padding: 1.5rem 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

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

.accordion-item.active .accordion-title {
  color: var(--accent-purple);
}

.accordion-expand-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.accordion-item:hover .accordion-expand-label {
  color: var(--accent-purple);
}

.accordion-item.active .accordion-expand-label {
  color: var(--accent-purple);
}

.accordion-item.active .accordion-expand-label::before {
  content: "Collapse";
  position: absolute; /* simple trick to swap text */
  background: var(--bg-primary);
}

/* actually it's easier to manipulate from JS or just hide/show, but the prompt says 
   rules: smooth expand/collapse. We will keep the label as Expand always unless modified in JS */

.accordion-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-line {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.summary-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-right: 0.5rem;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
  opacity: 0;
  padding: 0;
}

.accordion-item.active .accordion-content {
  opacity: 1;
  padding: 1rem 0 2.5rem 0;
  border-top: 1px solid var(--divider-line);
  margin-top: 0.5rem;
}

.accordion-content .clean-list {
  margin-bottom: 2rem;
}

.accordion-content .clean-list li {
  color: var(--text-secondary);
}

.accordion-content-links {
  display: flex;
  gap: 2rem;
}

.accordion-content-link {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.accordion-content-link:hover {
  color: var(--accent-purple-dark);
}

/* -----------------------------
 * 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);
}
