/* ============================================
   JAKUB HUL — PREMIUM PORTFOLIO
   Design System: Vision Pro / Linear / Stripe
   ============================================ */

/* ---------- SCROLL PROGRESS BAR ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), hsl(290,80%,65%));
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 99997;
  pointer-events: none;
  transition: transform 0.05s linear;
  box-shadow: 0 0 8px 0 hsla(262,83%,58%,0.6);
}

/* ---------- CUSTOM CURSOR ---------- */
@media (hover: hover) and (pointer: fine) {
  *, *::before, *::after { cursor: none !important; }
}

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease), opacity 0.2s ease, width 0.25s var(--ease-spring), height 0.25s var(--ease-spring), background 0.2s ease;
  will-change: transform;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.55);
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}

.cursor-ring.cursor-hover {
  width: 52px; height: 52px;
  border-color: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.8);
  background: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.06);
}

.cursor-ring.cursor-text {
  width: 72px; height: 72px;
  border-color: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.5);
  background: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.08);
}

.cursor-dot.cursor-click {
  transform: translate(-50%, -50%) scale(0.5);
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed !important;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  color: var(--accent);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  z-index: 999999;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease-spring), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  padding: 0;
}
.back-to-top.btt-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  box-shadow: 0 0 24px var(--accent-glow), var(--shadow-card-hover);
  color: var(--text-0);
}
.back-to-top svg {
  display: block;
  flex-shrink: 0;
}

/* ---------- CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--accent-border);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---------- DESIGN TOKENS ---------- */
:root {
  --accent-h: 262;
  --accent-s: 83%;
  --accent-l: 58%;
  --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-soft: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.12);
  --accent-glow: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.25);
  --accent-border: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.3);

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.35s var(--ease);
  --max-w: 1120px;
  --nav-h: 64px;
}

/* ---- DARK ---- */
[data-theme="dark"] {
  --bg-0: #08080c;
  --bg-1: #0e0e14;
  --bg-2: #15151e;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.055);
  --surface-border: rgba(255,255,255,0.06);
  --surface-border-hover: rgba(255,255,255,0.12);
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.07);
  --glass-highlight: rgba(255,255,255,0.08);
  --text-0: #f4f4f7;
  --text-1: #b0b0bf;
  --text-2: #6e6e80;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-card-hover: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
  --shadow-glow: 0 0 60px -12px hsla(var(--accent-h),70%,50%,0.10);
  --divider: rgba(255,255,255,0.05);
}

/* ---- LIGHT ---- */
[data-theme="light"] {
  --bg-0: #f8f8fc;
  --bg-1: #f0f0f6;
  --bg-2: #e8e8f0;
  --surface: rgba(255,255,255,0.65);
  --surface-hover: rgba(255,255,255,0.85);
  --surface-border: rgba(0,0,0,0.06);
  --surface-border-hover: rgba(0,0,0,0.1);
  --glass: rgba(255,255,255,0.5);
  --glass-border: rgba(0,0,0,0.07);
  --glass-highlight: rgba(255,255,255,0.9);
  --text-0: #111118;
  --text-1: #52525b;
  --text-2: #a1a1aa;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 8px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 60px -12px hsla(var(--accent-h),70%,50%,0.06);
  --divider: rgba(0,0,0,0.06);
}

/* ---------- RESET ---------- */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--nav-h)+24px);}
body{
  font-family:var(--font);
  background:var(--bg-0);
  color:var(--text-0);
  line-height:1.7;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  transition:background .5s var(--ease), color .4s var(--ease), opacity .25s ease;
}
/* ---------- NOISE / GRAIN OVERLAY ---------- */
body::after{
  content:'';
  position:fixed;
  inset:0;
  z-index:99996;
  pointer-events:none;
  opacity:0.032;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat:repeat;
  background-size:300px 300px;
}
body.lang-switching{
  opacity:0;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
button{cursor:pointer;border:none;background:none;font:inherit;color:inherit;}
ul{list-style:none;}
input,textarea{font:inherit;color:inherit;}

/* ---------- UTILITIES ---------- */
.container{width:100%;max-width:var(--max-w);margin:0 auto;padding:0 24px;}

/* ---------- LANG SWITCH (segmented pill) ---------- */
.lang-switch{
  display:flex;
  align-items:center;
  position:relative;
  background:var(--surface);
  border:1px solid var(--surface-border);
  border-radius:100px;
  padding:3px;
  gap:0;
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  transition:border-color var(--transition);
}
.lang-switch:hover{
  border-color:var(--surface-border-hover);
}
.lang-opt{
  position:relative;
  z-index:1;
  padding:5px 14px;
  border-radius:100px;
  font-size:0.7rem;
  font-weight:700;
  letter-spacing:0.05em;
  color:var(--text-2);
  background:none;
  border:none;
  cursor:pointer;
  transition:color .25s ease;
  line-height:1;
}
.lang-opt.active{
  color:var(--accent);
}
.lang-opt:not(.active):hover{
  color:var(--text-0);
}
.lang-slider{
  position:absolute;
  top:3px;
  left:3px;
  height:calc(100% - 6px);
  border-radius:100px;
  background:var(--accent-soft);
  border:1px solid var(--accent-border);
  transition:transform .3s var(--ease-spring), width .3s var(--ease-spring);
  pointer-events:none;
}

/* ---------- GLASS PANEL (shared component) ---------- */
.glass-panel{
  background:var(--glass);
  backdrop-filter:blur(40px) saturate(1.5);
  -webkit-backdrop-filter:blur(40px) saturate(1.5);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-card);
  position:relative;
  overflow:hidden;
  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform .4s var(--ease);
}
.glass-panel::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(135deg,var(--glass-highlight) 0%,transparent 50%);
  opacity:0.5;
  pointer-events:none;
}
.glass-panel:hover{
  border-color:var(--surface-border-hover);
  box-shadow:var(--shadow-card-hover);
}

/* ---------- GLASS SHIMMER ---------- */
.glass-panel::after{
  content:'';
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  transition:opacity 0.5s var(--ease);
  background:conic-gradient(
    from var(--shimmer-angle, 180deg) at 50% 50%,
    transparent 0deg,
    hsla(262,80%,75%,0.18) 60deg,
    hsla(200,90%,75%,0.12) 120deg,
    hsla(320,80%,75%,0.15) 180deg,
    transparent 240deg
  );
  mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite:exclude;
  -webkit-mask-composite:xor;
  padding:1px;
}
.glass-panel:hover::after{
  opacity:1;
}
@media (prefers-reduced-motion: reduce){
  .glass-panel::after{ transition:none; }
}

/* ---------- AMBIENT BACKGROUND ---------- */
.bg-ambient{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}

.bg-blob{
  position:absolute;
  border-radius:50%;
  filter:blur(120px);
  opacity:0.35;
  will-change:transform;
}

