:root {
  --bg: radial-gradient(circle at top, #0a0a0a 0%, #050505 65%, #000000 100%);
  --text-primary: #e0e0e0;
  --text-muted: #a0a0a0;
  --accent: #ffffff;
  --panel: rgba(20, 20, 20, 0.85);
  --panel-border: rgba(255, 255, 255, 0.15);
  --focus: rgba(255, 255, 255, 0.4);
  --section-bg: rgba(15, 15, 15, 0.92);
  --ascii-peak-opacity: 0.15;
  /* Responsive defaults that work across all devices */
  --hero-visual-scale: 0.75;
  --hero-detail-ratio: 1.8;

  /* Glow Gradients */
  --glow-default: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 40%, transparent 70%);
  --glow-cyber: radial-gradient(circle, rgba(45, 212, 191, 0.3) 0%, rgba(22, 163, 74, 0.1) 40%, transparent 70%);
  --glow-transition: 0.4s;
  --hero-glow-hover-color: rgba(45, 212, 191, 0.67);
  --hero-glow-hover-scale: 3;
  --hero-glow-hover-blur: 75px;
  --hero-glow-hover-opacity: 1;
  --hero-glow-hover-speed: 0.4s;
}

@property --glow-color {
  syntax: '<color>';
  inherits: false;
  initial-value: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  background-color: black;
  font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
}

body {
  position: relative;
  overflow-x: hidden;
}

.hero-nav__inner,
.hero__card,
.body-section,
.body-section__inner,
.toolbar {
  position: relative;
  overflow: hidden;
}

.hero-nav__inner > *:not(.card-glow),
.hero__card > *:not(.card-glow),
.body-section > *:not(.card-glow),
.body-section__inner > *:not(.card-glow),
.toolbar > *:not(.card-glow),
.experience-card > *:not(.card-glow) {
  position: relative;
  z-index: 2;
}
.card-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  /* Background removed, handled by pseudo-elements for smooth transition */
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--glow-scale, 1));
  transition:
    opacity var(--glow-transition, 0.35s) ease,
    transform var(--glow-transition, 0.35s) ease,
    filter var(--glow-transition, 0.35s) ease,
    --glow-color var(--glow-transition, 0.35s) ease;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0;
  filter: blur(var(--glow-blur, 24px));
  --glow-color: rgba(255, 255, 255, 0.1);
  --glow-active-opacity: 1;
  --glow-default: radial-gradient(circle, var(--glow-color) 0%, var(--glow-color) 35%, transparent 72%);
}

.card-glow::before,
.card-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth, slow fade */
  will-change: opacity;
}

/* Default Glow (Neutral/White) */
.card-glow::before {
  background: var(--glow-default);
  opacity: 1;
  z-index: 1;
}

/* Cyber Glow (Teal/Green) - Hidden by default */
.card-glow::after {
  background: var(--glow-cyber);
  opacity: 0;
  z-index: 2;
}

/* Trigger: When hovering the cybersec text, cross-fade */
.hero__details-card:has(.my-gradient-text:hover) .card-glow::before {
  opacity: 0;
}

.hero__details-card:has(.my-gradient-text:hover) .card-glow::after {
  opacity: 1;
}

.hero__details-card:has(.my-gradient-text:hover),
.hero__details-card:has(.my-gradient-text:focus-visible) {
  border-color: var(--hero-glow-hover-color, rgba(45, 212, 191, 0.27));
}


.ascii-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
  z-index: 1;
}

.ascii-bg pre {
  margin: 0;
  width: 100%;
  height: 100%;
  display: block;
  color: rgba(255, 255, 255, var(--ascii-peak-opacity, 0.15));
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: clamp(9px, 1.05vw, 14px);
  letter-spacing: 0.08em;
  line-height: 1.02;
  white-space: pre;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-text-stroke: 0 transparent;
  text-shadow: 0 0 3px rgba(255, 255, 255, calc(var(--ascii-peak-opacity, 0.15) + 0.05));
  transform-origin: top left;
  transform: scale(var(--ascii-scale-x, 1), var(--ascii-scale-y, 1));
  will-change: transform;
}

