/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0d1015;
  --text: #ffffff;
  --text-secondary: #f2f3f6;
  --accent: #ffcaca;
  --card-bg: #171b23;
  --card-border: #262c38;
  --card-hover: #1c212b;
  --link: #ffffff;
  --link-hover: #d6d9e0;
  --divider: #262c38;
  --tag-bg: #1c212b;
  --tag-text: #d6d9e0;
  --highlight: rgba(255, 255, 255, 0.08);
  --max-width: 720px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
  --cursor-figma: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='M6.5 4 L22 13.3 L14 15.8 L10.8 22.5 Z' fill='%232b2b2c' stroke='white' stroke-width='1.8' stroke-linejoin='round'/></svg>") 6 4, auto;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --text: #12151b;
  --text-secondary: #3d4451;
  --accent: #ffcaca;
  --card-bg: #ffffff;
  --card-border: #e1e5ec;
  --card-hover: #eef1f6;
  --link: #12151b;
  --link-hover: #565f6e;
  --divider: #e1e5ec;
  --tag-bg: #eef1f6;
  --tag-text: #5a6272;
  --highlight: rgba(20, 30, 60, 0.06);
  color-scheme: light;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  cursor: var(--cursor-figma);
  transition: background-color 0.4s var(--ease-out-quart), color 0.4s var(--ease-out-quart);
}

a,
button {
  cursor: var(--cursor-figma);
}

/* ===== GRAIN TEXTURE (both themes) =====
   `overlay` blend leaves near-black/near-white bases almost untouched, so the
   grain needs a blend mode that actually shows against each theme's extreme:
   `screen` lightens (visible on the near-black dark bg), `multiply` darkens
   (visible on the near-white light bg). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 180px 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0; /* temporarily disabled */
}

[data-theme="dark"] body::before {
  mix-blend-mode: screen;
  opacity: 0; /* temporarily disabled */
}

[data-theme="light"] body::before {
  mix-blend-mode: multiply;
  opacity: 0; /* temporarily disabled */
}

::selection {
  background: var(--text);
  color: var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.3s var(--ease-out-quart);
}

a:hover {
  color: var(--link-hover);
}

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

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.container-wide {
  max-width: 1100px;
}

/* ===== HEADER / NAV ===== */
header {
  padding: 40px 0 0;
}

/* Homepage header stays reachable while scrolling, since its pill nav is a
   functional in-page nav (not just a back-link), unlike the case-study pages. */
header#top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: 20px;
  padding-bottom: 20px;
  background: var(--bg);
  transition: background-color 0.4s var(--ease-out-quart);
}

/* Nav sits in a wider (but still bounded) row than the reading column, so the
   back button/toggle have breathing room without being pinned to the true edge. */
header .container {
  max-width: 1100px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease-out-quart), letter-spacing 0.4s var(--ease-out-expo);
}

nav .logo:hover {
  color: var(--text);
  letter-spacing: 0.06em;
}

nav .nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

nav .nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  position: relative;
  transition: color 0.3s var(--ease-out-quart);
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.4s var(--ease-out-expo);
}

nav .nav-links a:hover {
  color: var(--text);
}

nav .nav-links a:hover::after {
  width: 100%;
}

/* ===== PILL NAV ===== */
.pill-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: background 0.4s var(--ease-out-quart), border-color 0.4s var(--ease-out-quart);
}

.pill-nav a {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.3s var(--ease-out-quart), color 0.3s var(--ease-out-quart);
}

.pill-nav a:hover {
  color: var(--text);
}

.pill-nav a.active {
  background: var(--text);
  color: var(--bg);
}

.pill-nav a.active:hover {
  color: var(--bg);
}