[data-theme="dark"] .bg-blob--1{
  width:600px;height:600px;
  top:-15%;left:-10%;
  background:radial-gradient(circle,hsla(262,60%,30%,0.4),transparent 70%);
  animation:blobDrift1 25s ease-in-out infinite;
}
[data-theme="dark"] .bg-blob--2{
  width:500px;height:500px;
  bottom:-10%;right:-5%;
  background:radial-gradient(circle,hsla(220,60%,25%,0.35),transparent 70%);
  animation:blobDrift2 30s ease-in-out infinite;
}
[data-theme="dark"] .bg-blob--3{
  width:400px;height:400px;
  top:40%;left:50%;
  background:radial-gradient(circle,hsla(280,50%,25%,0.25),transparent 70%);
  animation:blobDrift3 22s ease-in-out infinite;
}

[data-theme="light"] .bg-blob--1{
  width:600px;height:600px;
  top:-15%;left:-10%;
  background:radial-gradient(circle,hsla(262,70%,80%,0.3),transparent 70%);
  animation:blobDrift1 25s ease-in-out infinite;
}
[data-theme="light"] .bg-blob--2{
  width:500px;height:500px;
  bottom:-10%;right:-5%;
  background:radial-gradient(circle,hsla(220,60%,80%,0.25),transparent 70%);
  animation:blobDrift2 30s ease-in-out infinite;
}
[data-theme="light"] .bg-blob--3{
  width:400px;height:400px;
  top:40%;left:50%;
  background:radial-gradient(circle,hsla(280,50%,85%,0.2),transparent 70%);
  animation:blobDrift3 22s ease-in-out infinite;
}

@keyframes blobDrift1{
  0%,100%{transform:translate(0,0) scale(1);}
  33%{transform:translate(80px,40px) scale(1.1);}
  66%{transform:translate(-40px,80px) scale(0.95);}
}
@keyframes blobDrift2{
  0%,100%{transform:translate(0,0) scale(1);}
  33%{transform:translate(-60px,-50px) scale(1.08);}
  66%{transform:translate(50px,-30px) scale(0.92);}
}
@keyframes blobDrift3{
  0%,100%{transform:translate(-50%,0) scale(1);}
  50%{transform:translate(-50%,-60px) scale(1.12);}
}

/* faint grid overlay */
.bg-grid{
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(var(--divider) 1px, transparent 1px),
    linear-gradient(90deg, var(--divider) 1px, transparent 1px);
  background-size:64px 64px;
  opacity:0.35;
  mask-image:radial-gradient(ellipse 60% 50% at 50% 50%,black,transparent);
  -webkit-mask-image:radial-gradient(ellipse 60% 50% at 50% 50%,black,transparent);
}

/* ---------- NAVBAR ---------- */
.navbar{
  position:fixed;
  top:12px;left:50%;
  transform:translateX(-50%);
  z-index:1000;
  width:calc(100% - 32px);
  max-width:var(--max-w);
  height:var(--nav-h);
  background:var(--glass);
  backdrop-filter:blur(40px) saturate(1.6);
  -webkit-backdrop-filter:blur(40px) saturate(1.6);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  transition:
    background .4s var(--ease),
    border-color .4s var(--ease),
    box-shadow .4s var(--ease);
}
.navbar.scrolled{
  box-shadow:var(--shadow-card);
  border-color:var(--surface-border-hover);
}

.nav-container{
  height:100%;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.nav-logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  font-size:0.95rem;
  letter-spacing:-0.02em;
}

.nav-logo-icon{
  width:32px;height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--radius-xs);
  background:var(--accent);
  color:#fff;
  font-size:0.72rem;
  font-weight:800;
  letter-spacing:0.04em;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:4px;
  position:relative;
}

.nav-links a{
  font-size:0.82rem;
  font-weight:500;
  color:var(--text-2);
  padding:8px 14px;
  border-radius:var(--radius-xs);
  transition:color var(--transition), background var(--transition);
  position:relative;
  z-index:1;
}
.nav-links a:hover,
.nav-links a.active{
  color:var(--text-0);
}

.nav-indicator{
  position:absolute;
  height:32px;
  background:var(--surface);
  border:1px solid var(--surface-border);
  border-radius:var(--radius-xs);
  z-index:0;
  transition:all .35s var(--ease-spring);
  pointer-events:none;
  opacity:0;
}
.nav-indicator.visible{
  opacity:1;
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

/* theme toggle */
.theme-toggle{
  width:36px;height:36px;
  border-radius:var(--radius-xs);
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--surface);
  border:1px solid var(--surface-border);
  transition:all var(--transition);
}
.theme-toggle:hover{
  background:var(--surface-hover);
  border-color:var(--surface-border-hover);
  transform:scale(1.05);
}
[data-theme="dark"] .icon-sun{display:block;}
[data-theme="dark"] .icon-moon{display:none;}
[data-theme="light"] .icon-sun{display:none;}
[data-theme="light"] .icon-moon{display:block;}

