:root {

  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-terminal: #0b1120;

  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-indigo: #4f46e5;
  --accent-amber: #d97706;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #059669 100%);
  --accent-glow: rgba(2, 132, 199, 0.15);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-code: #0369a1;

  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-hover: #0284c7;

  --font-sans: 'Times New Roman', Times, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 20px var(--accent-glow);
}

[data-theme="dark"] {
  --bg-body: #0a0d14;
  --bg-surface: #0f1523;
  --bg-card: #131b2e;
  --bg-card-hover: #18233c;
  --bg-glass: rgba(19, 27, 46, 0.85);
  --bg-terminal: #070a10;

  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-indigo: #6366f1;
  --accent-amber: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #10b981 100%);
  --accent-glow: rgba(56, 189, 248, 0.2);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-code: #38bdf8;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(56, 189, 248, 0.4);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px var(--accent-glow);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(2, 132, 199, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 90% 65%, rgba(5, 150, 105, 0.05) 0%, transparent 45%),
    url('../images/bg-light.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.24;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease, background-image 0.4s ease;
}

[data-theme="dark"] body::before {
  opacity: 0.42;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(56, 189, 248, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 90% 65%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    url('../images/bg-dark.jpg');
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #0369a1;
}

[data-theme="dark"] a:hover {
  color: #7dd3fc;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
}

[data-theme="dark"] .section-tag {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}

.section-title {
  font-size: 2.35rem;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-cyan);
  display: inline-block;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: var(--transition);
}

.site-header.scrolled {
  background: var(--bg-surface);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: inline-block;
  vertical-align: middle;
  transition: var(--transition);
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.08);
}

.brand-code-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: #f0f9ff;
  color: var(--accent-cyan);
  border: 1px solid #bae6fd;
}

/* =============================================
   MENISCUS NAV — Fluid Physics Liquid Tab Bar
   ============================================= */

.mn {
  --mn-h: 104px;
  --mn-headroom: 38px;
  --mn-bar-h: 66px;
  --mn-rail: 16px;
  --mn-bead: 23px;
  --mn-bead-color: #0284c7;

  --mn-surface: #ffffff;
  --mn-icon-idle: #64748b;
  --mn-icon-active: #ffffff;
  --mn-label-idle: #64748b;
  --mn-label-active: #0284c7;

  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 530px;
  max-width: calc(100% - 24px);
  height: var(--mn-h);
  pointer-events: none;
  user-select: none;
  z-index: 999;
  filter: drop-shadow(0 12px 32px rgba(15, 23, 42, 0.18));
  animation: none !important;
}

[data-theme="dark"] .mn {
  --mn-surface: #0f172a;
  --mn-icon-idle: #94a3b8;
  --mn-icon-active: #070a10;
  --mn-label-idle: #94a3b8;
  --mn-label-active: #f8fafc;
  filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.5));
}

/* Layer 0 — Coloured bloom glow tracking the bead */
.mn-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 170px;
  height: 90px;
  margin-top: -45px;
  margin-left: -85px;
  border-radius: 50%;
  opacity: 0.4;
  filter: blur(22px);
  will-change: transform, background;
  pointer-events: none;
}

[data-theme="dark"] .mn-glow {
  opacity: 0.58;
  filter: blur(24px);
}

/* Layer 1 & Clip — Glassmorphism clipped by dynamic track path */
.mn-glass {
  position: absolute;
  inset: 0;
  clip-path: url(#mn-clip);
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  pointer-events: none;
}

[data-theme="dark"] .mn-glass {
  background: rgba(15, 23, 42, 0.65);
}

/* Layer 2 — Rim highlight following the track contour */
.mn-rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

#mn-rim-path {
  stroke-width: 1.8;
}

