/* ============================================================
   Ross Thomasson — Improved CV Site
   Fonts: Raleway (headings/buttons), Source Sans Pro (body)
   Primary accent: #1CCBD6 (teal)
   Text: #474747 (dark grey)
   Borders: #CCCCCC
   Background: #FFFFFF / #F5F5F5
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --accent: #1CCBD6;
  --accent-dark: #15a8b2;
  --text: #474747;
  --text-light: #777777;
  --border: #CCCCCC;
  --bg: #F5F5F5;
  --white: #FFFFFF;
  --nav-height: 3.5rem;
  --transition: 0.25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, img,
ul, ol, li, form, label, input, textarea, button, section, nav {
  margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline;
}

html { font-size: 18pt; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  line-height: 1;
  min-height: 100vh;
  overflow-x: hidden;
  word-wrap: break-word;
  color: var(--text);
  font-family: 'Source Sans Pro', sans-serif;
}

u { text-decoration: underline; }
strong { color: inherit; font-weight: 700; }
em { font-style: italic; }
a { color: inherit; text-decoration: underline; transition: color var(--transition); }
a:hover { color: var(--accent); }
ol, ul { list-style: none; }

/* ---- Top Navigation (New) ---- */
#topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow var(--transition);
}

#topnav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-inner {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 0.7em;
  letter-spacing: 0.3rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color var(--transition);
}

.nav-logo:hover { color: var(--accent); }

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

.nav-links a {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 0.55em;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-light);
  transition: color var(--transition);
  cursor: pointer;
}

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

/* ---- Wrapper & Main ---- */
#wrapper {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 2;
  padding-top: var(--nav-height);
}

#main {
  align-items: center;
  display: flex;
  flex-grow: 0;
  flex-shrink: 0;
  justify-content: center;
  max-width: 100%;
  position: relative;
  text-align: center;
  z-index: 1;
  width: 100%;
  transition: opacity 0.8s ease 0s, transform 0.8s ease 0s;
}

body.is-loading #main {
  opacity: 0;
  transform: translateY(0.5rem);
}

#main > .inner {
  width: 100%;
  position: relative;
}

/* ---- Sections ---- */
section {
  width: 100%;
  display: none;
  animation: sectionFadeIn 0.4s ease forwards;
}

@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: translateY(0); }
}

section.active { display: block; }
section.inactive { display: none; }

/* ---- Container ---- */
.container {
  display: flex;
  width: 100%;
  align-items: stretch;
  justify-content: center;
  background-color: var(--white);
}

.container.columns > .wrapper {
  max-width: 74rem;
  width: 100%;
}

.container.columns > .wrapper > .inner {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  padding: 5rem 4rem;
  gap: 0;
}

/* Text column */
.text-col {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

/* Image column */
.image-col {
  flex: 0 0 50%;
  max-width: 50%;
  position: relative;
  overflow: hidden;
  min-height: 28rem;
}

/* Reverse layout */
.container.reverse > .wrapper > .inner { flex-direction: row-reverse; }
.container.reverse .text-col { padding-right: 0; padding-left: 4rem; }

/* ---- Images ---- */
.image.full {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
}

.image.full img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.image.full:hover img { transform: scale(1.03); }

/* ---- Typography ---- */
h1, h2, h3, p { direction: ltr; position: relative; }

h1#text04 {
  text-transform: uppercase;
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.5rem;
  font-size: 1.875em;
  line-height: 1.375;
  font-weight: 700;
}

h2 {
  text-transform: uppercase;
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.45rem;
  font-size: 1.25em;
  line-height: 1.375;
  font-weight: 700;
}

h3 {
  text-transform: uppercase;
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.25rem;
  font-size: 0.75em;
  line-height: 1.875;
  font-weight: 300;
}

p {
  text-align: left;
  color: var(--text);
  font-family: 'Source Sans Pro', sans-serif;
  letter-spacing: 0.025rem;
  font-size: 1em;
  line-height: 1.875;
  font-weight: 300;
}

.section-intro {
  color: var(--text-light);
  font-size: 0.9em;
  max-width: 48rem;
  margin: 0 auto 2rem;
  text-align: center;
}

/* ---- Role Badge (New) ---- */
.role-badge {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.5rem;
  width: fit-content;
}