@media (max-width: 600px) {
  .pill-nav {
    gap: 0;
    padding: 4px;
  }

  .pill-nav a {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 52px;
  height: 28px;
  padding: 0 7px;
  margin-left: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  cursor: var(--cursor-figma);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s var(--ease-out-quart), border-color 0.3s var(--ease-out-quart);
}

.theme-toggle:hover {
  border-color: #414a5c;
}

.theme-toggle:active .theme-toggle-thumb {
  width: 22px;
}

.theme-toggle .theme-icon {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  pointer-events: none;
  opacity: 0.55;
  transition: color 0.3s var(--ease-out-quart), opacity 0.35s var(--ease-out-quart);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transform: translateX(24px);
  rotate: 0deg;
  transition: transform 0.5s var(--spring), rotate 0.5s var(--spring), width 0.2s var(--ease-out-quart);
}

[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(0);
  rotate: -160deg;
}

/* The thumb is pink in both themes, so whichever icon currently sits on top
   of it (moon in dark mode, sun in light mode) needs a dark color for contrast. */
[data-theme="dark"] .theme-toggle .icon-moon {
  color: #1a1a1a;
}

[data-theme="light"] .theme-toggle .icon-sun {
  color: #1a1a1a;
}

/* Gentle squash-and-stretch bounce on click, layered on top of the slide/roll
   via the standalone `scale` property so it never fights the transform transition. */
@keyframes theme-thumb-squash {
  0% { scale: 1 1; }
  35% { scale: 1.2 0.8; }
  65% { scale: 0.9 1.08; }
  100% { scale: 1 1; }
}

.theme-toggle.is-animating .theme-toggle-thumb {
  animation: theme-thumb-squash 0.45s var(--ease-out-quart);
}

/* ===== HERO ===== */
.hero {
  padding: 48px 0 60px;
}

.hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 20px;
  transition: background 0.4s var(--ease-out-quart), border-color 0.4s var(--ease-out-quart);
}

.hero-card-intro {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card-hover);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-hover);
}

.hero-intro-text {
  flex: 1;
  min-width: 0;
}

.hero .greeting {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}

.hero h1 .name-highlight {
  display: inline-block;
  position: relative;
}

.hero h1 .name-highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--highlight);
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo);
}

.hero h1:hover .name-highlight::after {
  transform: scaleX(1);
}

.hero-card-bio .bio {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 18px;
  max-width: 600px;
}

.hero-card-bio .current-role {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-card-bio .current-role strong {
  color: var(--text);
  font-weight: 600;
}

.hero-card-bio .personal-note {
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
  display: inline-block;
  transition: transform 0.4s var(--ease-out-expo);
}

.hero-card-bio .personal-note:hover {
  transform: translateX(4px);
}

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

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-hover);
  border: 1px solid var(--card-border);
  color: var(--text);
  transition:
    transform 0.35s var(--ease-out-expo),
    background 0.3s var(--ease-out-quart),
    border-color 0.3s var(--ease-out-quart);
}

.social-icon svg {
  width: 17px;
  height: 17px;
}

.social-icon:hover {
  transform: translateY(-2px);
  background: var(--card-border);
}

.scroll-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 32px;
  transition:
    transform 0.35s var(--ease-out-expo),
    border-color 0.3s var(--ease-out-quart),
    color 0.3s var(--ease-out-quart);
}

.scroll-pill:hover {
  transform: translateY(3px);
  border-color: #414a5c;
  color: var(--text);
}

.scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  animation: scroll-dot-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-dot-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(3px); opacity: 1; }
}

/* ===== INTRO (homepage: avatar + bio + links) ===== */
.intro {
  padding: 64px 0 8px;
}

.intro-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 24px;
  flex-shrink: 0;
}

.intro-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.intro-bio {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
}

.intro-bio-lead {
  font-size: 24px;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
  margin-bottom: 8px;
}

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

.intro-bio a {
  color: var(--text);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 1px;
  transition: color 0.3s var(--ease-out-quart), border-color 0.3s var(--ease-out-quart);
}

.intro-bio a:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
}

.intro-links {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.intro-links a {
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s var(--ease-out-quart);
}

.intro-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out-expo);
}