.modal-open .ascii-bg pre {
  /* Reduce visual blur/noise when modal is open */
  text-shadow: none;
  -webkit-text-stroke: 0;
}

@keyframes floatDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-nav {
  position: fixed;
  inset: 0 0 auto 0;
  padding: 2rem clamp(1.2rem, 6vw, 3rem);
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: padding 420ms cubic-bezier(0.22, 1, 0.36, 1), background 360ms ease, border-bottom-color 360ms ease,
    box-shadow 360ms ease;
}

.hero-nav__inner {
  pointer-events: auto;
  width: min(860px, 92%);
  background: rgba(10, 10, 10, 0.894);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  backdrop-filter: blur(98px);
  box-shadow: 0 18px 40px rgba(12, 9, 6, 0.55);
  transition:
    width 480ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 480ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 420ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 320ms ease,
    background 320ms ease,
    border-color 320ms ease,
    box-shadow 360ms ease,
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
  transform: scale(1);
  transform-origin: center;
  z-index: 2;
  will-change: width, border-radius, transform, padding;
  
  animation: floatDown 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) both;
  animation-delay: 0.1s;
}

.hero-nav--pinned {
  padding: clamp(0.35rem, 1.4vh, 0.65rem) clamp(0.6rem, 4vw, 1.6rem);
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 44px rgba(8, 6, 4, 0.58);
  backdrop-filter: blur(24px);
}

.hero-nav--pinned .hero-nav__inner {
  width: min(820px, 90%);
  max-width: 820px;
  border-radius: 18px;
  padding: clamp(0.48rem, 1.3vh, 0.65rem) clamp(1rem, 4vw, 1.6rem);
  transform: scale(0.94);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-nav > .card-glow {
  z-index: 1;
}

.hero-nav--pinned .hero-nav__inner > .card-glow {
  opacity: 0 !important;
}

.hero-nav__brand {
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  position: relative;
  display: flex;
  align-items: center;
  animation: floatDown 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) both;
  animation-delay: 0.3s;
}

.hero-nav__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.35rem);
}

.hero-nav__links li {
  animation: floatDown 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) both;
  opacity: 0;
}

.hero-nav__links li:nth-child(1) { animation-delay: 0.4s; }
.hero-nav__links li:nth-child(2) { animation-delay: 0.45s; }
.hero-nav__links li:nth-child(3) { animation-delay: 0.5s; }
.hero-nav__links li:nth-child(4) { animation-delay: 0.55s; }
.hero-nav__links li:nth-child(5) { animation-delay: 0.6s; }
.hero-nav__links li:nth-child(6) { animation-delay: 0.65s; }

.hero-nav__links a {
  color: #aaaaaa;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  text-shadow: 0 0 0 rgba(255, 255, 255, 0);
  transition:
    color 160ms ease,
    text-shadow 260ms ease,
    opacity 220ms ease;
}

.hero-nav__links a.is-active {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.859);
}

.hero-nav__links a.is-active::after {
  transform: scaleX(0);
  opacity: 0;
}

.hero-nav__links a.is-active:hover::after,
.hero-nav__links a.is-active:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}

.hero-nav__links a::after,
.hero-nav__brand::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.35rem 0;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.my-gradient-text::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 2px;
  background: linear-gradient(to right, #2DD4BF, #16A34A);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
  opacity: 0.8;
}

.hero-nav__links a:hover,
.hero-nav__links a:focus-visible,
.hero-nav__brand:hover,
.hero-nav__brand:focus-visible {
  color: #ffffff;
}

.hero-nav__links a:hover::after,
.hero-nav__links a:focus-visible::after,
.hero-nav__brand:hover::after,
.hero-nav__brand:focus-visible::after,
.my-gradient-text:hover::after,
.my-gradient-text:focus-visible::after {
  transform: scaleX(1);
}

