html.dark .progress-stickman-gif {
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #fff);
}
/* Stickman progress walker */
.progress-bar-stickman-wrap {
  width: 100%;
  height: 54px;
  position: relative;
  margin-bottom: 0.2em;
}
.progress-stickman-gif { position: absolute; top: 0; left: 0; width: 90px; height: 90px; object-fit: contain; z-index: 2; pointer-events: none; background: transparent; border-radius: 0; box-shadow: none; user-select: none; }
/* Progress Bar Overlay */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: opacity 0.25s;
}
html.dark .progress-overlay {
  background: rgba(11,15,25,0.92);
}
.progress-bar-container {
  min-width: 260px;
  width: min(90vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1em;
}
.progress-bar-bg {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 8px 0 rgba(0,0,0,0.08);
  position: relative;
}
html.dark .progress-bar-bg {
  background: #1d2740;
}
.progress-bar-fill {
  height: 100%;
  /* Pure green fill in light mode: use the accent colors for a clean look */
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-600) 100%);
  border-radius: 8px 0 0 8px;
  transition: width 0.18s linear;
}
html.dark .progress-bar-fill {
  background: linear-gradient(90deg, #fff 0%, var(--accent) 100%);
}
.progress-bar-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
  letter-spacing: 0.04em;
}
html.dark .progress-bar-label {
  color: #fff;
}
/* Modern minimal portfolio styles */
:root {
  /* Light theme */
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #0b0f19;
  --muted: color-mix(in oklab, var(--accent) 30%, #64748b);
  --border: #e5e7eb;
  --hover: #f5f7fb;
  --accent: #50C878; /* Emerald */
  --accent-600: #36b86b;
  --accent-700: #217044;
  --radius: 12px;
  --shadow-sm: 0 1px 1px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
}
html.dark {
  --bg: #0b0f19;
  --surface: #0e1424;
  --text: #e6ebf5;
  --muted: color-mix(in oklab, var(--accent) 30%, #93a0b8);
  --border: #1d2740;
  --hover: #131c31;
  --accent: #50C878; /* Emerald (same as light) */
  --accent-600: #36b86b;
  --accent-700: #217044;
  --shadow-sm: 0 1px 1px rgba(0,0,0,0.25);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.28);
}
@media (prefers-color-scheme: dark) {
  html:not(.light):not(.dark) {
    --bg: #0b0f19; --surface:#0e1424; --text:#e6ebf5; --muted:#93a0b8; --border:#1d2740; --hover:#131c31; --accent:#50C878; --accent-600:#36b86b; --accent-700:#2a9d5e; --shadow-sm:0 1px 2px rgba(0,0,0,.3); --shadow-md:0 8px 24px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Global custom cursor: emerald (light) and whitish (dark) */
html, body { cursor: url("../assets/icons/cursor-emerald.svg") 2 2, auto; }
html.dark, html.dark body { cursor: url("../assets/icons/cursor-emerald.svg") 2 2, auto; }
/* Ensure interactive elements keep pointer while using our custom cursor */
a, button, .btn, [role="button"], .icon-link { cursor: url("../assets/icons/cursor-emerald.svg") 2 2, pointer; }
html.dark a, html.dark button, html.dark .btn, html.dark [role="button"], html.dark .icon-link { cursor: url("../assets/icons/cursor-emerald.svg") 2 2, pointer; }
/* Preserve text cursor where it matters */
input, textarea, select { cursor: text; }
body { margin:0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
img { max-width:100%; display:block; }
.container { width:min(1280px,92%); margin:0 auto; }
.header-inner, .hero-inner, .footer-top, .contact-cta, .social-row, .hero-social { min-width: 0; }
.section { padding: clamp(3rem, 6vw, 6rem) 0; }
.section-header { margin-bottom: 2.25rem; }
.section-header h2 { margin:0 0 .25rem 0; font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
.section-header .muted { color: var(--muted); margin: 0; }

/* Header */
.site-header { position:sticky; top:0; z-index:20; background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: saturate(180%) blur(10px); border-bottom:1px solid var(--border); }
.site-header { padding-left: max(env(safe-area-inset-left), 0px); padding-right: max(env(safe-area-inset-right), 0px); }
.header-inner { display:flex; align-items:center; justify-content:space-between; height:64px; gap:.75rem; }
.brand { font-weight:700; text-decoration:none; color:var(--text); font-size:1.125rem; }
.brand .dot { color: var(--accent); margin-left: 6px; }
html.dark .brand .dot { color: var(--accent); }
.site-nav { position:relative; }
.site-nav ul { display:flex; gap:1rem; list-style:none; margin:0; padding:0; }
.site-nav a { color:var(--text); text-decoration:none; padding:.5rem .75rem; border-radius:8px; position:relative; font-weight:600; }
.site-nav a:hover { background: var(--hover); }
.site-nav .nav-icon { width:18px; height:18px; vertical-align:-3px; margin-right:.35rem; }
.active-marker { position:absolute; height:2px; background: var(--text); bottom:-1px; left:0; width:0; transition: transform .25s ease, width .25s ease; transform-origin:left; opacity:.85; }
.header-actions { display:flex; align-items:center; gap:.5rem; }
.nav-toggle { display:none; background:none; border:0; cursor:pointer; padding:.5rem; }
.nav-toggle span { display:block; width:24px; height:2px; background:var(--text); margin:5px 0; }
.theme-toggle { display:inline-flex; align-items:center; gap:.25rem; background:transparent; border:1px solid var(--border); color:var(--text); border-radius:999px; padding:.35rem .5rem; cursor:pointer; }
.theme-toggle:hover { background: var(--hover); }
.theme-toggle img { width:18px; height:18px; }
.theme-toggle .sun { display:inline; } .theme-toggle .moon { display:none; }
html.dark .theme-toggle .sun { display:none; } html.dark .theme-toggle .moon { display:inline; }
@media (max-width: 860px) {
  .nav-toggle { display:block; }
  /* Turn nav into a floating popup panel anchored to the header on mobile */
  .site-nav { position:absolute; top:64px; right:1rem; width:min(240px, 90vw); background: color-mix(in oklab, var(--surface) 98%, transparent); border:1px solid var(--border); border-radius:12px; box-shadow: var(--shadow-md); opacity:0; pointer-events:none; transition: opacity .14s ease; z-index:30; }
  .site-nav.open { opacity:1; pointer-events:auto; }
  .site-nav ul { flex-direction:column; gap:.25rem; padding:.5rem; }
  .site-nav a { padding:.75rem 1rem; display:block; }
  .active-marker { display:none; }
}

/* Backdrop for floating nav */
.nav-backdrop { position:fixed; inset:0; background: rgba(0,0,0,0.25); backdrop-filter: blur(1px); opacity:0; pointer-events:none; transition: opacity .18s ease; z-index:25; }
.nav-backdrop.show { opacity:1; pointer-events:auto; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 8rem) 0; }
.hero-inner { display:grid; grid-template-columns: 1.2fr .8fr; align-items:center; gap: clamp(1.5rem, 4vw, 3rem); }
.hero-title { margin:0 0 .25rem 0; font-size: clamp(2.8rem, 10vw, 5.2rem); line-height:1.05; font-weight:800; letter-spacing:-.5px; }
.hero-subtitle { margin:0 0 .75rem 0; color:var(--muted); font-weight:600; }
.hero-intro { margin:0 0 1.25rem 0; max-width:60ch; }
.hero-cta { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
.hero-social { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:1rem; }
.hero-visual { display:none; }
.hero-photo { justify-self:end; }
.hero-photo img { width: clamp(240px, 32vw, 400px); aspect-ratio: 3/4; object-fit: cover; object-position: top center; border-radius: 14px; border: 3px solid #000; box-shadow: var(--shadow-md); background: color-mix(in oklab, var(--surface) 85%, transparent); }
html.dark .hero-photo img { border: 3px solid #fff; box-shadow: var(--shadow-md); }
/* Interactive glow on profile photo */
/* Minimal: no interactive glow on photo */
@media (max-width: 960px) { .hero-inner { grid-template-columns:1fr; } .hero-photo { order:-1; justify-self:start; } .hero-photo img { width:min(280px, 62vw); aspect-ratio: 3/4; object-position: top center; } }

/* Buttons */
.btn { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:.6rem; padding:.7rem 1rem; min-height:44px; border-radius:12px; border:2px solid var(--text); text-decoration:none; color:var(--text); font-weight:600; transition: background .15s ease, transform .05s ease, border-color .15s ease, color .15s ease; line-height:1; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: var(--accent); }
.btn.primary { background: var(--accent); color:#fff; border-color: var(--accent-700); }
.btn.primary:hover { background: var(--accent-600); }
.btn.strong { border-color: var(--accent); }
.btn .btn-icon { width:18px; height:18px; margin-top:-1px; }
.btn:focus-visible, .chip:focus-visible { outline:2px solid color-mix(in oklab, var(--text) 50%, transparent); outline-offset:2px; }
.block { display:inline-flex; width:100%; justify-content:center; }
.btn.sm { padding:.5rem .8rem; min-height:36px; border-radius:10px; font-weight:600; }

/* Soft glow: emerald in light, deep blue in dark */
/* Minimal: no glow, just simple hover */
html:not(.dark) .btn, html.dark .btn { box-shadow: none; }
.btn::after { content:none; }

/* About */
.about-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:1.75rem 2rem; margin-top: 1rem; }
.about-grid h3 { margin:0 0 .5rem 0; }
.about-grid.about-two { grid-template-columns: repeat(2, 1fr); }
.keylines { margin:.25rem 0 0 0; padding-left:1.1rem; }
.keylines li { margin-bottom:.5rem; }
/* Spacing for the Summary block above the grid */
.summary { margin-top:.5rem; margin-bottom:1.5rem; }
@media (max-width: 960px) { .about-grid { grid-template-columns:1fr; } }

/* Skills */
.skills-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:1rem; }
.skill { background: var(--surface); border:1px solid var(--border); border-radius:10px; padding:.75rem; box-shadow: var(--shadow-sm); }
.skill-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; font-weight:600; }
.skill-top .i { width:18px; height:18px; vertical-align:-3px; margin-right:.35rem; filter: drop-shadow(0 0 0 transparent); }
.bar { height:10px; border-radius:999px; background:#eef2ff22; position:relative; overflow:hidden; border:1px solid var(--border); }
.bar::after { content:""; position:absolute; inset:0; width:0%; background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 35%, #ffffff)); border-radius:999px; transition: width 800ms ease; }
.bar.filled::after { width: var(--w, 0%); }
@media (max-width: 720px) { .skills-grid { grid-template-columns: 1fr; } }

/* Projects */
/* Route map style for projects using steps */
.project-steps .steps { gap: 1.25rem; }
.project-steps .step-content { display:grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items:start; }
.thumb-card { background: var(--surface); border:1px solid var(--border); border-radius:12px; box-shadow: var(--shadow-sm); overflow:hidden; aspect-ratio: 1 / 1; display:flex; align-items:center; justify-content:center; padding:.5rem; }
.thumb-card img { width:100%; height:100%; object-fit: contain; }
.resume-thumb img { width:100%; height:100%; object-fit: contain; }
.project-steps .step-main h3 { margin:.1rem 0 .25rem 0; font-size:1.08rem; }
.project-steps .step-main .muted { margin:0 0 .5rem 0; }
.step-actions { margin-top:.5rem; display:flex; gap:.5rem; }
.tags { display:flex; flex-wrap:wrap; gap:.5rem; list-style:none; margin:0; padding:0; }
.tags li { font-size:.82rem; padding:.2rem .5rem; border:1px solid var(--border); border-radius:999px; }
.icon-link { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:8px; border:1px solid var(--border); transition: background .2s ease, transform .05s ease; color:var(--text); }
.icon-link:hover { background: var(--hover); }
.icon-link img { width:18px; height:18px; }
@media (max-width: 720px) { .project-steps .step-content { grid-template-columns: 80px 1fr; } }
@media (min-width: 1200px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }

/* Education grid tweaks */
/* Education steps */
.edu-steps { margin-top: .5rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1rem; position: relative; }
.step { display: grid; grid-template-columns: 20px 1fr; gap:.75rem; align-items:start; position: relative; }
.step .dot { width:14px; height:14px; border:2px solid var(--text); border-radius:50%; display:block; margin-top:.3rem; background: var(--bg); box-shadow: 0 0 0 2px var(--bg); }
.step .dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(80,200,120,0.0);
}
.step::before { content:""; position:absolute; left:8px; top:22px; bottom:-1rem; width:2px; background: var(--border); }
.step:last-child::before { display:none; }

/* Wave highlight for timeline */
.steps { position: relative; }
.steps::after {
  content: '';
  position: absolute;
  left: 8px;
  top: var(--wave-top, 0px);
  width: 2px;
  height: var(--wave-height, 100%);
  background: linear-gradient(180deg, transparent 0%, rgba(80,200,120,0.7) 45%, rgba(80,200,120,0.2) 60%, transparent 100%);
  transform: translateY(-100%);
  opacity: 0.95;
  animation: wave 3s linear infinite;
}

@keyframes wave {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0%); }
  100% { transform: translateY(120%); }
}

/* Pulsing dot synchronized with wave using --i custom property */
.step { --i: 0; }
.step .dot { position: relative; }
.step .dot::after {
  animation: pulse 3s linear infinite;
  animation-delay: calc(var(--i) * 120ms);
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(80,200,120,0.0);
    border-color: var(--border);
    background: var(--bg);
  }
  35% {
    box-shadow: 0 0 16px 10px rgba(80,200,120,0.16);
    border-color: color-mix(in srgb, var(--accent) 60%, var(--text) 40%);
  }
  50% {
    box-shadow: 0 0 34px 18px rgba(80,200,120,0.32);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 18%, var(--bg));
  }
  80% {
    box-shadow: 0 0 6px 3px rgba(80,200,120,0.08);
    border-color: var(--border);
    background: var(--bg);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(80,200,120,0.0);
    border-color: var(--border);
    background: var(--bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .steps::after, .step .dot::after { animation: none !important; }
}
.step-content h3 { margin:.1rem 0 .15rem 0; font-size:1.05rem; }
.step-content p { margin:.1rem 0; }
/* Align education layout with project route map */
.edu-steps .step-content { display:grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items:start; }
.edu-steps .thumb-card { background: var(--surface); border:1px solid var(--border); border-radius:12px; box-shadow: var(--shadow-sm); overflow:hidden; aspect-ratio: 1 / 1; display:flex; align-items:center; justify-content:center; padding:.5rem; }
.edu-steps .thumb-card .thumb-svg { width:48px; height:48px; color: var(--text); opacity:.9; }
@media (max-width: 720px) { .edu-steps .step-content { grid-template-columns: 80px 1fr; } }
@media (min-width: 960px) {
  .steps { grid-template-columns: 1fr; }
}

/* Extra-large TV/monitor tuning */
@media (min-width: 1920px) {
  .container { width:min(1480px, 86%); }
  .hero-title { font-size: clamp(3rem, 6vw, 6rem); }
  .hero-inner { gap: 3rem; }
}

/* Small phones tweaks */
@media (max-width: 380px) {
  .btn { padding:.6rem .85rem; min-height:40px; border-radius:10px; }
  .chip { padding:.45rem .7rem; min-height:36px; }
}

/* Dark mode icon visibility: force icons to render white and bump control borders */
html.dark .icon-link { border-color: var(--text); }
html.dark .theme-toggle { border-color: var(--text); }
html.dark .icon-link img,
html.dark .chip img,
html.dark .btn .btn-icon,
html.dark .theme-toggle img,
html.dark .i18,
html.dark .i24 {
  filter: brightness(0) invert(1) contrast(1.05);
}

/* Experience */
.timeline { display:grid; gap:1rem; }
.timeline-item { display:grid; grid-template-columns: 140px 1fr; gap:1rem; padding:1rem; border:1px solid var(--border); border-radius:12px; background: var(--surface); }
.edu-media { margin-bottom:.5rem; border-radius:12px; overflow:hidden; border:1px solid var(--border); aspect-ratio: 1 / 1; display:flex; align-items:center; justify-content:center; background: var(--surface); }
.edu-media img { display:block; width:100%; height:100%; object-fit: contain; }
.timeline .time { color: var(--muted); font-weight:600; }
@media (max-width: 720px) { .timeline-item { grid-template-columns:1fr; } }

/* Contact */
.contact-cta { display:flex; flex-wrap:wrap; gap:.75rem; }
.chip { display:inline-flex; align-items:center; gap:.5rem; padding:.55rem .9rem; min-height:40px; border:1px solid var(--border); border-radius:999px; text-decoration:none; color:var(--text); background: transparent; transition: background .2s ease, color .2s ease, border-color .2s ease; max-width:100%; white-space: nowrap; }
.chip:hover { background: var(--hover); }
.chip img { width:18px; height:18px; }
/* Ensure chip icons are monochrome and inherit current text color */
.chip img { display:inline-block; vertical-align:middle; }
.chip img[alt=""] { /* icons only */ fill: none; }
/* For browsers that respect SVG currentColor, ensure image icons tint with CSS */
.chip img { color: var(--text); }
html.dark .chip img { color: var(--text); }
/* Allow address chip to wrap on narrow screens to avoid horizontal scroll */
.chip[aria-label="Address"] { white-space: normal; line-height:1.35; }

/* Dark mode: stronger borders/text for visibility */
html.dark .chip { border-color: var(--text); color: var(--text); }
/* Dark mode: blue-accent buttons to match blue cursor */
html.dark .btn { border-color: var(--accent); color: var(--accent); }
html.dark .btn:hover { background: color-mix(in oklab, var(--accent) 22%, transparent); }
html.dark .btn.primary { background: var(--accent); border-color: var(--accent-700); color:#f2f6ff; }
html.dark .btn.primary:hover { background: var(--accent-600); }

/* Resume */
.resume-wrap { display:grid; grid-template-columns: auto 1fr; gap:1.25rem; align-items:start; }
.resume-preview { display:flex; justify-content:flex-start; }
.resume-thumb { width: 180px; max-width: 100%; aspect-ratio: 3 / 4; }
.resume-actions { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.btn.disabled { opacity:.55; pointer-events:none; }
@media (max-width: 960px) {
  .resume-wrap { grid-template-columns: 1fr; }
  .resume-preview { justify-content:center; }
  .resume-actions { justify-content:center; text-align:center; }
}

/* Footer - slim premium style */
.site-footer {
  padding: 0.85rem 0;
  border-top: 1px solid color-mix(in oklab, var(--accent) 6%, var(--border));
  color: var(--muted);
  background: color-mix(in oklab, var(--surface) 98%, transparent);
  backdrop-filter: blur(6px) saturate(120%);
}
.site-footer p { margin: 0; }
.footer-top {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 1.25rem;
  padding-top: 0.8rem;
  padding-bottom: 0.6rem;
  align-items: start;
}
.footer-col h4 { margin: 0 0 0.5rem 0; font-size: 1rem; font-weight: 600; }
.footer-brand { display:flex; align-items:center; gap:0.5rem; }
.footer-brand h3 { margin:0; font-size:1.05rem; font-weight:700; letter-spacing: -0.2px; }
.i24 { width:20px; height:20px; }
.i18 { width:16px; height:16px; vertical-align:-2px; }
.social-row { display:flex; gap:0.5rem; margin-top:0.5rem; flex-wrap: wrap; }
.links-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:0.7rem; }
.links-grid ul { margin:0; padding:0; list-style:none; }
.links-grid a { color:var(--muted); text-decoration:none; font-size:0.95rem; }
.links-grid a:hover { color:var(--text); text-decoration:none; }
.logo-mark { width:36px; height:36px; border:1px solid color-mix(in oklab, var(--text) 18%, transparent); display:inline-flex; align-items:center; justify-content:center; margin-bottom:0.35rem; }
.logo-mark span { width:22px; height:22px; border:1px solid color-mix(in oklab, var(--text) 18%, transparent); display:block; }
.footer-bottom { display:flex; align-items:center; justify-content:center; padding:0.5rem 0; text-align:center; font-size:0.92rem; }
.heart { color:#e3516e; }
@media (max-width: 960px) { .footer-top { grid-template-columns: 1fr; } }

/* Reveal animations: float in/out on scroll with optional stagger */
[data-animate] {
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition:
    opacity .7s cubic-bezier(.22,1,.36,1),
    transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.in-view {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}
/* Line wrapper for line-by-line reveal */
[data-lines] .line { display:block; }

/* Section-level float: slower and single-shot per section */
[data-section] { --section-delay: 0ms; }
[data-section].section-in { opacity: 1; transform: none; }
[data-section] {
  opacity: 0;
  transform: translateY(28px) scale(.985);
  transition: opacity 1.05s cubic-bezier(.22,1,.36,1), transform 1.05s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--section-delay);
}

/* When a section animates, reveal inner content shortly after without extra motion */
[data-section].section-in [data-animate] {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease .15s, transform .45s ease .15s;
}

/* Stagger helper: up to 12 children get increasing delays */
[data-stagger] > [data-animate] { --delay: 0ms; }
[data-stagger] > [data-animate]:nth-child(1)  { --delay: 0ms; }
[data-stagger] > [data-animate]:nth-child(2)  { --delay: 60ms; }
[data-stagger] > [data-animate]:nth-child(3)  { --delay: 120ms; }
[data-stagger] > [data-animate]:nth-child(4)  { --delay: 180ms; }
[data-stagger] > [data-animate]:nth-child(5)  { --delay: 240ms; }
[data-stagger] > [data-animate]:nth-child(6)  { --delay: 300ms; }
[data-stagger] > [data-animate]:nth-child(7)  { --delay: 360ms; }
[data-stagger] > [data-animate]:nth-child(8)  { --delay: 420ms; }
[data-stagger] > [data-animate]:nth-child(9)  { --delay: 480ms; }
[data-stagger] > [data-animate]:nth-child(10) { --delay: 540ms; }
[data-stagger] > [data-animate]:nth-child(11) { --delay: 600ms; }
[data-stagger] > [data-animate]:nth-child(12) { --delay: 660ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  [data-animate] { transition:none !important; transform:none !important; opacity:1 !important; }
}

/* Premium animated scrollbar */
:root { --scrollbar-track: color-mix(in srgb, var(--surface) 85%, transparent); --scrollbar-thumb-start: #77d487; --scrollbar-thumb-end: #37b86b; }

@media (prefers-reduced-motion: no-preference) {
  /* WebKit browsers (Chrome, Edge, Safari) */
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--scrollbar-track); border-radius: 999px; }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--scrollbar-thumb-start), var(--scrollbar-thumb-end));
    border-radius: 999px;
    min-height: 36px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08) inset;
    position: relative;
    background-size: 200% 100%;
    animation: scrollThumbMove 2.8s linear infinite;
  }
  @keyframes scrollThumbMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
}

/* Firefox fallback: thin track and solid accent thumb */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 70%, #2b6f45) var(--scrollbar-track); }

@media (prefers-reduced-motion: reduce) {
  ::-webkit-scrollbar-thumb { animation: none !important; }
}

/* Skip link */
.skip-link { position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left:1rem; top:1rem; width:auto; height:auto; background:#fff; padding:.5rem .75rem; border-radius:6px; box-shadow: var(--shadow-sm); }

/* Splash screen */
.splash { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: hidden; background: var(--bg); color: var(--text); display:flex; align-items:center; justify-content:center; z-index: 100; border-bottom:1px solid var(--border); transition: background 0.3s, color 0.3s; }
.splash-inner { display:flex; flex-direction:column; align-items:center; gap:.75rem; text-align:center; padding:1rem; color:inherit; background: transparent; }
.splash .laptop { width: min(88vw, 820px); height: auto; color: var(--text); opacity:1; }
.rotate-once { animation: spinOnce 1.2s cubic-bezier(.22,1,.36,1) 200ms 1 both; }
@keyframes spinOnce { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.splash-title { margin:.25rem 0; font-size: clamp(1.25rem, 2.6vw, 1.6rem); letter-spacing:.2px; }
.splash-avatar { width:56px; height:56px; border-radius:50%; border:2px solid var(--border); object-fit: cover; object-position: top center; }
.splash-cta { margin-top:.5rem; }
.splash-hint { margin:0; font-size:.9rem; }
.splash.hide { opacity:0; pointer-events:none; transition: opacity .25s ease; }

/* Typing text inside screen */
.laptop-wrap { position: relative; display:inline-block; }
/* Precisely align overlay to SVG screen rect (24,12)-(104,66) in 128x96 viewBox */
.screen-overlay {
  position:absolute;
  left: calc((24 / 128) * 100%);
  top: calc((12 / 96) * 100%);
  width: calc((80 / 128) * 100%);
  height: calc((54 / 96) * 100%);
  pointer-events:none;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.4rem;
  padding: clamp(8px, 2vw, 24px);
  border-radius: clamp(4px, .9vw, 12px);
  overflow: hidden;
  box-sizing: border-box;
}
.screen-overlay .splash-avatar { width:min(12vw, 72px); height:min(12vw, 72px); border-radius:50%; border:2px solid var(--border); object-fit: cover; object-position: top center; margin-top: 2.2em; }
.type-line { margin-top:.3rem; font-size: clamp(.85rem, 2vw, 1.15rem); line-height:1.2; color: var(--text); display:flex; align-items:baseline; gap:.15rem; white-space:nowrap; }
.type-caret { width: .1em; height: 1em; background: currentColor; display:inline-block; animation: caretBlink 1s step-end infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.screen-overlay .splash-cta { margin-top:.6rem; pointer-events:auto; border:2px solid var(--border); color:var(--text); background:var(--bg); transition: background 0.18s, color 0.18s, border-color 0.18s; }
html:not(.dark) .screen-overlay .splash-cta {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
html:not(.dark) .screen-overlay .splash-cta:hover, html:not(.dark) .screen-overlay .splash-cta:focus {
  background: var(--accent-600);
  border-color: var(--accent-700);
  color: #fff;
}
.screen-overlay .splash-hint { margin:.2rem 0 0 0; }
.splash-theme-toggle { position: absolute; top: 0.5rem; right: 0.5rem; background: none; border: none; padding: 0.3em; border-radius: 50%; box-shadow: none; z-index: 2; cursor: pointer; }
.splash-theme-toggle {
  position: fixed;
  top: 2.2rem;
  right: 2.2rem;
  background: none;
  border: none;
  padding: 0.5em;
  border-radius: 50%;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
  z-index: 2000;
  cursor: pointer;
  pointer-events: auto !important;
  max-width: 4.2em;
  max-height: 4.2em;
  transition: box-shadow 0.18s, background 0.18s;
}
.splash-theme-toggle img {
  width: 2.2em;
  height: 2.2em;
  pointer-events: none;
}
.splash-theme-toggle:focus {
  outline: 3px solid var(--accent);
}
.splash-theme-toggle:hover {
  background: var(--hover);
  box-shadow: 0 4px 18px 0 rgba(0,0,0,0.16);
}
@media (orientation: landscape) {


/* Line draw animation for laptop */
.splash .laptop rect, .splash .laptop path, .splash .laptop circle {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 900ms ease forwards;
}
.splash .laptop rect:nth-of-type(1) { animation-delay: 100ms; }
.splash .laptop circle { animation-delay: 250ms; }
.splash .laptop path { animation-delay: 300ms; }
.splash .laptop rect:nth-of-type(2) { animation-delay: 420ms; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Portrait tuning: nudge overlay content downward for better fit */
@media (max-width: 600px) {
  .screen-overlay {
    justify-content: flex-start !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .screen-overlay .splash-avatar {
    width: 32px;
    height: 32px;
    margin-top: 1.6em;
  }
  .screen-overlay .splash-cta {
    font-size: 0.74rem;
    padding: 0.22em 0.5em;
    min-height: 18px;
    border-radius: 7px;
    max-width: 68%;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
  }
  .type-line { font-size: clamp(.9rem, 3vw, 1.1rem); }
}

/* Disable page scroll while splash is visible */
html.splash-lock, html.splash-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .rotate-once { animation: none !important; }
}
}