/* ---- Sector Tags (New) ---- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.tag {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.3rem 0.75rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(28,203,214,0.05);
}

/* ---- Stats Bar (New) ---- */
#stats-bar {
  background: var(--text);
  padding: 2.5rem 2rem;
  width: 100%;
}

.stats-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}

.stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  padding: 0 1rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.stat:last-child {
  border-right: none;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
}

.stat-number {
  font-family: 'Raleway', sans-serif;
  font-size: 2.8em;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  display: inline;
}

.stat-suffix {
  font-family: 'Raleway', sans-serif;
  font-size: 2.8em;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  display: inline;
}

.stat-label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.42em;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-align: center;
  line-height: 1.4;
}

/* ---- Buttons ---- */
.buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, auto));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 36rem;
}

/* Company page nav buttons: strict 2-column equal-width grid */
.buttons.company-nav {
  grid-template-columns: 1fr 1fr;
  max-width: 28rem;
}

.center-buttons { margin-left: auto; margin-right: auto; }

.buttons li { display: contents; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.2rem;
  padding: 0 1.1rem;
  vertical-align: middle;
  text-transform: uppercase;
  font-family: 'Raleway', sans-serif;
  letter-spacing: 0.15rem;
  font-size: 0.55em;
  font-weight: 700;
  border-radius: 0;
  color: var(--text);
  border: solid 1.5px var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--white);
}

.button:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: rgba(28,203,214,0.05) !important;
}

.button:active {
  background: rgba(28,203,214,0.1) !important;
}

.button.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white) !important;
}

.button.button-primary:hover {
  background: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
  color: var(--white) !important;
}

.button.btn-back {
  border-style: dashed;
  opacity: 0.75;
}

.button.btn-back:hover {
  opacity: 1;
}

.button.icon-only {
  width: 2.2rem;
  padding: 0;
  justify-content: center;
}

/* Social icon buttons on home page — larger, more visible */
.button.icon-social {
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  justify-content: center;
  font-size: 0.7em;
}

.btn-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}

/* ---- Timeline (New) ---- */
.timeline-container {
  background: var(--white);
}

.timeline-container > .wrapper {
  max-width: 74rem;
  width: 100%;
}

.timeline-inner {
  padding: 5rem 4rem;
  text-align: center;
}

.timeline-inner h2 {
  margin-bottom: 1rem;
}

.timeline {
  position: relative;
  max-width: 52rem;
  margin: 3rem auto 0;
  text-align: left;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  display: flex;
  flex-direction: row;
  gap: 0 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  align-items: flex-start;
  padding-left: 3rem;
}

.timeline-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent);
  flex-shrink: 0;
  position: absolute;
  left: 0.6rem;
  top: 0.3rem;
  z-index: 1;
  transition: transform var(--transition);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
}

.timeline-date {
  font-family: 'Raleway', sans-serif;
  font-size: 0.46em;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
  white-space: nowrap;
  margin-bottom: 0.3rem;
  display: block;
}

.timeline-content {
  padding-bottom: 0.5rem;
  flex: 1;
}

.timeline-content h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-family: 'Raleway', sans-serif;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-company a {
  color: var(--accent);
  text-decoration: none;
}

.timeline-company a:hover {
  text-decoration: underline;
}

.timeline-content p {
  font-size: 0.85em;
  color: var(--text-light);
  line-height: 1.7;
}

/* ---- Contact ---- */
.form-col { min-height: 100vh; }

/* ---- Home specific ---- */
.home-container > .wrapper > .inner {
  min-height: calc(100vh - var(--nav-height));
  padding-top: 4rem;
  padding-bottom: 0;
}

.home-text {
  padding-right: 4rem;
}

/* Home page primary action buttons */
.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 36rem;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
}

.home-socials {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.25rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1680px) { html { font-size: 13pt; } }
@media (max-width: 1280px) { html { font-size: 13pt; } }

