:root {
  --navy: #0a192f;
  --navy-light: #112240;
  --navy-lighter: #233554;
  --slate: #8892b0;
  --slate-light: #a8b2d1;
  --white: #e6f1ff;
  --green: #64ffda;
  --green-dim: rgba(100, 255, 218, 0.12);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --header-h: 104px;
  --ease: cubic-bezier(0.645, 0.045, 0.355, 1);
  --max-w: 1280px;
  --side-pad: clamp(24px, 6vw, 100px);
}

* {
  box-sizing: border-box;
}

/* Custom cursor */
body.has-custom-cursor .custom-cursor {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  overflow: visible;
}

body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  will-change: transform;
}

body.has-custom-cursor .custom-cursor.is-hidden .cursor-dot,
body.has-custom-cursor .custom-cursor.is-hidden .cursor-ring {
  opacity: 0;
  visibility: hidden;
}

body.has-custom-cursor .cursor-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 0 2px rgba(10, 25, 47, 0.9),
    0 0 18px rgba(100, 255, 218, 0.9);
  z-index: 2;
}

body.has-custom-cursor .cursor-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: rgba(100, 255, 218, 0.08);
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.25);
  z-index: 1;
  transition:
    width 0.2s var(--ease),
    height 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

body.has-custom-cursor.cursor-hover .cursor-ring {
  width: 64px;
  height: 64px;
  border-color: var(--green);
  background: var(--green-dim);
  box-shadow: 0 0 28px rgba(100, 255, 218, 0.45);
}

body.has-custom-cursor.cursor-hover .cursor-dot {
  box-shadow:
    0 0 0 2px rgba(10, 25, 47, 0.9),
    0 0 24px rgba(100, 255, 218, 1);
}

body.has-custom-cursor.cursor-click .cursor-ring {
  width: 36px;
  height: 36px;
  border-color: var(--slate-light);
}

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor * {
    cursor: none !important;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--slate);
  background: var(--navy);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.text-accent {
  color: var(--green);
}

/* IDE background */
.code-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.04;
}

.code-line {
  position: absolute;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  animation: codeFloat 28s linear infinite;
  top: calc(var(--line-i) * 4.2%);
}

@keyframes codeFloat {
  0% {
    transform: translateY(100vh);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    transform: translateY(-20vh);
    opacity: 0;
  }
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Scroll top */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--navy-light);
  color: var(--green);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--green-dim);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side-pad);
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.logo {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--green);
  z-index: 101;
}

.logo-bracket {
  color: var(--green);
}

.site-nav ol {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 1.1rem;
  color: var(--slate-light);
  transition: color 0.2s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--green);
}

.btn-resume {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  padding: 14px 28px;
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  z-index: 101;
  transition: background 0.2s var(--ease);
}

