/* ===================================================
   ANDRÉS FELIPE HOYOS MARTIN — RESUME STYLESHEET
   Hosted on GitHub Pages | Edit index.html to update
   =================================================== */

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

/* ---- CSS Variables ---- */
:root {
  --accent:      #2C4770;
  --accent-light: #3a5a8c;
  --accent-muted: #e8eef6;
  --bg:          #FAFAFA;
  --sidebar-bg:  #F0F4F8;
  --text:        #1a1a2e;
  --text-muted:  #5a6478;
  --border:      #d0dae8;
  --tag-bg:      #dde8f5;
  --tag-text:    #1e3a5f;
  --sidebar-w:   280px;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Utility bar (back link + PDF downloads) ---- */
.cv-utility-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.cv-utility-bar #back-link {
  color: var(--text-muted);
  font-weight: 500;
}

.cv-utility-bar #back-link:hover { color: var(--accent); }

.cv-downloads { display: flex; gap: 1rem; }

.cv-downloads a {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 720px) {
  .cv-utility-bar { padding: 1rem 1.25rem 0; }
}

@media print {
  .cv-utility-bar { display: none !important; }
}

/* ---- Outer wrapper ---- */
.page {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "header  header"
    "sidebar main";
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(44, 71, 112, 0.10);
  background: #fff;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  grid-area: header;
  background: var(--accent);
  color: #fff;
  padding: 2.5rem 2.5rem 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-photo {
  width: 115px;
  height: 115px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}

.header-name h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.header-name .title-line {
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.82;
  margin-top: 0.35rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  padding: 0.2rem 0.5rem;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 99px;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.flag-icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
}

.lang-btn:hover { color: #fff; }

.lang-btn.active {
  color: var(--accent);
  background: #fff;
}

.lang-sep {
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
}

.header-contact {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-end;
  padding-top: 0;
}

.header-contact a,
.header-contact span {
  color: rgba(255,255,255,0.92);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.header-contact a:hover { color: #fff; text-decoration: underline; }

.header-contact .icon {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  grid-area: sidebar;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-section h2 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 0.9rem;
}

/* Skills tags */
.skill-group { margin-bottom: 0.9rem; }

.skill-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.4rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  white-space: nowrap;
}

/* Education entries */
.edu-entry { margin-bottom: 1rem; }

.edu-entry .degree {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.edu-entry .institution {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.edu-entry .edu-year {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.edu-entry .thesis {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* Language entries */
.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.lang-item .lang-name { font-weight: 500; }

.lang-badge {
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  grid-area: main;
  padding: 2rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Section headings */
.section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
}

/* Summary */
.summary p {
  font-size: 0.925rem;
  color: var(--text);
  line-height: 1.75;
}

/* ---- Timeline entries (experience & teaching) ---- */
.timeline { display: flex; flex-direction: column; gap: 1.4rem; }

.entry {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 0 1.25rem;
}

.entry-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 0.1rem;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.entry-date .year-range {
  display: block;
}

.entry-body {}

.entry-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.entry-subtitle {
  font-size: 0.82rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

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

.entry-list li {
  font-size: 0.845rem;
  color: #3a3f50;
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
}

.entry-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.22rem;
}

/* Teaching courses inline */
.course-list {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.course-list strong {
  color: var(--text-muted);
  font-weight: 500;
}

/* Publications */
.pub-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 0 1.25rem;
  margin-bottom: 0.85rem;
}

.pub-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
  padding-top: 0.1rem;
}

.pub-body {}

.pub-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--accent-light);
  font-style: italic;
}

/* Awards */
.award-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 0 1.25rem;
  margin-bottom: 0.7rem;
  align-items: start;
}

.award-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
}

.award-body {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

.award-body strong { font-weight: 600; }
.award-body span { color: var(--text-muted); font-size: 0.8rem; }

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 720px) {
  .page {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "sidebar";
  }

  .sidebar { border-right: none; border-top: 1px solid var(--border); }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem 1.5rem 1.5rem;
  }

  .header-contact { align-items: flex-start; }
  .header-name h1 { font-size: 2rem; }

  .main-content { padding: 1.5rem 1.25rem; }

  .entry, .pub-item, .award-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .entry-date, .pub-year, .award-year { text-align: left; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@page {
  size: letter portrait;
  margin: 0;
}

@media print {
  html {
    font-size: 12.9px;
  }

  body {
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide interactive elements */
  .lang-toggle { display: none !important; }

  .page {
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    min-height: 11in;
    grid-template-columns: 190px 1fr;
    background-image: linear-gradient(to right, var(--sidebar-bg) 190px, #fff 190px);
  }

  .site-header {
    padding: 1rem 1.4rem 0.9rem;
    gap: 1rem;
  }

  .header-photo { width: 80px; height: 80px; }
  .header-name h1 { font-size: 2.2rem; }

  .header-right { gap: 0.4rem; }
  .header-contact { gap: 0.3rem; }
  .header-contact a, .header-contact span { font-size: 1.2rem; }

  .sidebar {
    padding: 1rem 1rem;
    gap: 1rem;
    background: transparent;
  }

  .sidebar-section h2 { margin-bottom: 0.5rem; }
  .skill-group { margin-bottom: 0.5rem; }

  .main-content {
    padding: 1rem 1.4rem 1rem;
    gap: 1rem;
  }

  .section-heading { margin-bottom: 0.7rem; }

  .summary p { line-height: 1.55; }

  .timeline { gap: 0.9rem; }
  .entry-list { gap: 0.15rem; }
  .entry-list li { line-height: 1.45; }

  a { color: inherit; }
  a[href]::after { content: ""; } /* suppress URL printing */
}
