/* =====================================================
   DESIGN TOKENS
   ===================================================== */
:root {
  /* Colors - Pastel palette */
  --color-bg: #faf9f7;
  --color-bg-subtle: #f5f3f0;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-accent: #4caf50;
  --color-accent-light: #e8f5e9;
  --color-border: #e8e6e3;
  --color-lavender: #f3e5f5;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --max-width: 640px;
  --border-radius: 8px;
  --border-radius-lg: 12px;

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* =====================================================
   BASE STYLES
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================
   LAYOUT
   ===================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

@media (min-width: 768px) {
  .container {
    padding: var(--space-16) var(--space-8);
  }
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  margin-bottom: var(--space-16);
}

.hero__avatar {
  width: 84px;
  height: 84px;
  object-fit: cover;
  margin-bottom: var(--space-6);
  border: none;
  background: none;
  box-shadow: none;
}

.hero__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.hero__headline {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.1;
  margin-bottom: var(--space-8);
  letter-spacing: -0.04em;
  color: var(--color-text);
  max-width: 100%;
}

.hero__bio {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 580px;
  margin-bottom: var(--space-6);
}

.hero__status {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: var(--space-12);
  opacity: 0.8;
}

.hero__status-link {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.hero__status-link:hover {
  border-bottom-color: var(--color-text-muted);
}

.hero__links {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.hero__links {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.hero__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out-expo);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__link svg {
  opacity: 0.6;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.hero__link:hover svg {
  opacity: 1;
  color: var(--color-text);
}

.hero__ctas {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-10);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out-expo);
  cursor: pointer;
}

.btn--primary {
  background: #111;
  color: white;
  border: 1px solid #111;
}

.btn--primary:hover {
  background: #000;
}

.btn--secondary {
  background: #fff;
  color: #111;
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: #fcfcfc;
  border-color: var(--color-text-muted);
}

/* =====================================================
   SECTION
   ===================================================== */
.section {
  margin-bottom: var(--space-20);
}

.section__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* =====================================================
   FLOATING YEAR NAVIGATION
   ===================================================== */
#experience {
  position: relative;
}

.year-nav {
  position: fixed;
  left: calc(50% - 400px);
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.year-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.year-nav__track {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-4) 0;
  background: transparent;
}

.year-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  transform-origin: right center;
}

/* Dash line for all years */
.year-nav__item::after {
  content: '';
  width: 12px;
  height: 1px;
  background: var(--color-border);
  transition: all 0.2s ease;
}

.year-nav__item:hover {
  transform: scale(1.05);
}

.year-nav__item:hover::after {
  width: 16px;
  background: #16a34a;
}

/* Labeled items (key work years) */
.year-nav__item--labeled {
  padding: 8px 12px 8px 8px;
}

.year-nav__item--labeled span {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  margin-right: var(--space-2);
  transition: all 0.2s ease;
}

.year-nav__item--labeled::after {
  width: 16px;
  background: var(--color-text-muted);
  opacity: 0.6;
}

.year-nav__item--labeled:hover span {
  color: #16a34a;
  font-weight: var(--font-weight-semibold);
}

.year-nav__item--labeled:hover::after {
  background: #16a34a;
  opacity: 1;
}

/* Active state */
.year-nav__item.is-active span {
  color: #16a34a;
  font-weight: var(--font-weight-semibold);
}

.year-nav__item--labeled.is-active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316a34a'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

@keyframes arrow-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.year-nav__item.is-active::after {
  width: 24px;
  background: #16a34a;
  opacity: 1;
}

/* Indicator dot */
.year-nav__indicator {
  display: none;
}

/* Timeline items container */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-5);
  position: relative;
  cursor: pointer;
  padding: var(--space-4);
  margin: calc(-1 * var(--space-4));
  border-radius: var(--border-radius-lg);
  transition: all var(--duration-normal) var(--ease-out-expo);
  border: 1px solid transparent;
}

.timeline-item:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--color-border);
}

.timeline-item.is-active {
  background: rgba(22, 163, 74, 0.04);
  border-color: rgba(22, 163, 74, 0.15);
}

.timeline-item:hover .timeline-item__toggle {
  color: #16a34a;
}

