/* ============================================================
   Erlan — public portfolio (converted from Erlan Portfolio.dc.html)
   Warm paper background, Source Serif 4 + Source Sans 3.
   Accent palette is driven by CSS variables; site.js overrides
   them from the admin "Brand accent colour" setting.
   ============================================================ */

:root {
  --accent: #4CA9BF;
  --accent-dark: #3B8495;
  --accent-soft: #EDF6F9;
  --accent-border: #CDE7ED;
  --accent-border2: #DBEEF2;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background-color: #FAF9F6; color: #1C1B18; font-family: 'Source Sans 3', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
.material-symbols-outlined { font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.topnav { position: sticky; top: 0; z-index: 50; background: rgba(250,249,246,0.88); backdrop-filter: blur(12px); border-bottom: 1px solid #E9E5DD; }
.nav-inner { max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: 'Source Serif 4', serif; font-size: 19px; font-weight: 600; color: #1C1B18; letter-spacing: 0.01em; }
.brand:hover { color: #1C1B18; }
.nav-desktop { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 14px; font-weight: 500; color: #55524B; }
.nav-link:hover { color: var(--accent); }
.nav-cta { font-size: 14px; font-weight: 500; color: var(--accent); border: 1px solid var(--accent-border); border-radius: 999px; padding: 7px 16px; }
.nav-cta:hover { background: var(--accent-soft); }
.nav-langs { display: flex; align-items: center; gap: 2px; border-left: 1px solid #E0DCD3; padding-left: 16px; }
.burger { display: none; background: none; border: 1px solid #E0DCD3; border-radius: 10px; width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; color: #1C1B18; }
.mobile-menu { display: none; border-top: 1px solid #E9E5DD; background: #FAF9F6; padding: 8px 24px 16px; flex-direction: column; gap: 4px; }
.mob-link { font-size: 15px; font-weight: 500; color: #1C1B18; padding: 10px 4px; border-bottom: 1px solid #F0EDE6; }
.mob-link.accent { color: var(--accent); }
.mobile-langs { display: flex; align-items: center; gap: 6px; padding-top: 12px; }
@media (max-width: 720px) {
  .nav-desktop { display: none; }
  .burger { display: flex; }
}
@media (min-width: 721px) { .mobile-menu { display: none !important; } }

.lang-btn { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; background: none; color: #8A867C; font-family: inherit; }
.lang-btn.is-on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }

/* ---------- hero ---------- */
.hero { padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); }
.badge { display: inline-flex; align-items: center; gap: 8px; background: #FFFFFF; border: 1px solid #E9E5DD; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 500; color: #55524B; box-shadow: 0 1px 2px rgba(28,27,24,0.04); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #3E8E63; display: inline-block; }
.overline { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.overline .material-symbols-outlined { font-size: 17px; }
.overline .ovl { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.hero-title { font-family: 'Source Serif 4', serif; font-weight: 500; font-size: clamp(38px, 6vw, 62px); line-height: 1.12; letter-spacing: -0.015em; margin: 14px 0 0; max-width: 24ch; text-wrap: pretty; }
.hero-sub { font-size: clamp(16px, 2vw, 18px); line-height: 1.65; color: #55524B; max-width: 56ch; margin: 20px 0 0; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.vsep { width: 1px; height: 24px; background: #E0DCD3; margin: 0 4px; }

.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #FFFFFF; font-size: 14.5px; font-weight: 600; padding: 12px 22px; border-radius: 10px; box-shadow: 0 1px 2px rgba(28,27,24,0.08); }
.btn-primary:hover { background: var(--accent-dark); color: #FFFFFF; }
.btn-accent-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--accent); font-size: 14.5px; font-weight: 600; padding: 11px 22px; border-radius: 10px; border: 1px solid var(--accent-border); }
.btn-accent-outline:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-neutral-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #1C1B18; font-size: 14.5px; font-weight: 600; padding: 11px 22px; border-radius: 10px; border: 1px solid #D9D5CC; }
.btn-neutral-outline:hover { background: #F2F0EA; color: #1C1B18; }
.btn-white-outline { display: inline-flex; align-items: center; gap: 8px; background: #FFFFFF; color: var(--accent); font-size: 14.5px; font-weight: 600; padding: 12px 24px; border-radius: 10px; border: 1px solid var(--accent-border); box-shadow: 0 1px 2px rgba(28,27,24,0.04); }
.btn-white-outline:hover { background: var(--accent-soft); color: var(--accent-dark); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #E0DCD3; border-radius: 10px; color: #55524B; background: #FFFFFF; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent-border); }

/* ---------- sections ---------- */
.sec { padding: 24px 0 72px; border-top: 1px solid #E9E5DD; }
.sec .overline { margin-top: 40px; }
.h2 { font-family: 'Source Serif 4', serif; font-weight: 500; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.01em; margin: 12px 0 0; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; margin-top: 24px; max-width: 880px; }
.about-p { font-size: 16px; line-height: 1.75; color: #55524B; margin: 0; text-wrap: pretty; }
.stats-sec { padding: 0 0 72px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.cards-grid.wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.lang-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.card { background: #FFFFFF; border: 1px solid #E9E5DD; border-radius: 14px; box-shadow: 0 1px 2px rgba(28,27,24,0.04); }
.proj-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.proj-card:hover { box-shadow: 0 10px 28px -14px rgba(28,27,24,0.18); border-color: #DDD8CD; }
.proj-shot { position: relative; aspect-ratio: 16/9; background: #F4F2EC; overflow: hidden; border-bottom: 1px solid #E9E5DD; }
.proj-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-cat { position: absolute; top: 12px; right: 12px; z-index: 1; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #fff; background: rgba(28,27,24,0.62); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.16); border-radius: 7px; padding: 5px 10px; }
.proj-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.proj-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.proj-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-chip { font-size: 11px; font-weight: 600; letter-spacing: 0.01em; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border2); border-radius: 6px; padding: 4px 9px; white-space: nowrap; }
.proj-year { font-size: 12.5px; font-weight: 500; color: #8A867C; flex: none; padding-top: 3px; }
.proj-catrow { display: flex; }
.proj-title { font-family: 'Source Serif 4', serif; font-size: 21px; font-weight: 600; color: #1C1B18; margin: 2px 0 0; }
.proj-desc { font-size: 14.5px; line-height: 1.6; color: #55524B; margin: 0; text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.proj-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; margin: -2px 0 0; color: var(--accent); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.proj-more:hover { color: var(--accent-dark); }
.proj-more .material-symbols-outlined { font-size: 15px; }
.proj-more[hidden] { display: none; }
.proj-links { display: flex; align-items: center; gap: 18px; margin-top: auto; padding-top: 12px; border-top: 1px solid #F0EDE6; }

/* project detail modal */
.pmodal-scrim { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(28,27,24,0.45); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.pmodal-scrim.open { opacity: 1; pointer-events: auto; }
.pmodal { width: min(560px, 100%); max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; background: #FAF9F6; border: 1px solid #E9E5DD; border-radius: 16px; box-shadow: 0 30px 80px -28px rgba(28,27,24,0.5); transform: translateY(14px) scale(0.98); transition: transform .22s cubic-bezier(.2,.7,.3,1); }
.pmodal-scrim.open .pmodal { transform: none; }
.pmodal__inner { display: flex; flex-direction: column; overflow-y: auto; }
.pmodal__shot { flex: none; }
.pmodal__bar { display: flex; justify-content: flex-end; padding: 12px 12px 0; }
.pmodal__close { width: 36px; height: 36px; border-radius: 9px; border: 0; background: rgba(28,27,24,0.55); backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.pmodal__shot .pmodal__close { position: absolute; top: 12px; left: 12px; z-index: 2; }
.pmodal__close:hover { background: rgba(28,27,24,0.8); }
.pmodal__close .material-symbols-outlined { font-size: 20px; }
.pmodal__body { padding: 22px 26px 26px; }
.pmodal__title { font-family: 'Source Serif 4', serif; font-size: 25px; font-weight: 600; color: #1C1B18; margin: 0 0 12px; letter-spacing: -0.01em; }
.pmodal__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 16px; }
.pmodal__desc { font-size: 15px; line-height: 1.72; color: #45423C; margin: 0; white-space: pre-wrap; text-wrap: pretty; }
.card-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.skill-icon { width: 20px; height: 20px; object-fit: contain; flex: none; display: block; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #45423C; background: #F4F2EC; border: 1px solid #E7E3DA; border-radius: 999px; padding: 5px 12px; }
.chip-icon { width: 15px; height: 15px; object-fit: contain; flex: none; display: block; }
.spoken-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; }
.spoken-row:not(:last-child) { border-bottom: 1px solid #F0EDE6; }
.stack-chip { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border2); border-radius: 6px; padding: 4px 9px; }
.cat-chip { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #55524B; background: #F4F2EC; border: 1px solid #E7E3DA; border-radius: 6px; padding: 4px 9px; }
.timeline { margin-top: 32px; display: flex; flex-direction: column; max-width: 760px; }
.proj-live { font-size: 13.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.proj-live:hover { color: var(--accent-dark); }
.proj-repo { font-size: 13.5px; font-weight: 600; color: #55524B; display: inline-flex; align-items: center; gap: 4px; }
.proj-repo:hover { color: #1C1B18; }
.center { display: flex; justify-content: center; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid #E9E5DD; background: #F4F2EC; }
.foot .icon-btn { border-color: #DDD8CD; }
.foot-inner { max-width: 1040px; margin: 0 auto; padding: 56px 24px 40px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.foot-brand { font-family: 'Source Serif 4', serif; font-size: 22px; font-weight: 600; color: #1C1B18; }
.foot-tag { font-size: 14.5px; line-height: 1.6; color: #55524B; margin: 8px 0 0; max-width: 42ch; }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid #E5E1D8; font-size: 13px; color: #8A867C; }
.foot-bottom .material-symbols-outlined { font-size: 15px; }

/* ---------- all-projects page ---------- */
.proj-head { padding: clamp(48px, 7vw, 88px) 0 8px; }
.h1 { font-family: 'Source Serif 4', serif; font-weight: 500; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.01em; margin: 12px 0 0; }
.proj-sub { font-size: 16px; line-height: 1.65; color: #55524B; max-width: 56ch; margin: 14px 0 0; text-wrap: pretty; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0 8px; position: sticky; top: 64px; z-index: 40; background: rgba(250,249,246,0.92); backdrop-filter: blur(10px); }
.filter-chip { font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid #E0DCD3; background: #FFFFFF; color: #55524B; cursor: pointer; font-family: inherit; }
.filter-chip.is-on { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: #55524B; }
.back-link:hover { color: var(--accent); }
.foot-simple { max-width: 1040px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: #8A867C; }
.foot-simple .material-symbols-outlined { font-size: 15px; }