.my-gradient-text {
  background: linear-gradient(to right, #2DD4BF, #16A34A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease, text-shadow 0.2s ease;
  position: relative;
  display: inline-block;
  line-height: 1.2;
  text-shadow: 0 0 12px rgba(45, 212, 190, 0.5), 0 0 20px rgba(22, 163, 74, 0.5);
}

.my-gradient-text:hover {
  opacity: 1;
  text-shadow: 0 0 16px rgba(45, 212, 191, 1), 0 0 24px rgba(22, 163, 74, 1);
}

.hero {
  --hero-section-height: clamp(480px, 65svh, 680px);
  position: relative;
  z-index: 1;
  min-height: var(--hero-section-height);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Reduced bottom padding to remove gap */
  padding: clamp(3.5rem, 8vh, 5.5rem) clamp(1.2rem, 4vw, 3rem) 0; 
  background: transparent;
  overflow: visible;
}

.hero__container {
  padding-top: 50px;
  position: relative;
  width: min(1160px, 100%);
  height: auto;
  min-height: var(--hero-section-height);
  padding: clamp(1rem, 3vw, 2rem);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.hero__cards {
  --hero-gap: clamp(1.8rem, 5vw, 4rem);
  --hero-base-size: max(280px, calc(var(--hero-section-height) - 120px));
  --hero-card-size: min(calc(var(--hero-section-height) - 40px), calc(var(--hero-base-size) * var(--hero-visual-scale)));
  --hero-detail-ratio-effective: var(--hero-detail-ratio-current, var(--hero-detail-ratio));
  --hero-detail-width-target: calc(var(--hero-card-size) * var(--hero-detail-ratio-effective));
  --hero-detail-width-final: clamp(
    280px,
    var(--hero-detail-width-target),
    max(280px, calc(100% - var(--hero-card-size) - var(--hero-gap)))
  );
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--hero-gap);
  width: min(1200px, calc(100vw - clamp(2.4rem, 8vw, 6rem)));
  margin: 0 auto;
  height: auto;
  max-height: none;
  min-height: var(--hero-card-size);
}

.hero__card {
  position: relative;
  border-radius: 28px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  height: auto;
  max-height: none;
}

.hero__card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 255, 255, 0.05);
}

.hero__card::before {
  content: "";
  position: absolute;
  inset: -20% -25%;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(100, 100, 100, 0.05) 40%,
    rgba(0, 0, 0, 0) 70%
  );
  filter: blur(18px);
  z-index: -2;
}

.hero__card::after {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 32px;
  background: linear-gradient(120deg, rgba(200, 200, 200, 0.1), rgba(100, 100, 100, 0.05));
  opacity: 0.22;
  mix-blend-mode: screen;
  filter: blur(8px);
  z-index: -1;
}

.hero__image-card {
  flex: 0 0 var(--hero-card-size);
  width: var(--hero-card-size);
  height: auto;
  min-height: 0;
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.4rem, 1.2vw, 0.8rem);
  
  animation: floatUp 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) both;
  animation-delay: 0.2s;
}

.hero__image-frame {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, rgba(30, 30, 30, 0.55), rgba(10, 10, 10, 0.45)) padding-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image-placeholder {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 230, 200, 0.5);
  text-align: center;
  padding: 1rem;
}

.hero__details-card {
  flex: 0 0 var(--hero-detail-width-final);
  width: var(--hero-detail-width-final);
  max-width: var(--hero-detail-width-final);
  height: auto;
  min-height: var(--hero-card-size);
  display: flex;
  align-items: center;
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
  
  animation: floatUp 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) both;
  animation-delay: 0.35s;
}

.hero__details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vh, 0.75rem);
  max-height: none;
  overflow: visible;
  padding-right: 0;
  width: 100%;
}

.hero__details .eyebrow {
  color: #888;
  margin: 0;
  flex-shrink: 0;
}

.hero__details h1 {
  margin: 0 0 0;
  font-size: clamp(1.8rem, 4.8vw, 3.8rem);
  letter-spacing: -0.03em;
  color: var(--accent);
  white-space: nowrap;
  word-break: keep-all;
  overflow: visible;
  flex-shrink: 1;
}

