:root {
  color-scheme: light;
  --bg: #f7f6f2; --text: #09090b; --surface: #efede7; --muted: #68655f;
  --line: rgba(9, 9, 11, .18); --blue: #5d5cff; --blue-dim: rgba(93, 92, 255, .08);
  --project-hover: #f3f5ff;
  --ink: var(--text); --paper: var(--bg); --paper-2: var(--surface);
  --hover-tint: rgba(9, 9, 11, .035);
  --fg: var(--text); --ln: var(--text);
  /* card palette — light mode */
  --card-bg: #ffffff;
  --card-stroke: rgba(9, 9, 11, 0.08);
  --card-shadow: 0 4px 24px -4px rgba(9, 9, 11, 0.04);
  --card-desc: rgba(9, 9, 11, 0.72);
  --card-shadow-hover: 0 16px 36px -10px rgba(0, 0, 0, 0.08);
  --card-border-hover: rgba(93, 92, 255, .45);
  --ac: #4342d6;
  --hero-kicker: var(--ac);
  --line-subtle: rgba(9, 9, 11, .08);
  --display: "Syne", sans-serif; --body: "Manrope", sans-serif; --mono: "DM Mono", monospace;
  --pad: clamp(1.25rem, 3.5vw, 3.5rem); --gutter: max(var(--pad), calc((100vw - 72rem) / 2)); --ease: cubic-bezier(.2, .75, .25, 1);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b; --text: #f2f0ea; --surface: #111114; --muted: #aaa7a0;
  --line: rgba(242, 240, 234, .18); --hover-tint: rgba(255, 255, 255, .035);
  --blue-dim: rgba(93, 92, 255, .13); --project-hover: rgba(93, 92, 255, .07);
  --fg: var(--text); --ln: var(--text);
  /* card palette — dark mode */
  --card-bg: #111116;
  --card-stroke: rgba(242, 240, 234, 0.09);
  --card-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.45);
  --card-desc: rgba(242, 240, 234, 0.78);
  --card-shadow-hover: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
  --card-border-hover: rgba(138, 146, 255, .45);
  --ac: #8a92ff;
  --hero-kicker: var(--ac);
  --line-subtle: rgba(242, 240, 234, .08);
}
/* tone-dark: only force the dark palette when the site is in dark mode.
   In light mode these sections fall through to the :root light variables. */