/* hamburger */
.nav-hamburger{
  display:none;
  flex-direction:column;
  gap:4px;
  width:36px;height:36px;
  align-items:center;
  justify-content:center;
  border-radius:var(--radius-xs);
  background:var(--surface);
  border:1px solid var(--surface-border);
}
.nav-hamburger span{
  display:block;
  width:16px;height:1.5px;
  background:var(--text-0);
  border-radius:2px;
  transition:transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-hamburger.open span:nth-child(1){transform:translateY(5.5px) rotate(45deg);}
.nav-hamburger.open span:nth-child(2){opacity:0;}
.nav-hamburger.open span:nth-child(3){transform:translateY(-5.5px) rotate(-45deg);}

/* ---------- SECTIONS SHARED ---------- */
.section{
  position:relative;
  z-index:1;
  padding:120px 0;
}
.section-header{
  margin-bottom:64px;
}
.section-label{
  display:block;
  font-size:0.78rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:var(--accent);
  margin-bottom:12px;
}
.section-title{
  font-size:clamp(1.75rem,4vw,2.75rem);
  font-weight:800;
  letter-spacing:-0.035em;
  line-height:1.15;
  background: linear-gradient(135deg, var(--accent) 0%, hsl(290,80%,65%) 60%, hsl(200,85%,65%) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* fallback for browsers that don't support background-clip:text */
  color: var(--accent);
}

/* ---------- HERO ---------- */
.hero{
  position:relative;
  z-index:1;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:calc(var(--nav-h) + 56px) 24px 40px;
  overflow:hidden;
}

#heroCanvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:0;
}

.hero-inner{
  position:relative;
  z-index:1;
  max-width:var(--max-w);
  margin:0 auto;
  width:100%;
  display:grid;
  grid-template-columns:1.1fr 0.9fr;
  gap:64px;
  align-items:center;
}

.hero-content{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 16px 6px 10px;
  border-radius:100px;
  font-size:0.78rem;
  font-weight:500;
  color:var(--text-1);
  background:var(--surface);
  border:1px solid var(--surface-border);
  margin-bottom:28px;
}
.status-dot{
  width:8px;height:8px;
  border-radius:50%;
  background:#34d399;
  box-shadow:0 0 8px rgba(52,211,153,0.5);
  animation:dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse{
  0%,100%{opacity:1;transform:scale(1);}
  50%{opacity:0.6;transform:scale(0.85);}
}

.hero-name{
  font-size:clamp(3rem,7.5vw,5.5rem);
  font-weight:800;
  letter-spacing:-0.04em;
  line-height:1;
  margin-bottom:16px;
}
.hero-name-line{
  display:block;
}

/* ---------- SPLIT-TEXT CHARS ---------- */
.char-split {
  display: inline-block;
  opacity: 0;
  transform: translateY(36px);
  will-change: opacity, transform;
}
.char-split.char-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s var(--ease-spring), transform 0.55s var(--ease-spring);
}
/* gradient-text lines: each span must carry the gradient individually
   because opacity/will-change creates a stacking context that breaks
   the parent's background-clip:text.
   Exception: .hero-name-line--accent is animated as a whole line,
   so gradient stays on the parent and spans just do layout. */
.hero-name-line--accent .char-split {
  /* no per-char gradient — parent handles it */
  background: none;
  -webkit-text-fill-color: inherit;
}
@media (prefers-reduced-motion: reduce) {
  .char-split { opacity: 1; transform: none; }
  .char-split.char-visible { transition: none; }
}

.hero-name-line--accent{
  background: linear-gradient(135deg, var(--accent) 0%, hsl(290,80%,65%) 60%, hsl(200,85%,65%) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  /* animated as whole line — needs to be visible by default,
     JS will override opacity via the line-anim class */
  opacity: 0;
  transform: translateY(36px);
  will-change: opacity, transform;
}

.hero-title{
  font-size:clamp(0.95rem,2.2vw,1.2rem);
  color:var(--text-1);
  font-family:var(--mono);
  min-height:1.5em;
  margin-bottom:20px;
}
.cursor{
  color:var(--accent);
  animation:blink 1s step-end infinite;
}
@keyframes blink{0%,100%{opacity:1;}50%{opacity:0;}}

.hero-description{
  font-size:1.05rem;
  color:var(--text-1);
  max-width:480px;
  line-height:1.8;
  margin-bottom:36px;
}

.hero-buttons{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* HERO CARD (identity card) */
.hero-visual{
  display:flex;
  justify-content:center;
  align-items:center;
}

/* ---- 3D SVG ---- */
.svg3d-viewport{
  position:relative;
  perspective:900px;
  perspective-origin:50% 42%;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:40px;
}

.svg3d-scene{
  position:relative;
  width:340px;
  height:405px;
  transform-style:preserve-3d;
  animation:svg3dFloat 4s ease-in-out infinite;
  will-change:transform;
}

.svg3d-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
}

.svg3d-layer svg{
  width:100%;
  height:100%;
  display:block;
}

.svg3d-glow{
  position:absolute;
  bottom:-12px;
  left:50%;
  transform:translateX(-50%);
  width:130px;
  height:18px;
  background:radial-gradient(ellipse, hsla(var(--accent-h),83%,58%,0.45), transparent 70%);
  border-radius:50%;
  filter:blur(6px);
  animation:svg3dShadow 4s ease-in-out infinite;
  pointer-events:none;
}

@keyframes svg3dFloat{
  0%,100%{transform:rotateX(10deg) rotateY(-14deg) translateY(0px);}
  50%{transform:rotateX(10deg) rotateY(-14deg) translateY(-22px);}
}

@keyframes svg3dShadow{
  0%,100%{opacity:0.7;transform:translateX(-50%) scaleX(1);}
  50%{opacity:0.35;transform:translateX(-50%) scaleX(0.75);}
}

/* scroll hint */
.hero-scroll-hint{
  position:absolute;
  bottom:32px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
}
.scroll-line{
  width:1px;height:48px;
  background:linear-gradient(to bottom,var(--accent),transparent);
  animation:scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse{
  0%,100%{opacity:0.3;transform:scaleY(0.6);}
  50%{opacity:0.8;transform:scaleY(1);}
}

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:11px 24px;
  border-radius:var(--radius-sm);
  font-size:0.85rem;
  font-weight:600;
  transition:all var(--transition);
  white-space:nowrap;
  position:relative;
}

.btn-primary{
  background:var(--accent);
  color:#fff;
  box-shadow:0 2px 16px var(--accent-glow), inset 0 1px 0 hsla(0,0%,100%,0.15);
}
.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 28px var(--accent-glow), inset 0 1px 0 hsla(0,0%,100%,0.2);
  filter:brightness(1.1);
}

.btn-glass{
  background:var(--glass);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border:1px solid var(--glass-border);
  box-shadow:var(--shadow-card);
}
.btn-glass:hover{
  background:var(--surface-hover);
  border-color:var(--surface-border-hover);
  transform:translateY(-2px);
}

.btn-outline{
  border:1px solid var(--surface-border);
  color:var(--text-1);
}
.btn-outline:hover{
  border-color:var(--accent-border);
  color:var(--accent);
  background:var(--accent-soft);
  transform:translateY(-2px);
}

.btn-full{width:100%;justify-content:center;}

/* ---------- ABOUT ---------- */
.about-layout{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:40px;
  align-items:start;
}

.about-profile-card{
  padding:36px 28px;
  text-align:center;
  border-radius:24px;
  position:relative;
}
.about-profile-card-shine{
  position:absolute;
  top:-50%;left:-50%;
  width:200%;height:200%;
  background:radial-gradient(circle at 30% 30%,
    hsla(var(--accent-h),60%,70%,0.05),
    transparent 50%);
  pointer-events:none;
}

.about-avatar{
  position:relative;
  width:88px;height:88px;
  margin:0 auto 18px;
}
.about-avatar-ring{
  position:absolute;
  inset:-3px;
  border-radius:50%;
  background:conic-gradient(from 120deg,var(--accent),hsl(290,80%,65%),var(--accent));
  opacity:0.5;
  animation:ringRotate 10s linear infinite;
}
.about-avatar-placeholder{
  position:relative;
  width:100%;height:100%;
  border-radius:50%;
  background:var(--bg-2);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text-2);
  border:3px solid var(--bg-0);
}

.about-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  display:block;
}

.about-profile-name{
  font-size:1.1rem;
  font-weight:700;
  margin-bottom:4px;
}
.about-profile-title{
  font-size:0.82rem;
  color:var(--text-2);
  margin-bottom:24px;
}

.about-profile-bullets{
  display:flex;
  flex-direction:column;
  gap:12px;
  text-align:left;
}
.about-bullet{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:0.85rem;
  color:var(--text-1);
}
.about-bullet svg{
  color:var(--accent);
  flex-shrink:0;
}

/* bio text */
.about-text-block{
  display:flex;
  flex-direction:column;
  gap:24px;
}
.about-bio{
  padding:32px;
  border-radius:var(--radius);
}
.about-bio p{
  color:var(--text-1);
  font-size:0.95rem;
  margin-bottom:14px;
  line-height:1.8;
}
.about-bio p:last-child{margin-bottom:0;}