/* Layer 3 — Gooey merge container (SVG Filter) */
.mn-goo {
  position: absolute;
  inset: 0;
  opacity: 0.96;
  filter: url(#mn-goo);
  pointer-events: none;
}

[data-theme="light"] .mn-goo {
  filter: url(#mn-goo) drop-shadow(0 4px 14px rgba(15, 23, 42, 0.08));
}

[data-theme="dark"] .mn-goo {
  filter: url(#mn-goo) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
}

.mn-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#mn-track-path {
  fill: var(--mn-surface);
  transition: fill 0.3s ease;
}

/* The liquid drop / bead */
.mn-bead {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--mn-bead) * 2);
  height: calc(var(--mn-bead) * 2);
  margin-top: calc(var(--mn-bead) * -1);
  margin-left: calc(var(--mn-bead) * -1);
  border-radius: 50%;
  transform-origin: 50% 50%;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.22), inset 0 2px 5px rgba(255, 255, 255, 0.45);
  will-change: transform, background;
}

/* Layer 4 — Interactive tab links, icons, and labels */
.mn-items {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: var(--mn-bar-h);
  padding: 0 var(--mn-rail);
  pointer-events: auto;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.mn-item {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 10px 2px 8px;
  overflow: visible;
  cursor: pointer;
  background: none;
  border: 0;
  text-decoration: none;
  outline: none;
  will-change: transform;
}

.mn-icon {
  --f: 0;
  --d: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--mn-icon-idle);
  color: color-mix(in srgb, var(--mn-icon-active) calc(var(--f) * 100%), var(--mn-icon-idle));
  opacity: calc((0.65 + 0.35 * var(--f)) * var(--d));
  will-change: transform, opacity;
  font-size: 1.15rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.mn-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  vertical-align: middle;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

.mn-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--mn-label-idle);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.015em;
  opacity: 0.75;
  transition: opacity 240ms ease, color 240ms ease;
  pointer-events: none;
}

.mn-item:hover .mn-label {
  opacity: 1;
  color: var(--mn-label-active);
}

.mn-item[aria-current="page"] .mn-label,
.mn-item.active .mn-label {
  opacity: 1;
  font-weight: 700;
  color: var(--mn-label-active);
}

.mn-item:focus-visible {
  outline: none;
}

.mn-item:focus-visible .mn-icon {
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent-cyan), 0 0 0 4px rgba(2, 132, 199, 0.3);
}

/* Page padding to prevent bottom tab bar overlapping content */
body {
  padding-bottom: 115px;
}

.site-footer {
  padding-bottom: 120px;
}

.back-to-top {
  bottom: 120px !important;
}

/* Filter and clip-path defs */
.mn-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

@keyframes splitDriftLeftExit {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(-24px, 0, 0);
    opacity: 0;
  }
}

@keyframes splitDriftRightExit {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(24px, 0, 0);
    opacity: 0;
  }
}