.btn-resume:hover {
  background: var(--green-dim);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Social rail */
.social-rail {
  position: fixed;
  bottom: 0;
  left: var(--side-pad);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-bottom: 48px;
}

.social-rail a {
  color: var(--slate);
  font-size: 1.1rem;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.social-rail a:hover {
  color: var(--green);
  transform: translateY(-3px);
}

.rail-line {
  width: 1px;
  height: 90px;
  background: var(--slate);
  opacity: 0.4;
}

/* Main */
.main-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  padding-left: calc(var(--side-pad) + 40px);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
}

body[data-page="home"] .hero {
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero-name {
  margin: 0;
  font-size: clamp(3.25rem, 10vw, 5.5rem);
  font-weight: 700;
  color: var(--slate-light);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

body[data-page="home"] .hero-name {
  font-size: clamp(4.5rem, 14vw, 9rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-lastname {
  display: block;
  color: var(--green);
}

.hero-skills {
  margin: 20px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: var(--slate);
  letter-spacing: 0.02em;
}

body[data-page="home"] .hero-skills {
  margin-top: 28px;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

body[data-page="home"] .hero-cta {
  display: flex;
  justify-content: center;
  width: 100%;
}

body[data-page="home"] .scroll-hint {
  left: 50%;
  transform: translateX(-50%);
}

.hero-skills-sep {
  color: var(--green);
  margin: 0 0.35em;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin: 0 0 16px;
}

.hero-title {
  margin: 8px 0 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  color: var(--slate);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-cta {
  margin-top: 40px;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 18px 28px;
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  transition: background 0.25s var(--ease);
}

.btn-primary:hover {
  background: var(--green-dim);
}

.scroll-hint {
  position: absolute;
  bottom: 48px;
  left: calc(var(--side-pad) + 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--green);
}

.scroll-hint-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
}

.scroll-hint-line {
  width: 1px;
  height: 60px;
  background: var(--green);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    transform: scaleY(0.4);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  color: var(--slate-light);
  letter-spacing: -0.02em;
}

.heading-index {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 0.75em;
  display: block;
  margin-bottom: 8px;
}

.heading-line {
  width: 60px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}

.section-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -24px 0 48px;
  font-size: 1.05rem;
}

/* Expertise */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.expertise-card {
  padding: 40px 32px;
  background: var(--navy-light);
  border-radius: 4px;
  transition: transform 0.25s var(--ease);
}

.expertise-card:hover {
  transform: translateY(-6px);
}

.expertise-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.expertise-icon {
  font-size: 1.5rem;
  color: var(--green);
  flex-shrink: 0;
}

.expertise-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.expertise-title {
  margin: 0;
  font-size: 1.35rem;
  color: var(--white);
}

.expertise-sub {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 0.8rem;
}

.expertise-desc {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.65;
}

.expertise-tools {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate);
}

.expertise-tools li::before {
  content: '▹ ';
  color: var(--green);
}

/* Quote */
.quote {
  margin: 0;
  padding: 60px 0;
  text-align: center;
  border: none;
}

.quote p {
  margin: 0 auto;
  max-width: 640px;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--slate-light);
  line-height: 1.7;
}

.quote p::before {
  content: '“';
  color: var(--green);
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

/* Featured project */
.featured-project {
  margin-bottom: 56px;
}

.featured-label {
  color: var(--green);
  font-size: 0.8rem;
  margin: 0 0 16px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--navy-light);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s var(--ease);
}

.featured-card:hover {
  transform: translateY(-4px);
}

.featured-card:hover .featured-link {
  color: var(--green);
}

.featured-media {
  overflow: hidden;
  min-height: 280px;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.featured-card:hover .featured-media img {
  transform: scale(1.04);
}

.featured-info {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-info h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  color: var(--white);
}

.featured-info p {
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.featured-link {
  margin-top: auto;
  color: var(--slate-light);
  font-size: 0.85rem;
  transition: color 0.2s var(--ease);
}

.featured-link i {
  margin-left: 8px;
  transition: transform 0.2s var(--ease);
}

.featured-card:hover .featured-link i {
  transform: translateX(4px);
}

/* Work toolbar */
.work-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.filter-btn .mono {
  color: var(--green);
}

.filter-count {
  opacity: 0.6;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--green);
  background: var(--green-dim);
}

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Project slider */
.project-slider-container {
  margin: 0 auto 48px;
  padding: 22px;
}

.project-slider-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.project-slider {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
}

.project-slider-track {
  display: flex;
  gap: 18px;
  transition: transform 0.45s var(--ease);
  will-change: transform;
}

.project-slide {
  flex: 0 0 calc((100% - 36px) / 3);
  background: var(--navy-light);
  color: var(--slate);
  border-radius: 12px;
  overflow: visible;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  height: 320px;
  position: relative;
}

.project-slide:hover {
  transform: scale(1.05) translateY(-8px);
  box-shadow: 0 12px 32px rgba(100, 255, 218, 0.15);
  z-index: 10;
}

.project-slide-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  color: inherit;
  width: 100%;
  height: 100%;
  background: var(--navy-light);
  position: relative;
}

.project-slide-card:hover .project-slide-body {
  opacity: 1;
  visibility: visible;
}

.project-slide img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  background: var(--navy);
  transition: filter 0.3s var(--ease);
  flex-shrink: 0;
  border-radius: 12px;
}

.project-slide:hover img {
  filter: brightness(0.8);
}

.project-slide-body {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(10, 25, 47, 0.7) 0%, rgba(10, 25, 47, 0.95) 60%);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  pointer-events: none;
  overflow-y: auto;
  max-height: 320px;
}

.project-slide:hover .project-slide-body {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-slide p {
  transition: opacity 0.3s var(--ease);
  margin: 0 0 12px 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.project-slide:hover p {
  opacity: 1;
}

.project-slide .mono {
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
}

.project-slide h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
}


.project-slide .mono { color: var(--green); }
.project-slide h3 { margin: 8px 0 10px; color: var(--white); font-size: 1.25rem; }
.project-slide p { margin: 0 0 12px; color: var(--slate); font-size: 0.95rem; line-height: 1.6; }

.slider-arrow {
  background: var(--navy-light);
  border: 1px solid rgba(100, 255, 218, 0.1);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.slider-arrow:hover {
  transform: translateY(-2px);
  background: rgba(100, 255, 218, 0.08);
}

.slider-arrow i { color: var(--green); }

.slider-dots {
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:14px;
}
.slider-dots button {
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(100,255,218,0.18);
  border:none;
  cursor:pointer;
}
.slider-dots button.active {
  background:var(--green);
  box-shadow:0 4px 10px rgba(100,255,218,0.18);
}

@media (max-width: 1100px) {
  .project-slide { flex: 0 0 calc((100% - 18px) / 2); }
}

@media (max-width: 700px) {
  .project-slider-wrap { gap: 8px; }
  .slider-arrow { display: none; }
  .project-slide { flex: 0 0 100%; }
}

.work-card {
  display: block;
  background: var(--navy-light);
  border: 1px solid var(--navy-lighter);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--green);
}

.work-card--wide {
  grid-column: span 2;
}

.work-card--wide .work-card-media {
  height: 320px;
}

.work-card-media {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
  filter: grayscale(30%) contrast(1.05);
}

.work-card:hover .work-card-media img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

.work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 25, 47, 0.9));
}

