/* ==========================================================================
   Portfolio: Foundation Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */

/* Color scheme: follows the system by default. The toggle pins a scheme by
   setting <meta name="color-scheme"> to "light" or "dark"; these rules map
   that back onto the property, and light-dark() tokens follow it. */
:root {
  color-scheme: light dark;

  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }

  --bg: light-dark(#f8f9fa, #0b0b0c);
  --text: light-dark(#1a1a1a, #f5f5f5);
  --text-muted: light-dark(#5c5c5c, #a0a0a5);
  --accent: light-dark(#009e82, #00d4aa);
  --accent-muted: light-dark(#007a66, #00a888);
  --border: light-dark(#e2e4e8, #2a2a2e);
  --surface: light-dark(#ffffff, #141416);

  --badge-bg: light-dark(var(--surface), transparent);
  --badge-text: var(--text);
  --badge-border: var(--border);

  --font-sans: system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --container-max: 1100px;
  --section-gap: 5rem;
  --header-offset: 4.5rem;
  --radius: 4px;
  --transition: 0.2s ease;
  --ease-out-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-duration: 0.55s;
  --reveal-distance: 1.25rem;

  --glow-accent: light-dark(rgba(0, 158, 130, 0.09), rgba(0, 212, 170, 0.11));
  --glow-teal: light-dark(rgba(0, 122, 102, 0.07), rgba(0, 168, 136, 0.09));
  --glow-mint: light-dark(rgba(32, 176, 132, 0.06), rgba(48, 200, 160, 0.07));
  --glow-deep: light-dark(rgba(0, 108, 88, 0.05), rgba(0, 140, 110, 0.06));
}

/* Browsers without light-dark(): follow the system scheme only, and hide the
   toggle since its override could not recolor the page. */
@supports not (color: light-dark(#fff, #000)) {
  :root {
    --bg: #f8f9fa;
    --text: #1a1a1a;
    --text-muted: #5c5c5c;
    --accent: #009e82;
    --accent-muted: #007a66;
    --border: #e2e4e8;
    --surface: #ffffff;
    --badge-bg: var(--surface);
    --glow-accent: rgba(0, 158, 130, 0.09);
    --glow-teal: rgba(0, 122, 102, 0.07);
    --glow-mint: rgba(32, 176, 132, 0.06);
    --glow-deep: rgba(0, 108, 88, 0.05);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0b0b0c;
      --text: #f5f5f5;
      --text-muted: #a0a0a5;
      --accent: #00d4aa;
      --accent-muted: #00a888;
      --border: #2a2a2e;
      --surface: #141416;
      --badge-bg: transparent;
      --glow-accent: rgba(0, 212, 170, 0.11);
      --glow-teal: rgba(0, 168, 136, 0.09);
      --glow-mint: rgba(48, 200, 160, 0.07);
      --glow-deep: rgba(0, 140, 110, 0.06);
    }
  }

  .theme-toggle {
    display: none !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html.theme-loading *,
html.theme-loading *::before,
html.theme-loading *::after {
  transition: none !important;
  animation-duration: 0s !important;
}

html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */

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

html {
  overflow-x: clip;
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 8% 0%, var(--glow-accent), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 8%, var(--glow-mint), transparent 50%),
    radial-gradient(ellipse 65% 50% at 85% 100%, var(--glow-teal), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 90%, var(--glow-deep), transparent 50%);
  transition: background-color var(--transition), color var(--transition);
}

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

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

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

a:hover {
  color: var(--accent-muted);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html.reveal-enabled .reveal {
    opacity: 1;
    transform: none;
  }

  .theme-liquid-overlay {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: var(--section-gap);
}

section[id],
.site-footer {
  scroll-margin-top: var(--header-offset);
}

#contact {
  scroll-margin-top: calc(var(--header-offset) + 1rem);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease, border-color var(--transition),
    backdrop-filter 0.15s ease, -webkit-backdrop-filter 0.15s ease;
}

html.is-scrolling .site-header {
  background-color: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.site-logo {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-logo:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.nav-links a {
  font-size: 1rem;
  color: var(--text-muted);
}

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

/* --------------------------------------------------------------------------
   Theme Toggle
   -------------------------------------------------------------------------- */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

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

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle-icon {
  width: 1.125rem;
  height: 1.125rem;
  display: none;
}

.theme-toggle-icon--moon {
  display: block;
}

.theme-toggle-label--to-light {
  display: none;
}

.theme-toggle.is-liquidating {
  animation: toggle-liquid-jiggle 0.8s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.theme-liquid-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.theme-liquid-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.theme-liquid-blob {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 42% 58% 68% 32% / 42% 48% 52% 58%;
  opacity: 0.92;
  will-change: transform, border-radius, opacity;
}

.theme-liquid-blob--echo {
  opacity: 0.55;
  animation-delay: 0.06s;
}

.theme-liquid-overlay.is-active .theme-liquid-blob {
  animation: liquid-burst 0.95s cubic-bezier(0.22, 1.1, 0.36, 1) forwards;
}

.theme-liquid-overlay.is-active .theme-liquid-blob--echo {
  animation: liquid-burst-echo 0.95s cubic-bezier(0.22, 1.1, 0.36, 1) forwards;
}

.theme-liquid-overlay.to-light .theme-liquid-blob {
  background: radial-gradient(circle at 35% 35%, #fff8e0, #f0d060 55%, #e8a820 100%);
}

.theme-liquid-overlay.to-dark .theme-liquid-blob {
  background: radial-gradient(circle at 35% 35%, #3dffd4, #00c49a 50%, #007a66 100%);
}

@keyframes toggle-liquid-jiggle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    border-radius: var(--radius);
  }

  25% {
    transform: scale(0.9) rotate(-5deg);
    border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  }

  50% {
    transform: scale(1.1) rotate(5deg);
    border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%;
  }

  75% {
    transform: scale(0.95) rotate(-2deg);
  }
}

@keyframes liquid-burst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    opacity: 0.95;
  }

  35% {
    transform: translate(-50%, -50%) scale(28);
    border-radius: 38% 62% 58% 42% / 52% 38% 62% 48%;
    opacity: 0.88;
  }

  65% {
    transform: translate(-50%, -50%) scale(42);
    border-radius: 62% 38% 42% 58% / 48% 62% 38% 52%;
    opacity: 0.75;
  }

  100% {
    transform: translate(-50%, -50%) scale(55);
    border-radius: 50%;
    opacity: 0;
  }
}

@keyframes liquid-burst-echo {
  0% {
    transform: translate(-50%, -50%) scale(0);
    border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
    opacity: 0.6;
  }

  40% {
    transform: translate(-50%, -50%) scale(22);
    border-radius: 45% 55% 65% 35% / 55% 45% 55% 45%;
    opacity: 0.45;
  }

  100% {
    transform: translate(-50%, -50%) scale(48);
    border-radius: 50%;
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: 6rem 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  align-items: center;
  gap: 3rem 4rem;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-avatar {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-role {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 260px;
}

.hero-actions .btn {
  width: 100%;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition),
    transform 0.25s var(--ease-out-smooth), box-shadow 0.25s var(--ease-out-smooth);
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-muted);
  border-color: var(--accent-muted);
  color: var(--bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.btn .icon {
  width: 1rem;
  height: 1rem;
}

/* --------------------------------------------------------------------------
   Experience
   -------------------------------------------------------------------------- */

.experience-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-left: 1.5rem;
}

.experience-entry {
  position: relative;
}

.experience-entry::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 4.5px);
  top: 1.25rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.experience-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 0.5px);
  top: calc(1.25rem + 4px);
  width: 1px;
  height: calc(100% + 1.25rem);
  background: var(--accent);
}

.experience-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.1s ease;
}

.experience-card:hover {
  border-color: var(--accent);
}

.experience-card-top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.experience-logo {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.experience-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.125rem;
}

.experience-logo--theme .experience-logo-light {
  display: block;
}

.experience-logo--theme .experience-logo-dark {
  display: none;
}

/* Non-color branches for the dark scheme: system dark without a light
   override, or a dark override. Kept in sync with the token rules above. */
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) {
    .experience-logo--theme .experience-logo-light { display: none; }
    .experience-logo--theme .experience-logo-dark { display: block; }
    .theme-toggle-icon--moon { display: none; }
    .theme-toggle-icon--sun { display: block; }
    .theme-toggle-label--to-dark { display: none; }
    .theme-toggle-label--to-light { display: inline; }
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  .experience-logo--theme .experience-logo-light { display: none; }
  .experience-logo--theme .experience-logo-dark { display: block; }
  .theme-toggle-icon--moon { display: none; }
  .theme-toggle-icon--sun { display: block; }
  .theme-toggle-label--to-dark { display: none; }
  .theme-toggle-label--to-light { display: inline; }
}

.experience-card-body {
  flex: 1;
  min-width: 0;
}

.experience-date,
.experience-role,
.experience-company,
.experience-team {
  font-family: var(--font-mono);
}

.experience-date {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.experience-role {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.experience-company {
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.experience-company a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.experience-company a:hover {
  color: var(--accent-muted);
}

.experience-team {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.experience-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.75rem;
}

#involvement .experience-logo {
  display: none;
}

#involvement .experience-card-top {
  display: block;
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  align-self: start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.1s ease;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.project-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-award {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
}

.project-award-star {
  flex-shrink: 0;
  font-size: 1.5rem;
  color: #f5b800;
  line-height: 1;
}

.project-desc {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.project-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.project-source {
  padding: 0.5rem 0.875rem;
  font-size: 0.75rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding: 0.125rem 0;
}

.project-tag::before {
  content: "[ ";
  color: var(--text-muted);
}

.project-tag::after {
  content: " ]";
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Tags
   -------------------------------------------------------------------------- */

.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  transition: border-color var(--transition);
}

.tag:hover {
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */

.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.skill-category {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.skill-category:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.skill-category-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--badge-text);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.skill-badge:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* --------------------------------------------------------------------------
   Contact Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: 3rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: var(--section-gap);
}

.contact-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.contact-footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.contact-email {
  display: inline-block;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color var(--transition), background-size 0.2s ease;
  user-select: text;
  -webkit-user-select: text;
}

.contact-email-revealed {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-email-revealed .contact-email {
  color: var(--accent);
  cursor: pointer;
}

.contact-email-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition),
    transform 0.25s var(--ease-out-smooth);
}

.contact-email-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-email-copy:active {
  transform: translateY(0);
}

.contact-email-copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-email-copy.is-copied {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-email-copy .icon {
  width: 1rem;
  height: 1rem;
}

button.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.contact-email .icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.contact-email:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

.js-email-reveal.is-revealed {
  color: var(--accent);
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.contact-social-btn {
  width: auto;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

html.reveal-enabled .reveal {
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
}

html.reveal-enabled .reveal.is-animating {
  transition:
    opacity var(--reveal-duration) var(--ease-out-smooth),
    transform var(--reveal-duration) var(--ease-out-smooth);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

html.reveal-enabled .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  html {
    scrollbar-gutter: auto;
  }

  .site-header {
    background-color: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 640px) {
  :root {
    --header-offset: 6.5rem;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    padding-top: 0.5rem;
  }

  .experience-timeline {
    padding-left: 1.25rem;
  }

  .experience-entry::before {
    left: calc(-1.25rem - 4.5px);
  }

  .experience-entry:not(:last-child)::after {
    left: calc(-1.25rem - 0.5px);
  }

  .hero {
    padding-block: 4rem 3rem;
  }

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

  .hero-avatar {
    max-width: 200px;
  }

  .hero-actions {
    max-width: 200px;
  }

  .section {
    padding-block: 3.5rem;
  }

  .contact-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-social {
    width: 100%;
  }
}
