/* Colours are injected from the admin panel as CSS variables (see theme_css()). These are fallbacks. */
:root {
  --accent: #ff4d00; --accent-2: #ff9a3d; --bg: #0b0d12; --surface: #14171f; --sidebar: #11141b;
  --text: #eef0f4; --muted: #9aa1ae; --on-accent: #fff;
  --logo-mark: #fff; --logo-dot: #ff4d00; --logo-text: #fff; --logo-tag: #a6a8ab;
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --line-2: color-mix(in srgb, var(--text) 18%, transparent);
  --soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --soft-2: color-mix(in srgb, var(--accent) 35%, transparent);
  --bg-alt: color-mix(in srgb, var(--surface) 45%, var(--bg));
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 20px;
  --side-w: 300px;
  --shadow: 0 30px 60px -24px rgba(0, 0, 0, .55);
  --head: 'Sora', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { background: var(--bg); color: var(--text); font-family: var(--body); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }

/* logo (colours controlled from admin) */
.logo { display: block; height: auto; }
.logo .lg-mark { fill: var(--logo-mark); }
.logo .lg-dot { fill: var(--logo-dot); }
.logo .lg-text { fill: var(--logo-text); }
.logo .lg-tag { fill: var(--logo-tag); }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 100; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font: 600 15px var(--body); border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: var(--on-accent); box-shadow: 0 12px 30px -12px var(--accent); }
.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--dark { background: var(--bg); color: var(--text); }
.btn--lg { padding: 17px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn__ico { display: grid; place-items: center; width: 30px; height: 30px; margin-right: -12px; border-radius: 50%; background: rgba(255, 255, 255, .22); }

/* ---------- side menu ---------- */
.side { position: fixed; top: 20px; bottom: 20px; left: 20px; width: var(--side-w); z-index: 60; }
.side__card { height: 100%; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; border-radius: 22px; background: var(--sidebar); border: 1px solid var(--line); box-shadow: var(--shadow); }
.side__card::-webkit-scrollbar { display: none; }
.side__logo { display: block; padding: 22px 26px 18px; }
.side__logo .logo { height: 104px; width: auto; max-width: 100%; margin: 0 auto; }
.side__photowrap { position: relative; flex: none; }
.side__photo { height: 240px; background: var(--grad); clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 92%); }
.side__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.side__badge { position: absolute; left: 22px; bottom: -14px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sidebar); border: 3px solid var(--accent); z-index: 2; }
.side__badge .logo { width: 30px; height: 30px; }
.side__id { padding: 22px 26px 6px; }
.side__id h2 { font: 700 19px/1.2 var(--head); text-transform: uppercase; letter-spacing: .02em; }
.side__id p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.side__nav { position: relative; display: grid; gap: 2px; padding: 12px 18px 12px 26px; }
.side__nav::before { content: ''; position: absolute; left: 31px; top: 26px; bottom: 26px; width: 1px; background: var(--line-2); }
.side__nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 0; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s; }
.side__nav a .ico { opacity: .7; }
.side__nav a:hover { color: var(--text); }
.side__nav .dot { position: relative; z-index: 1; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--sidebar); border: 2px solid var(--accent); transition: background .2s, transform .2s; }
.side__nav a.active { color: var(--text); }
.side__nav a.active .dot { background: var(--accent); transform: scale(1.25); box-shadow: 0 0 0 4px var(--soft); }
.side__nav a.active .ico { color: var(--accent); opacity: 1; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--text); transition: color .2s, border-color .2s, background .2s, transform .2s; }
.socials a:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.socials--side { padding: 6px 26px 16px; }
.side__card > .btn { margin: auto 26px 24px; width: calc(100% - 52px); }

.mbar, .scrim { display: none; }

