/* Portfolio — shared visual system */
:root {
    color-scheme: dark;
    --site-bg: #101113;
    --site-surface: #18191c;
    --site-surface-raised: #202124;
    --site-line: #303136;
    --site-text: #f4f3ee;
    --site-muted: #a9abb2;
    --site-accent: #ffd400;
    --site-accent-soft: #272414;
    --site-radius: 8px;
    --site-ease: cubic-bezier(.22, .68, .2, 1);
    --site-header-height: 88px;
    --font-body: 'Manrope', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-meta: 'IBM Plex Mono', monospace;
}
/* Minimal base rules used by the public site, replacing Bootstrap Reboot. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
:where(.portfolio-site) h1, :where(.portfolio-site) h2, :where(.portfolio-site) h3, :where(.portfolio-site) h4, :where(.portfolio-site) h5, :where(.portfolio-site) h6 { margin-top: 0; margin-bottom: .5rem; }
:where(.portfolio-site) p, :where(.portfolio-site) dl, :where(.portfolio-site) ol, :where(.portfolio-site) ul { margin-top: 0; margin-bottom: 1rem; }
:where(.portfolio-site) ol, :where(.portfolio-site) ul { padding-left: 2rem; }
:where(.portfolio-site) ol ol, :where(.portfolio-site) ul ul, :where(.portfolio-site) ol ul, :where(.portfolio-site) ul ol { margin-bottom: 0; }
:where(.portfolio-site) button, :where(.portfolio-site) input, :where(.portfolio-site) optgroup, :where(.portfolio-site) select, :where(.portfolio-site) textarea { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
:where(.portfolio-site) button, :where(.portfolio-site) select { text-transform: none; }
:where(.portfolio-site) button, :where(.portfolio-site) [type="button"], :where(.portfolio-site) [type="submit"], :where(.portfolio-site) [type="reset"] { -webkit-appearance: button; }
:where(.portfolio-site) button { border-radius: 0; }
:where(.portfolio-site) label { display: inline-block; }
:where(.portfolio-site) img, :where(.portfolio-site) svg { vertical-align: middle; }
:where(.portfolio-site) [hidden] { display: none !important; }
:where(.portfolio-site) .container { width: 100%; padding-right: 12px; padding-left: 12px; margin-right: auto; margin-left: auto; }
@media (min-width: 576px) { :where(.portfolio-site) .container { max-width: 540px; } }
@media (min-width: 768px) { :where(.portfolio-site) .container { max-width: 720px; } }
@media (min-width: 992px) { :where(.portfolio-site) .container { max-width: 960px; } }
@media (min-width: 1200px) { :where(.portfolio-site) .container { max-width: 1140px; } }
@media (min-width: 1400px) { :where(.portfolio-site) .container { max-width: 1320px; } }
:where(.portfolio-site) .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { scroll-behavior: smooth; scroll-padding-top: 115px; }
body.portfolio-site {
    margin: 0;
    min-width: 320px;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--site-bg);
    color: var(--site-text);
    font: 400 1rem/1.8 var(--font-body);
    -webkit-font-smoothing: antialiased;
}
.portfolio-site main { flex: 1; min-width: 0; }
.portfolio-site img { max-width: 100%; }
.portfolio-site a { color: inherit; text-decoration: none; }
.portfolio-site a:hover { color: var(--site-accent); }
.portfolio-site button, .portfolio-site input, .portfolio-site textarea { font: inherit; }
.portfolio-site :is(a, button, [role="button"], [data-tooltip], .cursor-pointer, .hero-letter, .panel, .skill-card) { cursor: pointer; }
.portfolio-site a, .portfolio-site button { -webkit-tap-highlight-color: transparent; }
.portfolio-site :focus-visible { outline: 2px solid var(--site-accent); outline-offset: 5px; }
.portfolio-site ::selection { background: var(--site-accent); color: #101113; }
.portfolio-site h1, .portfolio-site h2, .portfolio-site h3 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.14;
    letter-spacing: -.045em;
    color: var(--site-text);
    text-align: left;
    text-transform: none;
}
.portfolio-site h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); overflow-wrap: anywhere; }
.portfolio-site h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.portfolio-site p { margin-top: 0; }
.portfolio-site strong { font-weight: 700; color: var(--site-text); }
.mono { font-family: var(--font-meta); font-size: .75rem; font-weight: 400; letter-spacing: .055em; }
.muted { color: var(--site-muted); }
.accent { color: var(--site-accent); }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1100; transform: translateY(-160%); padding: 10px 18px; background: var(--site-accent); color: #101113 !important; border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }
.section-index { display: block; margin-bottom: 14px; color: var(--site-accent); text-transform: uppercase; }
.page-content { padding-top: 40px; padding-bottom: 60px; }
.page-heading { margin-bottom: 44px; max-width: 1050px; }
.page-heading h1 { margin: 0 0 22px; }
.page-heading p { color: var(--site-muted); margin: 0; }
.section-space { padding-top: 60px; padding-bottom: 70px; scroll-margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; }
.portfolio-site .btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 19px;
    border: 1px solid var(--site-accent);
    border-radius: 5px;
    background: var(--site-accent);
    color: #15150c !important;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.5;
    transition: transform .25s var(--site-ease), background .25s, box-shadow .25s;
}
.btn-main:hover { background: #ffe347; transform: translateY(-3px); box-shadow: 0 7px 28px #ffd40020; }
.btn-main:active { transform: translateY(-1px); }
.btn-main i { transition: transform .25s; }
.btn-main:hover i { transform: translate(2px, -2px); }
.text-link { display: inline-flex; align-items: center; gap: 13px; padding: 7px 0; font-size: .875rem; transition: color .2s; }
.text-link i { font-size: .8em; transition: transform .25s var(--site-ease); }
.text-link:hover i { transform: translateX(3px); }
.text-link.back-link:hover i { transform: translateX(-3px); }
.back-link { margin-bottom: 25px; color: var(--site-muted) !important; }
.back-link:hover { color: var(--site-accent) !important; }
/* Page loading: shown only while JS marks the document as loading. */
.page-loader { position: fixed; inset: 0; z-index: 2000; display: grid; grid-template-columns: max-content; grid-template-rows: 96px auto; align-content: center; align-items: center; justify-content: center; justify-items: center; gap: 24px; background: var(--site-bg); color: var(--site-muted); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s, visibility .2s; }
.page-loading .page-loader { visibility: visible; opacity: 1; pointer-events: auto; }
.page-loader-logo { grid-area: 1 / 1; display: block; width: 46px; height: 52px; object-fit: contain; }
.page-loader-spinner { grid-area: 1 / 1; width: 96px; height: 96px; border: 4px solid var(--site-line); border-top-color: var(--site-accent); border-radius: 50%; will-change: transform; animation: portfolio-loading-spin .8s linear infinite; }
.page-loader .mono { font-size: .85rem; }
@keyframes portfolio-loading-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* Header and encapsulated navigation */
.site-header { position: sticky; top: 0; z-index: 1000; background: #101113f5; border-bottom: 1px solid var(--site-line); transition: box-shadow .25s, background .25s; }
@supports (backdrop-filter: blur(12px)) { .site-header { background: #101113e8; backdrop-filter: blur(16px); } }
.site-header.is-scrolled { box-shadow: 0 6px 22px #0003; }
.site-nav { position: relative; display: flex; align-items: center; gap: 28px; min-height: var(--site-header-height); padding-top: 18px; padding-bottom: 18px; transition: padding .25s, min-height .25s; }

.site-logo { display: flex; align-items: center; flex-shrink: 0; min-width: 40px; min-height: 44px; }
.site-logo img { display: block; width: 40px; height: 44px; object-fit: contain; transition: transform .25s, filter .25s; }
.site-logo:hover img { transform: translateY(-1px); filter: drop-shadow(0 3px 9px #ffd40026); }
.site-menu { margin-left: auto; }
.site-menu ul { display: flex; align-items: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.site-menu a { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 42px; padding: 8px 16px; background: var(--site-bg); border: 1px solid var(--site-line); border-radius: var(--site-radius); color: var(--site-muted); font-family: var(--font-meta); font-size: .75rem; font-weight: 400; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; transition: color .2s, background .2s, border-color .2s, transform .25s var(--site-ease), box-shadow .25s; }
.site-menu a i { font-size: .85em; }
.site-menu a:hover { border-color: #ffd40080; background: #222119; color: var(--site-accent); transform: translateY(-2px); box-shadow: 0 4px 14px #0003; }
.site-menu a[aria-current="page"] { color: var(--site-accent); border-color: var(--site-accent); background: var(--site-accent-soft); }
.site-menu a.social-link { width: 42px; padding: 8px; }
.site-menu a.social-link i { font-size: 1rem; }
.menu-toggle { display: none; }
/* Home */
.home-hero { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 75% 50%, #242424 0, transparent 55%), #101010; }
.hero-inner { min-height: min(740px, calc(100svh - 160px)); display: flex; flex-direction: column; position: relative; z-index: 1; padding-top: 26px; padding-bottom: 24px; }
.hero-top, .hero-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--site-muted); font-size: .8rem; }
.hero-top > span:first-child { display: flex; align-items: center; gap: 10px; }
.hero-content { text-align: center; margin: auto 0; padding: 60px 0; }
.portfolio-site .hero-title { margin: 0; text-align: center; font-size: clamp(3.8rem, 8vw, 7.5rem); font-weight: 600; line-height: 1; letter-spacing: -.065em; }
.hero-title > span { display: block; }
.hero-surname { color: var(--site-accent); }
.hero-letter { display: inline-block; transition: transform .35s var(--site-ease), color .3s; }
.hero-letter:hover { transform: translateY(-8px) rotate(-5deg); color: var(--site-text); }
.hero-period { display: none; }
.hero-role { margin: 29px 0 12px; font-size: clamp(.95rem, 1.5vw, 1.25rem); font-weight: 500; }
.hero-role > span:first-child { color: var(--site-accent); padding: 0 10px; }
.hero-scroll { display: inline-flex; align-items: center; gap: 17px; min-height: 32px; }
.hero-scroll i { color: var(--site-accent); transition: transform .25s; }
.hero-scroll:hover i { transform: translateY(4px); }
.hero-facets { position: absolute; inset: -15px; z-index: 0; pointer-events: none; transform: translate(var(--facet-x, 0px), var(--facet-y, 0px)); transition: transform .8s var(--site-ease); }
.hero-facets span { position: absolute; inset: 0; background: linear-gradient(135deg, #2a2a2a, #131313); clip-path: polygon(65% 5%, 95% 21%, 73% 56%); }
.hero-facets span:nth-child(2) { background: linear-gradient(165deg, #2b2b2b, #161616); clip-path: polygon(95% 21%, 73% 56%, 100% 79%); }
.hero-facets span:nth-child(3) { background: linear-gradient(45deg, #121212, #2b2b2b); clip-path: polygon(73% 56%, 100% 79%, 53% 97%); }
.hero-facets span:nth-child(4) { background: linear-gradient(110deg, #111111, #1f1f1f); clip-path: polygon(0 12%, 27% 41%, 7% 88%); }
.hero-facets span:nth-child(5) { background: linear-gradient(150deg, #171717, #131313); clip-path: polygon(0 12%, 27% 41%, 44% 0); }
.stack-strip { border-block: 1px solid var(--site-line); background: #151618; }
.stack-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 25px; padding-bottom: 25px; font-size: .875rem; }
.stack-inner .mono { font-size: .7rem; text-transform: uppercase; }
.stack-divider { color: #62635f; }
/* Projects */
.projects-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; row-gap: 38px; }
.projects-list-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project { min-width: 0; }
.project-card { display: block; }
.project-thumbnail { position: relative; overflow: hidden; aspect-ratio: 100 / 51; background: var(--site-surface); border: 1px solid var(--site-line); border-radius: var(--site-radius); transition: border-color .3s, transform .3s var(--site-ease), box-shadow .3s; }
.project-thumbnail::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, #ffffff12 50%, transparent 70%); opacity: 0; transform: translateX(-70%); transition: transform .65s var(--site-ease), opacity .4s; }
.project-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .55s var(--site-ease), filter .3s; }
.project-open { position: absolute; bottom: 14px; right: 14px; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #ffffff50; border-radius: 50%; background: #101113dd; color: var(--site-text); font-size: .9rem; transition: transform .25s, background .25s, color .25s; }
.project-card:hover .project-thumbnail, .project-card:focus-visible .project-thumbnail { border-color: #ffd40088; transform: translateY(-4px); box-shadow: 0 13px 34px #0004; }
.project-card:hover .project-thumbnail img, .project-card:focus-visible .project-thumbnail img { transform: scale(1.035); filter: brightness(.95); }
.project-card:hover .project-thumbnail::after { opacity: 1; transform: translateX(60%); }
.project-card:hover .project-open, .project-card:focus-visible .project-open { background: var(--site-accent); color: #101113; transform: translate(2px, -2px); border-color: var(--site-accent); }
.project-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 17px; }
.project-caption h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.03em; transition: color .2s; overflow-wrap: anywhere; }
.project-card:hover h2 { color: var(--site-accent); }
.project-date { flex-shrink: 0; color: var(--site-muted); font-size: .8rem; }
.project-category { display: block; color: var(--site-muted); font-family: var(--font-meta); font-size: .8rem; font-weight: 400; letter-spacing: .055em; margin-top: 5px; }
.project-heading-meta .project-category { display: inline; margin-top: 0; }
/* Project navigation follows the ordering of the project listing. */
.project-page-heading { max-width: none; }
.project-page-heading h1.has-project-subtitle { margin-bottom: 10px; }
.project-page-heading .project-subtitle { margin: 0 0 24px; font-family: var(--font-heading); font-size: clamp(1.15rem, 2.4vw, 1.75rem); font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.project-heading-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 25px; }
.project-heading-top .back-link { margin-bottom: 0; }
.project-navigation { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.project-nav-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 8px 14px; border: 1px solid var(--site-line); border-radius: var(--site-radius); background: var(--site-surface); color: var(--site-text); font-size: .8rem; font-weight: 500; white-space: nowrap; transition: color .2s, border-color .2s, background .2s, transform .2s var(--site-ease); }
.project-nav-link:hover { border-color: var(--site-accent); color: var(--site-accent); background: var(--site-surface-raised); transform: translateY(-2px); }
.project-nav-link i { font-size: .85em; }
.project-heading-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; color: var(--site-muted); }
.project-heading-meta > * + * { border-left: 1px solid var(--site-line); padding-left: 24px; }
.project-details { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.project-gallery { min-width: 0; }
/* Native gallery mechanics; the existing presentation stays unchanged. */
.carousel { position: relative; }
.carousel-inner { position: relative; display: grid; width: 100%; overflow: hidden; touch-action: pan-y pinch-zoom; }
.carousel-item { position: relative; display: none; grid-area: 1 / 1; min-width: 0; width: 100%; backface-visibility: hidden; }
.carousel-item.active, .carousel-item.is-leaving { display: block; }
.carousel-control-prev, .carousel-control-next { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 0; color: #fff; text-align: center; background: none; border: 0; touch-action: manipulation; }
.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }
.carousel-indicators { position: absolute; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; padding: 0; list-style: none; }
.carousel-indicators button { box-sizing: content-box; flex: 0 1 auto; padding: 0; margin-right: 3px; margin-left: 3px; text-indent: -999px; }
.project-gallery .carousel { overflow: hidden; background: var(--site-surface); border: 1px solid var(--site-line); border-radius: var(--site-radius); box-shadow: 0 12px 32px #0003; padding-bottom: 35px; }
.project-gallery .carousel-item img { width: 100%; height: auto; aspect-ratio: 5 / 3; display: block; object-fit: contain; background: #f5f5f2; }
.project-gallery .carousel-control-prev, .project-gallery .carousel-control-next { width: 50px; top: 0; bottom: 35px; opacity: 1; }
.project-gallery .carousel-control-prev i, .project-gallery .carousel-control-next i { width: 34px; height: 40px; display: grid; place-items: center; border: 1px solid #ffffff50; border-radius: 6px; background: #101113dc; color: var(--site-text); transition: background .2s, color .2s; }
.project-gallery .carousel-control-prev:hover i, .project-gallery .carousel-control-next:hover i { background: var(--site-accent); border-color: var(--site-accent); color: #101113; }
.project-gallery .carousel-indicators { bottom: 8px; margin: 0; gap: 2px; }
.project-gallery .carousel-indicators [data-carousel-index] { width: 20px; height: 4px; border: 8px solid transparent; border-inline-width: 2px; border-radius: 8px; background-clip: padding-box; background-color: #73757e; opacity: 1; transition: background .2s; }
.project-gallery .carousel-indicators .active { background-color: var(--site-accent); }
.gallery-caption { color: var(--site-muted); padding: 10px 18px 0; font-size: .75rem; }
.project-description { min-width: 0; }
.project-info-section { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--site-line); }
.project-info-section h2 { font: 500 .75rem var(--font-meta); text-transform: uppercase; letter-spacing: .045em; color: var(--site-accent); margin-bottom: 16px; }
.rich-text { color: var(--site-muted); font-size: .875rem; line-height: 1.85; overflow-wrap: anywhere; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text ul { padding-left: 20px; margin: 0; }
.rich-text li + li { margin-top: 7px; }
.rich-text a { color: var(--site-accent); text-decoration: underline; text-underline-offset: 3px; }
.rich-text img { height: auto; }
/* Profile: original text and complete chronology */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 65px; align-items: start; }
.presentation { position: sticky; top: 110px; }
.presentation-text { color: var(--site-muted); font-size: .875rem; line-height: 1.95; }
.presentation-text p + p { margin-top: 23px; }
.presentation-text em { font-style: normal; color: #d3d3ce; }
/* Profile heading: title left, PDF download right; wrapping keeps mobile readable. */
.profile-page > .page-heading { max-width: none; }
.profile-heading-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 24px; min-width: 0; }
.profile-heading-title h1 { margin-bottom: 0; }
.download-pdf { color: var(--site-text); margin-left: auto; }
.download-pdf i { color: var(--site-accent); font-size: 1.1rem; }
.download-pdf .mono { color: var(--site-muted); font-size: .65rem; }
.profile-section-heading { margin-bottom: 28px; font-size: 1.55rem !important; }
.timeline { position: relative; padding-left: 24px; }
.timeline > .line { position: absolute; top: 12px; bottom: 25px; left: 3px; width: 1px; background: var(--site-line); }
.level { position: relative; margin-bottom: 23px; }
.level:last-child { margin-bottom: 0; }
.panel { position: relative; width: 100%; border: 1px solid var(--site-line); background: var(--site-surface); border-radius: var(--site-radius); transition: border-color .3s; }
/* Real anchor links retain the timeline dots and support keyboard navigation. */
.timeline-point { position: absolute; z-index: 1; top: 7px; left: -44px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.timeline-point::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--site-accent); box-shadow: 0 0 0 5px var(--site-bg); transition: transform .2s var(--site-ease), box-shadow .2s; }
.timeline-point:hover::before, .timeline-point:focus-visible::before { transform: scale(1.4); box-shadow: 0 0 0 5px var(--site-bg), 0 0 0 6px #ffd40066; }
.timeline .panel:target { border-color: var(--site-accent); }
.panel:hover { border-color: #68634a; }
.panel-header, .panel-header-school { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 18px 21px 14px; border-bottom: 1px solid var(--site-line); }
.panel-date, .panel-date-school { grid-column: 1; color: var(--site-accent); font: 400 .8rem/1.6 var(--font-meta); }
.panel-title { font-family: var(--font-heading); grid-column: 1; grid-row: 2; color: var(--site-text); font-size: .9rem; font-weight: 600; }
.panel-icon { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--site-muted); font-size: 1.1rem; }
.panel-body { padding: 18px 21px 21px; color: var(--site-muted); font-size: .825rem; line-height: 1.8; }
.panel-body-role { margin-bottom: 11px; }
.panel-body ul { margin: 0; padding-left: 18px; }
.panel-body li + li { margin-top: 7px; }
.diploma-award { color: var(--site-accent); margin-left: .35rem; font-size: 1.05em; vertical-align: -.05em; }
.skills-section { margin-top: 65px; padding-top: 35px; border-top: 1px solid var(--site-line); }
/* Compact technology cards with vector icons and subtle brand colours. */
.skills-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.skills-group { min-width: 0; padding: 24px; border: 1px solid var(--site-line); border-radius: 12px; background: linear-gradient(145deg, #1c1d21, #141517); }
.skills-group-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--site-line); }
.skills-group-symbol { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ffd40033; border-radius: 9px; background: #ffd4000a; color: var(--site-accent); font-size: .9rem; }
.portfolio-site .skills-group-heading h3 { margin: 0; font-size: 1.2rem; font-weight: 500; letter-spacing: -.025em; }
.skills-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.skill-card { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 100px; padding: 16px; border: 1px solid #ffffff0c; border-radius: 10px; background: #202125; transition: transform .25s var(--site-ease), border-color .25s, background .25s, box-shadow .25s; }
.skill-card:hover { transform: translateY(-3px); border-color: #ffd40066; background: #26272a; box-shadow: 0 8px 20px #0002; }
.skill-icon { flex: 0 0 46px; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #ffffff12; border-color: color-mix(in srgb, var(--skill-color) 22%, transparent); border-radius: 12px; color: var(--skill-color); background: #28292e; background: color-mix(in srgb, var(--skill-color) 9%, #202125); font-size: 1.6rem; transition: transform .25s var(--site-ease), border-color .25s; }
.skill-card:hover .skill-icon { transform: translateY(-2px); border-color: var(--skill-color); }
.skill-icon .fa-php { font-size: 1.85rem; }
.skill-glyph { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; letter-spacing: -.06em; }
.skill-copy { min-width: 0; }
.skill-label { display: block; color: var(--site-text); font-size: .875rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.skill-detail { display: block; margin-top: 5px; color: var(--site-muted); font-size: .75rem; line-height: 1.5; }
/* Contact and login */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 65px; align-items: stretch; }
.contact-info { display: flex; flex-direction: column; min-width: 0; }
.contact-info h2 { font-size: 1.65rem; margin-bottom: 24px; }
.contact-coordinates { padding: 0; list-style: none; margin-bottom: 30px; color: var(--site-muted); font-size: .875rem; }
.contact-coordinates li { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.phone-reveal { padding: 0; border: 0; background: none; color: var(--site-accent); font: inherit; line-height: inherit; text-decoration: underline; text-underline-offset: 3px; }
.phone-reveal:hover { color: #ffe347; }
.phone-value { white-space: nowrap; }
.contact-coordinates i { color: var(--site-accent); width: 15px; text-align: center; flex-shrink: 0; }
.map-wrapper { position: relative; flex: 1; min-height: 290px; border: 1px solid var(--site-line); background: var(--site-surface); border-radius: var(--site-radius); overflow: hidden; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.portfolio-form .field { margin-bottom: 22px; }
.portfolio-form label { display: block; font-size: .8rem; margin-bottom: 9px; color: var(--site-text); }
.portfolio-site .form-control { display: block; width: 100%; font-weight: 400; appearance: none; background-clip: padding-box; border: 1px solid #42444b; border-radius: 5px; background: var(--site-surface); color: var(--site-text); font-size: .9rem; line-height: 1.65; padding: 11px 14px; transition: border-color .2s, box-shadow .2s; }
.portfolio-site .form-control:focus { background: var(--site-surface); color: var(--site-text); border-color: var(--site-accent); outline: 0; outline-offset: 0; box-shadow: none; }
.portfolio-site .form-control::placeholder { color: #989ba4; opacity: 1; }
.portfolio-site textarea { resize: vertical; min-height: 140px; }
.portfolio-form .field ul, .form-errors ul { color: #ffacac; list-style: none; padding: 0; margin: 8px 0 0; font-size: .8rem; }
.form-errors:empty { display: none; }
.portfolio-site .alert { position: relative; margin-bottom: 1rem; border: 1px solid transparent; border-radius: 6px; font-size: .875rem; padding: 14px 18px; }
.portfolio-site .alert-success { color: #bfefcc; background: #1b3021; border-color: #385f43; }
.portfolio-site .alert-danger { color: #ffc0c0; background: #351d22; border-color: #69404a; }
.login-form { max-width: 440px; }
/* Native tooltips share the site's colours, type and rounded corners. */
.site-tooltip { position: fixed; z-index: 2100; max-width: min(200px, calc(100vw - 16px)); padding: 6px 10px; border: 0; border-radius: 6px; background: #fff; color: #101113; font: 400 .8125rem/1.5 var(--font-body); text-align: center; overflow-wrap: anywhere; opacity: 0; box-shadow: 0 5px 16px #0004; transition: opacity .15s; }
.site-tooltip.is-visible { opacity: 1; }
.site-tooltip::after { content: ''; position: absolute; left: var(--tooltip-arrow-x, 50%); width: 7px; height: 7px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.site-tooltip[data-placement="top"]::after { bottom: -4px; }
.site-tooltip[data-placement="bottom"]::after { top: -4px; }
/* Shared footer, scroll and reveal effects */
.site-footer { border-top: 1px solid var(--site-line); background: var(--site-bg); }
.footer-inner { padding-top: 26px; padding-bottom: 26px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 30px; }
.portfolio-site .footer-name, .portfolio-site .footer-name:hover { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; line-height: 1; letter-spacing: -.065em; color: var(--site-text); white-space: nowrap; }
.footer-caption { color: var(--site-muted); font-size: .875rem; }
.back-to-top { position: fixed; bottom: 22px; right: 22px; z-index: 990; width: 42px; height: 42px; display: grid; place-items: center; color: #101113 !important; background: var(--site-accent); border-radius: 7px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, visibility .25s, transform .25s; }
.back-to-top.is-visible { visibility: visible; opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }
[data-reveal] { transition: opacity .6s var(--site-ease), transform .6s var(--site-ease); }
html.motion-ready [data-reveal]:not(.is-revealed) { opacity: 0; transform: translateY(15px); }
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); transition-delay: var(--reveal-delay, 0ms); }
@media (min-width: 1600px) { .hero-inner { min-height: 760px; } }
@media (max-width: 1199.98px) {
    .profile-layout, .contact-layout { gap: 38px; }
    .project-details { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 28px; }
    .skills-wrapper { grid-template-columns: 1fr; }
    .skills-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .projects-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-layout, .project-details { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .presentation { position: static; }
    .presentation-text { max-width: 75ch; }
    .hero-inner { min-height: 610px; }
    .stack-inner { gap: 15px; font-size: .8rem; flex-wrap: wrap; justify-content: center; }
    .stack-inner > .mono { width: 100%; text-align: center; }
    .contact-layout { gap: 32px; }
}
@media (max-width: 767.98px) {
    :root { --site-header-height: 76px; }
    .page-heading { margin-bottom: 32px; }
    .site-nav { padding-top: 13px; padding-bottom: 13px; justify-content: space-between; }

    .site-logo img { width: 36px; height: 40px; }
    .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; background: var(--site-surface); border: 1px solid var(--site-line); border-radius: 8px; }
    .menu-toggle span { width: 19px; height: 2px; background: var(--site-text); transition: transform .25s, opacity .2s; }
    .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
    .site-menu { position: absolute; top: calc(100% + 1px); left: 12px; right: 12px; padding: 14px; max-height: calc(100svh - var(--site-header-height) - 16px); overflow-y: auto; overscroll-behavior: contain; margin: 0; border: 1px solid var(--site-line); border-top: 0; border-radius: 0 0 10px 10px; background: #151618; box-shadow: 0 16px 30px #0005; }
    .site-menu ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .site-menu a { width: 100%; min-height: 46px; }
    .site-menu a.social-link { width: 100%; }
    /* The menu stays usable without JavaScript. It collapses after successful initialization. */
    .portfolio-site:not(.navigation-ready) .site-nav { flex-wrap: wrap; }
    .portfolio-site:not(.navigation-ready) .menu-toggle { display: none; }
    .portfolio-site:not(.navigation-ready) .site-menu { position: static; width: 100%; box-shadow: none; border: 0; }
    .navigation-ready .site-menu { visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .22s, transform .22s, visibility .22s; }
    .navigation-ready .site-menu.is-open { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
    .hero-inner { min-height: 590px; }
    .hero-content { padding: 55px 0; }
    .portfolio-site .hero-title { font-size: clamp(3.4rem, 12vw, 5.6rem); }
    .hero-role { margin-top: 25px; font-size: .95rem; }
    .hero-bottom { justify-content: center; }
    .hero-bottom > span { display: none; }
    .section-space { padding-top: 42px; padding-bottom: 50px; }
    .section-heading { align-items: start; flex-wrap: wrap; gap: 16px; }
    .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .contact-info { order: 2; }
    .contact-form { order: 1; }
    .portfolio-site .form-control { font-size: 1rem; }
    .skills-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-caption { display: none; }
    .back-to-top { bottom: 15px; right: 15px; }
}
@media (max-width: 575.98px) {
    .portfolio-site { font-size: .95rem; }
    .projects-list { grid-template-columns: minmax(0, 1fr); row-gap: 30px; }
    .project-thumbnail { aspect-ratio: 100 / 51; }
    .page-heading h1 { font-size: 2.65rem; }
    .hero-inner { min-height: 550px; padding-top: 22px; }
    .portfolio-site .hero-title { font-size: clamp(3.2rem, 12vw, 4.5rem); }
    .hero-role { font-size: .85rem; }
    .hero-role > span:first-child { padding: 0 4px; }
    .stack-inner { gap: 9px 13px; font-size: .75rem; padding-top: 20px; padding-bottom: 20px; }
    .stack-inner > .mono { margin-bottom: 3px; }
    .section-heading { flex-direction: column; }
    .skills-group { padding: 18px 14px; }
    .skills-group-heading { gap: 10px; padding-bottom: 16px; margin-bottom: 16px; }
    .portfolio-site .skills-group-heading h3 { font-size: 1.1rem; }
    .skills-list { gap: 10px; }
    .skill-card { flex-direction: column; justify-content: flex-start; gap: 12px; min-height: 145px; padding: 16px 10px; text-align: center; }
    .skill-label { font-size: .825rem; }
    .skill-detail { font-size: .75rem; }
    .panel-body { padding: 16px; }
    .panel-header, .panel-header-school { padding: 16px; }
    .project-gallery .carousel-control-prev, .project-gallery .carousel-control-next { width: 44px; }
    .footer-inner { padding-right: 60px; gap: 12px; }
    .portfolio-site .footer-name, .portfolio-site .footer-name:hover { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .portfolio-site *, .portfolio-site *::before, .portfolio-site *::after { animation: none !important; transition: none !important; }
    html.motion-ready [data-reveal]:not(.is-revealed) { opacity: 1; transform: none; }
    .hero-facets { transform: none; }
    .hero-letter:hover { transform: none; }
}
