/* Portfolio shell. Existing app showcase palettes and phone layouts stay intact. */
:root {
  --page-paper: #fafaf8;
  --page-panel: #ffffff;
  --page-line: rgba(0, 23, 74, .11);
  --page-muted: #5f6878;
}
html.dark {
  --page-paper: #111315;
  --page-panel: #191c20;
  --page-line: rgba(180, 197, 255, .14);
  --page-muted: #aab4c4;
}
body.bg-surface { background: var(--page-paper); -webkit-font-smoothing: antialiased; }
/* Page transitions: a soft arrival, and a short fade out before leaving for another page on the site. */
@keyframes page-enter { from { opacity: 0; } to { opacity: 1; } }
body { animation: page-enter .5s cubic-bezier(.22, 1, .36, 1) both; }
body.is-leaving { animation: none; opacity: 0; transition: opacity .26s ease; }
section[id], [id^="work-"] { scroll-margin-top: 100px; }
a:focus-visible, button:focus-visible { outline: 3px solid #728bd2; outline-offset: 5px; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--primary); color: var(--on-primary); border-radius: 12px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.glass-nav { background: color-mix(in srgb, var(--page-paper) 88%, transparent); border-color: var(--page-line); }
.glass-nav nav { height: 76px; }
.hero-section { position: relative; padding-top: 116px; padding-bottom: 64px; }
.hero-section > div, #about > div, #skills > div, .highlights-section .highlights-grid { max-width: 1216px; }
.hero-section::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 80% 35%, rgba(159, 183, 215, .15), transparent 55%); pointer-events: none; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--page-muted); font-size: 11px; letter-spacing: .17em; text-transform: uppercase; font-weight: 600; }
.hero-section h1 { font-size: clamp(64px, 7.5vw, 102px); line-height: .98; letter-spacing: -.065em; }
.hero-description { font-size: clamp(18px, 1.6vw, 23px); line-height: 1.6; max-width: 470px; font-weight: 400; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; color: var(--page-muted); font-size: 12px; }
.hero-meta .material-symbols-outlined { font-size: 16px; }
.hero-meta .meta-divider { margin: 0 6px; color: var(--outline-variant); }
.hero-workbench { position: relative; padding: 0; }
.workbench-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.workbench-heading h2 { font-family: Manrope, sans-serif; font-size: 21px; font-weight: 700; letter-spacing: -.035em; color: var(--primary); }
.workbench-count { font-size: 12px; color: var(--page-muted); white-space: nowrap; }
.workbench-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.workbench-app { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 26px; min-height: 236px; border-radius: 22px; transition: transform .25s ease, box-shadow .25s ease; }
.workbench-app:hover { transform: translateY(-4px); box-shadow: 0 16px 30px #0000000f; }
.workbench-icon { position: relative; display: block; width: 80px; height: 80px; margin-bottom: 18px; overflow: hidden; flex-shrink: 0; }
.workbench-icon img { position: absolute; width: 144px; height: 144px; max-width: none; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.workbench-arrow { position: absolute; top: 24px; right: 24px; font-size: 22px; opacity: .6; transition: transform .25s ease, opacity .25s ease; }
.workbench-app:hover .workbench-arrow { transform: translate(3px, -3px); opacity: 1; }
.workbench-tag { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; opacity: .6; }
.workbench-tag + strong { margin-top: -4px; }
.workbench-app strong { font-family: Manrope, sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -.035em; line-height: 1.3; }
.workbench-app small { font-size: 14px; line-height: 1.5; opacity: .8; }
.workbench-expenses { background: #143323; color: #effaf2; }
.workbench-birthday { background: #f8ebdf; color: #46352d; }
.workbench-inizio { grid-column: 1 / -1; min-height: 138px; background: #eee4d7; color: #241c14; flex-direction: row; justify-content: space-between; align-items: center; }
.workbench-inizio .workbench-tag { display: block; margin-bottom: 8px; }
.workbench-inizio strong { display: block; font-family: Georgia, serif; font-size: 42px; letter-spacing: .06em; font-weight: 400; margin-bottom: 6px; }
.workbench-inizio small { font-size: 14px; }
.workbench-inizio > span { font-size: 24px; opacity: .75; }
.highlights-section { background: transparent; padding: 0 32px; }
.highlights-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--page-line); border-bottom: 1px solid var(--page-line); }
.highlight-item { padding: 28px 24px; }
.highlight-item:first-child { padding-left: 0; }
.highlight-item + .highlight-item { border-left: 1px solid var(--page-line); }
.highlight-item strong { display: block; font-family: Manrope, sans-serif; color: var(--primary); font-size: 17px; letter-spacing: -.025em; }
.highlight-item span { display: block; margin-top: 7px; font-size: 12px; color: var(--page-muted); line-height: 1.5; }
#about, #skills { padding-top: 88px; padding-bottom: 88px; }
#about h2, #skills h2, #contact h2 { letter-spacing: -.045em; }
#about .bg-surface-container:not(.stat-card-active), #about .bg-surface-container-low { background: var(--page-panel); border: 1px solid var(--page-line); }
#about .bg-surface-container-low { border-radius: 20px; }
/* Expertise & Tools — three cards, one per discipline, chips instead of bullet lists. */
.skills-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px; margin-bottom: 34px; }
.skills-note { max-width: 360px; font-size: 14px; line-height: 1.7; color: var(--page-muted); text-align: right; }
.expertise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.expertise-group { --accent: var(--primary); position: relative; display: flex; flex-direction: column; gap: 22px; padding: 28px 26px 26px; border-radius: 22px; background: var(--page-panel); border: 1px solid var(--page-line); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.expertise-group::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--accent), transparent 78%); opacity: .55; }
.expertise-group:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(16, 31, 56, .09); border-color: color-mix(in srgb, var(--accent) 26%, var(--page-line)); }
.expertise-group--frameworks { --accent: #2f7d55; }
.expertise-group--tools { --accent: #96764f; }
.expertise-index { position: absolute; top: 24px; right: 24px; font-family: Manrope, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--page-muted); opacity: .55; }
.expertise-heading { display: flex; align-items: center; gap: 14px; }
.expertise-icon { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 15px; background: color-mix(in srgb, var(--accent) 11%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-size: 23px; flex-shrink: 0; }
.expertise-heading h3 { font-family: Manrope, sans-serif; font-size: 19px; font-weight: 700; letter-spacing: -.03em; color: var(--primary); }
.expertise-heading p { margin-top: 3px; font-size: 12px; color: var(--page-muted); }
.expertise-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.expertise-list li { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--page-line); background: color-mix(in srgb, var(--accent) 4%, transparent); font-size: 13.5px; font-weight: 500; line-height: 1.25; color: var(--on-surface-variant); transition: border-color .2s ease, color .2s ease, background .2s ease; }
.expertise-group:hover .expertise-list li { border-color: color-mix(in srgb, var(--accent) 20%, var(--page-line)); }
html.dark .expertise-group:hover { box-shadow: 0 18px 34px rgba(0, 0, 0, .3); }
html.dark .expertise-group--frameworks { --accent: #86d6a9; }
html.dark .expertise-group--tools { --accent: #d9bc92; }
.projects-wrapper { background: transparent; }
.projects-wrapper .project-mini-card { background: var(--page-panel); box-shadow: none; border: 1px solid var(--page-line); border-radius: 20px; height: 100%; }
.project-mini-card-wrap:hover .project-mini-card { transform: translateY(-4px); box-shadow: 0 16px 32px var(--shadow-color); }
.project-site-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; margin-bottom: 4px; border: 1px solid currentColor; border-radius: 999px; font-size: 14px; font-weight: 700; transition: background .2s, transform .2s; }
.project-site-link:hover { transform: translateY(-2px); }
.project-section-dark .project-site-link { color: #e1f5e9; border-color: #ffffff50; }
.project-section-dark .project-site-link:hover { background: #ffffff15; }
.project-section-light .project-site-link { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.project-section-light .project-site-link:hover { background: #ffffff20; }
.project-section-inizio { --inizio-text: #241c14; --inizio-muted: #5e574d; --inizio-accent: #756047; background: linear-gradient(135deg, #faf7f1, #eee4d7); color: var(--inizio-text); border: 1px solid #e7d9c6; border-radius: 24px; overflow: hidden; }
.inizio-badges, .inizio-stack { display: flex; flex-wrap: wrap; gap: 8px; }
/* Slow botanical drift, contained behind the project content. */
.project-section-inizio { position: relative; isolation: isolate; --particle-opacity: .3; }
.inizio-content { position: relative; z-index: 1; }
.inizio-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; user-select: none; z-index: 0; }
.inizio-particle { position: absolute; left: var(--x); top: -48px; height: calc(100% + 96px); width: 32px; opacity: 0; animation: inizio-fall var(--duration) linear var(--delay) infinite; }
.inizio-particle > span { display: block; font-size: 25px; line-height: 1; filter: saturate(.55); animation: inizio-sway 7s ease-in-out var(--delay) infinite alternate; }
.inizio-particle:nth-child(3n) > span { font-size: 20px; animation-duration: 9s; }
.inizio-particle:nth-child(even) > span { animation-direction: alternate-reverse; }
@keyframes inizio-fall {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12%, 85% { opacity: var(--particle-opacity); }
  100% { transform: translate3d(0, 100%, 0); opacity: 0; }
}
@keyframes inizio-sway {
  from { transform: translateX(-14px) rotate(-18deg); }
  to { transform: translateX(14px) rotate(18deg); }
}
html.dark .project-section-inizio { --particle-opacity: .4; }
@media (max-width: 639px) {
  .inizio-particle:nth-child(even) { display: none; }
  .inizio-particle > span { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .inizio-particles { display: none; }
}
.inizio-badges span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; border-radius: 99px; padding: 5px 12px; background: #e3d8c7; }
.inizio-badges .inizio-live { background: #dfe8db; color: #35513a; }
.inizio-title { font-family: Georgia, serif; font-size: 42px; letter-spacing: .06em; line-height: 1.1; }
.inizio-subtitle { color: var(--inizio-muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-top: 8px; }
.inizio-label { color: var(--inizio-accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.inizio-copy { color: var(--inizio-muted); line-height: 1.7; font-size: 17px; }
.inizio-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; font-size: 14px; }
.inizio-features li { display: flex; align-items: flex-start; gap: 8px; }
.inizio-features .material-symbols-outlined { font-size: 17px; color: var(--inizio-accent); margin-top: 2px; }
.inizio-why { background: #fffdfc80; border-left: 4px solid #8f7d62; padding: 16px; border-radius: 12px; }
.inizio-why p { color: var(--inizio-muted); font-size: 14px; line-height: 1.65; margin-top: 6px; }
.inizio-visit { background: #241c14; color: #faf7f1; border-color: #241c14; }
.inizio-visit:hover { background: #44382b; }
.inizio-stack span { padding: 5px 10px; background: #e3d8c780; border-radius: 8px; font-size: 11px; font-weight: 600; }
/* Owner-supplied device mockups, layered without altering the source images. */
.inizio-visual { position: relative; aspect-ratio: 1; width: 100%; isolation: isolate; }
.inizio-visual::before { content: ""; position: absolute; inset: 8% -2% 0; border-radius: 50%; background: radial-gradient(ellipse, #8f7d622b, transparent 68%); z-index: -1; }
.inizio-visual img { position: absolute; height: auto; filter: drop-shadow(0 20px 24px #241c1426); }
.inizio-visual .inizio-macbook { width: 106%; max-width: none; left: -5%; top: 20%; }
.inizio-visual .inizio-iphone { width: 30%; right: 0; bottom: 4%; }
html.dark .project-section-inizio { --inizio-text: #f3ebdd; --inizio-muted: #d0c4b4; --inizio-accent: #d1b99a; background: linear-gradient(135deg, #29231d, #342c24); border-color: #514333; }
html.dark .inizio-badges span, html.dark .inizio-stack span { background: #493d30; }
html.dark .inizio-badges .inizio-live { background: #314638; color: #c2dec4; }
html.dark .inizio-why { background: #ffffff06; }
html.dark .inizio-visit { background: #e3d8c7; color: #241c14; }
#contact { padding-top: 24px; padding-bottom: 80px; background: transparent; }
.contact-card { position: relative; overflow: hidden; isolation: isolate; padding: 58px 52px 56px; border-radius: 30px; background: #101f38; color: #f4f6fc; }
.contact-orbits { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 96% 6%, #54789c30, transparent 62%); }
.contact-orbits span { position: absolute; width: 650px; height: 650px; right: -225px; top: -220px; border: 1px solid #d1dff214; border-radius: 50%; }
.contact-orbits span:nth-child(2) { width: 820px; height: 820px; top: -305px; right: -310px; }
.contact-orbits span:nth-child(3) { width: 990px; height: 990px; top: -390px; right: -395px; }
.contact-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 56px; }
#contact h2 { font-family: Manrope, sans-serif; font-size: clamp(38px, 5vw, 70px); font-weight: 600; line-height: 1.09; letter-spacing: -.06em; }
#contact h2 span { color: #b8cbdc; }
.contact-intro > p { margin-top: 24px; max-width: 520px; font-size: 17px; line-height: 1.75; color: #c4cede; }
.contact-mail { display: inline-flex; align-items: center; gap: 12px; margin-top: 30px; padding: 15px 26px 15px 20px; border-radius: 999px; background: #f4f6fc; color: #101f38; transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.contact-mail .material-symbols-outlined { font-size: 21px; }
.contact-mail-text { font-family: Manrope, sans-serif; font-size: clamp(15px, 1.5vw, 18px); font-weight: 700; letter-spacing: -.025em; }
.contact-mail:hover { background: #ffffff; transform: translateY(-2px); box-shadow: 0 14px 28px #040c1c59; }
.contact-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-channel { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 18px; border-radius: 18px; background: #ffffff0a; border: 1px solid #d1dff21f; transition: transform .25s ease, background .25s ease, border-color .25s ease; }
.contact-channel:hover { transform: translateY(-3px); background: #ffffff14; border-color: #d1dff23d; }
.contact-channel-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; background: #ffffff12; color: #dbe6f7; font-size: 20px; flex-shrink: 0; }
.contact-channel-text { display: flex; flex-direction: column; min-width: 0; }
.contact-channel-label { font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: #92a4bd; }
.contact-channel-value { font-family: Manrope, sans-serif; font-size: 15px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; }
.contact-channel-go { margin-left: auto; font-size: 18px; color: #9fb0c8; transition: transform .25s ease, color .25s ease; }
.contact-channel:hover .contact-channel-go { transform: translate(2px, -2px); color: #ffffff; }
html.dark .contact-card { background: #162337; border: 1px solid #cadcf01f; }
@media (max-width: 1100px) {
  .contact-main { grid-template-columns: 1fr; gap: 36px; }
  .contact-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .skills-head { grid-template-columns: 1fr; align-items: start; gap: 14px; }
  .skills-note { text-align: left; max-width: 540px; }
  .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .expertise-group--tools { grid-column: 1 / -1; }
  .contact-card { padding: 36px; }
}
@media (max-width: 639px) {
  .skills-head { margin-bottom: 26px; }
  .skills-note { font-size: 13.5px; }
  .expertise-grid { grid-template-columns: 1fr; gap: 14px; }
  .expertise-group { padding: 24px 20px; gap: 18px; border-radius: 20px; }
  .expertise-list li { padding: 7px 12px; font-size: 13px; }
  #contact { padding-top: 8px; padding-bottom: 48px; }
  .contact-card { padding: 34px 22px 32px; border-radius: 24px; }
  .contact-main { grid-template-columns: 1fr; gap: 28px; }
  .contact-intro > p { font-size: 15px; margin-top: 18px; }
  .contact-mail { margin-top: 24px; width: 100%; justify-content: center; padding: 14px 18px; }
  .contact-mail-text { font-size: 15px; }
  .contact-channels { grid-template-columns: 1fr; gap: 10px; }
  .contact-channel { padding: 14px 14px 14px 16px; border-radius: 16px; }
  .contact-orbits span { opacity: .6; }
}
footer { background: transparent !important; border-top: 1px solid var(--page-line); }
footer a { text-decoration: none !important; }
footer a:hover { text-decoration: underline !important; }
@media (max-width: 1023px) {
  .hero-section { padding-top: 108px; }
  .hero-workbench { max-width: 580px; margin-inline: auto; width: 100%; }
}
@media (max-width: 639px) {
  .glass-nav nav { height: 68px; }
  .hero-section { padding-top: 96px; padding-bottom: 40px; }
  .hero-section h1 { font-size: 66px; }
  .hero-workbench { padding: 0; }
  .workbench-heading { margin-bottom: 18px; }
  .workbench-heading h2 { font-size: 18px; }
  .workbench-count { font-size: 11px; }
  .workbench-tag { font-size: 9px; letter-spacing: .1em; }
  .workbench-app { padding: 16px; min-height: 222px; }
  .workbench-app strong { font-size: 16px; }
  .workbench-app small { font-size: 12px; }
  .workbench-arrow { top: 12px; right: 12px; font-size: 16px; }
  .workbench-inizio { min-height: 96px; }
  .workbench-inizio strong { font-size: 32px; }
  .workbench-inizio small { font-size: 12px; }
  .highlights-section { padding-inline: 20px; }
  .highlights-grid { grid-template-columns: 1fr 1fr; }
  .highlight-item, .highlight-item:first-child { padding: 20px 12px; }
  .highlight-item:nth-child(3) { border-left: 0; }
  .highlight-item:nth-child(n+3) { border-top: 1px solid var(--page-line); }
  .highlight-item strong { font-size: 15px; }
  #about, #skills { padding-top: 56px; padding-bottom: 56px; }
  .project-section-inizio { border-radius: 16px; }
  .inizio-features { grid-template-columns: 1fr; }
  .inizio-copy { font-size: 16px; }
  .inizio-visual { max-width: 440px; margin-inline: auto; }
}
@media (max-width: 359px) {
  .hero-workbench { padding: 0; }
  .workbench-grid { gap: 10px; }
  .workbench-app { padding: 12px; }
  .workbench-icon { width: 70px; height: 70px; }
  .workbench-icon img { width: 126px; height: 126px; }
  .workbench-app:not(.workbench-inizio) strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-animate, .hero-photo-animate { opacity: 1; transform: none; }
  body, body.is-leaving { opacity: 1; }
}