.hero__details h1 span {
  display: inline-block;
  transition: color 0.15s ease, text-shadow 0.15s ease, transform 0.1s ease;
  cursor: default;
}

/* .hero__details h1 span:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
} */

.hero__details .subtitle {
  font-size: clamp(0.9rem, 2vh, 1.08rem);
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  flex-shrink: 0;
}

.hero__summary {
  margin: 0;
  /* Slightly reduced line-height and font size for better fit */
  line-height: 1.4;
  color: var(--text-muted);
  font-size: clamp(0.68rem, 1.5vh, 0.9rem);
  overflow: visible;
  display: block;
  max-height: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hero__summary::-webkit-scrollbar { 
    display: none;
}

.subtitle {
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text-primary);
}

.eyebrow {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(245, 230, 200, 0.45);
}

.toolbar {
  position: static;
  margin: 2.5rem auto 0;
  width: min(260px, 80%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
}

.toolbar label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: rgba(245, 230, 200, 0.58);
}

.toolbar select {
  min-width: 120px;
  padding: 0.33rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(20, 18, 15, 0.74);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.toolbar select:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px var(--focus);
}

.shortcut {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(245, 230, 200, 0.5);
  font-size: 0.8rem;
}

.shortcut .plus {
  color: rgba(245, 230, 200, 0.38);
}

.shortcut kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.52rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(23, 20, 16, 0.68);
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  min-width: 2.1rem;
}

.hero,
.body-section {
  scroll-margin-top: clamp(4.5rem, 18vh, 7.5rem);
}

.body-section {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.5rem 2.5rem;
  background: linear-gradient(#050505, #000000);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.body-section__inner {
  width: min(860px, 92%);
  margin: 0 auto;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  gap: 1.4rem;
  box-shadow: none;
  height: fit-content; /* Adjust based on content */
  overflow: visible;
}

.experience-top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.experience-lede {
  max-width: 760px;
}

.experience-cards {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 78px;
  --timeline-progress: 0;
}

.experience-cards::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border-radius: 999px;
  opacity: 0.6;
}

.experience-cards::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 0;
  width: 4px;
  height: calc(var(--timeline-progress, 0) * 100%);
  background: linear-gradient(180deg, rgba(93, 217, 188, 0.95), rgba(93, 132, 255, 0.85));
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(93, 217, 188, 0.4);
  transition: height 120ms ease-out;
}

.experience-card {
  position: relative;
  padding: 1rem 1rem 1.15rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.92), rgba(10, 10, 10, 0.82));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
  opacity: 0;
  transform: translateY(14px);
  overflow: hidden;
}

