:root {
  color-scheme: light;
  --text: #111111;
  --muted: #555555;
  --line: #e7e7e7;
  --soft: #f5f5f5;
  --bs-espol: #223265;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
}

.page-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

/* ── Site title bar ── */
.site-title {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 16px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

.site-title h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: 0.06em;
}

/* Social icons next to DIEGO TORRES */
.site-social {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.site-social a {
  text-decoration: none;
  color: var(--muted);
  font-size: 1.25rem;
  transition: color 0.15s;
}

.site-social a:hover {
  color: var(--text);
}

.btn-blog-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}


.site-title.has-back {
  width: 100%;
  padding-left: max(24px, calc((100% - 760px) / 2 + 16px));
  position: relative;
}

.back-home {
  position: absolute;
  left: 24px;
  text-decoration: none;
  color: var(--muted);
  font-size: 1.1rem;
  transition: color 0.15s;
}

.back-home:hover {
  color: var(--text);
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 18px;
}

/* ── Page header (avatar + bio) ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 160px;
  height: 160px;
  min-width: 160px;
  min-height: 160px;
  border-radius: 50%;
  display: block;
  background: linear-gradient(135deg, #f1f1f1, #dddddd);
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow: hidden;
  flex-shrink: 0;
}

.name {
  margin: 0 0 10px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Avatar image inside .avatar */
.avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.btn-blog-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Old in-header social links (hidden now that we moved them to site-title) */
.header-links {
  display: none;
}

/* ── Sections ── */
section {
  padding: 0 0 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

/* ── Timeline ── */
.timeline-container {
  position: relative;
  margin-top: 20px;
  /* Pull left so the date column sits outside the text flow */
  margin-left: -102px;
  padding-left: 0;
}

/* Vertical line: after date (90px) + gap (12px) + half dot (9px) = 111px from container left */
.timeline-line-bar {
  position: absolute;
  left: 111px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline {
  display: grid;
  gap: 32px;
}

/* Each row: date | dot | logo | text */
.timeline-item {
  display: grid;
  grid-template-columns: 90px 18px 72px 1fr;
  align-items: center;
  gap: 0 12px;
}

/* Date column — right-aligned, muted */
.tl-date {
  text-align: right;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  padding-right: 4px;
}

/* Dot on the timeline */
.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aaa;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #aaa;
  justify-self: center;
  position: relative;
  z-index: 1;
}

/* Logo box */
.tl-logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.tl-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* Description */
.tl-content {
  padding-left: 4px;
}

.tl-content p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--text);
}

/* ── Typography ── */
h1,
h2,
p {
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

p {
  max-width: 64ch;
}

/* ── Footer ── */
.footer {
  border: 0;
  margin: 0;
  padding: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 24px, 760px);
    padding-top: 20px;
  }

  .site-title {
    height: auto;
    padding: 16px;
  }

  .site-social a {
    font-size: 1.1rem;
  }

  .header {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 1.8rem;
  }

  .avatar {
    width: 128px;
    height: 128px;
    min-width: 128px;
    min-height: 128px;
  }

  /* On small screens collapse date into content to avoid overflow */
  .timeline-container {
    margin-left: 0;
  }

  .timeline-item {
    grid-template-columns: 14px 56px 1fr;
  }

  .tl-date {
    display: none;
  }

  .tl-logo-wrap {
    width: 56px;
    height: 56px;
  }

  .tl-logo {
    width: 42px;
    height: 42px;
  }

  .timeline-line-bar {
    left: 7px;
  }
}