.work-card-body {
  padding: 20px 22px 24px;
}

.work-card-cat {
  font-size: 0.72rem;
  color: var(--green);
}

.work-card-body h3 {
  margin: 8px 0 10px;
  font-size: 1.1rem;
  color: var(--white);
}

.work-card-desc {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--slate);
}

.work-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 0.8rem;
  margin-top: 8px;
  transition: opacity 0.2s var(--ease);
  pointer-events: auto;
}

.work-card-link:hover {
  opacity: 0.8;
}

.work-card-link i {
  font-size: 0.7rem;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  background: var(--navy);
  color: var(--slate-light);
  border-radius: 3px;
}

.tag-list--sm li {
  font-size: 0.68rem;
  padding: 3px 8px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--slate);
}

/* Experience */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.job-card {
  position: relative;
  padding-left: 28px;
}

.job-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--green);
  border-radius: 2px;
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.job-role {
  margin: 0;
  font-size: 1.15rem;
  color: var(--white);
  font-weight: 600;
}

.job-company {
  margin: 6px 0 0;
  color: var(--green);
  font-size: 0.85rem;
}

.job-period {
  color: var(--slate);
  font-size: 0.8rem;
  white-space: nowrap;
}

.job-location {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--slate);
}

.job-desc {
  margin: 16px 0;
  max-width: 720px;
  font-size: 0.98rem;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  margin: 0 0 20px;
}

.education-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.edu-item {
  padding: 24px;
  background: var(--navy-light);
  border-radius: 4px;
  border-left: 3px solid var(--green);
}

.edu-item h4 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 1rem;
}

.edu-item p {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.edu-period {
  color: var(--green);
  font-size: 0.78rem !important;
}

.edu-detail {
  font-size: 0.85rem !important;
  color: var(--slate);
}

/* Contact */
.contact-section {
  padding-bottom: 120px;
}

.contact-box {
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
  padding: 56px 40px;
  background: var(--navy-light);
  border-radius: 4px;
}

.contact-box h3 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  color: var(--white);
}

.contact-box p {
  margin: 0 0 32px;
}

.contact-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.contact-meta a {
  color: var(--slate-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-meta a:hover {
  color: var(--green);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px var(--side-pad) 48px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
}

.footer a {
  color: var(--green);
}

.footer-sep {
  margin: 0 10px;
  opacity: 0.4;
}

/* Animations */
.reveal-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }
.delay-4 { animation-delay: 0.48s; }
.delay-5 { animation-delay: 0.6s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal-on-scroll.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

/* Case study modal */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
}

.case-modal[hidden] {
  display: none;
}

.case-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 22, 0.88);
  backdrop-filter: blur(6px);
}

.case-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: min(94vh, 1000px);
  display: flex;
  flex-direction: column;
  background: var(--navy-light);
  border: 1px solid var(--navy-lighter);
  border-radius: 12px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.case-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy-lighter);
  border-radius: 4px;
  background: var(--navy);
  color: var(--slate-light);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.case-modal__close:hover {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-dim);
}

.case-modal__body {
  overflow-y: auto;
  padding: 48px clamp(28px, 5vw, 56px) 56px;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-lighter) transparent;
}

.case-modal__header {
  padding-right: 48px;
}

.case-modal__label {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.85rem;
}