.experience-card:hover {
  border-color: var(--accent-color, rgba(255, 255, 255, 0.26));
  border-color: color-mix(in srgb, var(--accent-color, #6bb5ff) 55%, #ffffff 20%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55),
    0 0 24px var(--accent-color, rgba(255, 255, 255, 0.22)),
    0 0 24px color-mix(in srgb, var(--accent-color, #6bb5ff) 35%, transparent);
  transform: translateY(-2px);
}

.experience-card::before {
  content: "";
  position: absolute;
  left: -48px;
  top: 28px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color, #6bb5ff);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.05), 0 10px 18px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(0, 0, 0, 0.35);
}

.experience-card--visible {
  opacity: 1;
  transform: translateY(0);
}

.experience-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.experience-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--accent-color, #6bb5ff);
  background: color-mix(in srgb, var(--accent-color, #6bb5ff) 80%, #0d0d0d 20%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #0b0b0b;
  /* box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06); */
  z-index: 1;
}

.experience-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.experience-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.experience-card__company {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.experience-card__date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.experience-card__role {
  margin-top: 0.5rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
}

.experience-card__stack {
  margin-top: 0.1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  color: color-mix(in srgb, var(--text-muted) 80%, var(--accent-color, #6bb5ff) 20%);
}

.experience-card__bullets {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.experience-card__bullets li {
  color: var(--text-primary);
  line-height: 1.5;
  opacity: 0;
  transform: translateX(-8px) translateY(6px);
  list-style: disc;
}

.experience-card--visible .experience-card__bullets li {
  animation: bulletReveal 0.45s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
  animation-delay: calc(0.08s * var(--i, 0));
}

@keyframes bulletReveal {
  from {
    opacity: 0;
    transform: translateX(-8px) translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

.experience-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--accent-color, #6bb5ff) 30%, transparent) 0%, transparent 42%);
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 720px) {
  .experience-cards {
    padding-left: 58px;
  }

  .experience-card::before {
    left: -40px;
  }

  .experience-card__header {
    gap: 0.65rem;
  }

  .experience-card__icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 1rem;
  }
}

#projects {
    background: linear-gradient(to bottom, rgb(5, 5, 5), rgb(0, 0, 0));
  }
  
#projects .body-section__inner {
    display: block;
    width: fit-content;
    padding-top: 20px;
    padding-bottom: 24px;
    min-width: min(360px, 92vw);
    max-width: min(1400px, 92vw);
  }
  
  .body-section__inner p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
  }
  
  .projects-lede {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
  }
  
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    justify-items: stretch;
  }

  @media (min-width: 1080px) {
    .projects-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  /* Skills */
  #skills .body-section__inner {
    width: min(1800px, 99vw);
    max-width: none;
  }

  .skills-section {
    display: grid;
    gap: 2rem;
    padding-top: 12px;
  }

  .skills-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .skills-header > div:first-child {
    flex: 1 1 75%;
    min-width: min(520px, 100%);
  }

  .skills-header h2 {
    margin: 0;
    margin-bottom: 0.7rem;
  }

  .skills-lede {
    margin: 1.1rem 0 0;
    padding-bottom: 2rem;
    color: var(--text-muted);
    line-height: 1.55;
  }

  .skills-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .skills-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
  }

  .skills-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* padding-bottom: 4rem; */
    position: relative;
    padding-right: 1.1rem;
    padding-left: 0.2rem;
  }

  .skills-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .skills-group__title {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

  .skills-group__title h3 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
  }

  .skills-group__eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
  }

  .skills-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
  }

  .skills-group:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0px;
    bottom: 0px;
    right: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.14);
  }

  .skill-list {
    list-style: none;
    padding: 0;
    padding-top: 0.5rem;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: flex-start;
  }

  .skill-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
    width: auto;
  }

  .skill-item:hover {
    border-color: color-mix(in srgb, var(--skills-accent) 35%, rgba(255, 255, 255, 0.18));
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
  }

  .skill-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    flex-shrink: 0;
  }

  .skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  /* Slight rounding for select icons */
  .skill-icon img[src*="Selenium"],
  .skill-icon img[src*="javascript"] {
    border-radius: 6px;
  }

  .skill-icon img[src*="subversion"] {
    border-radius: 9px;
  }

  /* Force Express logo to white */
  .skill-icon img[src*="express"] {
    filter: brightness(0) invert(1);
  }

  .skill-name {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    font-size: 1rem;
  }

  @media (max-width: 720px) {
    .skills-group__header {
      align-items: flex-start;
    }

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

    .skills-group {
      padding-right: 0;
    }

    .skills-group:not(:last-child)::after {
      display: none;
    }
  }
  
  .project-card {
    --project-primary: rgba(255, 255, 255, 0.2);
    --project-primary-strong: color-mix(in srgb, var(--project-primary, rgba(255, 255, 255, 0.2)) 80%, #ffffff 20%);
    --project-outline-glow: color-mix(in srgb, var(--project-primary, rgba(255, 255, 255, 0.2)) 60%, transparent 10%);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem;
    margin-top: 1.5rem;
    background:
      linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.85) 100%),
      var(
        --project-card-gradient,
        linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(12, 12, 12, 0.35) 90%)
      );
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    isolation: isolate;
    z-index: 1;
  }

