/* Wider column on desktop */
@media (min-width: 768px) {
  .column { max-width: 820px; }
}

/* ---- View tabs ---- */
.view-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.view-tab {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 8px 0;
  margin-right: 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.view-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.view-tab:hover {
  color: var(--ink);
}

.project-filter-tabs {
  margin-bottom: 20px;
}

#view-projects { display: none; }

/* ---- Project grid ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 767px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.project-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--muted);
}

.project-img-wrap {
  aspect-ratio: 315 / 250;
  overflow: hidden;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  position: relative;
}

/* Wraps the entire image area when a card has a link */
.project-img-link {
  display: block;
  line-height: 0;
}

/* Overlay icon — top-right corner of image */
.project-ext-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.project-ext-icon svg {
  width: 14px;
  height: 14px;
  color: #fff;
}

.project-card:hover .project-ext-icon {
  opacity: 1;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-card:hover .project-img {
  transform: scale(1.03);
}

.project-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-desc {
  flex: 1;
}

.project-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.85;
  margin-bottom: 3px;
  line-height: 1.3;
}

.project-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.project-date-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.project-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Filter tabs ---- */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-btn:hover {
  background: var(--accent-soft);
  border-color: var(--ink);
  color: var(--ink);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

/* ---- Portfolio artwork grid ---- */
.portfolio-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0;
}

.portfolio-entry {
  padding: 0;
  border-bottom: none;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  background: var(--line);
}

.portfolio-entry:last-child {
  border-bottom: none;
}

.portfolio-artwork-link {
  display: block;
  width: 100%;
  height: 100%;
}

.portfolio-artwork-thumb {
  position: relative;
  width: 100%;
  height: 100%;
}

.portfolio-artwork-thumb img,
.portfolio-artwork-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-artwork-thumb:hover img,
.portfolio-artwork-thumb:hover video {
  transform: scale(1.05);
}

.portfolio-artwork-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.78));
  padding: 28px 8px 8px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.portfolio-artwork-thumb:hover .portfolio-artwork-overlay {
  opacity: 1;
}

.portfolio-artwork-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.portfolio-artwork-date {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

@media (max-width: 600px) {
  .portfolio-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
}

.portfolio-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  opacity: 0.72;
  margin-bottom: 4px;
}

.portfolio-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.portfolio-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

.portfolio-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