.case-modal__title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--white);
  line-height: 1.15;
}

.case-modal__subtitle {
  margin: 10px 0 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  color: var(--slate-light);
  font-weight: 600;
}

.case-modal__period {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--green);
}

.case-modal__intro {
  margin: 20px 0 0;
  max-width: 72ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--slate);
}

.case-modal__tags {
  margin-top: 20px;
}

.case-modal__section {
  margin-top: 40px;
}

.case-modal__heading {
  margin: 0 0 20px;
  font-size: 1.25rem;
  color: var(--white);
}

.case-modal__text {
  margin: 0 0 16px;
  max-width: 72ch;
  line-height: 1.7;
  color: var(--slate);
}

.case-modal__text:last-child {
  margin-bottom: 0;
}

.case-modal__highlights {
  margin-top: 32px;
}

.case-modal__overview-preview-grid {
  display: grid;
  grid-template-columns: 1.4fr auto 1fr;
  gap: 0;
  margin-top: 32px;
  align-items: start;
}

.case-modal__section-divider {
  width: 1px;
  background: var(--navy-lighter);
  align-self: stretch;
  margin: 0 24px;
}

.case-modal__overview-side {
  margin-top: 0;
}

.case-modal__overview-side .case-modal__heading {
  margin-top: 0;
}

.case-modal__preview-side .story-grid {
  margin-top: 0;
}

.case-modal__highlight {
  background: var(--navy);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--navy-lighter);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.case-modal__highlight:hover {
  transform: translateY(-4px);
  border-color: var(--green);
}

.case-modal__highlight--no-image {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
}

.case-modal__highlight-media {
  height: 280px;
  overflow: hidden;
  position: relative;
}

.case-modal__highlight--video .case-modal__highlight-media {
  height: 480px;
}

.case-modal__highlight-media img,
.case-modal__highlight-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
  background: var(--navy);
}

.case-modal__highlight:hover .case-modal__highlight-media img,
.case-modal__highlight:hover .case-modal__highlight-media video {
  transform: scale(1.05);
}

.case-modal__highlight--video .case-modal__highlight-media {
  cursor: pointer;
}

.case-modal__highlight--video .case-modal__highlight-media video {
  border-radius: 4px;
}

.case-modal__highlight-body {
  padding: 20px 24px 24px;
}

.case-modal__highlight--no-image .case-modal__highlight-body {
  padding: 0;
  text-align: center;
}

.case-modal__highlight-cat {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.case-modal__highlight--before::before {
  content: 'BEFORE';
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(255, 165, 0, 0.9);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 3px;
  z-index: 2;
}

.case-modal__highlight--after::before {
  content: 'AFTER';
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(100, 255, 218, 0.9);
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 3px;
  z-index: 2;
}

.case-modal__highlight--no-image .case-modal__highlight-cat {
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.case-modal__highlight-body h4 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--white);
  font-weight: 600;
}

.case-modal__highlight--no-image .case-modal__highlight-body h4 {
  font-size: 1.35rem;
}

button.featured-card,
button.work-card {
  width: 100%;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
}

.story-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 48px 0;
}

.story-stat {
  padding: 24px;
  background: var(--navy-light);
  border-radius: 4px;
  text-align: center;
}

.story-stat strong {
  display: block;
  font-size: 1.75rem;
  color: var(--green);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.story-stat span {
  font-size: 0.85rem;
  color: var(--slate);
}

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

/* Responsive */
@media (max-width: 900px) {
  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .social-rail {
    display: none;
  }

  .main-content {
    padding-left: var(--side-pad);
  }

  .scroll-hint {
    left: var(--side-pad);
  }

  body[data-page="home"] .scroll-hint {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    top: 0;
    background: var(--navy-light);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    z-index: 100;
  }

  .site-nav.open {
    transform: translateX(0);
  }

  .site-nav ol {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .site-nav a {
    font-size: 1.4rem;
    padding: 20px;
  }

  .logo {
    font-size: 1.75rem;
  }

  .btn-resume {
    display: none;
  }

  .work-grid,
  .story-grid,
  .story-stats {
    grid-template-columns: 1fr;
  }

  .work-card--wide {
    grid-column: span 1;
  }

  .work-card--wide .work-card-media {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .case-modal__body {
    padding: 32px 20px 36px;
  }

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

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

  .case-modal__overview-preview-grid {
    grid-template-columns: 1fr;
  }

  .case-modal__section-divider {
    width: 100%;
    height: 1px;
    margin: 24px 0;
  }
}