/* ---------- main ---------- */
.main { margin-left: calc(var(--side-w) + 40px); padding-right: 20px; }
.section { padding: 110px clamp(16px, 4vw, 56px); }
.section--alt { background: var(--bg-alt); border-radius: 28px; }
.head { margin-bottom: 48px; max-width: 760px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.kicker::before { content: ''; width: 26px; height: 2px; background: var(--accent); }
.head h2 { font: 700 clamp(32px, 4.6vw, 52px)/1.06 var(--head); letter-spacing: -.03em; margin-top: 12px; }
.head h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.desc { color: color-mix(in srgb, var(--text) 80%, var(--muted)); margin-top: 8px; font-size: 15px; }
.ibox { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--soft); color: var(--accent); font-size: 19px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 60px clamp(16px, 4vw, 56px); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 78% 35%, var(--soft-2), transparent 45%); opacity: .55; }
.hero__bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 70% 40%, #000 15%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 15%, transparent 65%); opacity: .5; }
.hero__grid { position: relative; width: 100%; display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.live { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .2); }
.hero__name { font: 800 clamp(50px, 7.4vw, 110px)/.95 var(--head); letter-spacing: -.045em; margin: 20px 0 16px; text-transform: uppercase; }
.hero__name .accent { display: block; color: transparent; -webkit-text-stroke: 2px var(--accent); }
.hero__role { font: 500 clamp(18px, 2vw, 23px) var(--head); color: var(--text); min-height: 1.6em; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); margin-left: 4px; vertical-align: -.12em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cert { display: flex; gap: 16px; align-items: center; margin: 26px 0; padding: 16px 20px; max-width: 560px; border-radius: 18px; background: linear-gradient(135deg, var(--soft), transparent); border: 1px solid var(--soft-2); }
.cert__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: var(--on-accent); font-size: 22px; flex: none; }
.cert__label { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.cert__text { font-weight: 600; line-height: 1.45; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.socials--hero { margin-top: 22px; }
.stats { display: flex; gap: 36px; margin-top: 34px; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font: 700 32px var(--head); }
.stats span { font-size: 13px; color: var(--muted); }
.hero__visual { position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 440px; justify-self: center; }
.hero__disc { position: absolute; left: 6%; right: 6%; bottom: 0; aspect-ratio: 1; border-radius: 50%; background: var(--grad); }
.hero__ring { position: absolute; left: -3%; right: -3%; bottom: -4%; aspect-ratio: 1; border-radius: 50%; border: 1px dashed var(--soft-2); animation: spin 50s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__visual img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 112%; width: auto; max-width: none; object-fit: contain; -webkit-mask-image: linear-gradient(#000 84%, transparent); mask-image: linear-gradient(#000 84%, transparent); }
.float { position: absolute; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; z-index: 2; }
.float > .ico { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--soft); color: var(--accent); }
.float b { display: block; font-size: 14px; } .float span { font-size: 12px; color: var(--muted); }
.float--a { left: -6%; top: 50%; } .float--b { right: -4%; bottom: 14%; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- about ---------- */
.about { display: grid; gap: 40px; }
.about--img { grid-template-columns: .8fr 1.2fr; align-items: start; }
.about__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about__text { font-size: 18px; line-height: 1.85; color: color-mix(in srgb, var(--text) 85%, var(--muted)); max-width: 860px; }
.info { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 32px; }
.info__item { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.info__item > .ico { width: 42px; height: 42px; padding: 11px; border-radius: 12px; background: var(--soft); color: var(--accent); }
.info__item span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.info__item b { font-weight: 600; font-size: 15px; word-break: break-word; }

/* ---------- education ---------- */
.edu { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.edu__card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .3s, border-color .3s; }
.edu__card:hover { transform: translateY(-6px); border-color: var(--soft-2); }
.edu__card.featured { grid-column: 1 / -1; background: linear-gradient(135deg, var(--soft), var(--surface) 60%); border-color: var(--soft-2); }
.edu__card.featured.has-img { flex-direction: row; }
.edu__card.featured.has-img .edu__img { width: 45%; }
.edu__card.featured h3 { font-size: 26px; }
.edu__img { display: block; overflow: hidden; }
.edu__img img { width: 100%; height: 100%; min-height: 200px; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s; }
.edu__card:hover .edu__img img { transform: scale(1.05); }
.edu__body { padding: 26px; flex: 1; }
.edu__card h3 { font: 600 19px/1.3 var(--head); margin: 14px 0 6px; }

/* ---------- experience timeline ---------- */
.timeline { position: relative; max-width: 1000px; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--accent), var(--soft)); transform: translateX(-50%); }
.tl { position: relative; width: 50%; padding: 0 40px 28px 0; }
.tl:nth-child(even) { margin-left: 50%; padding: 0 0 28px 40px; }
.tl::before { content: ''; position: absolute; top: 26px; right: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); z-index: 1; }
.tl:nth-child(even)::before { left: -8px; right: auto; }
.tl__card { display: flex; gap: 16px; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .3s; }
.tl__card:hover { border-color: var(--soft-2); transform: translateY(-4px); }
.tl__img { flex: none; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; }
.tl__img img { width: 100%; height: 100%; object-fit: cover; }
.tl__period { font-size: 13px; color: var(--accent); font-weight: 600; }
.tl__card h3 { font: 600 17px/1.35 var(--head); margin-top: 4px; }
.tl__card p.muted { font-size: 14px; }
.now { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #3ddc84; color: #08210f; font-size: 11px; }
.tl.current .tl__card { border-color: var(--soft-2); background: linear-gradient(135deg, var(--soft), var(--surface) 70%); }

/* ---------- skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.skillgroup { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.skillgroup h3 { display: flex; align-items: center; gap: 12px; font: 600 17px var(--head); margin-bottom: 22px; }
.skillgroup .ibox { width: 38px; height: 38px; font-size: 17px; }
.skill + .skill { margin-top: 16px; }
.skill__top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.skill__top span:last-child { color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.in .bar span { width: var(--w); }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.proj { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .3s, border-color .3s, box-shadow .3s; }
.proj:hover { transform: translateY(-6px); border-color: var(--soft-2); box-shadow: var(--shadow); }
.proj__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.proj__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.proj__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.proj__num { font: 800 40px/1 var(--head); color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.proj h3 { font: 600 19px/1.3 var(--head); margin: 14px 0 12px; }
.proj ul { list-style: none; display: grid; gap: 8px; }
.proj li { display: flex; gap: 10px; font-size: 15px; color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.proj li .ico { color: var(--accent); margin-top: 4px; }
.proj__link { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14px; }

/* ---------- achievements ---------- */
.medals { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.medals__total { display: flex; flex-direction: column; justify-content: center; padding: 26px; border-radius: var(--radius); background: var(--grad); color: var(--on-accent); }
.medals__total span { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.medals__total strong { font: 800 62px/1 var(--head); }
.medal { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.medal i { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 12px; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 42%), var(--mc); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 10px 22px -8px var(--mc); }
.medal--gold { --mc: #f4c542; } .medal--silver { --mc: #c9d1dc; } .medal--bronze { --mc: #cd7f45; }
.medal strong { font: 700 42px/1 var(--head); }
.medal span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; margin-top: 6px; }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.trophy { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .3s, border-color .3s; }
.trophy:hover { transform: translateY(-4px); border-color: rgba(244, 197, 66, .45); }
.trophy__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.trophy__row { display: flex; gap: 16px; align-items: center; padding: 20px; }
.trophy__count { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 16px; background: rgba(244, 197, 66, .14); color: #f4c542; font: 800 21px var(--head); }
.trophy h3 { font: 600 16px/1.3 var(--head); }
.trophy p { font-size: 14px; }

/* ---------- gallery ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--muted); font: 500 14px var(--body); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gallery { columns: 3 260px; column-gap: 14px; }
.gitem { position: relative; display: block; margin-bottom: 14px; break-inside: avoid; border-radius: 16px; overflow: hidden; background: var(--surface); }
.gitem img { width: 100%; height: auto; transition: transform .6s; }
.gitem:hover img { transform: scale(1.05); }
.gitem__cap { position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; font-size: 14px; font-weight: 500; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); opacity: 0; transform: translateY(8px); transition: all .3s; }
.gitem__cap small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-2); }
.gitem:hover .gitem__cap, .gitem:focus .gitem__cap { opacity: 1; transform: none; }
.gitem.is-hidden { display: none; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 60px 70px; background: rgba(0, 0, 0, .92); }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 12px; object-fit: contain; }
.lightbox figcaption { color: #ddd; font-size: 15px; text-align: center; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; font-size: 22px; }
.lightbox button:hover { background: var(--accent); border-color: var(--accent); }
.lb__close { top: 16px; right: 16px; } .lb__prev { left: 14px; top: 50%; } .lb__next { right: 14px; top: 50%; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; }
.contact__info { display: grid; gap: 12px; align-content: start; }
.cinfo { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
a.cinfo:hover { border-color: var(--soft-2); transform: translateX(4px); }
.cinfo > div > span, .cinfo--social > span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.cinfo b { font-weight: 600; word-break: break-word; }
.cinfo--social { flex-direction: column; align-items: flex-start; gap: 10px; }
.form { display: grid; gap: 16px; padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form input, .form textarea { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form__status { font-size: 14px; min-height: 1.4em; }
.form__status.ok { color: #3ddc84; } .form__status.err { color: #ff6b6b; }
.hp { position: absolute; left: -9999px; }

/* ---------- cv band + footer ---------- */
.cvband { padding: 90px clamp(16px, 4vw, 56px) 60px; }
.cvband__inner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 52px; border-radius: 28px; background: var(--grad); color: var(--on-accent); }
.cvband__inner::after { content: 'CV'; position: absolute; right: 26%; top: -40px; font: 800 230px/1 var(--head); opacity: .08; pointer-events: none; }
.cvband h2 { font: 700 clamp(28px, 4vw, 42px)/1.1 var(--head); letter-spacing: -.03em; }
.cvband p { max-width: 520px; margin-top: 10px; opacity: .85; }
.cvband .btn { position: relative; z-index: 1; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 26px clamp(16px, 4vw, 56px) 34px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.footer__logo .logo { height: 34px; width: auto; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 380px; order: -1; }
  .about--img { grid-template-columns: 1fr; }
  .about__img img { aspect-ratio: 16 / 10; }
}
@media (max-width: 1000px) {
  .side { top: 0; bottom: 0; left: 0; width: min(320px, 86vw); transform: translateX(-105%); transition: transform .35s ease; }
  .side__card { border-radius: 0 22px 22px 0; }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .3s; display: block; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .mbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .mbar__logo .logo { height: 40px; width: auto; }
  .mbar__btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: none; color: var(--text); font-size: 20px; cursor: pointer; }
  .main { margin-left: 0; padding: 0 12px; }
  .hero { min-height: auto; padding-top: 40px; }
  .medals { grid-template-columns: repeat(3, 1fr); }
  .medals__total { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .contact { grid-template-columns: 1fr; }
  .edu__card.featured.has-img { flex-direction: column; }
  .edu__card.featured.has-img .edu__img { width: 100%; }
}
@media (max-width: 720px) {
  .section { padding: 72px 16px; }
  .section--alt { border-radius: 20px; }
  .timeline::before { left: 8px; }
  .tl, .tl:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 18px 34px; }
  .tl::before, .tl:nth-child(even)::before { left: 0; right: auto; }
  .tl__img { width: 70px; height: 70px; }
  .edu, .projects { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
  .float--a { left: 0; } .float--b { right: 0; }
  .medal strong { font-size: 30px; }
  .medal i { width: 38px; height: 38px; }
  .cvband { padding: 60px 4px 40px; }
  .cvband__inner { padding: 34px 22px; }
  .gallery { columns: 2 140px; column-gap: 10px; }
  .gitem { margin-bottom: 10px; }
  .lightbox { padding: 60px 10px; }
  .lb__prev, .lb__next { top: auto !important; bottom: 14px; }
  .lb__prev { left: calc(50% - 60px); } .lb__next { right: calc(50% - 60px); }
}


/* Logos (detected automatically by site.js) are shown whole, never cropped */
.is-logo { display: grid; place-items: center; background: var(--logo-bg, #fff); }
.is-logo img { object-fit: contain !important; padding: 7% 9%; }
.tl__img.is-logo img { padding: 8%; }
