/* Projects section: cards and detail view.
   Uses the colors, fonts, card and modal styles already defined in style.css. */

.project-card { display: flex; flex-direction: column; }
.project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.project-card .portfolio-info { flex: 1; display: flex; flex-direction: column; padding-top: 30px; }
.project-card .portfolio-info h4 { line-height: 1.4; }
.project-more { margin-top: auto; padding-top: 16px; font-family: var(--font-mono); font-size: .8rem; color: var(--accent); }

.project-modal { visibility: hidden; transition: opacity .3s, visibility .3s; }
.project-modal.active { visibility: visible; transition: opacity .3s; }
.project-modal .modal-content { display: flex; flex-direction: column; width: min(760px, 92vw); max-height: 92vh; max-height: 92dvh; padding: 0; overflow: hidden; }
.project-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 46px; padding: 0 28px 20px; }
.project-scroll:focus-visible { outline: 2px solid rgba(0, 255, 65, .5); outline-offset: -2px; }
.project-modal h3 { margin-bottom: 14px; padding: 0; font-size: 1.3rem; line-height: 1.35; text-align: left; }
.project-modal h4 { margin: 20px 0 8px; font-family: var(--font-head); font-size: 1.02rem; color: #fff; }
.project-modal h4::before { content: "// "; font-family: var(--font-mono); color: var(--accent); }
.project-facts > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.project-facts dt { font-family: var(--font-mono); font-size: .8rem; color: var(--muted-2); }
.project-facts dd { font-size: .92rem; color: var(--text); }
.project-overview { font-size: .92rem; color: var(--muted); }
.project-features { padding-left: 20px; list-style: disc; font-size: .92rem; color: var(--muted); }
.project-features li { margin-bottom: 8px; }
.project-features li::marker { color: var(--accent); }
.project-modal code { padding: 0 5px; font-family: var(--font-mono); font-size: .84em; color: var(--accent); background: rgba(0, 255, 65, .07); border: 1px solid rgba(0, 255, 65, .2); border-radius: 5px; overflow-wrap: anywhere; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 28px; border-top: 1px solid var(--line); }
.project-file { font-family: var(--font-mono); font-size: .76rem; color: var(--muted-2); overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .project-modal .modal-content { width: 94vw; max-height: 90vh; max-height: 90dvh; }
  .project-scroll { padding: 0 16px 16px; }
  .project-modal h3 { font-size: 1.08rem; }
  .project-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .project-actions { justify-content: center; gap: 8px; padding: 12px 16px; }
  .project-actions .btn { width: 100%; justify-content: center; }
}
