@charset "UTF-8";

/* Cache-busting: every page links this file as css/teipen.css?v=1 (same for
   js/projects.js and js/portfolio.js). After editing this file, bump the ?v=
   number in every HTML file's <link>/<script> tag that references it — that's
   what makes browsers fetch the new version instead of a cached old copy. */

/* ── Site-wide ──────────────────────────────────────────────────────────────── */
body {
  background-color: #080808;
  color: #888;
}

.bg-dark {
  background-color: rgba(8, 8, 8, 1) !important;
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
  background-color: rgba(8, 8, 8, 1) !important;
  border-bottom: 1px solid #1a1a1a;
}

/* ── Index page — full-screen background video ──────────────────────────────── */
.video-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.video-wrap iframe {
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ── Portfolio grid ─────────────────────────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
}

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

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

/* ── Portfolio card ─────────────────────────────────────────────────────────── */
.portfolio-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  outline-offset: -2px;
}

.portfolio-card:focus-visible {
  outline: 2px solid #fff;
}

.portfolio-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.portfolio-thumb-empty {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
}

.portfolio-card:hover .portfolio-thumb {
  transform: scale(1.04);
}

.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-card-overlay,
.portfolio-card:focus-visible .portfolio-card-overlay {
  opacity: 1;
}

.portfolio-card-title {
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portfolio-card-year {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Project modal ──────────────────────────────────────────────────────────── */
#projectModal .modal-content {
  background-color: #0d0d0d;
  color: #ccc;
  border: 1px solid #222;
  border-radius: 0;
}

#projectModal .modal-header {
  border-bottom-color: #222;
  padding: 0.85rem 1.25rem;
}

#projectModal .modal-title {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #ddd;
}

#projectModal .modal-body {
  padding: 1.25rem;
}

/* Plyr — dark theme accents */
.plyr {
  --plyr-color-main: #999;
  --plyr-video-background: #000;
}

/* Portrait/vertical video — Plyr actually auto-detects a Vimeo embed's real
   aspect ratio on its own and sizes .plyr__video-embed correctly (9:16 etc.),
   so no ratio override is needed. The problem is it fills 100% of the modal's
   width with nothing capping the resulting height, so a tall portrait video
   was rendering far taller than the modal and getting cut off top/bottom as
   you scrolled. Cap the WIDTH of the outer wrapper instead — height then
   follows proportionally and stays within view. This targets the wrapper
   (.mb-4), not .plyr__video-embed itself, because Plyr's JS rebuilds its own
   markup on init and drops any extra class from the element it's attached to
   (it never touches ancestors, so the class is set on the wrapper in
   portfolio.js). Set via project.orientation = 'portrait' in projects.js. */
.mb-4.portrait {
  max-width: min(420px, calc(75vh * 9 / 16));
  margin-left: auto;
  margin-right: auto;
}

/* Native Vimeo embed (bypasses Plyr — see vimeoNative in projects.js) — gets
   none of Plyr's CSS, so it needs its own responsive 16:9 box. The .portrait
   wrapper rule above still applies on top of this if orientation is set. */
.vimeo-native-embed {
  position: relative;
  aspect-ratio: 16 / 9;
}

.vimeo-native-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Photo carousel inside modal ────────────────────────────────────────────── */
#photoCarousel .carousel-inner img {
  max-height: 68vh;
  width: 100%;
  object-fit: contain;
  background: #000;
}

.carousel-control-prev,
.carousel-control-next {
  width: 8%;
}

/* ── Project info (Title, Year, Dimensions, Medium) ─────────────────────────── */
.project-info {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #222;
}

.project-info-title {
  color: #ccc;
  font-style: italic;
}

.project-info-details {
  color: #888;
}

/* If a description follows an info block, don't double the divider/spacing */
.project-info + .project-description {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: none;
}

/* ── Project description ────────────────────────────────────────────────────── */
.project-description {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #888;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #222;
}

/* ── CV / Contact page ──────────────────────────────────────────────────────── */
.cv-list {
  list-style: none;
  padding: 0;
  color: #888;
}

.cv-list li {
  margin-bottom: 0.2rem;
}

.cv-list .cv-section-head {
  color: #bbb;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.space  { margin-top: 10px; margin-bottom: 30px; }
.space1 { margin-bottom: 30px; }

a       { color: #888; text-decoration: none; }
a:hover { color: #ccc; }