.intro-links a:hover {
  color: var(--text);
}

.intro-links a:hover::after {
  width: 100%;
}

/* ===== SECTION LABEL (small uppercase eyebrow) ===== */
.section-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  display: block;
}

#work .section-label {
  font-size: 18px;
}

/* ===== EXPERIENCE (homepage timeline) ===== */
.experience {
  padding: 40px 0;
}

.experience-list {
  display: flex;
  flex-direction: column;
}

.experience-row {
  display: flex;
  gap: 80px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--divider);
  transition: transform 0.4s var(--ease-out-expo);
}

.experience-row:first-child {
  border-top: none;
}

.experience-row:hover {
  transform: translateX(4px);
}

.experience-date {
  flex-shrink: 0;
  width: 180px;
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.experience-role {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

.exp-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out-quart), color 0.3s var(--ease-out-quart);
}

.exp-link:hover {
  color: var(--text);
  border-color: var(--text);
}

.exp-link-arrow {
  display: inline-block;
  margin-left: 3px;
  vertical-align: 1px;
  color: var(--text-secondary);
  transition: transform 0.35s var(--ease-out-expo), color 0.3s var(--ease-out-quart);
}

.exp-link:hover .exp-link-arrow {
  transform: translate(2px, -2px);
  color: var(--text);
}

/* ===== SIDE PROJECTS (homepage: simple text list) ===== */
.side-projects-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 24px;
}

.side-project-item h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.side-project-status {
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
}

.side-project-item p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== CASE STUDIES (homepage: large image cards) ===== */
.case-studies {
  padding: 40px 0 60px;
}

.case-study-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.case-study-card-lg {
  display: block;
}

.case-study-media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  aspect-ratio: 16 / 10;
  transition:
    transform 0.4s var(--ease-out-expo),
    border-color 0.3s var(--ease-out-quart),
    box-shadow 0.4s var(--ease-out-expo);
}

.case-study-card-lg:hover .case-study-media {
  transform: translateY(-3px);
  border-color: #414a5c;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
}

.case-study-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.case-study-card-lg h3 {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.case-study-arrow {
  font-size: 14px;
  color: var(--text-secondary);
  display: inline-block;
  transition: transform 0.35s var(--ease-out-expo);
}

.case-study-card-lg:hover .case-study-arrow {
  transform: translate(2px, -2px);
}

.case-study-meta {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== PROJECT COVER GRID (cover image + text card style) ===== */
.project-cover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
}

.project-cover-card {
  display: block;
}

.project-cover-image {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  aspect-ratio: 16 / 9.5;
  transition:
    transform 0.4s var(--ease-out-expo),
    border-color 0.3s var(--ease-out-quart),
    box-shadow 0.4s var(--ease-out-expo);
}

.project-cover-card:hover .project-cover-image {
  transform: translateY(-3px);
  border-color: #414a5c;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
}

.project-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-cover-info h3 {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-cover-info p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== SECTIONS ===== */
section {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

.divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 0;
  transition: border-color 0.4s ease;
}

/* ===== PROJECT CARDS ===== */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.work-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 36px;
}

.more-work-line {
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.more-work-line .more-link {
  margin-top: 0;
  display: inline;
}

.work-grid .project-card {
  padding: 32px;
}

.project-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 28px;
  cursor: var(--cursor-figma);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease-out;
}

.project-card:hover {
  transform: translateX(8px);
}

.project-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.project-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-card .arrow {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== CTA BANNER ===== */
.cta-banner {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 32px;
  line-height: 1.7;
}

.cta-banner a {
  position: relative;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 1px;
  transition: color 0.3s var(--ease-out-quart);
}

.cta-banner a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.4s var(--ease-out-expo);
}

.cta-banner a:hover {
  color: var(--text);
}

.cta-banner a:hover::after {
  width: 100%;
}

/* ===== UPDATES / BLOG ===== */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.update-item {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--divider);
  transition: transform 0.4s var(--ease-out-expo);
}