@media (max-width: 980px) {
  html { font-size: 11pt; }

  .container.columns > .wrapper > .inner {
    flex-direction: column !important;
    padding: 3rem 2rem;
  }

  .container.reverse > .wrapper > .inner {
    flex-direction: column !important;
  }

  .text-col,
  .image-col {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0 !important;
    padding-left: 0 !important;
    width: 100%;
  }

  .image-col {
    position: relative;
    min-height: 20rem;
    height: 20rem;
  }

  .text-col { padding-top: 2rem; padding-bottom: 2rem; }

  .buttons { justify-content: center; }
  p { text-align: center; }
  h1#text04, h2, h3 { text-align: center; }
  .tags { justify-content: center; }
  .role-badge { margin: 0 auto 0.5rem; }

  .form-col { min-height: auto; }

  .home-container > .wrapper > .inner { min-height: auto; }
  .home-text { padding-right: 0; }

  /* Timeline mobile */
  .timeline::before { left: 0.5rem; top: 0.5rem; }
  .timeline-item {
    padding-left: 2rem;
    margin-bottom: 2rem;
  }
  .timeline-dot {
    left: 0.15rem;
    top: 0.3rem;
  }
  .timeline-date {
    font-size: 0.5em;
    white-space: nowrap;
    margin-bottom: 0.2rem;
  }
  .timeline-content h3 { font-size: 0.7em; margin-bottom: 0.2rem; }
  .timeline-company { font-size: 0.58em; margin-bottom: 0.3rem; }
  .timeline-content p { font-size: 0.68em; line-height: 1.5; }
  .timeline-inner { padding: 3rem 1.5rem; }

  /* Stats bar — 2x2 grid on mobile with 5th centred below */
  .stats-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1rem;
    justify-items: center;
  }
  .stat { border-right: none; padding: 0; flex: none; width: 100%; }
  .stat:nth-child(5) { grid-column: 1 / -1; }
  .stat-number, .stat-suffix { font-size: 2.2em; }

  .nav-links { display: none; }
}

@media (max-width: 736px) {
  .container.columns > .wrapper > .inner { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .container.columns > .wrapper > .inner { padding: 1.5rem 1rem; }
  .stat-number, .stat-suffix { font-size: 1.8em; }
}

/* ---- Timeline Logos ---- */
.timeline-header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.timeline-logo {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
  opacity: 0.75;
  margin-top: 0.1rem;
}

/* ---- Section Logos (experience pages) ---- */
.section-logo-wrap {
  margin-bottom: 0.75rem;
}

.section-logo {
  max-height: 2.8rem;
  max-width: 10rem;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ---- Logo Buttons (companies page) ---- */
.logo-buttons {
  flex-wrap: wrap;
  gap: 0.6rem;
}

.button.logo-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-logo {
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---- Education Cards ---- */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 40rem;
  margin: 2.5rem auto 0;
  text-align: left;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.edu-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(28,203,214,0.1);
}

.edu-icon {
  width: 2.2rem;
  height: 2.2rem;
  background: rgba(28,203,214,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--accent);
}

.edu-body { flex: 1; }

.edu-date {
  font-family: 'Raleway', sans-serif;
  font-size: 0.46em;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.edu-body h3 {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.08rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.edu-school {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.8em;
  color: var(--text-light);
  font-weight: 300;
}

/* ---- Causes Block ---- */
.causes-block {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.causes-block h3 {
  font-size: 0.65em;
  font-weight: 700;
  letter-spacing: 0.2rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.causes-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1rem;
}

.cause-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Raleway', sans-serif;
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.35rem 0.85rem;
  transition: color var(--transition), border-color var(--transition);
}

.cause-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.cause-icon {
  width: 0.75em;
  height: 0.75em;
  fill: var(--accent);
  flex-shrink: 0;
}

/* ---- Recommendations Grid ---- */
.recs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 60rem;
  margin: 2.5rem auto 0;
  text-align: left;
}

.rec-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.rec-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(28,203,214,0.1);
}

.rec-quote-icon {
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
}

.rec-quote-icon svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: var(--accent);
  opacity: 0.35;
}

.rec-card blockquote {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.85em;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  font-weight: 300;
  flex: 1;
}

.rec-author {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.rec-name {
  font-family: 'Raleway', sans-serif;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.rec-title {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.7em;
  color: var(--text-light);
  font-weight: 300;
}

/* ---- Responsive: Education & Recommendations ---- */
@media (max-width: 980px) {
  .recs-grid {
    grid-template-columns: 1fr;
  }
  .edu-grid {
    max-width: 100%;
  }
  .timeline-logo {
    width: 1.2rem;
    height: 1.2rem;
  }
}