.about-tech-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tech-tag{
  padding:7px 16px;
  border-radius:100px;
  font-size:0.8rem;
  font-weight:500;
  background:var(--surface);
  border:1px solid var(--surface-border);
  color:var(--text-1);
  transition:all var(--transition);
}
.tech-tag:hover{
  border-color:var(--accent-border);
  color:var(--accent);
  background:var(--accent-soft);
  transform:translateY(-2px);
}

/* ---------- PROJECT SHOWCASE ---------- */

/* Section modifier — removes default section padding-bottom
   since the showcase outer div provides its own scroll height */
.section--projects{
  padding-bottom:0;
}

/* ── Outer: tall scroll container (desktop/tablet only) ── */
.proj-showcase{
  position:relative;
  /* 4 projects × 100dvh each + 1 buffer = 5 segments */
  height:calc(100vh * 5);
  height:calc(100dvh * 5);
  /* hidden on mobile — see responsive block */
}

/* ── Sticky inner stage ── */
.proj-stage{
  position:sticky;
  top:0;
  height:100vh;
  height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:var(--nav-h) 24px 24px;
  overflow:hidden;
}

/* ── Cards container ── */
.proj-cards{
  position:relative;
  width:100%;
  max-width:1000px;
  height:calc(100% - 16px);
}

/* ── Individual project card ── */
.proj-card{
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  border-radius:var(--radius);
  overflow:hidden;
  opacity:0;
  transform:translateY(28px) scale(0.985);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
  pointer-events:none;
  will-change:opacity,transform;
}
.proj-card.active{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
  z-index:2;
}
.proj-card.prev{
  opacity:0;
  transform:translateY(-20px) scale(0.985);
  z-index:1;
  pointer-events:none;
}

/* ── Image side ── */
.proj-card-image{
  background:var(--bg-2);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
  border-right:1px solid var(--glass-border);
  min-height:0;
  overflow:hidden;
}

/* Safe frame — consistent padding, any aspect ratio */
.proj-card-frame{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--radius-md);
  overflow:hidden;
}
.proj-card-frame img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:var(--radius-sm);
  box-shadow:0 8px 40px rgba(0,0,0,0.35);
  display:block;
}

/* Placeholder frame (no screenshot yet) */
.proj-card-frame--placeholder{
  background:linear-gradient(
    135deg,
    hsla(var(--frame-hue,262),40%,18%,0.6),
    hsla(var(--frame-hue,262),30%,10%,0.9)
  );
  border:1px solid hsla(var(--frame-hue,262),40%,50%,0.12);
  color:hsla(var(--frame-hue,262),40%,70%,0.4);
  flex-direction:column;
  gap:12px;
  aspect-ratio:16/10;
  max-height:100%;
}
[data-theme="light"] .proj-card-frame--placeholder{
  background:linear-gradient(
    135deg,
    hsla(var(--frame-hue,262),30%,88%,0.7),
    hsla(var(--frame-hue,262),20%,94%,0.9)
  );
  color:hsla(var(--frame-hue,262),30%,40%,0.5);
}

/* ── Content side ── */
.proj-card-body{
  padding:40px 44px;
  display:flex;
  flex-direction:column;
  gap:16px;
  overflow-y:auto;
  min-height:0;
}

/* Meta row: number + category */
.proj-card-meta{
  display:flex;
  align-items:center;
  gap:10px;
}
.proj-card-num{
  font-size:0.7rem;
  font-weight:700;
  font-family:var(--mono);
  color:var(--accent);
  opacity:0.6;
  letter-spacing:0.08em;
}
.proj-card-category{
  font-size:0.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:var(--text-2);
  padding:3px 10px;
  border-radius:100px;
  background:var(--surface);
  border:1px solid var(--surface-border);
}

.proj-card-title{
  font-size:clamp(1.3rem,2.5vw,1.75rem);
  font-weight:800;
  letter-spacing:-0.03em;
  line-height:1.15;
  color:var(--text-0);
  margin:0;
}

.proj-card-desc{
  font-size:0.9rem;
  color:var(--text-1);
  line-height:1.75;
  margin:0;
}

/* ── Structured project details (Problem / Solution / Outcome / Role) ── */
.proj-card-details{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.proj-detail-item{
  display:grid;
  grid-template-columns:80px 1fr;
  gap:8px;
  align-items:baseline;
}
.proj-detail-label{
  font-size:0.65rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:var(--accent);
  opacity:0.75;
  white-space:nowrap;
  padding-top:1px;
}
/* Hotfix: Polish label "Rozwiązanie" is slightly longer */
html[lang="pl"] .proj-detail-label[data-i18n="proj.solution"]{
  font-size:0.58rem;
  letter-spacing:0.08em;
}
.proj-detail-text{
  font-size:0.875rem;
  color:var(--text-1);
  line-height:1.6;
}

.proj-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.proj-card-tags span{
  font-size:0.72rem;
  font-family:var(--mono);
  color:var(--text-2);
  padding:4px 10px;
  border-radius:6px;
  background:var(--surface);
  border:1px solid var(--surface-border);
}

.proj-card-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:auto;
  padding-top:8px;
}

/* ── Vertical progress indicator ── */
.proj-progress{
  position:absolute;
  right:28px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  z-index:10;
}
.proj-progress-dot{
  width:6px;
  height:6px;
  border-radius:100px;
  background:var(--text-2);
  opacity:0.3;
  transition:
    height 0.4s var(--ease-spring),
    background 0.35s var(--ease),
    opacity 0.35s var(--ease);
  flex-shrink:0;
}
.proj-progress-dot.active{
  height:24px;
  background:var(--accent);
  opacity:1;
}

/* ── Scroll hint ── */
.proj-scroll-hint{
  position:absolute;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  opacity:0;
  transition:opacity 0.4s var(--ease);
  pointer-events:none;
}
.proj-scroll-hint.visible{
  opacity:1;
}
.proj-scroll-hint span{
  font-size:0.72rem;
  font-weight:500;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--text-2);
}
.proj-scroll-line{
  width:1px;
  height:36px;
  background:linear-gradient(to bottom, var(--accent), transparent);
  animation:scrollPulse 2s ease-in-out infinite;
}

/* ── Mobile list (hidden on desktop) ── */
.proj-mobile{
  display:none;
  flex-direction:column;
  gap:24px;
  padding-bottom:40px;
}