.project-card__media,
.project-card__content {
    position: relative;
    z-index: 2;
  }
  
.project-card .card-glow {
    z-index: -2;
  }

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--project-primary-strong, rgba(255, 255, 255, 0.32));
  border-color: color-mix(in srgb, var(--project-primary-strong, rgba(255, 255, 255, 0.32)) 70%, #ffffff 30%);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.5),
    0 0 22px var(--project-outline-glow, var(--project-primary, rgba(255, 255, 255, 0.2))),
    0 0 22px color-mix(in srgb, var(--project-primary-strong, rgba(255, 255, 255, 0.32)) 55%, transparent 45%);
}

.project-card:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.project-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(64, 54, 44, 0.35), rgba(26, 22, 18, 0.55)), var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  overflow: hidden;
}

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

.project-card__media-fallback {
  padding: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.project-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
}

.project-card__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    row-gap: 0.35rem;
    margin-top: 0.35rem;
    max-height: none;
    overflow: visible;
}

.project-card__tag {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  line-height: 1.1;
  color: var(--text-primary);
  white-space: nowrap;
}

.project-card .card-glow {
    width: 320px;
    height: 320px;
    filter: blur(16px);
    opacity: 0;
    z-index: -2;
}

@media (max-width: 1024px) {
  .hero__container {
    padding: clamp(1.5rem, 6vw, 2.6rem);
  }

  .hero__cards {
    flex-direction: column;
    gap: clamp(1.4rem, 4vw, 2rem);
    width: min(680px, 96%);
    height: auto;
    max-height: none;
    --hero-detail-ratio-current: 1;
    margin-top: clamp(1rem, 6vw, 2rem);
  }

  .hero__card,
  .hero__image-card,
  .hero__details-card {
    flex: none;
    width: 100%;
    max-height: none;
    height: auto;
  }

  .hero__image-card {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
  }

  .hero__details-card {
    max-width: none;
  }

  .hero__details {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .hero-nav__inner {
    flex-direction: column;
    gap: 0.85rem;
  }

  .hero-nav__links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    --hero-section-height: clamp(420px, 65svh, 620px);
    min-height: var(--hero-section-height);
    height: auto;
    padding-top: clamp(8rem, 14vh, 5.5rem);
    overflow: visible;
  }

  .hero__image-card {
    width: clamp(200px, 70vw, 260px);
  }

  .hero__cards {
    --hero-detail-ratio-current: 1;
  }

  .hero__details {
    text-align: center;
  }

  .hero__summary {
    font-size: 0.98rem;
  }

  .toolbar {
    width: clamp(240px, 92vw, 320px);
  }
}

@media (max-height: 620px) {
  .hero {
    --hero-section-height: clamp(420px, 65svh, 620px);
    min-height: var(--hero-section-height);
    height: auto;
    padding-top: clamp(2.2rem, 12vh, 3.8rem);
    padding-bottom: clamp(1.5rem, 8vh, 2.5rem);
    overflow: visible;
  }

  .hero__container {
    padding: clamp(0.8rem, 2.5vw, 1.6rem);
  }
}

@media (max-height: 720px) {
  .hero__details h1 {
    font-size: clamp(1.6rem, 4.2vw, 3rem);
  }
  .hero__details .subtitle {
    font-size: clamp(0.85rem, 1.8vh, 1rem);
  }
  .hero__summary {
    font-size: clamp(0.7rem, 1.6vh, 0.85rem);
    line-height: 1.3;
  }
  .hero__details {
    overflow: visible;
    max-height: none;
  }
}

.hero-dev-panel {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  width: clamp(240px, 28vw, 300px);
  padding: 1rem;
  background: rgba(18, 16, 13, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 22px 44px rgba(8, 6, 4, 0.55);
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.45;
  backdrop-filter: blur(20px);
  z-index: 60;
  display: grid;
  gap: 0.75rem;
}

.hero-dev-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: rgba(245, 230, 200, 0.65);
}

