/* ----------------------------------------
   portfolio.css — portfolio page styles
   ---------------------------------------- */

/* ---- Layout ---- */

/* Same width as the homepage timeline and blog list (.tl-wrap / .blog-wrap). */
.pf-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.pf-wrap .hero-bio { max-width: 720px; }

/* ---- Skills ---- */

/* Dividers come from the 1px gap showing the grid background, so they stay
   right at any column count. */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  margin-top: 1.25rem;
}

.skill-group {
  padding: 1.25rem;
  background: var(--bg);
}

.skill-group h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

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

.skill-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--muted);
}

/* ---- Projects ---- */

.project-card {
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.project-card:last-child { margin-bottom: 0; }

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project-grid .project-card { margin-bottom: 0; }

.project-featured {
  border-color: var(--border);
  border-left: 4px solid var(--border);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.65rem;
  gap: 1rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.project-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.project-desc {
  font-size: 0.925rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* A lone highlight on the last row spans it instead of leaving a gap. */
.highlight:last-child:nth-child(3n+1) { grid-column: 1 / -1; }

.highlight {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.highlight strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.project-stack span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--border-light);
  background: var(--bg);
  color: var(--muted);
  text-transform: lowercase;
}

/* ---- Timeline ---- */

.timeline {
  margin-top: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 0 0 2rem;
}

/* Vertical line with a dot per entry, matching the homepage timeline. */
.timeline,
.edu-list {
  position: relative;
  padding-left: 2rem;
}

.timeline::before,
.edu-list::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.3rem;
  bottom: 1.5rem;
  border-left: 2px solid var(--border);
}

.timeline-item,
.edu-item { position: relative; }

.timeline-item::after,
.edu-item::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: calc(-2rem + 0.45rem - 6px);
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.timeline-meta {
  padding-top: 0.1rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.timeline-org a { color: var(--accent); }

.timeline-desc {
  max-width: 76ch;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ---- Education ---- */

.edu-list { margin-top: 1.25rem; }

.edu-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 0 0 1.5rem;
}

.edu-meta { padding-top: 0.1rem; }

.edu-degree {
  font-size: 0.975rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

/* ---- Responsive ---- */

@media (max-width: 960px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .project-highlights { grid-template-columns: 1fr 1fr; }
  .highlight:last-child:nth-child(3n+1) { grid-column: auto; }
  .highlight:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .skills-grid { grid-template-columns: 1fr; }

  .project-highlights { grid-template-columns: 1fr; }
  .project-header { flex-direction: column; gap: 0.25rem; }

  .timeline-item,
  .edu-item { grid-template-columns: 1fr; gap: 0.25rem; }
}
