:root {
  --bg: #0a0e18;
  --bg-alt: #0f1526;
  --surface: #131a2e;
  --surface-2: #1a2340;
  --text: #eef1f8;
  --text-muted: #aab4d0;
  --primary: #4fb0ff;
  --primary-2: #7c5cff;
  --accent: #ff8a3d;
  --success: #37d399;
  --border: rgba(255,255,255,0.1);
  --border-strong: rgba(255,255,255,0.16);
  --shadow: 0 24px 60px rgba(0,0,0,0.4);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-ring {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-right-color: var(--primary-2);
  animation: preloaderSpin 0.9s linear infinite;
}
.preloader-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 10px 30px rgba(79,176,255,0.35);
  animation: preloaderPulse 1.4s ease-in-out infinite;
}
@keyframes preloaderSpin {
  to { transform: rotate(360deg); }
}
@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  text-wrap: balance;
}
p { text-wrap: pretty; }

::selection {
  background: rgba(79,176,255,0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Page transitions (cross-page View Transitions; the dock stays in place) */
@view-transition { navigation: auto; }
::view-transition-old(root) {
  animation: vtOut 0.3s cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: vtIn 0.5s cubic-bezier(0, 0, 0.2, 1) both;
}
@keyframes vtOut {
  to { opacity: 0; transform: translateY(-30px) scale(0.98); }
}
@keyframes vtIn {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
}
/* Fallback for browsers without cross-page View Transitions */
html.no-vt main { animation: vtIn 0.5s cubic-bezier(0, 0, 0.2, 1) both; }
body.page-leaving main,
body.page-leaving .site-footer {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* Icons */
.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Cursor glow */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,176,255,0.10) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 12px rgba(79,176,255,0.6);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* Floating navigation dock */
.dock {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px;
  border-radius: 100px;
  background: rgba(19,26,46,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  view-transition-name: dock;
}
.dock-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dock-logo:hover { transform: rotate(-12deg) scale(1.08); }
.dock-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--border-strong);
}
.dock-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.dock-link .icon { font-size: 1.05rem; }
.dock-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.dock-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(79,176,255,0.9), rgba(124,92,255,0.9));
  box-shadow: 0 6px 18px rgba(79,176,255,0.3);
}
@media (max-width: 720px) {
  .dock { bottom: 14px; gap: 2px; }
  .dock-link { padding: 11px; }
  .dock-link span { display: none; }
  .dock-link .icon { font-size: 1.2rem; }
}