.hero-dev-panel__toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(26, 22, 18, 0.7);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.hero-dev-panel__toggle:hover,
.hero-dev-panel__toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
  outline: none;
}

.hero-dev-panel__row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-dev-panel__row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hero-dev-panel__row strong {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero-dev-panel input[type="range"] {
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.hero-dev-panel input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.hero-dev-panel input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.hero-dev-panel__meta {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: rgba(245, 230, 200, 0.62);
}

.hero-dev-panel__code {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(245, 230, 200, 0.72);
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.7rem;
  overflow: auto;
  max-height: 120px;
}

.hero-dev-panel--collapsed .hero-dev-panel__body {
  display: none;
}

.hero-dev-panel--collapsed {
  padding: 0.75rem 0.85rem;
}

.hero-dev-panel--hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .hero-dev-panel {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-nav,
  .hero-nav__inner,
  .hero-nav__links li,
  .hero-nav__brand,
  .hero__image-card,
  .hero__details-card {
    transition: none !important;
    animation: none !important;
  }

  .hero-nav__inner,
  .hero-nav--pinned .hero-nav__inner {
    transform: none !important;
  }
}


/* Site Footer */
.site-footer {
  background: #080808;
  padding: 2rem 1rem;
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 5;
  text-align: center;
}

.site-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.site-footer__text {
  margin: 0;
  color: #e0e0e043;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.site-footer__copyright {
  margin: 0;
  color: #e0e0e043;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

@media (max-width: 1200px) {
  .contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .contact-pill {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .site-footer__bar {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
  }
}

/* Contact Link Style */
.contact-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

#experience .body-section__inner {
    padding-top: 3px;
    padding-bottom: 25px;
  }


#contact .body-section__inner {
    padding-top: 14px;
    padding-bottom: 24px;
  }

.contact-card {
  position: relative;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  text-align: center;
  transition: none;
}

.contact-card__glow {
  display: none;
}

.contact-card > *:not(.contact-card__glow) {
  position: relative;
  z-index: 1;
}

.contact-card:hover {
  border-color: transparent;
  box-shadow: none;
}

.contact-card__intro {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
  padding-top: 0.1rem;
  align-items: center;
}

.contact-card__intro .eyebrow {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: 0.34em;
}

.contact-card__lede {
  margin: 0;
  padding-bottom: 10px;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.55;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
  margin-top: 0.75rem;
  justify-items: stretch;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  min-width: 0;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: none;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 48px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
  backdrop-filter: blur(12px);
  justify-content: center;
}

.contact-pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.contact-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.contact-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  overflow: hidden;
  color: var(--accent);
}

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

.contact-pill__text {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  color: var(--text-primary);
  line-height: 1.05;
}

.contact-pill__text--stacked {
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: normal;
  line-height: 1;
  gap: 0;
  font-size: 0.96em;
}

.contact-pill__text-secondary {
  font-size: 0.66em;
  color: rgba(255, 255, 255, 0.5);
}

.contact-pill--primary .contact-pill__text--stacked {
  font-size: 0.94em;
  line-height: 1;
}

.contact-pill--primary .contact-pill__text-secondary {
  font-size: 0.62em;
}
}

.contact-pill__img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-pill__img--square {
  border-radius: 6px;
}

.contact-pill--primary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.contact-pill--primary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.contact-copy-row {
  margin-top: 0.9rem;
  display: none;
}

.contact-copy-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 8, 0.94);
  color: rgba(190, 190, 190, 0.95);
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 55%;
  max-width: 220px;
  min-width: 120px;
  justify-content: center;
  margin: 0 auto;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contact-copy-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.78);
}

.contact-copy-btn:not(.contact-copy-btn--copied):hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(14, 14, 14, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.08);
}