.proj-mobile-card{
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.proj-mobile-frame{
  width:100%;
  background:var(--bg-2);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  border-bottom:1px solid var(--glass-border);
  min-height:180px;
}
.proj-mobile-frame img{
  max-width:100%;
  max-height:240px;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:var(--radius-sm);
  box-shadow:0 4px 20px rgba(0,0,0,0.25);
  display:block;
}
.proj-mobile-frame--placeholder{
  background:linear-gradient(
    135deg,
    hsla(var(--frame-hue,262),40%,18%,0.6),
    hsla(var(--frame-hue,262),30%,10%,0.9)
  );
  color:hsla(var(--frame-hue,262),40%,70%,0.4);
  flex-direction:column;
  gap:10px;
}
[data-theme="light"] .proj-mobile-frame--placeholder{
  background:linear-gradient(
    135deg,
    hsla(var(--frame-hue,262),30%,88%,0.7),
    hsla(var(--frame-hue,262),20%,94%,0.9)
  );
  color:hsla(var(--frame-hue,262),30%,40%,0.5);
}

.proj-mobile-body{
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* ── Reduced motion ── */
@media(prefers-reduced-motion:reduce){
  .proj-card{
    transition:opacity 0.2s ease;
    transform:none !important;
  }
  .proj-progress-dot{
    transition:background 0.2s ease, opacity 0.2s ease;
    height:6px !important;
  }
  .proj-progress-dot.active{
    height:6px;
    box-shadow:0 0 0 2px var(--accent);
  }
  .proj-scroll-line{
    animation:none;
    opacity:0.5;
  }
}

/* ---------- SKILLS ---------- */
.skills-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:20px;
}

.skill-group{
  padding:28px;
  border-radius:var(--radius);
}
.skill-group-header{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
}
.skill-group-icon{
  width:36px;height:36px;
  border-radius:var(--radius-xs);
  background:var(--accent-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--accent);
}
.skill-group-header h3{
  font-size:0.95rem;
  font-weight:600;
}

/* ---------- SOFTWARE CAPABILITY WORKSPACE ---------- */

.srv-workspace{
  border-radius:var(--radius);
  overflow:hidden;
  padding:0;
}

/* ── Header bar ── */
.srv-ws-bar{
  height:44px;
  background:rgba(0,0,0,0.22);
  border-bottom:1px solid var(--divider);
  display:flex;
  align-items:center;
  padding:0 20px;
  gap:12px;
  flex-shrink:0;
}
[data-theme="light"] .srv-ws-bar{
  background:rgba(0,0,0,0.05);
}
.srv-ws-dots{
  display:flex;
  gap:6px;
  align-items:center;
}
.srv-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  flex-shrink:0;
}
.srv-dot--red   { background:#ff5f57; }
.srv-dot--yellow{ background:#febc2e; }
.srv-dot--green { background:#28c840; }
.srv-ws-title{
  flex:1;
  text-align:center;
  font-size:0.75rem;
  font-weight:600;
  color:var(--text-2);
  letter-spacing:0.06em;
  font-family:var(--mono);
}
.srv-ws-num{
  font-size:0.7rem;
  font-weight:700;
  color:var(--text-2);
  font-family:var(--mono);
  opacity:0.5;
}

/* ── Body: two-column grid ── */
.srv-ws-body{
  display:grid;
  grid-template-columns:240px 1px 1fr;
  min-height:460px;
}

/* ── Left: module navigator ── */
.srv-nav{
  padding:24px 0;
  overflow:hidden;
}
.srv-module-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.srv-module{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:14px 24px;
  border-left:2px solid transparent;
  cursor:pointer;
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
  outline:none;
}
.srv-module:hover{
  background:var(--surface-hover);
}
.srv-module:focus-visible{
  background:var(--surface-hover);
  border-left-color:var(--accent-border);
  outline:none;
}
.srv-module.active{
  background:var(--accent-soft);
  border-left-color:var(--accent);
}
.srv-module-num{
  font-size:0.65rem;
  font-weight:600;
  font-family:var(--mono);
  color:var(--text-2);
  letter-spacing:0.08em;
  transition:color 0.25s var(--ease);
}
.srv-module.active .srv-module-num{
  color:var(--accent);
  opacity:0.7;
}
.srv-module-name{
  font-size:0.9rem;
  font-weight:600;
  color:var(--text-1);
  transition:color 0.25s var(--ease);
  line-height:1.3;
}
.srv-module.active .srv-module-name{
  color:var(--accent);
}
.srv-module:hover .srv-module-name{
  color:var(--text-0);
}
.srv-module-cmd{
  font-size:0.65rem;
  font-family:var(--mono);
  color:var(--text-2);
  opacity:0.5;
  letter-spacing:0.04em;
  transition:opacity 0.25s var(--ease);
}
.srv-module.active .srv-module-cmd{
  opacity:0.6;
  color:var(--accent);
}

/* ── Vertical divider ── */
.srv-divider{
  background:var(--divider);
  width:1px;
  align-self:stretch;
}

/* ── Right: detail panel ── */
.srv-detail{
  position:relative;
  padding:32px 40px;
  overflow:hidden;
}
.srv-detail-panel{
  position:absolute;
  inset:0;
  padding:32px 40px;
  opacity:0;
  transform:translateY(8px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
  pointer-events:none;
  display:flex;
  flex-direction:column;
  gap:14px;
  overflow-y:auto;
}
.srv-detail-panel.visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
  position:relative;
  inset:unset;
}
.srv-detail-icon{
  color:var(--accent);
  opacity:0.8;
  flex-shrink:0;
}
.srv-detail-title{
  font-size:1.2rem;
  font-weight:700;
  letter-spacing:-0.02em;
  color:var(--text-0);
  margin:0;
  line-height:1.2;
}
.srv-detail-desc{
  font-size:0.92rem;
  color:var(--text-1);
  line-height:1.75;
  margin:0;
}
.srv-detail-divider{
  height:1px;
  background:var(--divider);
  flex-shrink:0;
}
.srv-detail-label{
  font-size:0.65rem;
  font-weight:700;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--text-2);
  margin:0;
}
.srv-detail-solve{
  font-size:0.88rem;
  color:var(--text-1);
  line-height:1.7;
  margin:0;
}
.srv-detail-row{
  display:flex;
  gap:32px;
  flex-wrap:wrap;
}
.srv-detail-group{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}
.srv-pills{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

/* ── Mobile segmented nav (hidden on desktop) ── */
.srv-mobile-nav{
  display:none;
  padding:16px 20px;
  gap:6px;
  border-top:1px solid var(--divider);
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.srv-mobile-nav::-webkit-scrollbar{ display:none; }
.srv-mobile-tab{
  flex-shrink:0;
  padding:8px 18px;
  border-radius:100px;
  font-size:0.82rem;
  font-weight:600;
  color:var(--text-2);
  background:var(--surface);
  border:1px solid var(--surface-border);
  cursor:pointer;
  transition:all 0.25s var(--ease);
  white-space:nowrap;
}
.srv-mobile-tab:hover{
  color:var(--text-0);
  background:var(--surface-hover);
  border-color:var(--surface-border-hover);
}
.srv-mobile-tab.active{
  color:var(--accent);
  background:var(--accent-soft);
  border-color:var(--accent-border);
}

/* ── Reduced motion ── */
@media(prefers-reduced-motion:reduce){
  .srv-detail-panel{
    transition:opacity 0.15s ease;
    transform:none !important;
  }
  .srv-module{
    transition:background 0.15s ease, border-color 0.15s ease;
  }
}

.skill-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.skill-pill{
  padding:7px 16px;
  border-radius:100px;
  font-size:0.8rem;
  font-weight:500;
  color:var(--text-1);
  background:var(--surface);
  border:1px solid var(--surface-border);
  transition:all var(--transition);
  cursor:default;
}
.skill-pill:hover{
  border-color:var(--accent-border);
  color:var(--accent);
  background:var(--accent-soft);
  transform:translateY(-2px);
  box-shadow:0 4px 12px var(--accent-glow);
}

/* ---------- EXPERIENCE 3D CAROUSEL ---------- */
.exp-carousel-wrap{
  position:relative;
  width:100%;
  padding:40px 0 100px;
  overflow:hidden;
}

/* The 3D stage */
.exp-carousel{
  position:relative;
  width:100%;
  height:420px;
  perspective:1400px;
  perspective-origin:50% 40%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Individual cards */
.exp-card{
  position:absolute;
  width:min(480px, 80vw);
  min-height:360px;
  border-radius:var(--radius);
  padding:0;
  cursor:pointer;
  will-change:transform,opacity;
  transition:
    transform 0.6s var(--ease-spring),
    opacity 0.6s var(--ease),
    box-shadow 0.6s var(--ease),
    border-color 0.4s var(--ease);
  transform-style:preserve-3d;
  user-select:none;
  -webkit-user-select:none;
}

/* Offset states — set via data-offset attribute by JS */
.exp-card[data-offset="0"]{
  transform:translateX(0) translateZ(0) rotateY(0deg) scale(1);
  opacity:1;
  z-index:10;
  cursor:default;
  box-shadow:var(--shadow-card-hover), 0 0 60px -10px var(--accent-glow);
  border-color:var(--accent-border);
}
.exp-card[data-offset="1"]{
  transform:translateX(58%) translateZ(-180px) rotateY(-28deg) scale(0.84);
  opacity:0.6;
  z-index:5;
}
.exp-card[data-offset="-1"]{
  transform:translateX(-58%) translateZ(-180px) rotateY(28deg) scale(0.84);
  opacity:0.6;
  z-index:5;
}
.exp-card[data-offset="2"]{
  transform:translateX(100%) translateZ(-340px) rotateY(-44deg) scale(0.68);
  opacity:0.28;
  z-index:2;
}
.exp-card[data-offset="-2"]{
  transform:translateX(-100%) translateZ(-340px) rotateY(44deg) scale(0.68);
  opacity:0.28;
  z-index:2;
}
.exp-card[data-offset="3"],
.exp-card[data-offset="-3"],
.exp-card[data-offset="4"],
.exp-card[data-offset="-4"]{
  transform:translateX(0) translateZ(-500px) rotateY(0deg) scale(0.5);
  opacity:0;
  z-index:1;
  pointer-events:none;
}

/* Hover on side cards */
.exp-card:not([data-offset="0"]):hover{
  opacity:0.85;
}

/* Card inner layout */
.exp-card-inner{
  padding:32px 36px;
  display:flex;
  flex-direction:column;
  gap:16px;
  height:100%;
  pointer-events:none;
}
.exp-card[data-offset="0"] .exp-card-inner{
  pointer-events:auto;
}

.exp-card-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.exp-card-year{
  font-size:2.4rem;
  font-weight:800;
  letter-spacing:-0.04em;
  line-height:1;
  background:linear-gradient(135deg, var(--accent) 0%, hsl(290,80%,65%) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}

.exp-card-badge{
  display:inline-flex;
  align-items:center;
  font-size:0.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:var(--accent);
  padding:4px 12px;
  border-radius:100px;
  background:var(--accent-soft);
  border:1px solid var(--accent-border);
  white-space:nowrap;
}

.exp-card-badge--current{
  color:hsl(142,70%,50%);
  background:hsla(142,70%,50%,0.1);
  border-color:hsla(142,70%,50%,0.3);
}

.exp-card-badge--future{
  color:hsl(200,80%,60%);
  background:hsla(200,80%,60%,0.1);
  border-color:hsla(200,80%,60%,0.3);
}

.exp-card-title{
  font-size:1.15rem;
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.3;
  color:var(--text-0);
  margin:0;
}

.exp-card-desc{
  font-size:0.875rem;
  color:var(--text-1);
  line-height:1.75;
  margin:0;
}

.exp-card-achievements{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.exp-card-achievements li{
  font-size:0.82rem;
  color:var(--text-1);
  padding-left:16px;
  position:relative;
  line-height:1.5;
}
.exp-card-achievements li::before{
  content:'';
  position:absolute;
  left:0;
  top:7px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--accent);
  opacity:0.7;
}

.exp-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:auto;
  padding-top:4px;
}
.exp-card-tags span{
  font-size:0.72rem;
  font-family:var(--mono);
  color:var(--text-2);
  padding:4px 10px;
  border-radius:6px;
  background:var(--surface);
  border:1px solid var(--surface-border);
  transition:all var(--transition);
}
.exp-card[data-offset="0"] .exp-card-tags span:hover{
  border-color:var(--accent-border);
  color:var(--accent);
  background:var(--accent-soft);
}

/* Future card special styling */
.exp-card--future{
  border-style:dashed;
  border-color:hsla(200,80%,60%,0.25);
}
.exp-card--future .exp-card-year{
  background:linear-gradient(135deg, hsl(200,80%,60%) 0%, hsl(240,70%,65%) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
.exp-card--future[data-offset="0"]{
  box-shadow:var(--shadow-card-hover), 0 0 60px -10px hsla(200,80%,60%,0.2);
  border-color:hsla(200,80%,60%,0.35);
}

/* Nav buttons */
.exp-nav{
  position:absolute;
  top:50%;
  transform:translateY(calc(-50% - 50px));
  z-index:20;
  width:48px;
  height:48px;
  border-radius:50%;
  background:var(--glass);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border:1px solid var(--glass-border);
  color:var(--text-1);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all var(--transition);
  box-shadow:var(--shadow-card);
}
.exp-nav:hover{
  background:var(--surface-hover);
  border-color:var(--accent-border);
  color:var(--accent);
  box-shadow:var(--shadow-card-hover), 0 0 20px var(--accent-glow);
  transform:translateY(calc(-50% - 50px)) scale(1.08);
}
.exp-nav--prev{ left:max(24px, calc(50% - 320px)); }
.exp-nav--next{ right:max(24px, calc(50% - 320px)); }

/* Year track */
.exp-year-track{
  position:absolute;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  width:min(560px, 90vw);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.exp-year-line{
  position:relative;
  width:100%;
  height:2px;
  background:var(--divider);
  border-radius:2px;
  overflow:hidden;
}
.exp-year-line-fill{
  position:absolute;
  left:0;top:0;
  height:100%;
  background:linear-gradient(90deg, var(--accent), hsl(290,80%,65%));
  border-radius:2px;
  transition:width 0.5s var(--ease-spring);
  box-shadow:0 0 8px var(--accent-glow);
}

.exp-year-nodes{
  display:flex;
  justify-content:space-between;
  width:100%;
}
.exp-year-node{
  font-size:0.72rem;
  font-weight:600;
  color:var(--text-2);
  background:none;
  border:none;
  cursor:pointer;
  padding:4px 6px;
  border-radius:var(--radius-xs);
  transition:color var(--transition), transform var(--transition);
  position:relative;
  letter-spacing:0.02em;
}
.exp-year-node::before{
  content:'';
  position:absolute;
  top:-18px;
  left:50%;
  transform:translateX(-50%);
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--divider);
  border:2px solid var(--bg-0);
  transition:background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.exp-year-node.active{
  color:var(--accent);
}
.exp-year-node.active::before{
  background:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft), 0 0 12px var(--accent-glow);
  transform:translateX(-50%) scale(1.3);
}
.exp-year-node:hover:not(.active){
  color:var(--text-0);
  transform:translateY(-1px);
}

/* Reduced motion */
@media(prefers-reduced-motion:reduce){
  .exp-card{
    transition:opacity 0.3s ease;
  }
  .exp-card[data-offset="0"]{
    transform:none;
    opacity:1;
  }
  .exp-card:not([data-offset="0"]){
    transform:none;
    opacity:0;
    pointer-events:none;
  }
  .exp-card[data-offset="1"],
  .exp-card[data-offset="-1"]{
    opacity:0.5;
    pointer-events:auto;
  }
}

/* ---------- CONTACT ---------- */
.contact-lead{
  text-align:center;
  color:var(--text-1);
  margin-bottom:48px;
  font-size:1rem;
  max-width:480px;
  margin-left:auto;
  margin-right:auto;
}

.contact-layout{
  display:grid;
  grid-template-columns:1fr 1.3fr;
  gap:28px;
  align-items:start;
}

.contact-links{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.contact-link-card{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 20px;
  border-radius:var(--radius-md);
  transition:all var(--transition);
}
.contact-link-card:hover{
  background:var(--surface-hover);
  border-color:var(--surface-border-hover);
  transform:translateX(4px);
}
.contact-link-card svg:first-child{
  color:var(--accent);
  flex-shrink:0;
}
.contact-link-label{
  display:block;
  font-size:0.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:var(--text-2);
  margin-bottom:1px;
}
.contact-link-value{
  display:block;
  font-size:0.88rem;
  font-weight:500;
  color:var(--text-0);
}
.contact-arrow{
  margin-left:auto;
  color:var(--text-2);
  transition:transform var(--transition), color var(--transition);
  flex-shrink:0;
}
.contact-link-card:hover .contact-arrow{
  transform:translateX(4px);
  color:var(--accent);
}

/* form */
.contact-form{
  padding:32px;
  border-radius:var(--radius);
  display:flex;
  flex-direction:column;
  gap:18px;
}
.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.form-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.form-group label{
  font-size:0.78rem;
  font-weight:600;
  color:var(--text-2);
  text-transform:uppercase;
  letter-spacing:0.06em;
}
.form-group input,
.form-group textarea{
  padding:12px 16px;
  background:var(--surface);
  border:1px solid var(--surface-border);
  border-radius:var(--radius-xs);
  outline:none;
  transition:border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-group input:focus,
.form-group textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
  background:var(--surface-hover);
}
.form-group textarea{
  resize:vertical;
  min-height:120px;
}
.form-group input::placeholder,
.form-group textarea::placeholder{
  color:var(--text-2);
}

/* ---------- FOOTER ---------- */
.footer{
  position:relative;
  z-index:1;
  padding:32px 0;
  border-top:1px solid var(--divider);
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.footer-text,.footer-copy{
  font-size:0.82rem;
  color:var(--text-2);
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.visible{
  opacity:1;
  transform:translateY(0);
}

/* stagger siblings in grids */
.projects-grid .reveal:nth-child(1){transition-delay:0s;}
.projects-grid .reveal:nth-child(2){transition-delay:0.07s;}
.projects-grid .reveal:nth-child(3){transition-delay:0.14s;}
.projects-grid .reveal:nth-child(4){transition-delay:0.21s;}
.projects-grid .reveal:nth-child(5){transition-delay:0.28s;}
.projects-grid .reveal:nth-child(6){transition-delay:0.35s;}
.projects-grid .reveal:nth-child(7){transition-delay:0.42s;}

.skills-grid .reveal:nth-child(1){transition-delay:0s;}
.skills-grid .reveal:nth-child(2){transition-delay:0.08s;}
.skills-grid .reveal:nth-child(3){transition-delay:0.16s;}
.skills-grid .reveal:nth-child(4){transition-delay:0.24s;}

.hero-content .reveal:nth-child(1){transition-delay:0.1s;}
.hero-content .reveal:nth-child(2){transition-delay:0.2s;}
.hero-content .reveal:nth-child(3){transition-delay:0.35s;}
.hero-content .reveal:nth-child(4){transition-delay:0.5s;}
.hero-content .reveal:nth-child(5){transition-delay:0.65s;}
.hero-visual .reveal{transition-delay:0.4s;}

/* ---------- RESPONSIVE ---------- */

/* ── Desktop large ≥ 1200px: full two-column card, generous spacing ── */
/* (default styles already target this range — no overrides needed) */

/* ── Laptop 992–1199px: slightly tighter card ── */
@media(max-width:1199px) and (min-width:992px){
  .proj-cards{
    max-width:880px;
  }
  .proj-card-body{
    padding:32px 36px;
  }
  .proj-card-image{
    padding:24px;
  }
  .proj-card-title{
    font-size:1.45rem;
  }
}

/* ── Tablet 768–991px: single-column card, sticky still active ── */
@media(max-width:991px) and (min-width:769px){
  .proj-showcase{
    height:calc(100vh * 5);
    height:calc(100dvh * 5);
  }
  .proj-stage{
    padding:calc(var(--nav-h) + 12px) 20px 20px;
  }
  .proj-cards{
    max-width:640px;
  }
  .proj-card{
    grid-template-columns:1fr;
    grid-template-rows:auto 1fr;
  }
  .proj-card-image{
    border-right:none;
    border-bottom:1px solid var(--glass-border);
    padding:20px;
    max-height:240px;
  }
  .proj-card-body{
    padding:28px 32px;
    gap:12px;
  }
  .proj-card-title{
    font-size:1.25rem;
  }
  .proj-progress{
    right:16px;
  }
}

@media(max-width:1024px){
  .hero-inner{
    grid-template-columns:1fr;
    text-align:center;
    gap:48px;
  }
  .hero-content{align-items:center;}
  .hero-description{max-width:520px;margin-left:auto;margin-right:auto;}
  .hero-buttons{justify-content:center;}
  .about-layout{
    grid-template-columns:1fr;
    gap:28px;
  }
  .about-profile-card{
    max-width:360px;
    margin:0 auto;
  }
}

@media(max-width:768px){
  .nav-links{
    position:fixed;
    top:calc(12px + var(--nav-h) + 8px);
    left:16px;
    right:16px;
    background:rgba(10, 10, 18, 0.92);
    backdrop-filter:blur(24px) saturate(1.4);
    -webkit-backdrop-filter:blur(24px) saturate(1.4);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:var(--radius-md);
    flex-direction:column;
    padding:12px;
    gap:2px;
    transform:translateY(-16px);
    opacity:0;
    pointer-events:none;
    transition:transform .35s var(--ease), opacity .35s var(--ease);
    box-shadow:0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  }
  [data-theme="light"] .nav-links{
    background:rgba(240, 240, 246, 0.95);
    border-color:rgba(0,0,0,0.1);
    box-shadow:0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
  }
  .nav-links.open{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
  }
  .nav-links a{
    display:block;
    padding:14px 18px;
    border-radius:var(--radius-xs);
    font-size:0.92rem;
    font-weight:500;
    color:var(--text-1);
    transition:background .25s, color .25s;
  }
  .nav-links a:hover,
  .nav-links a.active{
    background:var(--surface-hover);
    color:var(--text-0);
  }
  .nav-indicator{display:none;}
  .nav-hamburger{display:flex;}

  .section{padding:80px 0;}
  .section-header{margin-bottom:40px;}
  .hero{padding-top:calc(var(--nav-h) + 72px);}

  .hero-name{font-size:clamp(2.5rem,10vw,3.5rem);}

  .hero-buttons{
    flex-direction:column;
    align-items:center;
    width:100%;
  }
  .hero-buttons .btn{
    width:100%;
    max-width:260px;
    justify-content:center;
  }

  /* ── Project showcase: tablet (768px) — single column card ── */
  .proj-showcase{
    height:calc(100vh * 5);
    height:calc(100dvh * 5);
  }
  .proj-stage{
    padding:calc(var(--nav-h) + 8px) 16px 16px;
  }
  .proj-card{
    grid-template-columns:1fr;
    grid-template-rows:auto 1fr;
  }
  .proj-card-image{
    border-right:none;
    border-bottom:1px solid var(--glass-border);
    padding:20px;
    max-height:220px;
  }
  .proj-card-body{
    padding:24px 28px;
    gap:12px;
  }
  .proj-card-title{
    font-size:1.2rem;
  }
  .proj-progress{
    right:12px;
  }
  .proj-scroll-hint{
    bottom:16px;
  }

  /* ── Mobile showcase: hide sticky, show list ── */
  .proj-showcase{ display:none; }
  .proj-mobile{ display:flex; }

  .skills-grid{grid-template-columns:1fr 1fr;}

  /* ── Workspace: mobile full reflow ── */

  /* Override glass-panel overflow:hidden so content is never clipped */
  .srv-workspace,
  .srv-workspace.glass-panel{
    overflow:visible !important;
    border-radius:var(--radius-md);
  }

  /* The workspace is now a flex column:
     header → mobile-nav → divider → detail */
  .srv-workspace{
    display:flex;
    flex-direction:column;
  }
  .srv-ws-bar{
    flex-shrink:0;
    border-radius:var(--radius-md) var(--radius-md) 0 0;
  }

  /* Mobile segmented nav appears right after the header bar */
  .srv-mobile-nav{
    display:flex;
    flex-shrink:0;
    border-top:none;
    border-bottom:1px solid var(--divider);
    padding:12px 16px;
  }

  /* Body becomes a single column (no grid) */
  .srv-ws-body{
    display:flex;
    flex-direction:column;
    min-height:0;
    flex:1;
  }
  .srv-nav{ display:none; }
  .srv-divider{ display:none; }

  /* Detail area: natural document flow, no absolute positioning, no clipping */
  .srv-detail{
    position:static;
    padding:20px 16px 28px;
    overflow:visible;
    height:auto;
    min-height:0;
  }

  /* Hidden panels: completely removed from flow */
  .srv-detail-panel{
    position:static !important;
    inset:unset !important;
    display:none !important;
    opacity:1 !important;
    transform:none !important;
    padding:0;
    overflow:visible;
    height:auto;
    pointer-events:auto;
  }

  /* Active panel: visible, stacked column */
  .srv-detail-panel.visible{
    display:flex !important;
    flex-direction:column;
    gap:14px;
  }

  /* Typography */
  .srv-detail-title{ font-size:1.05rem; }
  .srv-detail-desc{ font-size:0.88rem; }
  .srv-detail-solve{ font-size:0.85rem; }
  .srv-detail-row{ flex-direction:column; gap:16px; }
  .srv-pills .skill-pill{ font-size:0.78rem; padding:6px 12px; }

  .contact-layout{grid-template-columns:1fr;}
  .form-row{grid-template-columns:1fr;}

  .footer-inner{
    flex-direction:column;
    gap:4px;
    text-align:center;
  }

  /* exp carousel — tablet/mobile: reduce 3D depth */
  .exp-carousel{
    height:460px;
    perspective:900px;
  }
  .exp-card{
    width:min(420px, 88vw);
  }
  .exp-card[data-offset="1"]{
    transform:translateX(52%) translateZ(-120px) rotateY(-20deg) scale(0.86);
    opacity:0.5;
  }
  .exp-card[data-offset="-1"]{
    transform:translateX(-52%) translateZ(-120px) rotateY(20deg) scale(0.86);
    opacity:0.5;
  }
  .exp-card[data-offset="2"],
  .exp-card[data-offset="-2"]{
    opacity:0.15;
  }
  .exp-nav--prev{ left:12px; }
  .exp-nav--next{ right:12px; }
}

@media(max-width:480px){
  .container{padding:0 16px;}
  .navbar{
    top:8px;
    width:calc(100% - 16px);
    border-radius:var(--radius-md);
  }
  .svg3d-scene{width:240px;height:286px;}
  .project-card{padding:0;}
  .project-card-content{padding:22px;}
  .skill-group{padding:22px;}
  .contact-form{padding:24px;}
  .skills-grid{grid-template-columns:1fr;}

  /* exp carousel — mobile: flat, full-width single card */
  .exp-carousel{
    height:auto;
    min-height:400px;
    perspective:none;
    perspective-origin:unset;
  }
  .exp-carousel-wrap{
    padding:20px 0 90px;
  }
  .exp-card{
    width:calc(100vw - 32px);
    min-height:auto;
    transition:opacity 0.4s var(--ease);
  }
  .exp-card[data-offset="0"]{
    transform:none;
    position:relative;
    margin:0 auto;
  }
  .exp-card:not([data-offset="0"]){
    transform:none;
    opacity:0;
    pointer-events:none;
    position:absolute;
  }
  .exp-card-inner{
    padding:24px 20px;
  }
  .exp-card-year{
    font-size:1.8rem;
  }
  .exp-nav{
    top:auto;
    bottom:52px;
    transform:none;
    width:40px;
    height:40px;
  }
  .exp-nav:hover{
    transform:scale(1.08);
  }
  .exp-nav--prev{ left:calc(50% - 56px); }
  .exp-nav--next{ right:calc(50% - 56px); }
  .exp-year-track{
    bottom:12px;
    width:calc(100vw - 32px);
  }
}

.form-status {
  min-height: 20px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.form-status--pending { color: var(--text-muted, #999); }
.form-status--success { color: #4ade80; }
.form-status--error { color: #f87171; }