/* Page hero (used on sub-pages) */
.page-hero {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(79,176,255,0.16), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(124,92,255,0.14), transparent 50%),
    var(--bg);
  z-index: -1;
}
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
.page-kicker .spark { font-size: 1rem; }
.badge-wip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255,138,61,0.15);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: none;
  font-weight: 700;
}
.page-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.page-lead {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Hero (home) */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 64px 0 100px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(79,176,255,0.18), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(124,92,255,0.18), transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(255,138,61,0.10), transparent 50%),
    var(--bg);
  z-index: -1;
}
.hero-inner { padding-top: 0; }
.hero-kicker {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.highlight {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text {
  max-width: 580px;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.badge .icon {
  font-size: 1rem;
  color: var(--primary);
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 30px rgba(79,176,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(79,176,255,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* Section shared */
section { padding: 110px 0; position: relative; }
section.tight { padding: 70px 0; }

/* Stacked scroll panel: the first section rises over the hero with rounded corners */
.stack-wrap {
  position: relative;
  min-height: 145vh;
}
.stack-panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -60px 80px -20px rgba(0,0,0,0.5);
  padding-top: 70px;
  padding-bottom: 70px;
}
.panel-2 { z-index: 2; background: var(--bg-alt); }
.stack-panel > .container { width: 100%; }
@media (max-width: 760px) {
  .stack-panel {
    border-radius: 26px 26px 0 0;
    padding-top: 100px;
  }
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
.section-kicker .spark { color: var(--primary); font-size: 1.05rem; }
.section-kicker .kicker-line {
  width: 60px; height: 1px;
  background: var(--border-strong);
}

/* Marquee ticker */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marqueeScroll 26s linear infinite;
}
.marquee-track span {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 48px;
}
.marquee-track span em {
  font-style: normal;
  color: var(--primary);
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.section-title.mb0 { margin-bottom: 0; }

/* About */
.about-text {
  max-width: 700px;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}
.about-list li {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.about-list li::before {
  content: '';
  flex-shrink: 0;
  width: 8px; height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

/* Timeline */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--primary);
}
.timeline-item time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.timeline-item h4 {
  margin: 6px 0 6px;
  font-size: 1.1rem;
}
.timeline-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Passions cards (home preview + full page) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease, border-color 0.45s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(79,176,255,0.3);
}
.card-icon {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 16px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--surface-2);
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 700;
}
.card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  flex: 1;
}
.card .card-link,
.project-body .card-link {
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

/* Passion detail blocks (passions.html) */
.passion-block {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}
.passion-block:last-child { border-bottom: none; }
@media (max-width: 700px) {
  .passion-block { grid-template-columns: 1fr; gap: 18px; }
}
.passion-visual {
  width: 100%;
  aspect-ratio: 1;
  max-width: 200px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  color: var(--primary);
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
}
.passion-content h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.passion-content p {
  color: var(--text-muted);
  margin-bottom: 14px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Skills */
.skills-grid { display: grid; gap: 26px; }
.skill-head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.skill-bar {
  height: 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Projects */
.projects-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
}
.projects-note .icon {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 2px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}
.project-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(79,176,255,0.3);
}
.project-thumb {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: #cfd9f5;
  background: linear-gradient(140deg, var(--surface-2), var(--bg-alt));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.project-thumb .ghost-num {
  position: absolute;
  right: 10px;
  bottom: -18px;
  font-family: 'Poppins', sans-serif;
  font-size: 4.2rem;
  font-weight: 800;
  color: rgba(255,255,255,0.05);
  line-height: 1;
  pointer-events: none;
}
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-body h3 { font-size: 1.1rem; }
.project-body p { color: var(--text-muted); font-size: 0.92rem; flex: 1; }
.project-status {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 100px;
}
.status-live { background: rgba(55,211,153,0.15); color: var(--success); }
.status-progress { background: rgba(255,138,61,0.15); color: var(--accent); }
.project-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.stat h3 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat p { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, rgba(79,176,255,0.12), rgba(124,92,255,0.12));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); margin-bottom: 28px; }

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.contact-text {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 28px;
}
.info-list { display: flex; flex-direction: column; gap: 18px; margin-top: 10px; }
.info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.info-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--primary);
}
.info-item strong { display: block; font-size: 0.9rem; }
.info-item span { color: var(--text-muted); font-size: 0.88rem; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row { display: flex; gap: 16px; }
input, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--primary); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
.contact-form .btn { align-self: flex-start; }
.form-note { font-size: 0.9rem; color: var(--primary); min-height: 1.2em; }

/* Footer */
.site-footer {
  position: relative;
  margin-top: 40px;
  padding-top: 70px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-radius: 40px 40px 0 0;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 14px;
}
.footer-logo .dock-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.95rem;
}
.footer-logo-dot { color: var(--primary); }
.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
  font-size: 0.95rem;
}
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-col a .icon { font-size: 0.8rem; opacity: 0.7; }
.footer-col a:hover {
  color: var(--text);
  transform: translateX(4px);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.to-top:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(79,176,255,0.5);
}
.to-top:hover .icon { animation: bounceUp 0.6s ease; }
@keyframes bounceUp {
  50% { transform: translateY(-4px); }
}
.footer-wordmark {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(5rem, 22vw, 18rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  text-align: center;
  margin-top: 40px;
  padding-bottom: 110px;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(238,241,248,0.12);
  background: linear-gradient(180deg, rgba(79,176,255,0.18), transparent 80%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Ambient animations */
.hero-bg,
.page-hero-bg {
  animation: bgDrift 16s ease-in-out infinite alternate;
}
@keyframes bgDrift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.1) translate(-2%, 2%); }
}

