.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.05rem;
  transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--accent); transform: rotate(-8deg); }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: .34rem .85rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .78rem; font-weight: 600;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.chip.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); color: var(--accent-strong); }
.toggle, .filter { display: flex; flex-wrap: wrap; gap: .45rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; padding: .65rem 1.05rem; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 650; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 22%, transparent); transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn.ghost { color: var(--text); background: transparent; border-color: var(--border); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-strong); box-shadow: none; }
.stats div { padding: 1.15rem; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: transform .2s, border-color .2s; }
.stats div:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }
.stats strong { display: block; color: var(--text); font-size: 1.7rem; line-height: 1.2; letter-spacing: -.05em; }
.stats span { color: var(--muted); font-size: .72rem; }
.job, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem 1.5rem; box-shadow: 0 12px 38px rgba(28, 45, 75, .045); }
.meta { color: var(--muted); margin: .3rem 0 0; font-size: .85rem; }
.card p { margin: .4rem 0 0; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.2rem 0; border-bottom: 1px solid var(--border); }
.tab { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: .6rem .85rem; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .83rem; }
.tab em { display: block; font-style: normal; font-size: .72rem; color: var(--accent); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 650; }
.panel { display: none; }
.panel.active { display: block; animation: fade .3s ease; }
.proj-title { font-weight: 650; margin: 0 0 .65rem; font-size: .9rem; }
.bullets { list-style: none; }
.bullets li { position: relative; padding-left: 1.15rem; margin-bottom: .65rem; color: var(--muted); font-size: .9rem; }
.bullets li::before { content: ""; position: absolute; left: 0; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.skills { margin: 0; display: grid; gap: .65rem; }
.skill-row { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: .9rem 1rem; }
.skill-row.hidden { display: none; }
.skill-row dt { font-weight: 700; margin-bottom: .5rem; font-size: .9rem; }
.skill-row dd { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { background: var(--accent-soft); color: var(--accent-strong); border-radius: 7px; padding: .2rem .58rem; font-size: .78rem; }
.cta { display: flex; flex-wrap: wrap; gap: .65rem; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s, transform .55s; }
.reveal.visible { opacity: 1; transform: none; }
[hidden] { display: none !important; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* CSS-only backend architecture illustration */
.hero-art {
  --pointer-x: 0deg;
  --pointer-y: 0deg;
  position: relative; min-width: 0; height: 500px; perspective: 1050px; isolation: isolate;
}
.hero-art::before { content: ""; position: absolute; z-index: -2; inset: 9% 2% 6%; border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 50%; transform: rotate(-21deg); }
.art-halo { position: absolute; z-index: -2; top: 9%; left: 13%; width: 74%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent-soft) 90%, transparent), color-mix(in srgb, var(--accent-soft) 28%, transparent) 54%, transparent 72%); }
.art-grid { position: absolute; z-index: -1; inset: 8% 0 4%; opacity: .35; background-image: linear-gradient(color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px); background-size: 30px 30px; mask-image: radial-gradient(ellipse at center, #000 18%, transparent 74%); transform: perspective(420px) rotateX(59deg) scale(1.12); transform-origin: center 68%; }
.hero-object { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--pointer-y)) rotateY(var(--pointer-x)); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.orbit { position: absolute; top: 47%; left: 50%; width: 75%; height: 34%; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 50%; transform-style: preserve-3d; }
.orbit-one { transform: translate(-50%, -50%) rotate(-27deg) rotateX(57deg); }
.orbit-two { width: 66%; height: 53%; border-color: color-mix(in srgb, var(--accent) 13%, transparent); transform: translate(-50%, -50%) rotate(54deg) rotateX(63deg); }
.orbit-one::before, .orbit-two::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent); }
.orbit-one::before { top: 14%; left: 16%; }
.orbit-two::after { bottom: 11%; right: 20%; background: #67b8aa; box-shadow: 0 0 14px rgba(103,184,170,.45); }
.art-shadow { position: absolute; top: 61%; left: 28%; width: 44%; height: 18%; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); filter: blur(25px); transform: rotate(-20deg) translateZ(-80px); }
.cube-wrap { position: absolute; z-index: 4; top: 46%; left: 50%; width: 150px; height: 150px; transform: translate(-50%, -50%) translateZ(70px); transform-style: preserve-3d; animation: cube-hover 6.5s ease-in-out infinite; }
.engine-cube { position: absolute; inset: 0; transform-style: preserve-3d; animation: cube-turn 30s linear infinite; }
.cube-face { position: absolute; display: flex; align-items: center; justify-content: center; width: 136px; height: 136px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); border-radius: 20px; backface-visibility: hidden; box-shadow: inset 0 0 35px rgba(255,255,255,.04), 0 16px 32px rgba(9,22,46,.12); }
.cube-front { flex-direction: column; gap: 4px; color: #f5f8ff; background: linear-gradient(145deg, #335bbd, #17294f 70%); transform: translateZ(68px); }
.cube-symbol { font-size: 2rem; line-height: 1; font-weight: 700; letter-spacing: -.08em; color: #a9c1ff; }
.cube-label { font-size: .58rem; line-height: 1.3; text-align: center; letter-spacing: .22em; }
.cube-label b { font-size: 1.12rem; letter-spacing: .05em; }
.cube-back { color: #dfe9ff; background: linear-gradient(145deg, #1a2c4c, #101b30); transform: rotateY(180deg) translateZ(68px); }
.cube-back-mark { padding: .4rem .65rem; border: 1px solid rgba(169,193,255,.45); border-radius: 7px; font-size: .67rem; letter-spacing: .28em; }
.cube-right { gap: 8px; background: linear-gradient(145deg, #304b7e, #172847); transform: rotateY(90deg) translateZ(68px); }
.cube-node { width: 11px; height: 11px; border: 1px solid #a9c1ff; border-radius: 50%; box-shadow: 0 0 12px rgba(169,193,255,.5); }
.cube-left { color: #bfd0fa; background: linear-gradient(145deg, #182c4d, #0e192c); transform: rotateY(-90deg) translateZ(68px); }
.cube-left-mark { font-size: 4rem; font-weight: 700; letter-spacing: -.12em; }
.cube-top { flex-direction: column; gap: 8px; color: #dfe9ff; background: linear-gradient(145deg, #5677bd, #294576); transform: rotateX(90deg) translateZ(68px); font-size: .58rem; letter-spacing: .3em; }
.cube-top i { width: 34px; height: 1px; background: #a9c1ff; }
.cube-bottom { color: #dfe9ff; background: linear-gradient(145deg, #14223b, #0a1424); transform: rotateX(-90deg) translateZ(68px); }
.cube-bottom-mark { font-size: .56rem; letter-spacing: .32em; }
.architecture-card { position: absolute; z-index: 5; display: flex; align-items: center; gap: .7rem; min-width: 174px; padding: .72rem .85rem; border: 1px solid color-mix(in srgb, var(--border) 80%, white); border-radius: 13px; background: color-mix(in srgb, var(--surface) 91%, transparent); box-shadow: 0 16px 38px rgba(18, 33, 58, .1); backdrop-filter: blur(12px); transform-style: preserve-3d; }
.arch-api { top: 16%; left: 1%; transform: translateZ(95px) rotateY(8deg) rotateZ(-3deg); }
.arch-event { top: 38%; right: -1%; transform: translateZ(125px) rotateY(-8deg) rotateZ(3deg); }
.arch-data { bottom: 17%; left: 5%; transform: translateZ(70px) rotateY(8deg) rotateZ(2deg); }
.arch-icon { display: grid; place-items: center; width: 33px; height: 33px; flex: none; border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border)); border-radius: 10px; color: var(--accent-strong); background: var(--accent-soft); font-size: .57rem; font-weight: 800; letter-spacing: .03em; }
.arch-copy { display: grid; gap: .1rem; }
.arch-copy strong { color: var(--text); font-size: .69rem; font-weight: 700; line-height: 1.25; }
.arch-copy small { color: var(--muted); font-size: .61rem; line-height: 1.2; }
.arch-light { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #64b68d; box-shadow: 0 0 10px rgba(100,182,141,.5); }
.art-caption, .art-coordinates { position: absolute; z-index: 6; bottom: 5%; color: var(--muted); font-size: .54rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.art-caption { left: 2%; display: flex; align-items: center; gap: .55rem; }
.caption-line { display: block; width: 22px; height: 1px; background: var(--accent); }
.art-coordinates { right: 1%; text-align: right; line-height: 1.7; }
.art-coordinates span { opacity: .7; font-size: .46rem; }
@keyframes cube-hover { 0%, 100% { margin-top: 0; } 50% { margin-top: -12px; } }
@keyframes cube-turn { from { transform: rotateX(-13deg) rotateY(0) rotateZ(-3deg); } to { transform: rotateX(-13deg) rotateY(360deg) rotateZ(-3deg); } }
@media (max-width: 980px) {
  .hero-art { height: 430px; }
  .arch-api { left: -1%; }
  .arch-event { right: -2%; }
  .architecture-card { min-width: 158px; }
}
@media (max-width: 760px) {
  .hero-art { max-width: 510px; height: 420px; }
  .arch-api { top: 12%; left: 2%; }
  .arch-event { top: 37%; right: 0; }
  .arch-data { bottom: 13%; left: 3%; }
}
@media (max-width: 480px) {
  .hero-art { height: 355px; }
  .cube-wrap { top: 46%; width: 118px; height: 118px; }
  .cube-face { width: 108px; height: 108px; border-radius: 16px; }
  .cube-front { transform: translateZ(54px); }
  .cube-back { transform: rotateY(180deg) translateZ(54px); }
  .cube-right { transform: rotateY(90deg) translateZ(54px); }
  .cube-left { transform: rotateY(-90deg) translateZ(54px); }
  .cube-top { transform: rotateX(90deg) translateZ(54px); }
  .cube-bottom { transform: rotateX(-90deg) translateZ(54px); }
  .architecture-card { min-width: 142px; gap: .5rem; padding: .56rem .65rem; }
  .arch-icon { width: 28px; height: 28px; border-radius: 8px; }
  .arch-api { top: 11%; left: 0; }
  .arch-event { top: 39%; right: -1%; }
  .arch-data { bottom: 12%; left: 0; }
  .arch-copy strong { font-size: .63rem; }
  .arch-copy small { font-size: .56rem; }
  .art-caption, .art-coordinates { bottom: 3%; font-size: .43rem; }
  .art-coordinates span { font-size: .38rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cube-wrap, .engine-cube { animation: none; }
  .hero-object { transition: none; }
}
