/* ── Fonts ── */
@font-face {
  font-family: 'Lazurski';
  src: url('assets/fonts/lazurski_regular.otf') format('opentype'),
       url('assets/fonts/lazurski_regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lazurski';
  src: url('assets/fonts/lazurski_bold.otf') format('opentype'),
       url('assets/fonts/lazurski_bold.ttf') format('truetype');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
body {
  font-family: 'Lazurski', Georgia, serif;
  color: #fff;
  background: #23292b;
  line-height: 1.5;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

/* ── Back link ── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  font-size: 18px;
  margin-bottom: 40px;
  color: #fff;
  transition: opacity .15s;
}
.back:hover {
  opacity: 0.75;
  text-decoration: none !important;
}
.back-circle {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #D9D9D9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #23292b;
  line-height: 1;
}

/* ── Typography ── */
h1 {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
}
.excerpt {
  font-size: 20px;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ── Period divider ── */
.period-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}
.period-year {
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.period-line {
  flex: 1;
  height: 1px;
  background: #3f4c55;
}

.cover {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 48px;
  display: block;
}
.date {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

/* ── Links ── */
a { text-decoration: none !important; }
a:hover { text-decoration: underline !important; }

/* ── Project content (HTML) ── */
.project-content {
  font-size: 20px;
  line-height: 1.7;
  color: #fff;
}
.project-content p { margin-bottom: 1.4em; }
.project-content p:empty { display: none; }
.project-content h1 { font-size: 30px; margin: 1.6em 0 .6em; font-weight: 900; }
.project-content h2 { font-size: 24px; margin: 1.4em 0 .5em; font-weight: 900; }
.project-content h3 { font-size: 20px; margin: 1.2em 0 .4em; font-weight: 900; }
.project-content strong { font-weight: 900; }
.project-content a { color: #00aeff; }
.project-content blockquote {
  border-left: 3px solid #00aeff;
  padding-left: 20px;
  color: #aaa;
  font-style: italic;
  margin: 1.4em 0;
}
.project-content pre { background: #1c2224; padding: 16px; border-radius: 8px; overflow-x: auto; }
.project-content ul, .project-content ol { padding-left: 24px; margin-bottom: 1.2em; }
.project-content li { margin-bottom: .4em; line-height: 1.6; }
.project-content img { max-width: 100%; border-radius: 8px; margin: 1em 0; display: block; }
.project-content iframe { width: 100%; aspect-ratio: 16/9; border-radius: 8px; margin: 1em 0; border: none; }
video { max-width: 100%; border-radius: 8px; margin: 1em 0; }

/* ── Components: Subproject (two-column) ── */
.subproject {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.subproject + .subproject {
  margin-top: 40px;
}
.subproject-name {
  flex: 0 0 140px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1.7;
}
.subproject-content {
  flex: 1;
  font-size: 20px;
  line-height: 1.7;
}
.subproject-content p { margin-bottom: 20px; }
.subproject-content p:last-child { margin-bottom: 0; }

/* ── Components: Metrics ── */
.metrics-row {
  display: flex;
  gap: 16px;
  margin: 20px 0;
}
.metric-card {
  flex: 1;
  background: #C4E0FF;
  border-radius: 30px;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}
.metric-label {
  font-size: 14px;
  color: #333;
  line-height: 1.3;
}
.metric-value {
  font-size: 24px;
  font-weight: 900;
  color: #111;
}

/* ── Components: Side by side ── */
.side-by-side {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin: 20px 0;
}
.side-text {
  flex: 1;
}
.side-media {
  flex: 0 0 auto;
  max-width: 45%;
}
.side-media img {
  max-width: 100%;
  border-radius: 12px;
}

/* ── Components: Screenshots ── */
.screenshots-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin: 20px 0;
}
.screenshot {
  max-width: 48%;
  border-radius: 16px;
}

/* ── Components: Caption ── */
.caption {
  text-align: center;
  font-size: 15px;
  color: #666;
  margin: 8px 0 20px;
}

/* ── Components: Content image ── */
.content-img {
  max-width: 100%;
  border-radius: 12px;
  margin: 20px 0;
  display: block;
}

/* ── Components: iPhone mockup ── */
.iphone-mockup {
  width: 398px;
  background: #1a1a1a;
  border-radius: 55px;
  padding: 11px;
  position: relative;
  margin: 20px 0;
  box-shadow:
    inset 0 0 0 1px #333,
    0 20px 60px rgba(0,0,0,0.5);
}
.iphone-mockup-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  margin: 20px 0;
}
.iphone-island {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 20px;
  z-index: 2;
}
.iphone-screen {
  width: 100%;
  height: 750px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 44px;
  background: #1a1a1a;
  -webkit-overflow-scrolling: touch;
}
.iphone-screen::-webkit-scrollbar {
  width: 0;
  display: none;
}
.iphone-screen img {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 0;
}
.iphone-home-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 5px;
  background: #fff;
  border-radius: 3px;
  z-index: 2;
  opacity: 0.3;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .container { padding: 40px 20px 60px; }
  h1 { font-size: 28px; }
  .excerpt { font-size: 17px; }
  .project-content { font-size: 17px; }
  .subproject { flex-direction: column; gap: 12px; }
  .subproject + .subproject { margin-top: 50px; }
  .subproject-name { flex: none; }
  .subproject-content { font-size: 17px; }
  .metrics-row { flex-direction: column; }
  .side-by-side { flex-direction: column; }
  .side-media { max-width: 100%; }
  .screenshots-row { flex-direction: column; align-items: center; }
  .screenshot { max-width: 80%; }
  .iphone-mockup { width: 320px; border-radius: 45px; padding: 9px; }
  .iphone-mockup-row { flex-direction: column; align-items: center; }
  .iphone-screen { height: 600px; border-radius: 36px; }
  .iphone-island { width: 100px; height: 30px; top: 18px; }
  .iphone-home-bar { width: 110px; bottom: 16px; }
}
@media (max-width: 480px) {
  .container { padding: 32px 16px 48px; }
  h1 { font-size: 24px; }
  .metric-value { font-size: 18px; }
}