/* Letter-by-letter title intro */
.split-letters .word {
  display: inline-block;
  white-space: nowrap;
}
.split-letters .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(10deg);
}
.split-letters.play .char {
  animation: charIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 35ms);
}
.split-letters.play .highlight.char {
  animation: charIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, gradientShift 5s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 35ms), 0s;
}
@keyframes charIn {
  to { opacity: 1; transform: none; }
}

/* Word-by-word fill on scroll */
.fill-word {
  color: rgba(238,241,248,0.16);
  transition: color 0.3s ease;
}
.fill-word.on {
  color: var(--text);
}

.statement-section {
  padding: 140px 0 60px;
}
.statement {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: -0.5px;
  max-width: 1000px;
}

/* XXL hero words that slide with scroll */
.hero {
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
.hero > .container { width: 100%; }
.hero-xxl {
  width: 100%;
  overflow: hidden;
  margin-top: 50px;
  pointer-events: none;
}
.hero-xxl-track {
  display: inline-flex;
  gap: 0.3em;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 1;
  letter-spacing: -0.04em;
  will-change: transform;
}
.hero-xxl-track span {
  color: var(--text);
}
.hero-xxl-track span.xxl-outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(238,241,248,0.35);
}

.highlight {
  background-size: 200% auto;
  animation: gradientShift 5s ease-in-out infinite alternate;
}
@keyframes gradientShift {
  from { background-position: 0% center; }
  to { background-position: 100% center; }
}

.card-icon,
.passion-visual {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover .card-icon {
  transform: scale(1.15) rotate(-6deg);
}
.passion-block:hover .passion-visual {
  transform: scale(1.05) rotate(3deg);
}

.project-thumb {
  transition: font-size 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.project-card:hover .project-thumb {
  font-size: 3.2rem;
}
.project-thumb .ghost-num {
  transition: transform 0.4s ease, color 0.4s ease;
}
.project-card:hover .ghost-num {
  transform: translateX(-8px);
  color: rgba(79,176,255,0.12);
}

.card-link {
  display: inline-block;
  align-self: flex-start;
  transition: transform 0.2s ease;
}
.card-link:hover {
  transform: translateX(4px);
}

/* Mouse-following glow on cards */
.card,
.project-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.card::before,
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(79,176,255,0.14), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::before,
.project-card:hover::before {
  opacity: 1;
}

/* 3D tilt on hover (angles set from the mouse position in script.js) */
.card:hover,
.project-card:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
  transition: transform 0.15s ease-out, box-shadow 0.45s ease, border-color 0.45s ease;
}

/* 404 page */
.notfound {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 0 140px;
  text-align: center;
}
.notfound-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.notfound-code {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(7rem, 24vw, 18rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  margin-bottom: 24px;
  user-select: none;
}
.notfound-code span {
  display: inline-block;
  animation: floatY 5s ease-in-out infinite;
}
.notfound-code span:nth-child(2) { animation-delay: -1.6s; }
.notfound-code span:nth-child(3) { animation-delay: -3.2s; }
.notfound-code .solid {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound-code .hollow {
  color: transparent;
  -webkit-text-stroke: 2px rgba(238,241,248,0.4);
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
.notfound-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.notfound-text {
  max-width: 520px;
  margin: 0 auto 34px;
  color: var(--text-muted);
  font-size: 1.1rem;
}
.notfound-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.notfound-mountains {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 32vh;
  z-index: 1;
  pointer-events: none;
}
.snow {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.flake {
  position: absolute;
  top: -10px;
  border-radius: 50%;
  background: #fff;
  animation: snowFall linear infinite;
}
@keyframes snowFall {
  to { transform: translate3d(var(--drift, 0), 110vh, 0); }
}

/* Responsive */
@media (max-width: 760px) {
  .form-row { flex-direction: column; }
}