@keyframes splitDriftLeftEnter {
  0% {
    transform: translate3d(-20px, 0, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes splitDriftRightEnter {
  0% {
    transform: translate3d(20px, 0, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

#main-content {
  position: relative;
  overflow-x: clip;
}

#main-content.tab-split-exit {
  pointer-events: none;
}

#main-content.tab-split-exit .hero-content,
#main-content.tab-split-exit .section-header .section-tag,
#main-content.tab-split-exit .section-header .section-title,
#main-content.tab-split-exit .cards-grid-3 > *:nth-child(odd),
#main-content.tab-split-exit .timeline-item:nth-child(odd),
#main-content.tab-split-exit .skill-category-block:nth-child(odd),
#main-content.tab-split-exit .contact-info-list,
#main-content.tab-split-exit .hero-buttons,
#main-content.tab-split-exit .project-filter-btn:nth-child(odd) {
  animation: splitDriftLeftExit 0.22s cubic-bezier(0.35, 0, 0.65, 0) forwards !important;
  will-change: transform, opacity;
}

#main-content.tab-split-exit .hero-visual,
#main-content.tab-split-exit .section-header .section-subtitle,
#main-content.tab-split-exit .section-header p,
#main-content.tab-split-exit .cards-grid-3 > *:nth-child(even),
#main-content.tab-split-exit .timeline-item:nth-child(even),
#main-content.tab-split-exit .skill-category-block:nth-child(even),
#main-content.tab-split-exit .form-card,
#main-content.tab-split-exit .hero-tech-stack,
#main-content.tab-split-exit .project-filter-btn:nth-child(even) {
  animation: splitDriftRightExit 0.22s cubic-bezier(0.35, 0, 0.65, 0) forwards !important;
  will-change: transform, opacity;
}

#main-content.tab-split-enter .hero-content,
#main-content.tab-split-enter .section-header .section-tag,
#main-content.tab-split-enter .section-header .section-title,
#main-content.tab-split-enter .cards-grid-3 > *:nth-child(odd),
#main-content.tab-split-enter .timeline-item:nth-child(odd),
#main-content.tab-split-enter .skill-category-block:nth-child(odd),
#main-content.tab-split-enter .contact-info-list,
#main-content.tab-split-enter .hero-buttons,
#main-content.tab-split-enter .project-filter-btn:nth-child(odd) {
  animation: splitDriftLeftEnter 0.44s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

#main-content.tab-split-enter .hero-visual,
#main-content.tab-split-enter .section-header .section-subtitle,
#main-content.tab-split-enter .section-header p,
#main-content.tab-split-enter .cards-grid-3 > *:nth-child(even),
#main-content.tab-split-enter .timeline-item:nth-child(even),
#main-content.tab-split-enter .skill-category-block:nth-child(even),
#main-content.tab-split-enter .form-card,
#main-content.tab-split-enter .hero-tech-stack,
#main-content.tab-split-enter .project-filter-btn:nth-child(even) {
  animation: splitDriftRightEnter 0.44s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}

#main-content.tab-split-enter .section-header .section-subtitle,
#main-content.tab-split-enter .hero-tagline,
#main-content.tab-split-enter .hero-description {
  animation-delay: 0.04s;
}

#main-content.tab-split-enter .cards-grid-3 > *,
#main-content.tab-split-enter .hero-buttons,
#main-content.tab-split-enter .hero-tech-stack,
#main-content.tab-split-enter .hero-visual,
#main-content.tab-split-enter .timeline-item,
#main-content.tab-split-enter .skill-category-block {
  animation-delay: 0.06s;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-card);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.btn-outline:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: var(--transition);
}

.tech-badge i {
  color: var(--accent-cyan);
}

.tech-badge:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.hero-section {
  padding: 85px 0 95px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 75%;
  height: 100%;
  background-image: url('../images/bg-light.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 1) 22%, rgba(0, 0, 0, 0) 78%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 1) 22%, rgba(0, 0, 0, 0) 78%);
  transition: opacity 0.4s ease, background-image 0.4s ease;
}

[data-theme="dark"] .hero-section::before {
  opacity: 0.85;
  background-image: url('../images/bg-dark.jpg');
  mask-image: radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 84%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 84%);
}

