/* ==========================================================================
   Stephen Gibbons — Personal Website Styles
   Design Language: Warm cream background, deep charcoal text, elegant serif headline
   ========================================================================== */

:root {
  --bg-color: #f4efe4;
  --text-primary: #1a1a1a;
  --text-secondary: #44403a;
  --text-muted: #6e675d;
  --border-color: #ded5c6;
  --border-subtle: #eae2d4;
  --card-bg: rgba(255, 255, 255, 0.42);
  --card-bg-hover: rgba(255, 255, 255, 0.72);
  --pill-bg: #eae3d4;
  --pill-border: #dcd2c1;
  --btn-bg: #1a1a1a;
  --btn-text: #f4efe4;
  --btn-hover-bg: #2d2925;
  --font-serif: "Playfair Display", "New York", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.site-container {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem clamp(4rem, 10vw, 7rem) 1.5rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  margin-bottom: clamp(3.5rem, 7vw, 4.75rem);
}

.hero-header {
  margin-bottom: 1.25rem;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.85rem, 8vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.hero-name .name-first {
  font-weight: 400;
  font-style: normal;
}

.hero-name .name-last {
  font-weight: 400;
  font-style: italic;
  margin-left: 0.12em;
}

.pronunciation {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  letter-spacing: 0.01em;
}

.hero-title {
  font-size: clamp(1.05rem, 2.8vw, 1.22rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 42ch;
  margin: 0 0 2rem 0;
}

.hero-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.65rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  border: 1px solid transparent;
  user-select: none;
  -webkit-user-select: none;
}

.btn-primary {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.12);
}

.btn-primary:hover {
  background-color: var(--btn-hover-bg);
  transform: translateY(-1.5px);
  box-shadow: 0 5px 15px rgba(26, 26, 26, 0.18);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(26, 26, 26, 0.1);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

.btn-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Sections General
   ========================================================================== */

.section {
  margin-bottom: clamp(3.25rem, 6.5vw, 4.5rem);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Education & Experience
   ========================================================================== */

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.timeline-item:first-child {
  padding-top: 0.25rem;
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0.25rem;
}

.timeline-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.institution-name,
.role-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.timeline-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timeline-subtitle {
  font-size: 0.96rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.timeline-detail {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0 0;
}

/* ==========================================================================
   Certifications & Memberships
   ========================================================================== */

.cert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-item {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cert-bullet {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
  transform: translateY(-0.1rem);
}

/* ==========================================================================
   Technical Skills
   ========================================================================== */

.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background-color: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.skill-tag:hover {
  border-color: var(--text-muted);
  background-color: #e5decb;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.contact-card:hover {
  background-color: var(--card-bg-hover);
  border-color: var(--text-muted);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.05);
}

.contact-card:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.contact-card-icon {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.contact-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.contact-card-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-action {
  display: flex;
  align-items: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: clamp(4rem, 8vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 600px) {
  .site-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item-header {
    flex-direction: column;
    gap: 0.15rem;
  }

  .timeline-meta {
    order: 2;
  }

  .institution-name,
  .role-name {
    order: 1;
  }

  .btn {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  body {
    background-color: #fff;
    color: #000;
  }

  .site-container {
    padding: 0;
    max-width: 100%;
  }

  .btn {
    display: none;
  }

  .contact-card {
    border: 1px solid #ccc;
    background: transparent;
  }
}
