@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,600&family=Space+Grotesk:wght@400;600&display=swap');

:root {
  /* Architectural Calm Palette */
  --color-primary: #595f66; /* Charcoal */
  --color-text: #30332f;    /* Concrete */
  --color-secondary: #6b5d47; /* Natural Oak */
  --color-accent: #49636f;  /* Frosted Polycarbonate */
  --color-bg-main: #fbf9f6; /* Linen */
  --color-surface: #e3e0d8; /* Darker Surface */
  --color-surface-high: #ffffff; /* Surface Highest */
  
  /* Modular Radii & Geometry */
  --radius-sm: 8px;  /* Interactive elements */
  --radius-lg: 12px; /* Structural cards */
  
  /* Modular Spacing (1.25 ratio scale roughly) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;
}

/* GLOBAL RESETS & FOUNDATION */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1, h2, h3, h4, .serif-heading {
  font-family: 'Newsreader', serif;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.5rem; /* Explicitly compress the bottom gap */
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

/* LAYOUT MODULES */
.module-container {
  max-width: 800px; /* Compact page width */
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.module-section {
  padding: 0.75rem 0; /* Heavily compress top spacing above h2 tags */
}

.module-header {
  padding: var(--space-md) 0 var(--space-sm) 0;
  /* Center layout alignment */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.module-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.module-header .subtitle {
  font-size: 1.25rem;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

/* CONTENT MODULES (Cards & Tonal Shifts) */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem; /* Even more compact inner padding */
  margin-bottom: 0.75rem; /* Even more compact outer spacing */
  /* Glassmorphism/Tonal Layering instead of borders */
  border: none;
  box-shadow: 0 24px 48px -12px rgba(48, 51, 47, 0.03); 
}

/* Hover offset for interactive cards/buttons */
.interactive-element {
  transition: transform 0.2s ease;
}
.interactive-element:hover {
  transform: translateY(-2px);
}

/* TIMELINE MODULE */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Very compact timeline gap */
}

.timeline-item {
  display: flex;
  flex-direction: column;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: 0.15rem; /* Drastically reduced gap */
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0; /* Removing browser default h3 margin */
}

.timeline-period {
  background-color: #ffffff;
  color: var(--color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.timeline-company {
  font-size: 1rem;
  color: var(--color-secondary);
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.timeline-content {
  font-size: 0.95rem;
}

.timeline-content ul {
  padding-left: 1.5rem;
}

/* SKILL TAGS (Chips) */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.skill-tag {
  background-color: var(--color-surface-high);
  color: var(--color-primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

/* UTILITY CLASSES */
.opacity-ghost {
  opacity: 0.8;
}

.module-footer {
  padding: var(--space-md) 0;
  text-align: right;
  font-size: 0.8rem;
  color: var(--color-secondary);
  border-top: 1px solid var(--color-surface); /* A rare subtle structural line, acceptable for footer */
}

/* STICKY NAVIGATION */
.sticky-nav {
  position: sticky;
  top: 0;
  background-color: rgba(251, 249, 246, 0.85); /* Linen with opacity for blur */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--color-surface);
  padding: var(--space-sm) 0;
}
.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem;
  color: var(--color-primary);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
}

/* BUTTONS */
.btn-read-more {
  background: none;
  border: none;
  color: var(--color-accent);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
  cursor: pointer;
  margin-top: var(--space-xs);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-read-more:hover {
  color: var(--color-primary);
}

/* PROFICIENCY GRID (Single Column Layout) */
.proficiency-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Compact vertical gap */
}

/* PROGRESS BARS */
.progress-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem; /* Row gap and Column gap */
  margin-bottom: 1rem;
}

.progress-bar {
  display: flex;
  align-items: center; /* Inline text and bar */
  gap: 0.75rem;
}

.progress-label {
  flex: 0 0 50%; /* Text takes up half the column */
  font-size: 0.8rem; /* Highly compact label text */
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-track {
  flex: 1; /* Bar stretches out in front of the text */
  height: 8px; /* Thicker line */
  background-color: var(--color-bg-main);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
  transition: width 1s ease-in-out;
}

/* REVEAL CONTENT (Accordion) */
.interactive-header:hover {
  color: var(--color-accent);
}

.reveal-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease-out;
}

.reveal-content.expanded {
  max-height: 500px; /* High enough to contain the buttons */
  opacity: 1;
  transition: max-height 0.4s cubic-bezier(1, 0, 1, 0), opacity 0.4s ease-in;
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.expanded-icon {
  transform: rotate(45deg); /* Rotates the + into an x */
}
