:root {
  --text: #000;
  --bg: #fff;
  --accent: #000;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* ---------- Header ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

header h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.subtitle {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: -0.75rem;
  margin-bottom: 2rem;
}

.tag {
  border-radius: 8px;
}

header nav {
  margin-top: 0.75rem;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

header nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.2s ease;
}

header nav a:hover {
  opacity: 0.7;
}

/* ---------- Profile ---------- */
.profile-img {
  display: block;
  width: 220px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin: 0 auto 3rem;
}

/* ---------- Sections ---------- */
section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.titles {
  font-weight: 700;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  flex-direction: column;
}

.experience-title {
  display: flex;
  max-width: 100%;
  align-items: flex-start;
}

.experience-period {
  font-weight: 500;
  opacity: 0.6;
  white-space: nowrap;
}

.experience-item ul {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
  list-style-type: disc;
}

.experience-item {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  /* light gray line */
}

@media (min-width: 600px) {
  .experience-grid {
    column-gap: 2rem;
  }
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.6;
}

.employer-img {
  max-width: 64px;
  height: auto;
}

.job-text {
  display: flex;
  flex-direction: column;
}

.job-description {
  color: gray;
  margin: 0.5em 0 0 0;
}


.position-wrapper {
  display: flex;
  position: relative;
  align-items: flex-start;
  margin-left: 1.5rem;
  width: 100%;
  /* space for the dot */
}

.timeline-dot {
  position: relative;
  width: 2rem;
  min-width: 1rem;
  display: flex;
  justify-content: center;
}

.timeline-dot::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%, 0);
  z-index: 1;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  width: 2px;
  background: rgba(0, 0, 0, 0.1);
  top: 0.5rem;
  bottom: -100%;
  /* extend below the dot */
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
}

.position {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  width: 100%;
  padding-left: 64px;
}

.position-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 1rem;
  align-items: center;
}

.position .titles {
  font-weight: 700;
  font-size: 1.1rem;
  border-style: solid;
  border-radius: 20px;
  padding: 10px;
  border-width: 2px;
}

.position .experience-period {
  text-align: right;
  min-width: 140px;
}

#copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
