/* Inner pages (blog, students, cv, admin) — shares tokens with style.css */
[hidden] { display: none !important; }
.page { padding: calc(var(--nav-h) + 40px) 0 80px; min-height: 70vh; }
.page .nav { color: var(--ink); }
.page .nav .nav__mono { background: var(--wine); color: #fff; }
.page .nav .btn--outline { color: var(--wine); }
.page .nav .btn--outline:hover { background: var(--wine); color: #fff; border-color: var(--wine); }
.page__head { margin-bottom: 40px; }
.page__head h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.page__head p { font-size: clamp(17px, 1.5vw, 21px); max-width: 640px; color: var(--muted); font-weight: 300; margin-top: 12px; }
.crumb { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--wine); display: inline-flex; gap: 8px; align-items: center; margin-bottom: 18px; }
.crumb a:hover { text-decoration: underline; }

/* ---------- Blog ---------- */
.blog__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.blog__tags button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.blog__tags button.active, .blog__tags button:hover { background: var(--wine); color: #fff; border-color: var(--wine); }
.blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bpost { display: flex; flex-direction: column; gap: 12px; padding: 30px; border-radius: var(--radius); background: #fff; box-shadow: 0 1px 0 var(--line); transition: transform .4s var(--ease), box-shadow .4s; position: relative; overflow: hidden; }
.bpost::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--wine), var(--wine-3), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.bpost:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.bpost:hover::before { transform: scaleX(1); }
.bpost time { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--wine-3); font-weight: 700; }
.bpost h2 { font-size: 26px; line-height: 1.15; }
.bpost p { font-size: 15px; color: #2B2229; margin: 0; flex: 1; }
.bpost .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bpost .tags span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 5px 9px; border-radius: 6px; background: var(--wine-soft); color: var(--wine); }
.bpost .more { color: var(--wine); font-weight: 700; font-size: 14px; }
.article { max-width: 760px; margin: 0 auto; }
.article__meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); margin: 14px 0 34px; flex-wrap: wrap; }
.article h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; }
.article__body { font-size: 18px; line-height: 1.75; color: #2B2229; }
.article__body h2 { font-size: 32px; margin: 44px 0 14px; color: var(--wine); font-weight: 600; }
.article__body h3 { font-size: 24px; margin: 30px 0 10px; }
.article__body p { margin: 0 0 1.2em; }
.article__body ul, .article__body ol { padding-left: 24px; margin: 0 0 1.2em; }
.article__body li { margin: 6px 0; }
.article__body code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; background: var(--wine-soft); color: var(--wine-deep); padding: 2px 6px; border-radius: 6px; }
.article__body pre { background: var(--ink); color: #F5E9EC; padding: 22px 24px; border-radius: 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 0 0 1.4em; }
.article__body pre code { background: none; color: inherit; padding: 0; }
.article__body blockquote { border-left: 3px solid var(--wine); margin: 0 0 1.2em; padding: 6px 0 6px 20px; font-family: var(--serif); font-size: 22px; color: var(--wine); }
.article__body img { border-radius: 16px; }
.article__body strong { color: var(--ink); }
.article__foot { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.share { display: flex; gap: 8px; }
.share a, .share button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #fff; }
.share a:hover, .share button:hover { background: var(--wine); color: #fff; border-color: var(--wine); }

.bpost--cover { padding-top: 0; }
.bpost__cover { width: calc(100% + 60px); margin: 0 -30px 6px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.article__cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 20px; margin: 0 0 34px; box-shadow: var(--shadow); }
.EasyMDEContainer .CodeMirror { border-radius: 0 0 10px 10px; border-color: var(--line); min-height: 380px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.EasyMDEContainer .editor-toolbar { border-radius: 10px 10px 0 0; border-color: var(--line); background: #fff; }
.EasyMDEContainer .editor-toolbar button.active, .EasyMDEContainer .editor-toolbar button:hover { background: var(--wine-soft); border-color: var(--wine-soft); }
.EasyMDEContainer .editor-preview { background: #fff; }
.aform input[type="file"] { padding: 9px; border: 1px dashed var(--line); background: var(--wine-soft); }

/* ---------- Students ---------- */
.stu { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.stu__block { background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: 0 1px 0 var(--line); margin-bottom: 22px; }
.stu__block h2 { font-size: 30px; margin-bottom: 8px; }
.stu__block > p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.hours { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hours li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 12px 16px; border-radius: 12px; background: var(--wine-soft); font-size: 15px; align-items: center; }
.hours li b { color: var(--wine); }
.hours li span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.links { display: grid; gap: 10px; }
.links a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; transition: .25s; }
.links a:hover { border-color: var(--wine); color: var(--wine); transform: translateX(4px); }
.links a small { font-weight: 400; color: var(--muted); font-size: 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 21px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: '+'; color: var(--wine); font-size: 24px; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: #2B2229; font-size: 15.5px; }
.stu .contact__form { position: sticky; top: 100px; }
.contact__form select { font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; padding: 14px 16px; border-radius: 12px; border: 1px solid transparent; background: #fff; }

/* ---------- CV page ---------- */
.cv { max-width: 860px; margin: 0 auto; background: #fff; padding: 60px 64px; border-radius: 24px; box-shadow: 0 30px 80px -40px rgba(58,10,22,.35); }
.cv__top { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: start; border-bottom: 2px solid var(--wine); padding-bottom: 24px; margin-bottom: 30px; }
.cv__top h1 { font-size: 44px; font-weight: 600; }
.cv__top .sub { color: var(--wine); font-family: var(--serif); font-size: 20px; margin-top: 4px; }
.cv__top .meta { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
.cv__top img { width: 120px; height: 120px; border-radius: 16px; object-fit: cover; filter: grayscale(1); }
.cv h2 { font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: var(--wine); font-family: var(--sans); font-weight: 800; margin: 30px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cv table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cv td, .cv th { padding: 8px 10px 8px 0; vertical-align: top; border-bottom: 1px solid #F1EAEC; text-align: left; }
.cv th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cv .row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid #F1EAEC; font-size: 14.5px; }
.cv .row b { color: var(--ink); }
.cv .row .k { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-top: 2px; }
.cv ul { padding-left: 18px; margin: 4px 0 0; font-size: 14px; }
.cv .pub { display: block; padding: 10px 0; font-size: 14.5px; border-bottom: 1px solid #F1EAEC; }
.cv .pub b { font-weight: 600; }
.cv .pub i { color: var(--muted); }
.cv__actions { display: flex; gap: 12px; justify-content: center; margin: 0 0 30px; flex-wrap: wrap; }
.cv__sign { margin-top: 40px; text-align: right; font-size: 14px; }
.cv__sign b { display: block; font-family: var(--serif); font-size: 20px; margin-top: 6px; }

/* ---------- Admin ---------- */
.admin { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; }
.admin__nav { position: sticky; top: 100px; display: grid; gap: 4px; }
.admin__nav button { text-align: left; padding: 10px 14px; border-radius: 10px; border: 0; background: transparent; font-weight: 600; font-size: 14px; }
.admin__nav button.active, .admin__nav button:hover { background: var(--wine); color: #fff; }
.admin__panel { display: none; }
.admin__panel.active { display: block; }
.admin__panel h2 { font-size: 30px; margin-bottom: 16px; }
.admin__toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 var(--line); }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--wine-soft); }
.tbl td .btn { padding: 6px 12px; font-size: 12px; }
.tbl td.msg { max-width: 420px; white-space: pre-wrap; }
.aform { display: grid; gap: 12px; background: #fff; padding: 24px; border-radius: 16px; box-shadow: 0 1px 0 var(--line); margin-bottom: 20px; }
.aform label { display: grid; gap: 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--wine); }
.aform input, .aform textarea, .aform select { font: inherit; font-size: 14.5px; letter-spacing: 0; text-transform: none; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.aform textarea { min-height: 140px; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }
.aform .inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.aform .inline label { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.igadmin { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.igadmin figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.igadmin img { width: 100%; height: 100%; object-fit: cover; }
.igadmin figure.hidden img { filter: grayscale(1) brightness(.5); }
.igadmin figcaption { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(58,10,22,.85); color: #fff; font-size: 11px; padding: 6px 8px; text-align: center; }
.login { max-width: 460px; margin: 60px auto; background: #fff; padding: 40px; border-radius: 24px; text-align: center; box-shadow: var(--shadow); }
.login h1 { font-size: 34px; margin-bottom: 10px; }
.login p { color: var(--muted); font-size: 15px; }
.status { font-size: 13px; color: var(--muted); }
.status.ok { color: #1F7A4D; } .status.err { color: var(--wine-3); }

/* ---------- Analytics (admin) ---------- */
.ga__rt { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-bottom: 16px; }
.ga__live { position: relative; background: var(--wine); color: #fff; border-radius: 18px; padding: 22px; display: grid; gap: 4px; overflow: hidden; }
.ga__live b { font-family: var(--serif); font-size: 56px; line-height: 1; }
.ga__live span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.ga__pulse { position: absolute; top: 18px; right: 18px; width: 10px; height: 10px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: gaPulse 2s infinite; }
@keyframes gaPulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.6); } 70% { box-shadow: 0 0 0 12px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.ga__rtlist { background: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: 0 1px 0 var(--line); display: grid; gap: 10px; font-size: 13px; }
.ga__rtlist div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ga__rtlist b { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--wine); margin-right: 6px; }
.ga__rtlist span { padding: 5px 10px; border-radius: 999px; background: var(--wine-soft); }
.ga__rtlist em { font-style: normal; font-weight: 800; color: var(--wine); margin-left: 4px; }
.ga__kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.ga__kpi { background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 0 var(--line); display: grid; gap: 4px; }
.ga__kpi span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ga__kpi b { font-family: var(--serif); font-size: 28px; color: var(--wine); }
.ga__card { background: #fff; border-radius: 18px; padding: 18px 20px; box-shadow: 0 1px 0 var(--line); margin-bottom: 16px; }
.ga__card h3 { font-size: 20px; margin-bottom: 12px; }
.ga__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ga__grid .tbl { box-shadow: none; }
@media (max-width: 900px) { .ga__rt, .ga__grid { grid-template-columns: 1fr; } .ga__kpis { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Events (index) ---------- */
.events { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: start; }
.evlist { display: grid; gap: 12px; }
.ev { display: grid; grid-template-columns: 82px 1fr auto; gap: 20px; align-items: center; padding: 20px 24px; background: #fff; border-radius: 18px; box-shadow: 0 1px 0 var(--line); transition: transform .4s var(--ease), box-shadow .4s; }
.ev:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.ev__date { text-align: center; background: var(--wine); color: #fff; border-radius: 14px; padding: 10px 6px; line-height: 1; }
.ev__date b { display: block; font-family: var(--serif); font-size: 30px; }
.ev__date span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.ev__date.past { background: var(--wine-soft); color: var(--wine); }
.ev h3 { font-size: 22px; margin-bottom: 4px; }
.ev p { margin: 0; font-size: 14px; color: var(--muted); }
.ev .btn { white-space: nowrap; }
.press { background: var(--wine-soft); border-radius: var(--radius); padding: 28px; }
.press h3 { font-size: 24px; margin-bottom: 14px; }
.press ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.press li a { display: block; padding: 12px 14px; background: #fff; border-radius: 12px; font-size: 14px; font-weight: 600; }
.press li a small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.empty { font-size: 14px; color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }

/* ---------- Analytics consent ---------- */
.consent { position: fixed; left: 20px; bottom: 20px; z-index: 750; max-width: 360px; background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow), 0 0 0 1px var(--line); display: flex; gap: 12px; align-items: center; font-size: 13px; transform: translateY(20px); opacity: 0; transition: .4s var(--ease); }
.consent.show { transform: none; opacity: 1; }
.consent .btn { padding: 8px 14px; font-size: 12px; }

@media (max-width: 900px) {
  .blog__grid { grid-template-columns: 1fr; }
  .stu, .events, .admin { grid-template-columns: 1fr; }
  .stu .contact__form { position: static; }
  .cv { padding: 30px 22px; }
  .cv__top { grid-template-columns: 1fr; }
  .cv .row { grid-template-columns: 1fr; gap: 2px; }
  .igadmin { grid-template-columns: repeat(3, 1fr); }
  .admin__nav { position: static; display: flex; flex-wrap: wrap; }
  .ev { grid-template-columns: 70px 1fr; }
  .ev .btn { grid-column: 2; justify-self: start; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .footer, .totop, .cursor, .cursor-dot, .grain, .progress, .preloader, .consent, .cv__actions, .hero__scroll, .marquee, .lightbox, .contact__form, .burger, .lang { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { padding: 0; }
  .cv { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  .cv h2 { break-after: avoid; margin-top: 18pt; }
  .cv .row, .cv .pub, .cv tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .section { padding: 24pt 0; break-inside: avoid; }
  .section--wine, .section--dark, .section--tint { background: #fff !important; color: #000 !important; }
  .card, .job, .thesis, .ig, .li { box-shadow: none !important; border: 1px solid #ddd; background: #fff !important; color: #000 !important; }
  .hero { min-height: auto; background: #fff; color: #000; padding-top: 0; }
  .hero__mesh, .hero__rings, .portrait__frame { display: none; }
  .portrait img { filter: none; mix-blend-mode: normal; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
  @page { margin: 16mm; }
}
