/* Shared styles for the CV subpages (education, experience, skills, contact) */

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  animation: fadeIn 0.5s ease forwards;
}

/* keeps scrolled content from running underneath "Back" and the page label */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 96px;
  background: linear-gradient(#000 55%, rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: 5;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.back-btn {
  position: fixed;
  top: 36px;
  left: 44px;
  color: #ff6a00;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.2s;
  z-index: 10;
}
.back-btn:hover,
.back-btn:focus-visible { opacity: 1; }

.page-label {
  position: fixed;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ff6a00;
  opacity: 0.7;
  z-index: 10;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 110px 40px 100px;
}

a:focus-visible {
  outline: 1px solid #ff6a00;
  outline-offset: 4px;
}

/* ── Timeline entries (education, experience) ── */

.entry {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 0 32px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 106, 0, 0.1);
}
.entry:last-child { border-bottom: none; margin-bottom: 0; }

.entry-year {
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #ff6a00;
  opacity: 0.55;
  padding-top: 4px;
  line-height: 1.6;
}

.entry-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.entry-sub {
  font-size: 0.82rem;
  color: #fff;
  opacity: 0.4;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.entry-desc {
  font-size: 0.84rem;
  line-height: 1.75;
  color: #fff;
  opacity: 0.55;
}

.entry-list {
  list-style: none;
  font-size: 0.84rem;
  line-height: 1.75;
  color: #fff;
  opacity: 0.55;
}

.entry-list li {
  position: relative;
  padding-left: 22px;
}
.entry-list li + li { margin-top: 6px; }

.entry-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #ff6a00;
}

.thesis-block {
  margin-top: 14px;
  padding: 16px 18px;
  border-left: 1px solid rgba(255, 106, 0, 0.3);
}

.thesis-block p {
  font-size: 0.82rem;
  line-height: 1.75;
  color: #fff;
  opacity: 0.55;
}

.thesis-block p + p { margin-top: 6px; }

.thesis-block strong {
  color: #ff6a00;
  opacity: 0.8;
  font-weight: 500;
}

/* ── Phones ── */

@media (max-width: 600px) {
  body::before { height: 76px; }

  .back-btn   { top: 24px; left: 20px; }
  .page-label { top: 26px; font-size: 0.66rem; letter-spacing: 0.22em; }

  main { padding: 92px 20px 64px; }

  /* date moves above the title instead of taking a column */
  .entry {
    grid-template-columns: 1fr;
    margin-bottom: 36px;
    padding-bottom: 36px;
  }
  .entry-year { padding-top: 0; margin-bottom: 6px; }
  .entry-year br { display: none; }

  .thesis-block { padding: 12px 0 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}