.contact-copy-btn--copied:hover {
  border-color: rgba(44, 184, 49, 0.6);
  background: rgba(45, 212, 191, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 10px rgba(45, 212, 191, 0.2);
}

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

.contact-copy-btn--copied {
  border-color: rgba(4, 184, 49, 0.6);
  background: rgba(45, 212, 191, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.contact-copy-btn__label {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.2;
}

.contact-copy-btn__text {
  display: inline-block;
}

.contact-copy-btn__text.is-leaving {
  position: absolute;
  left: 0;
  top: 0;
  animation: copyTextOut 220ms ease forwards;
}

.contact-copy-btn__text.is-entering {
  animation: copyTextIn 220ms ease forwards;
}

@keyframes copyTextOut {
  from {
    transform: translateY(0) rotateX(0deg);
    opacity: 1;
  }
  to {
    transform: translateY(-110%) rotateX(70deg);
    opacity: 0;
  }
}

@keyframes copyTextIn {
  from {
    transform: translateY(110%) rotateX(-70deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotateX(0deg);
    opacity: 1;
  }
}


/* --- Project Page / Modal Layout --- */
.project-page-body {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.project-layout {
  flex: 1;
  display: flex;
  height: 100%;
  overflow: hidden;
}

.project-visual {
  flex: 1;
  background: #000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem 2.5rem;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
  line-height: 1.1;
}

#projects h2 {
  margin-top: 0.20rem;   /* smaller top space */
  margin-bottom: 0.75rem; /* adjust bottom if you like */
}

.project-github-floating-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: all 0.2s ease;
  background: rgba(10, 10, 10, 0.9);
  white-space: nowrap;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 210;
}

.project-github-floating-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.project-tags {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.project-description-container {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
  max-width: 65ch;
}

.code-tree-section {
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: rgba(5, 5, 5, 0.55);
}

.code-viewer-section {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.8);
}

.code-panel-header {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.file-tree-container {
  padding: 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.tree-item {
  cursor: pointer;
  padding: 0.2rem 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tree-item:hover {
  color: var(--accent);
}

.tree-item.active {
  color: var(--accent);
  font-weight: bold;
}

.tree-indent {
  display: inline-block;
  width: 1.2em;
}

.folder-icon, .file-icon {
  opacity: 0.7;
}

.code-preview-container {
  padding: 1rem;
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: #f1f1f1;
  white-space: pre;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 900px) {
  .project-page-body {
    height: auto;
    overflow: auto;
  }
  
  .project-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .project-visual {
    height: 50vh;
    flex: none;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .project-content {
    flex: none;
    overflow: visible;
    padding: 2rem 1.5rem;
  }
}

/* --- Modal Specific Styles --- */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.project-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(1.5px);
  z-index: -1;
}

.project-modal__container {
  position: relative;
  width: min(1200px, 90vw);
  height: min(800px, 80vh);
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-modal__close {
  display: none;
}

.project-modal__body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.content-hidden {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-scroll-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: transparent;
  z-index: 40;
  transition: background 0.3s ease, border-bottom 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1rem;
  border-bottom: 1px solid transparent;
  pointer-events: none;
}

.modal-scroll-bar.scrolled {
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

.project-modal[aria-hidden="false"] .card-glow {
  display: none !important;
}

.project-modal__body ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.project-modal__body ::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.6);
}
.project-modal__body ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}
.project-modal__body ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

@media (min-width: 901px) {
  .modal-scroll-bar {
    width: calc(50% + 1px);
  }
}

.modal-sticky-title {
  display: none;
}

.project-header {
  position: sticky;
  top: 0;
  z-index: 35;
  margin: 0 0 1.5rem 0;
  padding: 1.5rem 0 1rem 0;
  background: transparent;
  transition: background 0.3s ease, border-bottom 0.3s ease, padding 0.1s;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-header.scrolled {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

#modal-project-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
  line-height: 1.1;
  transform-origin: left center;
  transition: transform 0.05s linear;
  will-change: transform;
}

/* // FPS counter */
.perf-meter {
  position: fixed;
  inset: 16px auto auto 16px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(5, 5, 5, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 12px;
  color: #f0f0f0;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.perf-meter__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}
.perf-meter__value {
  font-size: 16px;
  line-height: 1.2;
}
.perf-meter__value--secondary {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