.timeline-item__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.timeline-item.is-active .timeline-item__logo {
  border-color: rgba(22, 163, 74, 0.3);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.timeline-item__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-item__logo-placeholder {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}

.timeline-item__content {
  padding-top: var(--space-1);
}

.timeline-item__header {
  margin-bottom: var(--space-3);
}

.timeline-item__role {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.timeline-item__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.timeline-item__company {
  font-weight: var(--font-weight-medium);
}

.timeline-item__date {
  color: var(--color-text-muted);
}

.timeline-item__summary {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
  line-height: var(--line-height-relaxed);
}

.timeline-item__toggle {
  display: inline-flex;
  margin-left: var(--space-2);
  color: var(--color-text-muted);
  font-size: 10px;
  transition: all var(--duration-normal) var(--ease-out-expo);
  vertical-align: middle;
}

.timeline-item.is-expanded .timeline-item__toggle {
  transform: rotate(45deg);
  color: #16a34a;
}

/* =====================================================
   PROJECT LIST WITH IMPACT INDICATORS
   ===================================================== */
.projects {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-normal) var(--ease-out-expo), opacity var(--duration-normal) var(--ease-out-expo);
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
}

.timeline-item.is-expanded .projects {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: var(--space-4);
}

.project-wrapper {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Subtle connecting line between projects - REMOVED for more minimal look */
.projects::before {
  display: none;
}

.project {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding: var(--space-1) 0;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.project::before {
  content: "—";
  color: var(--color-text-muted);
  margin-right: var(--space-4);
  font-size: var(--font-size-xs);
  flex-shrink: 0;
  opacity: 0.6;
}

/* Removed project hover effects for minimal look */

/* Green impact indicator - variable sizes */
.project__indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 5px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--color-bg-subtle);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

/* Size variants for impact degree */
.project__indicator--small {
  width: 6px;
  height: 6px;
  margin-top: 7px;
  opacity: 0.7;
}

.project__indicator--large {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  box-shadow: 0 0 0 3px var(--color-bg-subtle), 0 0 8px rgba(76, 175, 80, 0.3);
}

/* Hover effects */
/* Removed indicator hover effects */

.project:hover .project__indicator--large::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.2;
  animation: pulse 1.5s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.project__content {
  flex: 1;
}

.project__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.project__impact {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

/* Enhanced metric styling - the metric IS the indicator */
.project__impact strong {
  color: var(--color-accent);
  font-weight: var(--font-weight-semibold);
  background: var(--color-accent-light);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

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

.footer__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.footer__links {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.footer__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out-expo);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__link svg {
  opacity: 0.6;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.footer__link:hover svg {
  opacity: 1;
  color: var(--color-text);
}

/* =====================================================
   NEW SECTIONS (FOCUS, WORK, HOW)
   ===================================================== */
.focus-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3) var(--space-8);
}

@media (min-width: 480px) {
  .focus-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.focus-item {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) 0;
}

.focus-item::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
  flex-shrink: 0;
  opacity: 0.5;
}

.how-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  counter-reset: count;
}

.how-item {
  counter-increment: count;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-base);
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.how-item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.how-item::before {
  content: counter(count, decimal-leading-zero);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  width: 2ch;
  flex-shrink: 0;
}

/* Removed how-item hover effects */

@media (min-width: 480px) {
  .how-item {
    padding: var(--space-6) 0;
  }
}

.work-error {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.work-error__header {
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 6px;
}

.work-error__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.work-error__content {
  padding: var(--space-6);
}

.work-error__code {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
}

.work-error__msg {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.work-error__log {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-error__log span {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Removing old selected-work styles */
.selected-work__item {
  display: none;
}

/* Sentence Case Rule */
h1,
h2,
h3,
p,
span,
li,
a {
  text-transform: none;
  /* Already normal, but explicitly avoiding uppercase if any was used */
}

/* Removing old project styles that might conflict or be unused */
.project__indicator--large::after {
  display: none;
  /* Remove pulse for now unless requested again */
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 900px) {

  /* Hide floating year nav on smaller screens */
  .year-nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero__name {
    font-size: var(--font-size-xl);
  }

  .timeline-item {
    grid-template-columns: 40px 1fr;
    gap: var(--space-4);
    padding: var(--space-3);
    margin: calc(-1 * var(--space-3));
  }

  .timeline-item__logo {
    width: 40px;
    height: 40px;
  }

  .timeline-item.is-active {
    background: transparent;
    border-color: transparent;
  }
}