/* Frofolia — portfolio template styles. Each template is scoped to its own class (.t1 / .t2 / .t3).
   Templates adapt to the width of their container (container queries), so the same markup works
   in a phone, a desktop preview, a thumbnail and a printed page. */
.tplw { container-type: inline-size; }
.tpl { font-family: var(--sans); line-height: 1.6; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tpl * { min-width: 0; }
.tpl img { display: block; max-width: 100%; }
.tpl h1, .tpl h2, .tpl h3, .tpl p, .tpl li, .tpl a, .tpl span { overflow-wrap: anywhere; }
.tpl a { color: inherit; }
.tpl ul { list-style: none; margin: 0; padding: 0; }
.tpl h1, .tpl h2, .tpl h3, .tpl p { margin: 0; }
.tpl svg.ic { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tpl .ini { font: 600 3.4rem var(--serif); color: var(--forest); }

/* ================= 1 · SIMPLE ================= */
.t1 {
  background: var(--cream); color: var(--char); max-width: 1000px; margin: 0 auto; padding: 64px 56px;
  display: grid; grid-template-columns: 270px minmax(0, 1fr);
  grid-template-areas: "pic head" "side main"; line-height: 1.65;
}
.t1-pic { grid-area: pic; padding: 0 40px 32px 0; border-bottom: 1px solid var(--char); }
.t1-pic img, .t1-pic .ini { width: 100%; }
.t1-pic { display: block; }
.t1-pic > img { aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.t1-pic > .ini { display: grid; place-items: center; aspect-ratio: 1; background: rgba(168,182,160,.35); border-radius: 2px; font-size: 4.5rem; }
.t1-head { grid-area: head; padding: 0 0 32px 48px; border-bottom: 1px solid var(--char); align-self: end; }
.t1-head h1 { font: 600 clamp(38px, 7cqw, 62px)/1.04 var(--serif); letter-spacing: -.01em; }
.t1-head h1.long { font-size: clamp(30px, 5cqw, 44px); }
.t1-role { margin-top: 12px; font-size: 18px; color: var(--mut); }
.t1-side { grid-area: side; padding: 8px 40px 0 0; }
.t1-side section { margin-top: 32px; }
.t1-side h2, .t1-main h2 { font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--mut); margin-bottom: 14px; }
.t1-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 5px 0; }
.t1-list svg { margin-top: 4px; color: var(--mut); }
.t1-list a { text-decoration-color: rgba(37,40,32,.3); text-underline-offset: 3px; }
.t1-skills li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.t1-skills li:first-child { border-top: 1px solid var(--line); }
.t1-main { grid-area: main; padding-left: 48px; border-left: 1px solid var(--line); }
.t1-main section { padding: 32px 0; border-bottom: 1px solid var(--line); }
.t1-main section:first-child { padding-top: 32px; }
.t1-main section:last-child { border-bottom: 0; }
.t1-about { font: 400 18px/1.75 var(--serif); }
.t1-item { margin-bottom: 22px; }
.t1-item:last-child { margin-bottom: 0; }
.t1-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.t1-row h3 { font: 600 19px/1.35 var(--serif); }
.t1-yrs { font-size: 13px; color: var(--mut); white-space: nowrap; }
.t1-yrs a { color: var(--forest); text-underline-offset: 3px; }
.t1-org { font: italic 400 16px var(--serif); color: var(--mut); margin-top: 2px; }
.t1-item p:not(.t1-org) { margin-top: 8px; font-size: 15px; color: #3A3D34; }
@container (max-width: 640px) {
  .t1 { grid-template-columns: 1fr; grid-template-areas: "pic" "head" "side" "main"; padding: 36px 24px; }
  .t1-pic { border: 0; padding: 0 0 20px; max-width: 150px; }
  .t1-head { padding: 0 0 24px; border-bottom: 1px solid var(--char); }
  .t1-side { padding: 0 0 8px; }
  .t1-main { padding-left: 0; border-left: 0; }
  .t1-row { flex-direction: column; gap: 2px; }
  .t1-yrs { white-space: normal; }
}

/* ================= 2 · MODERN ================= */
.t2 { display: grid; grid-template-columns: 270px minmax(0, 1fr); background: var(--ivory); color: var(--char); min-height: 760px; }
.t2-side { background: var(--forest); color: var(--cream); padding: 40px 28px; display: flex; flex-direction: column; gap: 26px; }
.t2-pic { width: 112px; height: 112px; border-radius: 8px; overflow: hidden; background: var(--sage); display: grid; place-items: center; border: 2px solid rgba(255,252,245,.28); }
.t2-pic img { width: 100%; height: 100%; object-fit: cover; }
.t2-name { font: 800 24px/1.15 var(--sans); letter-spacing: -.01em; }
.t2-role { margin-top: 6px; font-size: 14.5px; color: #CBD6C5; }
.t2-contact li, .t2-links li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 5px 0; color: #E8EEE3; }
.t2-contact svg, .t2-links svg { margin-top: 3px; color: var(--sage); }
.t2-contact a, .t2-links a { text-decoration: none; }
.t2-contact a:hover, .t2-links a:hover { text-decoration: underline; }
.t2-nav { border-top: 1px solid rgba(255,252,245,.16); }
.t2-nav a { display: block; padding: 11px 0; border-bottom: 1px solid rgba(255,252,245,.16); font-size: 14px; font-weight: 500; text-decoration: none; color: #F3F6EF; }
.t2-nav a:hover { color: #F2B9A6; }
.t2-links { margin-top: auto; }
.t2-main { padding: 52px 48px 60px; display: flex; flex-direction: column; gap: 56px; }
.t2-hero { scroll-margin-top: 80px; }
.t2-hero h2 { font: 800 clamp(30px, 4.8cqw, 50px)/1.08 var(--sans); letter-spacing: -.028em; color: var(--forest); }
.t2-hero p { margin-top: 16px; font-size: 17px; line-height: 1.7; color: #3A3D34; max-width: 62ch; }
.t2-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.t2-btn { display: inline-flex; padding: 11px 20px; border-radius: 6px; font-weight: 600; font-size: 14px; text-decoration: none; background: var(--forest); color: var(--cream) !important; border: 1px solid var(--forest); }
.t2-btn.alt { background: transparent; color: var(--forest) !important; }
.t2-sec { scroll-margin-top: 80px; }
.t2-sec > h2 { display: flex; align-items: center; gap: 12px; font: 700 13px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--forest); margin-bottom: 20px; }
.t2-sec > h2::before { content: ''; width: 8px; height: 8px; background: var(--terra); flex: none; }
.t2-sec > h2::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.t2-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.t2-card { background: var(--cream); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.t2-img { aspect-ratio: 16 / 10; background: rgba(168,182,160,.3); overflow: hidden; }
.t2-img img { width: 100%; height: 100%; object-fit: cover; }
.t2-img.ph { display: grid; place-items: center; color: var(--forest); background: repeating-linear-gradient(135deg, rgba(168,182,160,.28) 0 10px, rgba(168,182,160,.14) 10px 20px); }
.t2-img.ph svg { width: 30px; height: 30px; opacity: .55; }
.t2-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.t2-body h3 { font: 700 17px/1.3 var(--sans); }
.t2-body p { font-size: 14.5px; color: #4A4F43; }
.t2-body a { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--forest); text-underline-offset: 3px; }
.t2-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; align-items: start; }
.t2-panel { background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 4px 22px; }
.t2-entry { padding: 16px 0; border-bottom: 1px solid var(--line); }
.t2-entry:last-child { border-bottom: 0; }
.t2-entry b { font-weight: 700; font-size: 15.5px; }
.t2-meta { font-size: 13px; color: var(--mut); margin-top: 2px; }
.t2-entry p { margin-top: 6px; font-size: 14.5px; color: #4A4F43; }
.t2-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.t2-tag { padding: 6px 13px; background: rgba(168,182,160,.28); border: 1px solid rgba(23,61,48,.2); color: var(--forest); border-radius: 4px; font-size: 13.5px; font-weight: 600; }
@container (max-width: 700px) {
  .t2 { grid-template-columns: 1fr; min-height: 0; }
  .t2-side { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 18px; padding: 26px 22px; align-items: center; }
  .t2-pic { width: 84px; height: 84px; }
  .t2-name { font-size: 21px; }
  .t2-contact, .t2-nav, .t2-links { grid-column: 1 / -1; }
  .t2-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; border-top: 1px solid rgba(255,252,245,.16); padding-top: 6px; }
  .t2-nav a { border: 0; padding: 6px 0; }
  .t2-links { margin-top: 0; }
  .t2-main { padding: 32px 22px 40px; gap: 40px; }
  .t2-cards, .t2-grid2 { grid-template-columns: 1fr; }
}

/* ================= 3 · CREATIVE ================= */
.t3 { background: var(--cream); color: var(--char); padding: 56px 5.5% 64px; position: relative; overflow: hidden; }
.t3-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; margin-bottom: 104px; }
.t3-hero-text { grid-column: 1 / 9; grid-row: 1; align-self: end; position: relative; z-index: 3; padding-top: 110px; }
.t3-role { font: italic 400 clamp(20px, 2.6cqw, 30px)/1.2 var(--serif); color: var(--terra); margin-bottom: 14px; }
.t3-name { font: 900 clamp(54px, 12.5cqw, 168px)/.9 var(--serif); letter-spacing: -.035em; }
.t3-name.long { font-size: clamp(40px, 8.5cqw, 112px); }
.t3-photo { grid-column: 8 / 13; grid-row: 1 / 3; position: relative; width: 100%; max-width: 380px; justify-self: end; margin: 0; align-self: start; }
.t3-blob { position: absolute; left: -44px; bottom: -34px; width: 72%; aspect-ratio: 1; background: #E8C2B1; border-radius: 58% 42% 52% 48% / 46% 54% 46% 54%; z-index: 0; }
.t3-arch { position: relative; z-index: 1; aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--sage); display: grid; place-items: center; }
.t3-arch img { width: 100%; height: 100%; object-fit: cover; }
.t3-arch .ini { font-size: 7rem; color: var(--cream); }
.t3-sprig { position: absolute; z-index: 2; right: -30px; bottom: -70px; width: 74px; opacity: .9; transform: rotate(12deg); }
.t3-about { grid-column: 1 / 7; grid-row: 2; margin-top: 48px; position: relative; z-index: 3; }
.t3-lab { display: flex; align-items: center; gap: 14px; font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--terra-d); }
.t3-lab::after { content: ''; flex: 1; height: 1px; background: var(--char); opacity: .3; }
.t3-lead { font: 400 clamp(18px, 2cqw, 24px)/1.55 var(--serif); margin-top: 18px; max-width: 34em; }
.t3-sec { margin-bottom: 96px; }
.t3-works { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 60px; margin-top: 32px; align-items: start; }
.t3-work { margin: 0; }
.t3-fig { width: 100%; overflow: hidden; background: rgba(168,182,160,.3); }
.t3-fig img, .t3-fig .t3-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.g0 { grid-column: 1 / 8; }                     .g0 .t3-fig { aspect-ratio: 4 / 3; }
.g1 { grid-column: 9 / 13; margin-top: 72px; }  .g1 .t3-fig { aspect-ratio: 3 / 4; border-radius: 999px 999px 0 0; }
.g2 { grid-column: 2 / 7; }                     .g2 .t3-fig { aspect-ratio: 1; border-radius: 50%; }
.g3 { grid-column: 7 / 13; margin-top: 40px; }  .g3 .t3-fig { aspect-ratio: 16 / 10; border-radius: 0 120px 0 0; }
.t3-cap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.t3-no { font: italic 400 22px/1.2 var(--serif); color: var(--terra); }
.t3-cap h3 { font: 700 26px/1.2 var(--serif); }
.t3-cap p { margin-top: 6px; font-size: 15px; color: #4A4F43; }
.t3-cap a { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--terra-d); text-underline-offset: 4px; }
.t3-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 56px; }
.t3-exp { grid-column: 1 / 7; }
.t3-edu { grid-column: 8 / 13; margin-top: 56px; }
.t3-ent { padding: 18px 0; border-top: 1px solid rgba(37,40,32,.2); }
.t3-ent .yrs { display: block; font: 600 12px var(--sans); letter-spacing: .08em; color: var(--terra-d); margin-bottom: 4px; }
.t3-ent h3 { font: 700 21px/1.3 var(--serif); }
.t3-ent .org { font: italic 400 16px var(--serif); color: var(--mut); margin-top: 2px; }
.t3-ent p:not(.org) { margin-top: 8px; font-size: 14.5px; color: #4A4F43; }
.t3-lab + .t3-ent { margin-top: 18px; }
.t3-sk { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 22px; }
.t3-sk li { padding: 6px 16px; border: 1px solid var(--terra); border-radius: 999px; font: italic 400 18px var(--serif); }
.t3-foot { border-top: 2px solid var(--char); padding-top: 28px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px; margin-bottom: 0; }
.t3-foot-main { grid-column: 1 / 9; }
.t3-mail { display: inline-block; margin-top: 18px; font: 700 clamp(24px, 4.6cqw, 52px)/1.1 var(--serif); text-decoration-thickness: 1px; text-underline-offset: 8px; }
.t3-foot-side { grid-column: 9 / 13; font-size: 14.5px; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.t3-foot-side a { text-underline-offset: 3px; }
@container (max-width: 700px) {
  .t3 { padding: 36px 22px 44px; }
  .t3-hero { display: block; margin-bottom: 64px; }
  .t3-hero-text { padding-top: 0; }
  .t3-photo { width: 66%; max-width: 280px; margin: 32px 0 0 auto; }
  .t3-blob { left: -28px; }
  .t3-about { margin-top: 56px; }
  .t3-sec { margin-bottom: 64px; }
  .t3-works { display: flex; flex-direction: column; gap: 44px; }
  .t3-work { width: 88%; margin-top: 0 !important; }
  .t3-work:nth-child(even) { align-self: flex-end; }
  .t3-row { display: block; }
  .t3-edu { margin-top: 44px; }
  .t3-skills { padding-left: 0; }
  .t3-foot { display: block; }
  .t3-foot-side { margin-top: 20px; }
}