@keyframes borderBeamSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes navSurroundTop {
  0% {
    opacity: 0;
    transform: translate3d(0, -32px, 0) scale(0.92);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes navSurroundLeft {
  0% {
    opacity: 0;
    transform: translate3d(-36px, -14px, 0);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes navSurroundRight {
  0% {
    opacity: 0;
    transform: translate3d(36px, -14px, 0);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes navItemDropIn {
  0% {
    opacity: 0;
    transform: translate3d(var(--nav-item-x, 0), -16px, 0) scale(0.86);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes surroundFromTop {
  0% {
    opacity: 0;
    transform: translate3d(0, -42px, 0) scale(0.92);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes surroundFromLeft {
  0% {
    opacity: 0;
    transform: translate3d(-68px, 0, 0);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes surroundFromRight {
  0% {
    opacity: 0;
    transform: translate3d(78px, -12px, 0) scale(0.94);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes surroundFromBottom {
  0% {
    opacity: 0;
    transform: translate3d(0, 44px, 0);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes badgeStaggerIn {
  0% {
    opacity: 0;
    transform: translate3d(-18px, 26px, 0) scale(0.84);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes nodeConvergeRight {
  0% {
    opacity: 0;
    transform: translate3d(50px, 0, 0);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes nodeConvergeLeft {
  0% {
    opacity: 0;
    transform: translate3d(-50px, 0, 0);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes metricConverge {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.86);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes orbitSpinIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35) rotate(-25deg);
  }
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes orbitTrack {
  0% {
    transform: rotate(0deg) translate(390px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translate(390px) rotate(-360deg);
  }
}

.hero-ambient-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  border: 1px dashed rgba(2, 132, 199, 0.12);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

[data-theme="dark"] .hero-ambient-orbit {
  border-color: rgba(56, 189, 248, 0.16);
}

.hero-ambient-orbit::before {
  content: "";
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 1px solid rgba(5, 150, 105, 0.08);
}

[data-theme="dark"] .hero-ambient-orbit::before {
  border-color: rgba(52, 211, 153, 0.12);
}

.hero-ambient-orbit::after {
  content: "";
  position: absolute;
  top: 60px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 14px var(--accent-cyan);
  animation: orbitTrack 14s linear infinite;
}

.hero-section.hero-surround-in .hero-ambient-orbit {
  animation: orbitSpinIn 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-section.hero-surround-in .status-pill {
  animation: surroundFromTop 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .hero-title {
  animation: surroundFromLeft 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .hero-subtitle {
  animation: surroundFromLeft 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.20s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .hero-tagline {
  animation: surroundFromLeft 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .hero-description {
  animation: surroundFromLeft 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .hero-buttons {
  animation: surroundFromBottom 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.44s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .hero-tech-label {
  animation: surroundFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.50s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .tech-badge:nth-child(2) {
  animation: badgeStaggerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.54s both;
}

.hero-section.hero-surround-in .tech-badge:nth-child(3) {
  animation: badgeStaggerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both;
}

.hero-section.hero-surround-in .tech-badge:nth-child(4) {
  animation: badgeStaggerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.62s both;
}

.hero-section.hero-surround-in .tech-badge:nth-child(5) {
  animation: badgeStaggerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.66s both;
}

.hero-section.hero-surround-in .tech-badge:nth-child(6) {
  animation: badgeStaggerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.70s both;
}

.hero-section.hero-surround-in .tech-badge:nth-child(7) {
  animation: badgeStaggerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.74s both;
}

.hero-section.hero-surround-in .hero-visual .arch-card {
  animation: surroundFromRight 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .arch-header {
  animation: surroundFromTop 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both;
}

.hero-section.hero-surround-in .arch-pipeline .arch-node:nth-of-type(1) {
  animation: nodeConvergeRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .arch-pipeline .arch-node:nth-of-type(2) {
  animation: nodeConvergeRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.52s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .arch-pipeline .arch-node:nth-of-type(3) {
  animation: nodeConvergeLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.62s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .arch-pipeline .arch-node:nth-of-type(4) {
  animation: nodeConvergeRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.72s both;
  will-change: transform, opacity;
}

.hero-section.hero-surround-in .arch-metric-card:nth-child(1) {
  animation: metricConverge 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.78s both;
}

.hero-section.hero-surround-in .arch-metric-card:nth-child(2) {
  animation: metricConverge 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.82s both;
}

.hero-section.hero-surround-in .arch-metric-card:nth-child(3) {
  animation: metricConverge 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.86s both;
}

.hero-section.hero-surround-in .arch-metric-card:nth-child(4) {
  animation: metricConverge 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.90s both;
}

.hero-section.hero-surround-in .arch-status-strip {
  animation: surroundFromBottom 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.94s both;
}

.site-header.navbar-surround-in .brand-logo {
  animation: navSurroundLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-actions {
  animation: navSurroundRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-links {
  animation: navSurroundTop 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.02s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-link:nth-of-type(1) {
  --nav-item-x: -22px;
  animation: navItemDropIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-link:nth-of-type(2) {
  --nav-item-x: -14px;
  animation: navItemDropIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-link:nth-of-type(3) {
  --nav-item-x: -6px;
  animation: navItemDropIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.20s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-link:nth-of-type(4) {
  --nav-item-x: 6px;
  animation: navItemDropIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.26s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-link:nth-of-type(5) {
  --nav-item-x: 14px;
  animation: navItemDropIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
  will-change: transform, opacity;
}

.site-header.navbar-surround-in .nav-link:nth-of-type(6) {
  --nav-item-x: 22px;
  animation: navItemDropIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .hero-section.hero-surround-in *,
  .hero-ambient-orbit,
  .arch-beam-border,
  .site-header.navbar-surround-in *,
  .nav-beam-border {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

.hero-section > .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  color: #047857;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

[data-theme="dark"] .status-pill {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.hero-title {
  font-size: 3.6rem;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-tech-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tech-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-right: 6px;
  font-weight: 600;
}

.terminal-card {
  background: var(--bg-terminal);
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  transition: var(--transition);
}

.terminal-card:hover {
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
}

.terminal-header {
  background: #111726;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
  color: #f8fafc;
}

.code-keyword { color: #f43f5e; font-weight: 600; }
.code-class { color: #38bdf8; }
.code-func { color: #c084fc; }
.code-string { color: #34d399; }
.code-comment { color: #94a3b8; font-style: italic; }
.code-prop { color: #fbbf24; }

.arch-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: var(--transition);
  isolation: isolate;
}

.arch-beam-border {
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    transparent 280deg,
    rgba(2, 132, 199, 0.85) 325deg,
    rgba(5, 150, 105, 0.95) 350deg,
    transparent 360deg
  );
  animation: borderBeamSpin 4.5s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

[data-theme="dark"] .arch-beam-border {
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    transparent 270deg,
    rgba(56, 189, 248, 0.95) 320deg,
    rgba(52, 211, 153, 0.95) 350deg,
    transparent 360deg
  );
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}

.arch-header,
.arch-body {
  position: relative;
  z-index: 1;
}

.arch-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 25px 55px -12px rgba(2, 132, 199, 0.14);
}

.arch-header {
  background: var(--bg-surface);
  margin: 1.5px 1.5px 0 1.5px;
  border-radius: calc(var(--radius-xl) - 1.5px) calc(var(--radius-xl) - 1.5px) 0 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.arch-body {
  background: var(--bg-card);
  margin: 0 1.5px 1.5px 1.5px;
  border-radius: 0 0 calc(var(--radius-xl) - 1.5px) calc(var(--radius-xl) - 1.5px);
  padding: 24px;
}

.arch-pipeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.arch-node {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.arch-node:hover {
  border-color: var(--accent-cyan);
  transform: translateX(4px);
  background: #f8fafc;
}

[data-theme="dark"] .arch-node:hover {
  background: rgba(56, 189, 248, 0.05);
}

.arch-node-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.arch-node-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f0f9ff;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid #bae6fd;
}

[data-theme="dark"] .arch-node-icon {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}

.arch-node-info h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
  color: var(--text-primary);
  font-weight: 700;
}

.arch-node-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.arch-node-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .arch-node-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.arch-flow-arrow {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1;
}

.arch-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-subtle);
}

.arch-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  transition: var(--transition);
}

.arch-metric-card:hover {
  border-color: var(--accent-cyan);
}

.arch-metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  margin-bottom: 2px;
}

.arch-metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.arch-status-strip {
  margin-top: 16px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #065f46;
  font-weight: 600;
}

[data-theme="dark"] .arch-status-strip {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.section-padding {
  padding: 84px 0;
}

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #f0f9ff;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 20px;
  border: 1px solid #bae6fd;
}

[data-theme="dark"] .card-icon {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.skills-wrapper {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.skill-category-block {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.skill-category-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.skill-category-title i {
  color: var(--accent-cyan);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: var(--transition);
}

.skill-item:hover {
  border-color: var(--accent-cyan);
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .skill-item:hover {
  background: var(--bg-surface);
}

.skill-icon {
  font-size: 1.35rem;
  color: var(--accent-cyan);
  width: 24px;
  text-align: center;
}

.skill-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.timeline-list {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding-left: 32px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-emerald), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  top: 6px;
  left: -32px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.4);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: #f0f9ff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #bae6fd;
}

[data-theme="dark"] .timeline-period {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}

.timeline-company {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.timeline-title {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.timeline-role {
  color: var(--accent-emerald);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-bullet {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

.timeline-bullet i {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  margin-top: 5px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.project-card:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-thumb {
  width: 100%;
  height: 230px;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="dark"] .project-thumb {
  background: #0b1120;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.03);
}

.project-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-role-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #a7f3d0;
}

[data-theme="dark"] .project-role-badge {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.project-title a {
  color: var(--text-primary);
}

.project-title a:hover {
  color: var(--accent-cyan);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-tech-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .project-tech-tag {
  color: var(--text-secondary);
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.project-detail-hero {
  padding: 50px 0 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-cyan);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 36px;
}

.project-feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.project-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 1rem;
  color: var(--text-primary);
}

.project-feature-item i {
  color: var(--accent-emerald);
}

.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.15rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-meta-row {
  margin-bottom: 14px;
}

.sidebar-meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.sidebar-meta-value {
  font-weight: 700;
  color: var(--text-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--accent-cyan);
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #f0f9ff;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 1px solid #bae6fd;
}

[data-theme="dark"] .contact-icon {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}

.contact-meta h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.contact-meta p,
.contact-meta a {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--accent-cyan);
  cursor: pointer;
  margin-left: 8px;
  padding: 4px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.copy-btn:hover {
  color: #0369a1;
  transform: scale(1.15);
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

[data-theme="dark"] .form-control {
  background: var(--bg-surface);
  border-color: var(--border-card);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  background: #ffffff;
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .toast {
  background: #1e293b;
  border-color: var(--border-hover);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
  margin-top: 80px;
}

[data-theme="dark"] .site-footer {
  background: #07090e;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1.1fr 1.2fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 440px;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

[data-theme="dark"] .social-btn {
  background: var(--bg-card);
  border-color: var(--border-card);
}

.social-btn:hover {
  background: #f0f9ff;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

.footer-links-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 28px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 90;
}

[data-theme="dark"] .back-to-top {
  background: var(--bg-card);
  border-color: var(--border-card);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-title {
    font-size: 2.85rem;
  }

  .cards-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: none !important;
  }

  body {
    padding-bottom: 88px;
  }

  .site-header {
    height: 64px;
  }

  .navbar {
    height: 64px;
  }

  .site-footer {
    padding-bottom: 100px;
  }

  .back-to-top {
    bottom: 100px !important;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .mn {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 16px);
    max-width: 440px;
    z-index: 1000;
    margin: 0;
    pointer-events: none;
  }

  .mn-items {
    pointer-events: auto;
  }

  .mn-label {
    font-size: 0.65rem;
  }

  .mn-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

@media (max-width: 400px) {
  .mn {
    width: calc(100% - 10px);
    --mn-rail: 8px;
  }

  .mn-label {
    font-size: 0.6rem;
    letter-spacing: 0;
  }

  .mn-icon {
    font-size: 0.92rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.4rem;
  }

  .cards-grid-3 {
    grid-template-columns: 1fr;
  }

  .project-feature-list {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .form-card {
    padding: 24px 18px;
  }
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.btn {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}

.btn:active {
  transform: scale(0.97) !important;
}

.card, .project-card, .skill-category-block, .timeline-item {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .nav-indicator-glider {
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .site-header,
  .site-footer,
  .back-to-top,
  .btn,
  .theme-toggle-btn,
  .mobile-toggle,
  .toast-container {
    display: none !important;
  }

  .card, .timeline-content, .sidebar-box {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
}