[data-theme="dark"] .tone-dark { --bg: #09090b; --text: #f2f0ea; --muted: #aaa7a0; --line: rgba(242, 240, 234, .18); --blue: #8a92ff; --blue-dim: rgba(138, 146, 255, .14); --panel: #101014; color: var(--text); }
.tone-dark { background: var(--bg); color: var(--text); }
.tone-soft { --soft: #efede7; }
[data-theme="dark"] .tone-soft { --soft: #121215; }
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; width: 100%; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: var(--body); font-size: 1rem; line-height: 1.5; }
html, body, .intro, .site-header, .hero, .projects, .about, .stack, .contact, .site-footer, .theme-toggle, .contact-channel, .contact-channel__icon, .stack__group li, .project, .project__description { transition-property: background-color, color, border-color, -webkit-text-stroke-color; transition-duration: 250ms; transition-timing-function: ease; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 2px; }
::selection { color: white; background: var(--blue); }
.skip-link { position: fixed; z-index: 1000; top: .75rem; left: .75rem; padding: .65rem 1rem; color: var(--bg); background: var(--text); transform: translateY(-150%); transition: transform .2s; }
.skip-link:focus { transform: none; }
.scroll-progress { position: fixed; z-index: 100; inset: 0 0 auto; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; width: 100%; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; }

.intro { display: none; }
.intro-enabled body { overflow: hidden; }
.intro-enabled .intro { position: fixed; z-index: 900; inset: 0; display: grid; overflow: hidden; padding: var(--pad); color: var(--text); background: var(--bg); cursor: wait; place-items: center; }
.intro-enabled .intro__content { width: min(100%, 80rem); opacity: 0; transform: translateY(1.5rem) scale(.98); }
.intro-enabled .intro__role { margin: 0 0 clamp(1.5rem, 3vh, 2.5rem); color: var(--ac); font: clamp(.65rem, .75vw, .75rem) var(--mono); letter-spacing: .1em; text-align: center; text-transform: uppercase; transition-property: opacity, transform; }
.intro-enabled .intro__name { width: 100%; margin: 0; color: var(--text); font: 600 clamp(3.5rem, 11vw, 9.5rem)/.82 var(--display); letter-spacing: -.08em; text-align: center; }
.intro-enabled .intro__name .hero__line { width: 100%; padding: .08em 0; overflow: visible; color: var(--text); -webkit-text-stroke: 0; }
.intro-enabled .intro__name .hero__line > span { opacity: 0; transform: translateY(1rem); }
.intro-enabled .intro__role { opacity: 0; transform: translateY(8px); }
.intro-enabled .hero__bottom { opacity: 0 !important; transform: translateY(1rem) !important; }
.intro-enabled .hero__role { opacity: 0 !important; transform: translateY(8px) !important; }
.intro-enabled .hero__role.intro-target { transform: none !important; transition: none !important; }
.intro-enabled .site-header, .intro-enabled main, .intro-enabled .site-footer { pointer-events: none; }

.site-header { color: var(--text); position: absolute; z-index: 50; top: 0; left: 0; display: grid; grid-template-columns: 1fr auto auto; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; width: 100%; padding: 1.4rem var(--gutter); }
.brand { display: inline-flex; align-items: center; width: fit-content; font: 600 1rem var(--display); letter-spacing: -.04em; }
.site-nav { display: flex; gap: clamp(1.8rem, 3.5vw, 4rem); align-items: center; }
.site-nav a { position: relative; font-size: .83rem; font-weight: 600; line-height: 1; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: -.35rem; left: 0; height: 1px; background: var(--blue); opacity: .2; transition: opacity .35s var(--ease); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { opacity: 1; }
.bottom-nav { display: none; }
.theme-toggle { display: grid; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: transparent; cursor: pointer; place-items: center; }
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--blue); border-color: var(--blue); }
.theme-toggle svg { grid-area: 1 / 1; width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: opacity 200ms ease; }
.theme-toggle__moon, [data-theme="dark"] .theme-toggle__sun { opacity: 0; }
[data-theme="dark"] .theme-toggle__moon { opacity: 1; }

.hero { position: relative; display: flex; background: var(--bg); min-height: min(86svh, 50rem); padding: 6.5rem var(--gutter) 3rem; flex-direction: column; justify-content: center; overflow: hidden; }
.hc, .hero__content { width: min(100%, 72rem); margin: 0 auto; display: flex; flex-direction: column; }
.hero__composition { position: relative; width: 100%; margin: clamp(1rem, 3vh, 2rem) 0; padding: clamp(1rem, 2vh, 1.75rem) 0 clamp(.5rem, 1.5vh, 1.25rem); }
.hero__role {
  margin: 0 0 clamp(1rem, 1.6vw, 1.5rem) 1.5%;
  color: var(--ac);
  font: clamp(.65rem, .75vw, .75rem) var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition-property: opacity, transform;
}
.hero__role.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  transition-property: opacity, transform;
}
.hero__role.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
#nmw { position: relative; width: 100%; --r: 85px; --x: 50%; --y: 50%; --fg: var(--text); --ln: var(--text); }
.hero h1 { position: relative; z-index: 2; margin: 0; font: 600 clamp(4.6rem, 10.6vw, 9.75rem)/.72 var(--display); letter-spacing: -.08em; }
.hero__name-layer { display: block; }
/* Camada 1 (base): texto com efeito de contorno / vazado */
.hero__name-layer--outline { position: relative; }
.hero__name-layer--outline .hero__line > span { color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: 1.5px var(--ln); }
/* Camada 2 (topo): texto preenchido sólido com máscara inversa */
.hero__name-layer--solid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle var(--r, 0px) at var(--x, 50%) var(--y, 50%), transparent 98%, black 100%);
  mask-image: radial-gradient(circle var(--r, 0px) at var(--x, 50%) var(--y, 50%), transparent 98%, black 100%);
  will-change: mask-image, -webkit-mask-image;
}
.hero__name-layer--solid .hero__line > span { color: var(--fg); -webkit-text-fill-color: var(--fg); -webkit-text-stroke: 0 transparent; }
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: block; }
.hero__line--one { width: 70%; padding-left: 1.5%; }
.hero__line--two { margin-top: clamp(1rem, 1.4vw, 1.5rem); padding: 0 .05em .12em 12%; }
.custom-cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html, body, a, button, input, select, textarea, summary, [role="button"], [tabindex] { cursor: none !important; }
  .custom-cursor { position: fixed; z-index: 1000; top: 0; left: 0; display: block; width: 32px; height: 32px; border: 1px solid var(--blue); border-color: color-mix(in srgb, var(--blue) 38%, transparent); border-radius: 50%; opacity: 0; pointer-events: none; will-change: transform, width, height, opacity; transition: width 280ms var(--ease), height 280ms var(--ease), opacity 180ms ease; }
  .custom-cursor::after { position: absolute; top: 50%; left: 50%; width: 9px; height: 10px; background: var(--blue); content: ""; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M2 1.5v10l2.6-2.5 2 4.2 1.8-.85-2-4.1H10L2 1.5Z' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M2 1.5v10l2.6-2.5 2 4.2 1.8-.85-2-4.1H10L2 1.5Z' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transform: translate(-50%, -50%); }
  .custom-cursor.is-visible { opacity: 1; }
  .custom-cursor.is-interactive { width: 40px; height: 40px; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .contact-title.is-cursor-active .contact-title__layer--solid, .contact__main h3.is-cursor-active .contact-title__layer--solid { -webkit-mask-image: radial-gradient(circle 56px at var(--cursor-x, 50%) var(--cursor-y, 50%), transparent 55px, #000 56px); mask-image: radial-gradient(circle 56px at var(--cursor-x, 50%) var(--cursor-y, 50%), transparent 55px, #000 56px); }
  .contact-title.is-cursor-active .contact-title__layer--outline, .contact__main h3.is-cursor-active .contact-title__layer--outline { opacity: 1; }
}
.hero__bottom { display: flex; justify-content: flex-end; width: min(100%, 72rem); margin: 0 auto; }
.hero__bottom > p { max-width: 24rem; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.4; letter-spacing: -.02em; }
.text-link { display: inline-flex; gap: .45rem; align-items: center; padding-bottom: .2rem; border-bottom: 1px solid var(--line); font: .72rem var(--mono); letter-spacing: .05em; text-transform: uppercase; transition: color .25s, border-color .25s; }
.text-link span { transition: transform .25s var(--ease); }
.text-link:hover { color: var(--blue); border-color: var(--blue); }
.text-link:hover span { transform: translate(.12rem, .12rem); }

.projects { padding: clamp(4.5rem, 6.5vw, 6.5rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem); color: var(--text); background: var(--bg); }
.section-heading { display: flex; max-width: 72rem; margin: 0 auto clamp(2.25rem, 3.5vw, 3.25rem); flex-direction: column; gap: .85rem; align-items: flex-start; }
.section-heading::after { width: 2.5rem; height: 2px; margin-top: .35rem; content: ""; visibility: hidden; }
.eyebrow { margin: 0; color: var(--muted); font: .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.section-heading .eyebrow { color: var(--blue); }
.section-heading h2 { position: relative; margin: 0; font: 500 clamp(3rem, 4.4vw, 4.5rem)/.92 var(--display); letter-spacing: -.06em; }
.section-heading h2::after { position: absolute; bottom: -1.2rem; left: 0; width: 2.5rem; height: 2px; background: var(--blue); content: ""; opacity: 1; transition: width 300ms var(--ease); }
.section-heading h2:hover::after { width: 100%; }
h2 em { color: var(--blue); font-style: normal; }
.project-list { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 2.5vw, 2.2rem); max-width: 1040px; margin-inline: auto; padding: 0; }
.project { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; padding: clamp(1.75rem, 2.5vw, 2.2rem); overflow: hidden; border-radius: 1.25rem; border: 1px solid var(--card-stroke); box-shadow: var(--card-shadow); color: var(--text); background: var(--card-bg); transition: background-color 280ms ease, border-color 280ms ease, transform 280ms cubic-bezier(.2, .75, .25, 1), box-shadow 280ms ease; }
.project:not(:has(.project__status)) { cursor: pointer; }
.project:not(:has(.project__status)) .project__link::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.project:not(:has(.project__status)) .project__header,
.project:not(:has(.project__status)) .project__title,
.project:not(:has(.project__status)) .project__body { pointer-events: none; }
.project:not(:has(.project__status)) .project__link { pointer-events: auto; }
.project__header { display: flex; justify-content: space-between; align-items: baseline; width: 100%; margin-bottom: 1.25rem; }
.project__index { display: block; font-family: var(--mono); font-size: .85rem; color: var(--blue); letter-spacing: .1em; margin: 0; }
.project__topline { display: flex; justify-content: flex-end; color: var(--blue); font: .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.project__title { margin: 0 0 1rem; font: 600 clamp(1.85rem, 2.4vw, 2.4rem)/1.05 var(--display); letter-spacing: -0.04em; color: var(--text); -webkit-text-fill-color: initial; -webkit-text-stroke: 0; }
.project__title span { display: block; color: var(--text); -webkit-text-fill-color: initial; -webkit-text-stroke: 0; }
.project__body { display: flex; flex-direction: column; flex: 1; width: 100%; margin: 0; }
.project__description { margin: 0 0 1.25rem; color: var(--card-desc); font-size: clamp(.92rem, 1.05vw, 1rem); line-height: 1.55; letter-spacing: -.015em; }
.project__meta { margin-top: auto; margin-bottom: 1.25rem; }
.project__tech { margin: 0; color: var(--blue); font: .72rem/1.55 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.project__action { margin-top: 0; }
.project__link { display: inline-flex; align-items: center; font-family: var(--body); font-size: .92rem; font-weight: 600; color: var(--blue); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid color-mix(in srgb, var(--blue) 35%, transparent); transition: border-color 200ms ease, color 200ms ease; }
.project:hover .project__link, .project__link:hover, .project__link:focus-visible { border-bottom-color: var(--blue); }
.project__status { font-size: .88rem; color: var(--muted); margin: 0; display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) {
  .project:hover { transform: translateY(-4px); background-color: color-mix(in srgb, var(--blue) 3.5%, var(--card-bg)); border-color: color-mix(in srgb, var(--blue) 35%, var(--card-stroke)); box-shadow: 0 16px 36px -12px rgba(93, 92, 255, 0.08); }
  [data-theme="dark"] .project:hover { background-color: color-mix(in srgb, var(--blue) 6%, var(--card-bg)); border-color: color-mix(in srgb, var(--blue) 45%, var(--card-stroke)); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.55); }
}

@media (max-width: 768px) {
  .project {
    transition: background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
  }
  .project.is-focused {
    transform: translateY(-2px);
    background-color: color-mix(in srgb, var(--blue) 3.5%, var(--card-bg));
    border-color: color-mix(in srgb, var(--blue) 40%, var(--card-stroke));
    box-shadow: 0 16px 36px -12px rgba(93, 92, 255, 0.12);
  }
  .project.is-focused .project__link {
    border-bottom-color: var(--blue);
  }
  [data-theme="dark"] .project.is-focused {
    background-color: color-mix(in srgb, var(--blue) 6%, var(--card-bg));
    border-color: color-mix(in srgb, var(--blue) 50%, var(--card-stroke));
    box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.55), 0 0 20px -4px rgba(93, 92, 255, 0.2);
  }
}
.project:focus-within { box-shadow: var(--card-shadow-hover); border-color: var(--card-border-hover); }

.about { padding: clamp(4.5rem, 6.5vw, 6.5rem) var(--gutter); background: var(--bg); }
.about__layout { display: grid; max-width: 72rem; margin: 0 auto; grid-template-columns: minmax(0, 1.2fr) minmax(19rem, .8fr); gap: clamp(3rem, 6vw, 6rem); align-items: start; }
.about__note { position: relative; padding-top: 0; }
.about__lead { max-width: 38rem; margin: 0; font-size: clamp(1.4rem, 2.2vw, 1.95rem); font-weight: 500; color: var(--text); line-height: 1.35; letter-spacing: -.03em; }
.about__sub { max-width: 38rem; margin: 1.25rem 0 0; font-size: 1.05rem; color: var(--muted); line-height: 1.6; letter-spacing: normal; }
.stack { padding: clamp(4.5rem, 6.5vw, 6.5rem) var(--gutter); overflow: hidden; color: var(--text); background: var(--bg); }
.tech-icon { display: grid; width: clamp(2.25rem, 3vw, 2.75rem); height: clamp(2.25rem, 3vw, 2.75rem); flex: 0 0 clamp(2.25rem, 3vw, 2.75rem); color: var(--text); place-items: center; transition: color .25s, transform .25s var(--ease), opacity .25s ease; }
.tech-icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.contact { max-width: none; margin: 0; padding: clamp(4rem, 6vw, 6rem) var(--gutter); color: var(--text); background: var(--bg); }
/* Two-column layout: left (headline) | right (links + CV) */
.contact__layout { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); max-width: 72rem; margin: 0 auto; }
.contact__left { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; min-width: 0; text-align: left; }
.contact__right { display: flex; flex-direction: column; gap: clamp(1.5rem, 3vw, 2rem); justify-content: flex-start; min-width: 0; }
.contact__main { min-width: 0; }
.contact__main h3, .contact-title { position: relative; margin: 0; font: 500 clamp(2.4rem, 4vw, 3.6rem)/1.05 var(--display); letter-spacing: -.04em; text-align: left; }
.contact__desc { margin: 1rem 0 0; color: var(--muted); font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.5; max-width: 28rem; }
.contact-title__layer, .contact-title__line { display: block; }
.contact-title__layer--solid { color: var(--text); }
.contact-title__layer--outline { position: absolute; inset: 0; color: transparent; opacity: 0; pointer-events: none; clip-path: circle(56px at var(--cursor-x, 50%) var(--cursor-y, 50%)); -webkit-text-stroke: 1.2px var(--text); transition: opacity .2s ease; }
.contact__links { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
.contact-channel { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 1.15rem; align-items: center; min-width: 0; width: 100%; transition: color .25s, transform .25s var(--ease); }
.contact-channel__icon { display: grid; width: 2rem; height: 2rem; padding: .28rem; margin-top: 0; color: var(--text); background: var(--blue-dim); border-radius: 7px; place-items: center; flex-shrink: 0; transition: color .25s, background .25s; }
.contact-channel__icon svg { width: 100%; height: 100%; fill: currentColor; }
.contact-channel:first-child .contact-channel__icon svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.contact-channel__copy { display: flex; min-width: 0; flex-direction: column; }
.contact-channel__copy small { margin-bottom: .3rem; color: var(--blue); font: .58rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.contact-channel__copy strong { overflow: hidden; font-size: clamp(.9rem, 1.1vw, 1.05rem); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.contact-channel:hover, .contact-channel:focus-visible { color: var(--text); }
.contact-channel:hover .contact-channel__icon, .contact-channel:focus-visible .contact-channel__icon { color: var(--blue); background: rgba(93, 92, 255, .16); }
.contact-channel__copy { transition: transform 250ms var(--ease); }
.contact-channel:hover .contact-channel__copy, .contact-channel:focus-visible .contact-channel__copy { transform: translateX(.18rem); }
.contact__cv { display: inline-flex; align-items: center; justify-content: center; width: fit-content; height: 44px; padding: 10px 22px; box-sizing: border-box; border: 1.5px solid #d4d4d8; border-radius: 12px; font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; color: #09090b; background-color: transparent; text-decoration: none; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.contact__cv:hover, .contact__cv:focus-visible { background-color: #09090b; border-color: #09090b; color: #ffffff; }
.contact__cv:active { transform: scale(0.98); }
[data-theme="dark"] .contact__cv { color: #f4f4f5; border-color: #3f3f46; background-color: transparent; }
[data-theme="dark"] .contact__cv:hover, [data-theme="dark"] .contact__cv:focus-visible { color: #09090b; border-color: #f4f4f5; background-color: #f4f4f5; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-top: 0; padding: 2rem var(--gutter); color: var(--muted); background: var(--bg); font: .58rem var(--mono); text-transform: uppercase; }
.site-footer p { margin: 0; }
.site-footer > * { opacity: .75; }
.site-footer a { color: var(--blue); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--blue); opacity: 1; }
.reveal { opacity: 0; transform: translateY(2.5rem); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.section-heading.reveal { opacity: 1; transform: none; }
.section-heading.reveal .eyebrow, .section-heading.reveal h2 { opacity: 0; transform: translateY(.75rem); transition: opacity 650ms var(--ease), transform 650ms var(--ease); }
.section-heading.reveal.is-visible .eyebrow, .section-heading.reveal.is-visible h2 { opacity: 1; transform: none; }
.section-heading.reveal.is-visible h2 { transition-delay: 90ms; }
.about__layout .reveal, .project-list .reveal, .stack__marquee.reveal, .contact__left .reveal, .contact__right .reveal { transition-delay: 140ms; }
@media (min-width: 768px) {
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project { min-height: 380px; }
}
.stack__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem clamp(2rem, 5vw, 5rem); width: 100%; max-width: 72rem; margin: 0 auto; }
.stack__label { margin: 0 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font: 500 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.stack__list { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.stack__list li { display: flex; gap: 1rem; align-items: center; color: var(--text); font-size: clamp(1.1rem, 1.5vw, 1.35rem); font-weight: 500; }
.stack__list .tech-icon { color: var(--muted); opacity: .8; transition: color .3s, opacity .3s, transform .3s var(--ease); }
.stack__list li:hover .tech-icon { color: var(--c); opacity: 1; transform: scale(1.08); }
.t-html { --c: #e34f26; } .t-css { --c: #1572b6; } .t-js { --c: #f7df1e; } .t-react { --c: #61dafb; } .t-git { --c: #f05032; } .t-docker { --c: #2496ed; } .t-tailwind { --c: #06b6d4; }

@media (max-width: 768px) {
  .stack__list li {
    filter: grayscale(1);
    opacity: 0.45;
    transition: filter 0.4s ease, opacity 0.4s ease;
  }
  .stack__list li .tech-icon {
    color: var(--muted);
    transition: color 0.4s ease;
  }
  .stack__col.is-active .stack__list li,
  .stack__list li.is-active {
    filter: grayscale(0);
    opacity: 1;
  }
  .stack__col.is-active .stack__list li .tech-icon,
  .stack__list li.is-active .tech-icon {
    color: var(--c);
  }
}

.about { padding-bottom: clamp(4rem, 5.5vw, 5.5rem); }
.facts { display: grid; margin: 0; padding-top: 0; }
.facts > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.25rem; align-items: baseline; padding: .85rem 0; border-top: 1px solid var(--line-subtle); }
.facts > div:first-child { border-top: none; padding-top: .15rem; }
.facts dt { margin: 0; color: var(--blue); font: .62rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.facts dd { margin: 0; font-size: 1.05rem; font-weight: 500; }
.facts__link { display: inline-block; color: var(--text); text-decoration: none; transition: transform 250ms var(--ease), color 250ms ease; will-change: transform; }
.facts__link:hover, .facts__link:focus-visible { transform: translateX(4px); color: var(--blue); }

.hero__role { margin-left: 1.5%; font-size: clamp(.72rem, .9vw, .86rem); }
.hero__bottom { align-items: flex-end; justify-content: space-between; gap: 2rem; padding-left: 1.5%; box-sizing: border-box; }
.hero__actions { display: inline-flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__cta { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 10px 22px; box-sizing: border-box; border-radius: 12px; font-size: 14px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; text-decoration: none; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.hero__cta:active { transform: scale(0.98); }
.hero__cta--primary { background-color: #09090b; color: #ffffff; border: 1.5px solid #09090b; }
.hero__cta--primary:hover, .hero__cta--primary:focus-visible { background-color: #27272a; border-color: #27272a; color: #ffffff; }
.hero__cta--secondary { background-color: transparent; color: #09090b; border: 1.5px solid #d4d4d8; }
.hero__cta--secondary:hover, .hero__cta--secondary:focus-visible { background-color: #09090b; border-color: #09090b; color: #ffffff; }
[data-theme="dark"] .hero__cta--primary { background-color: #f4f4f5; color: #09090b; border-color: #f4f4f5; }
[data-theme="dark"] .hero__cta--primary:hover, [data-theme="dark"] .hero__cta--primary:focus-visible { background-color: #e4e4e7; border-color: #e4e4e7; color: #09090b; }
[data-theme="dark"] .hero__cta--secondary { background-color: transparent; color: #f4f4f5; border-color: #3f3f46; }
[data-theme="dark"] .hero__cta--secondary:hover, [data-theme="dark"] .hero__cta--secondary:focus-visible { background-color: #f4f4f5; border-color: #f4f4f5; color: #09090b; }

@media (min-width: 901px) {
  /* Desktop: side-by-side two-column layout with vertical divider */
  .contact__layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: clamp(3rem, 6vw, 6rem); row-gap: 0; align-items: start; }
  .contact__left { justify-content: flex-start; padding-right: 0; padding-top: 0; }
  .contact__right { justify-content: flex-start; padding-left: clamp(2rem, 4vw, 4rem); border-left: 1px solid var(--line); }
  .contact__main h3, .contact-title { font-size: clamp(2.4rem, 4vw, 3.6rem); }
}

@media (max-width: 900px) {
  .hero__line--one { width: 82%; }
  .hero__line--two { padding-left: 5%; }
  .hero__role { margin-left: 0; }
  .hero__bottom { align-items: flex-start; flex-direction: column-reverse; padding-left: 0; margin-left: 0; width: 100%; }
  .hero__bottom > p { margin-left: 0; }
  .about__layout { grid-template-columns: 1fr; gap: 3rem; }
  .about__lead, .about__sub { max-width: 40rem; }
  .stack__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 110px;
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  }

  .intro-enabled .intro__name { font-size: clamp(2.3rem, 12.5vw, 3.8rem); letter-spacing: -.07em; }

  /* Compact Mobile Header */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem var(--gutter);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-subtle);
  }
  .brand { order: 1; }
  .theme-toggle { order: 2; margin-left: auto; }
  .site-header .site-nav { display: none !important; }
  .menu-toggle { display: none !important; }

  /* Floating Bottom Nav (Mobile <= 768px) */
  .bottom-nav {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 380px;
    height: 50px;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    text-align: center;
    padding: 4px;
    border-radius: 999px;
    background: rgba(26, 26, 26, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
  }
  [data-theme="dark"] .bottom-nav {
    background: rgba(18, 18, 20, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
  .bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 6px;
    border-radius: 999px;
    font-family: var(--body);
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav a:hover,
  .bottom-nav a:focus-visible {
    color: rgba(255, 255, 255, 0.95);
  }
  .bottom-nav a:active,
  .bottom-nav a.is-active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.14);
  }

  /* Hero Section Mobile */
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 90px);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    box-sizing: border-box;
    overflow: hidden;
  }
  .hc, .hero__content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .hero__composition {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    transform: none;
    overflow: hidden;
  }
  .hero__role {
    margin: 0 0 12px 0;
    font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  }
  .hero h1 {
    font-size: clamp(2.15rem, 12vw, 3.6rem);
    line-height: .82;
    letter-spacing: -.06em;
    word-break: normal;
    overflow-wrap: normal;
  }
  .hero__line--one { width: 100%; padding-left: 0; }
  .hero__line--two { width: 100%; margin-top: clamp(0.2rem, 1.2vw, 0.5rem); padding: 0; }
  .hero__bottom {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    margin-top: 26px;
    padding: 0;
    width: 100%;
    gap: 24px;
  }
  .hero__bottom > p {
    max-width: 24rem;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .hero__actions {
    width: 100%;
  }

  .section-heading { gap: .7rem; margin-bottom: 2.2rem; }
  .section-heading h2 { font-size: clamp(2.5rem, 12vw, 3.8rem); }
  .project { min-height: 0; padding: clamp(1.6rem, 5vw, 2.2rem) clamp(1.2rem, 3.5vw, 1.6rem); }
  .about { padding-top: 4rem; padding-bottom: 4rem; }
  .about__layout { gap: 2.5rem; }
  .stack__marquee { gap: 1.75rem; }
  .stack__group { gap: 2.5rem; padding: 0 1.25rem; }
  .stack__group li { gap: .7rem; font-size: .95rem; }
  .tech-icon { width: 1.8rem; height: 1.8rem; flex-basis: 1.8rem; }
  .contact { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .contact__layout { gap: 2.5rem; }
  .contact__main h3, .contact-title { font-size: clamp(2rem, 8.5vw, 2.8rem); }
  .contact__right { border-left: none; padding-left: 0; }
  .contact__links { gap: 1.5rem; }
  .site-footer { display: flex; flex-direction: column-reverse; gap: 1rem; align-items: flex-start; margin-top: 1.5rem; padding: 1.5rem var(--pad); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(2rem, 11.5vw, 2.85rem); line-height: .84; letter-spacing: -.06em; }
  .hero__line--one, .hero__line--two { width: 100%; padding-left: 0; padding-right: 0; margin-left: 0; }
  .intro-enabled .intro__name { font-size: clamp(2rem, 11.5vw, 2.85rem); }
  .hero__actions { flex-direction: column; width: 100%; align-items: stretch; }
  .hero__cta { width: 100%; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: clamp(1.75rem, 10.8vw, 2.2rem); }
  .intro-enabled .intro__name { font-size: clamp(1.75rem, 10.8vw, 2.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .section-heading.reveal .eyebrow, .section-heading.reveal h2 { opacity: 1; transform: none; }
  .intro { display: none !important; }
  .stack__marquee, .stack__row { overflow: hidden; }
  .stack__track { animation: none; transform: none; }
  .stack__track .stack__group[aria-hidden="true"] { display: none; }
  .stack__track { width: 100%; }
  .stack__group { width: 100%; flex-wrap: wrap; justify-content: center; }
  .stack__list li { filter: grayscale(0) !important; opacity: 1 !important; transition: none !important; }
  .stack__list li .tech-icon { color: var(--c) !important; transition: none !important; }
  .hero__name-layer--solid { -webkit-mask-image: none !important; mask-image: none !important; }
}

.t-vue { --c: #42b883; } .t-github { --c: var(--text); }
