/* css/components.css */

/* --- Timeline Component Styles --- */
#cd-timeline {
  position: relative;
  padding: 1em 0;
  margin-top: 1em;
  margin-bottom: 1em;
}

#cd-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  height: 100%;
  width: 4px;
  background: rgba(210, 180, 140, 0.6); /* Beige color (Tan) */
}

.cd-timeline-block {
  position: relative;
  margin: 2em 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.cd-timeline-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.cd-timeline-block:after {
  content: "";
  display: table;
  clear: both;
}
.cd-timeline-block:first-child {
  margin-top: 0;
}
.cd-timeline-block:last-child {
  margin-bottom: 0;
}

.cd-timeline-img {
  position: absolute;
  top: 0;
  left: 0; /* Adjusted for mobile first */
  transform: translateX(-50%); /* Center the dot on the line */
  left: 20px; /* Position relative to the line */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  /* Adjusted shadow for beige */
  box-shadow: 0 0 0 4px #fff, inset 0 2px 0 rgba(0, 0, 0, 0.08),
    0 3px 0 4px rgba(0, 0, 0, 0.05);
  background: rgba(210, 180, 140, 0.9); /* Darker beige for dot */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1; /* Ensure dot is above line */
}

.cd-timeline-img.cd-picture {
  /* Keep specific styles if needed, e.g., different background */
  /* background: #some-other-color; */
}

.cd-timeline-content {
  position: relative;
  margin-left: 60px;
  background: rgba(255, 255, 255, 0.85); /* Match content block opacity */
  border-radius: 12px; /* Slightly smaller radius */
  padding: 1.5em; /* Increased padding */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Match content block shadow */
  border: 1px solid rgba(0, 0, 0, 0.04); /* Match content block border */
}

.cd-timeline-content:after {
  content: "";
  display: table;
  clear: both;
}

/* Arrow pointing to timeline */
.cd-timeline-content::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 100%;
  height: 0;
  width: 0;
  border: 8px solid transparent; /* Slightly larger arrow */
  border-right-color: rgba(
    255,
    255,
    255,
    0.85
  ); /* Match content background */
}

.cd-timeline-content h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.2rem;
  color: #1d1d1f;
}

.timeline-content-info {
  background: #eee;
  padding: 5px 10px;
  color: #555;
  font-size: 0.85rem;
  border-radius: 4px;
  margin-bottom: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 15px;
}

.timeline-content-info span {
  display: inline-block;
}

.cd-timeline-content p {
  margin: 0 0 1em 0;
  line-height: 1.5;
  font-size: 1rem;
  color: #333;
}
.cd-timeline-content p b {
  font-weight: 600;
}

.content-skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.content-skills li {
  background: #e0e0e0;
  border-radius: 12px;
  display: inline-block;
  padding: 3px 10px;
  color: #333;
  font-size: 0.8rem;
  text-align: center;
}

/* Desktop Timeline Adjustments */
@media only screen and (min-width: 1000px) {
  #cd-timeline {
    padding: 2em 0;
  }
  #cd-timeline::before {
    left: 50%;
    margin-left: -2px;
    background: rgba(210, 180, 140, 0.6); /* Ensure beige line */
  }
  .cd-timeline-block {
    margin: 4em 0;
  }
  .cd-timeline-img {
    width: 40px;
    height: 40px;
    left: 50%;
    margin-left: -20px;
    transform: translateX(0); /* Reset mobile transform */
    /* Force Hardware Acceleration */
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
  }
  .cd-timeline-content {
    margin-left: 0;
    padding: 1.8em; /* Slightly more padding */
    width: 45%;
    border-radius: 16px; /* Match other blocks */
  }
  .cd-timeline-content::before {
    top: 24px;
    left: 100%;
    border-color: transparent;
    border-left-color: rgba(255, 255, 255, 0.85); /* Arrow points left */
    border-right-width: 0;
    border-left-width: 8px;
  }

  /* Even blocks on the right */
  .cd-timeline-block:nth-child(even) .cd-timeline-content {
    float: right;
  }
  .cd-timeline-block:nth-child(even) .cd-timeline-content::before {
    top: 24px;
    left: auto;
    right: 100%;
    border-color: transparent;
    border-right-color: rgba(255, 255, 255, 0.85); /* Arrow points right */
    border-left-width: 0;
    border-right-width: 8px;
  }
}

/* --- Terminal Component Styles --- */
.terminal {
  border-radius: 12px; /* Softer radius */
  position: relative;
  background: #2d2d2d;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Softer shadow */
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1); /* Subtle border */
}

.terminal .top {
  background: #e8e6e8;
  color: #3b3b3b;
  padding: 8px 12px;
  border-bottom: 1px solid #d1d1d1; /* Slightly darker border */
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
}

.terminal .btns {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
}

.terminal .circle {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 50%;
  border-width: 1px;
  border-style: solid;
}

.terminal .title {
  text-align: center;
  flex-grow: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  padding-right: 50px;
}

/* Apple Terminal Colors */
.red {
  background: #ff5f56;
  border-color: #e0443e;
}
.yellow {
  background: #ffbd2e;
  border-color: #dea123;
}
.green {
  background: #27c93f;
  border-color: #1aab29;
}

.terminal .body {
  color: #f0f0f0;
  padding: 20px; /* Increased padding */
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 1rem;
  line-height: 1.6; /* Increased line height */
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 150px; /* Ensure minimum height */
}

.terminal .body br {
  display: none;
}

/* Responsive Terminal */
@media (max-width: 500px) {
  .terminal .body {
    font-size: 0.9rem;
    padding: 15px;
    line-height: 1.5;
  }
  .terminal .title {
    font-size: 0.8rem;
  }
}