.update-item:hover {
  transform: translateX(4px);
}

.update-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.update-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.update-date {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.update-item:hover .update-date {
  color: var(--text);
}

.update-tag {
  font-size: 12px;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  transition: background 0.3s var(--ease-out-quart), color 0.3s var(--ease-out-quart);
}

.update-item:hover .update-tag {
  background: var(--text);
  color: var(--bg);
}

.update-item p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 10px;
}

.update-item .show-more {
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 1px;
  transition: color 0.3s var(--ease-out-quart);
}

.update-item .show-more::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.4s var(--ease-out-expo);
}

.update-item .show-more:hover {
  color: var(--text);
}

.update-item .show-more:hover::after {
  width: 100%;
}

.more-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s var(--ease-out-quart);
}

.more-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.4s var(--ease-out-expo);
}

.more-link:hover {
  color: var(--text);
}

.more-link:hover::after {
  width: 100%;
}

/* ===== FOOTER ===== */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--divider);
}

footer h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

footer .footer-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 520px;
}

.email-cta {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 28px;
  border-radius: 8px;
  transition:
    transform 0.3s var(--ease-out-expo),
    opacity 0.3s var(--ease-out-quart);
}

.email-cta:hover {
  transform: translateY(-2px);
  opacity: 0.82;
  color: #1a1a1a;
}

.email-cta:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
}

.footer-bottom .bye {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.3s var(--ease-out-quart);
}

.footer-social a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out-expo);
}

.footer-social a:hover {
  color: var(--text);
}

.footer-social a:hover::after {
  width: 100%;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.fade-in-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.fade-in-stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }

/* Slide from left */
.slide-in-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}


/* ===== MAGNETIC HOVER EFFECT AREA ===== */
.magnetic {
  transition: transform 0.3s var(--ease-out-quart);
}

/* ===== SNAKE AMBIENT (full-bleed, self-playing background game) ===== */
footer {
  position: relative;
}

.snake-ambient {
  position: relative;
  line-height: 0;
  opacity: 0.12;
  transition: opacity 0.1s linear;
  pointer-events: auto;
}

.snake-canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  outline: none;
  cursor: var(--cursor-figma);
  pointer-events: auto;
  touch-action: none;
}

.snake-canvas:focus-visible {
  outline: none;
}

.snake-ambient-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: #f2f3f6;
  background: rgba(8, 10, 14, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out-quart);
}

.snake-ambient-hint.is-visible {
  opacity: 1;
}

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

.snake-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.snake-title-hint {
  font-weight: 400;
}

.snake-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.snake-score-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #1a1a1a;
  cursor: var(--cursor-figma);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.35s var(--ease-out-quart),
    transform 0.35s var(--ease-out-expo),
    background 0.3s var(--ease-out-quart),
    border-color 0.3s var(--ease-out-quart);
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-top-btn:hover {
  opacity: 0.85;
  transform: translateY(-3px) scale(1);
}

.scroll-top-btn:active {
  transform: translateY(-1px) scale(0.96);
  transition-duration: 0.1s;
}

.scroll-top-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 600px) {
  .scroll-top-btn {
    left: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .intro {
    padding: 40px 0 8px;
  }

  .experience-row {
    flex-direction: column;
    gap: 4px;
  }

  .experience-date {
    width: auto;
  }

  .case-study-list {
    gap: 32px;
  }

  .project-cover-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero {
    padding: 36px 0 40px;
  }

  .hero-card {
    padding: 24px;
  }

  .hero-card-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .avatar {
    width: 88px;
    height: 88px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .social-links {
    flex-wrap: wrap;
    gap: 10px;
  }

  .project-card {
    padding: 22px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in,
  .slide-in-left,
  .fade-in-stagger > * {
    opacity: 1;
    transform: none;
  }

}
