@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-quantico: 'Quantico', sans-serif;
  --font-viga: 'Viga', sans-serif;

  /* Theme: Dark (Default) */
  --bg-primary: #0a0a0c;
  --bg-secondary: #121214;
  --bg-tertiary: #1a1a1e;
  --border-color: #242428;
  --border-hover: #3a3a42;
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #ffffff;
  --accent-rgb: 255, 255, 255;
  --badge-bg: rgba(255, 255, 255, 0.03);
  --badge-border: rgba(255, 255, 255, 0.08);
  --badge-hover-bg: rgba(255, 255, 255, 0.07);
  --shadow: rgba(0, 0, 0, 0.5);
  --foot-glow: rgba(106, 110, 111, 0.65);
  /* sky blue glow at foot of image */

  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease;

  --max-width: 1200px;
  /* was 900px */
  --name-gradient: linear-gradient(135deg, #bae6fd, #38bdf8);
  --bg-card: rgba(255, 255, 255, 0.02);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-menu: rgba(10, 10, 12, 0.85);

  /* Scroll Arrow tokens */
  --sa-ring: #ffffff;
  --sa-border: rgba(255, 255, 255, 0.22);
  --sa-border-hv: rgba(255, 255, 255, 0.55);
  --sa-stroke: #ffffff;
  --sa-label: rgba(255, 255, 255, 0.35);
}

[data-theme="light"] {
  /* Theme: Light */
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f0f3;
  --border-color: #c5c5c9;
  --border-hover: #a1a1aa;
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --accent: #09090b;
  --accent-rgb: 9, 9, 11;
  --badge-bg: rgba(9, 9, 11, 0.03);
  --badge-border: rgba(9, 9, 11, 0.08);
  --badge-hover-bg: rgba(9, 9, 11, 0.06);
  --shadow: rgba(0, 0, 0, 0.05);
  --foot-glow: rgba(14, 165, 233, 0.45);
  /* light theme blue glow at foot of image */
  --name-gradient: linear-gradient(135deg, #0ea5e9, #0369a1);
  --bg-card: rgba(9, 9, 11, 0.02);
  --bg-card-hover: rgba(9, 9, 11, 0.08);
  --bg-menu: rgba(245, 245, 247, 0.85);

  /* Scroll Arrow tokens — dark on light */
  --sa-ring: #09090b;
  --sa-border: rgba(9, 9, 11, 0.18);
  --sa-border-hv: rgba(9, 9, 11, 0.45);
  --sa-stroke: #09090b;
  --sa-label: rgba(9, 9, 11, 0.35);
}

/* Google Fonts Helper Classes */
.quantico-regular {
  font-family: var(--font-quantico);
  font-weight: 400;
  font-style: normal;
}

.quantico-bold {
  font-family: var(--font-quantico);
  font-weight: 700;
  font-style: normal;
}

.quantico-regular-italic {
  font-family: var(--font-quantico);
  font-weight: 400;
  font-style: italic;
}

.quantico-bold-italic {
  font-family: var(--font-quantico);
  font-weight: 700;
  font-style: italic;
}

.viga-regular {
  font-family: var(--font-viga);
  font-weight: 400;
  font-style: normal;
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar for IE and Edge */
}

/* Hide scrollbars for Chrome, Safari and Opera */
*::-webkit-scrollbar {
  display: none;
}

/* ── Layout: full-viewport, no scroll ── */
html,
body {
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Grainy overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Diagonal stripe pattern background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(-45deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 8px);
}

[data-theme="light"] body::before {
  background-image: repeating-linear-gradient(-45deg,
      rgba(0, 0, 0, 0.025) 0px,
      rgba(0, 0, 0, 0.025) 1px,
      transparent 1px,
      transparent 8px);
}

/* Page transitions container (legacy support) */
.fade-in-element {
  opacity: 1;
  /* keep transparent wrapper visible, transitions handled by children */
}

/* Staggered Page Entrance System */
.reveal-header,
.reveal-content,
.reveal-media {
  opacity: 0;
  will-change: opacity, transform;
}

.reveal-header {
  transform: translateY(-16px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-content {
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-media {
  transform: scale(0.96) translateY(10px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Trigger reveal when body is marked loaded */
body.loaded .reveal-header {
  opacity: 1;
  transform: translateY(0);
}

body.loaded .reveal-content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

body.loaded .reveal-media {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition-delay: 0.2s;
}

/* Home page — longer, more cinematic reveal */
body.page-home.loaded .reveal-header {
  transition-duration: 1s;
}

body.page-home.loaded .reveal-content {
  transition-duration: 1.1s;
  transition-delay: 0.45s;
}

body.page-home.loaded .reveal-media {
  transition-duration: 1.2s;
  transition-delay: 0.6s;
}

/* Scroll Reveal System */
.sr-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.sr-item.sr-visible {
  opacity: 1;
  transform: translateY(0);
}

.typewriter-text {
  display: inline;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background-color: var(--text-primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Main Layout Structure */
.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 3rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

main {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 2rem;
  /* gap between navbar border and hero title */
  padding-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
}

header {
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.6rem 0;
  /* adjusted for optimal height and symmetry */
  margin-bottom: 0;
  font-family: var(--font-heading);
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background-color: var(--border-color);
  pointer-events: none;
}

.logo {
  font-size: 1.3rem;
  /* increased logo font size */
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
  justify-self: start;
}

.logo:hover {
  opacity: 0.8;
}

nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  /* increased spacing between nav links */
  justify-self: center;
}

.nav-link {
  font-size: 0.95rem;
  /* increased navigation link font size */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--text-secondary);
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.2em;
  line-height: 1.2em;
  vertical-align: middle;
}

.nav-link:hover,
.nav-link.active {
  transform: none !important;
}

.nav-link-inner {
  display: block;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link-inner::after {
  content: attr(data-text);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  color: var(--text-primary);
  font-weight: 500;
}

.nav-link:hover .nav-link-inner,
.nav-link.active .nav-link-inner {
  transform: translateY(-100%);
}

.theme-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0.5px solid #333;
  background: #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: background 0.35s, border-color 0.35s, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  justify-self: end;
}

.theme-btn:active {
  transform: scale(0.82);
}

.theme-btn .ti {
  font-size: 20px;
  color: #fff;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s;
}

.theme-btn.light {
  background: #ececea;
  border-color: #d0d0d0;
}

.theme-btn.light .ti {
  transform: rotate(360deg);
  color: #111;
}

body.light-mode {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle-btn {
  display: none;
  /* hidden on desktop */
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--text-primary);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  position: relative;
  z-index: 1001;
  cursor: pointer;
  transition: var(--transition-fast);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  outline: none;
}

.menu-toggle-btn:hover {
  background: var(--badge-hover-bg);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.menu-toggle-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  border-radius: 2px;
}

/* Hamburger to X animation */
.menu-toggle-btn.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle-btn.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle-btn.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Backdrop overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 998;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.menu-open {
  overflow: hidden !important;
}

body.menu-open .menu-overlay {
  opacity: 1;
}

/* Hero Section */
.hero {
  flex-grow: 0;
  flex-shrink: 0;
  min-height: auto;
  padding: 0 0 0.5rem 0;
  margin-bottom: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* content starts right below navbar */
  position: relative;
  /* anchor for absolutely positioned photo */
}

.hero-grid {
  display: block;
  /* image is absolutely positioned; only left content flows */
  margin: 0;
  margin-top: 4rem;
  padding-right: 40%;
  /* reserve space so text doesn't overlap image */
}

/* Clean photo wrapper — absolutely positioned so it never moves with left content */
.hero-photo-wrapper {
  position: absolute;
  top: 4.5rem;
  right: -7.2rem;
  width: 46%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Glowing shadow at the foot of the avatar image */
.hero-photo-wrapper::after {
  content: '';
  position: absolute;
  bottom: -10px;
  /* position right at the bottom edge */
  left: 15%;
  right: 15%;
  height: 35px;
  background: radial-gradient(ellipse at bottom, var(--foot-glow) 0%, rgba(56, 189, 248, 0) 75%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 2;
  /* sits slightly over/on the bottom edge */
  transition: opacity 0.3s ease;
}

.hero-grid .about-photo-wrapper {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  min-height: 300px;
  align-self: center;
}

.hero-grid .about-photo-wrapper::after {
  display: none !important;
}

.hero-photo-wrapper .about-photo,
.hero-grid .about-photo {
  max-width: 450px;
  width: 100%;
  display: block;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .hero-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding-right: 0 !important;
    margin-top: 2rem;
  }

  .hero-photo-wrapper {
    position: static !important;
    width: 40% !important;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    display: block;
    padding-right: 0 !important;
    margin-top: 1.5rem;
  }

  .hero-photo-wrapper {
    display: none !important;
  }
}


.greeting-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

h1 {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  /* increased from 2.75rem */
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.greeting-row h1 span {
  font-family: var(--font-viga);
  font-weight: 400;
  /* Viga only supports weight 400, but is naturally very bold */
  background: var(--name-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.greeting-row h1 span:hover {
  opacity: 0.95;
  filter: brightness(1.1);
}

.pattern-text {
  background: var(--name-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  white-space: nowrap;
}

.pattern-text:hover {
  opacity: 1;
  filter: none;
}

.pattern-text::after {
  content: attr(data-shadow);
  position: absolute;
  top: 0.06em;
  left: 0.08em;
  z-index: -1;
  background-size: 0.1em 0.1em;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  background-image: linear-gradient(45deg,
      transparent 45%,
      var(--text-primary) 45%,
      var(--text-primary) 55%,
      transparent 0);
  animation: shadanim 5s linear infinite;
  white-space: nowrap;
}

@keyframes shadanim {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: -1em 1em;
  }
}


/* Audio Pronunciation Wave Button */
.pronounce-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition-fast);
  margin-left: 0.25rem;
}

.pronounce-btn:hover {
  color: var(--text-primary);
  background-color: var(--badge-bg);
}

.pronounce-btn svg {
  width: 1.35rem;
  height: 1.35rem;
}

.pronounce-btn.speaking {
  color: var(--accent);
  animation: pulse-wave 1s infinite alternate;
}

@keyframes pulse-wave {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  /* was 0.5rem */
}

.hero-subtitle a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: var(--transition-fast);
}

.hero-subtitle a:hover {
  opacity: 0.8;
}

.hero-desc {
  font-size: 0.975rem;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 100%;
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* Social Grid Links - Button styling */
.about__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0;
}

.about__links a {
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-h {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-quantico);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Apply pill shape to about page links and nav menu links */
.about__links .link-h {
  border-radius: 50px;
  padding: 8px 16px;
  height: auto;
  color: var(--text-secondary) !important;
  /* Text starts grey, becomes white on hover via pseudo element */
  overflow: visible;
  /* Override any inherited hidden overflow */
  display: inline-flex;
  /* Override .nav-link inline-block from bottom of file */
}

/* Nav menu links are icon-only */
.nav-menu .nav-link.link-h {
  border-radius: 50%;
  padding: 10px;
  width: 54px;
  height: 54px;
  color: var(--text-secondary) !important;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-menu .nav-link.link-h .icon-wrap {
  width: 30px;
  height: 30px;
}

.nav-menu .nav-link.link-h .social-text-wrapper {
  display: none !important;
}

.about__links .link-h .icon-wrap,
.nav-menu .link-h .icon-wrap {
  color: var(--text-secondary);
  /* Icon starts grey */
  transition: color 0.3s ease;
}

.about__links .link-h:hover .icon-wrap,
.nav-menu .link-h:hover .icon-wrap,
.nav-menu .link-h.active .icon-wrap {
  color: var(--text-primary);
  /* Default hover color (used by GitHub/Twitter) */
}

/* Social Link Brand Colors on Hover */
.about__links .link-email .icon-gmail path {
  transition: fill 0.3s ease;
}

.about__links .link-email:hover .icon-gmail .gmail-path1 {
  fill: url(#gmail-grad-a) !important;
}

.about__links .link-email:hover .icon-gmail .gmail-path2 {
  fill: #fc413d !important;
}

.about__links .link-email:hover .icon-gmail .gmail-path3 {
  fill: url(#gmail-grad-b) !important;
}

.about__links .link-linkedin:hover .icon-wrap {
  color: #0A66C2 !important;
}

.about__links .link-instagram .icon-ig path {
  transition: fill 0.3s ease;
}

.about__links .link-instagram:hover .icon-ig path {
  fill: url(#ig-gradient) !important;
}

.about__links .link-github:hover .icon-wrap,
.about__links .link-twitter:hover .icon-wrap {
  color: #FFFFFF !important;
}

/* Social link sliding text effect */
.social-text-wrapper {
  overflow: hidden;
  height: 1.2em;
  line-height: 1.2em;
  vertical-align: middle;
  display: inline-block;
  margin-top: 2px;
  /* Visually center uppercase text with icons */
}

.social-text-inner {
  display: block;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-text-inner::after {
  content: attr(data-text);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  color: var(--text-primary);
  font-weight: 500;
}

.about__links .link-h:hover .social-text-inner,
.nav-menu .link-h:hover .social-text-inner,
.nav-menu .link-h.active .social-text-inner {
  transform: translateY(-100%);
}

.link-h:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.link-h:active {
  transform: translateY(0) scale(0.96);
}

/* icon container */
.link-h .icon-wrap,
.github-source-btn .icon-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.link-h .icon-wrap svg,
.github-source-btn .icon-wrap svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* solid icon fades out */
.link-h .icon-fill,
.github-source-btn .icon-fill {
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-h:hover .icon-fill,
.github-source-btn:hover .icon-fill {
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* outline strokes draw in */
.link-h .icon-outline path,
.link-h .icon-outline rect,
.link-h .icon-outline circle,
.link-h .icon-outline line,
.github-source-btn .icon-outline path,
.github-source-btn .icon-outline rect,
.github-source-btn .icon-outline circle,
.github-source-btn .icon-outline line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-h:hover .icon-outline path,
.link-h:hover .icon-outline rect,
.link-h:hover .icon-outline circle,
.link-h:hover .icon-outline line,
.github-source-btn:hover .icon-outline path,
.github-source-btn:hover .icon-outline rect,
.github-source-btn:hover .icon-outline circle,
.github-source-btn:hover .icon-outline line {
  stroke-dashoffset: 0;
}

/* Section Common Styles */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  /* was 0.65rem */
  color: var(--text-primary);
}

/* Resume Section */
.resume-section {
  margin-bottom: 0;
}

/* ── Resume Button (btn-outlined) ── */
.btn-outlined {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0 22px;
  height: 46px;
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-quantico);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, transform 0.15s;
  outline: none;
  text-decoration: none;
}

.btn-outlined:hover {
  background: var(--badge-hover-bg);
  border-color: var(--border-hover);
}

.btn-outlined:active {
  transform: scale(0.97);
}

/* Page icon */
.page-icon {
  position: relative;
  width: 22px;
  height: 27px;
  flex-shrink: 0;
  z-index: 2;
}

.page-body {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--text-secondary);
  border-radius: 3px;
  background: transparent;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-outlined:hover .page-body {
  transform: rotate(-6deg) translateX(-2px);
}

.page-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-left: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  border-bottom-left-radius: 2px;
  background: transparent;
}

.page-lines {
  position: absolute;
  top: 11px;
  left: 4px;
  right: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.page-lines .line {
  height: 1.5px;
  background: var(--border-hover);
  border-radius: 2px;
  width: 100%;
}

.page-lines .line:nth-child(2) {
  width: 80%;
}

.page-lines .line:nth-child(3) {
  width: 90%;
}

.page-lines .line:nth-child(4) {
  width: 65%;
}

/* Button text */
.btn-text {
  position: relative;
  z-index: 2;
  line-height: 1.2;
  text-align: left;
}

.btn-sub {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
  font-weight: 400;
}

/* Arrow */
.arrow-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  z-index: 2;
  opacity: 0.55;
  color: var(--text-primary);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}

.btn-outlined:hover .arrow-icon {
  transform: translate(3px, -3px);
  opacity: 1;
}

/* Tech Stack Card Grid System */
.tech-stack-section {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.section-label {
  font-family: var(--font-quantico);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.stack-container {
  display: grid;
  grid-template-columns: repeat(8, 72px);
  gap: 0.3rem 8px;
}

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}

.tech-icon-wrapper {
  width: 100%;
  max-width: 52px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 12px;
  transition: var(--transition-smooth);
  margin: 0 auto;
}

.tech-icon-wrapper img,
.tech-icon-wrapper svg {
  width: 46%;
  height: 46%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Specific size adjustments for detailed/larger logos */
.tech-card[data-tech="HuggingFace"] .tech-icon-wrapper svg {
  width: 54%;
  height: 54%;
}

.tech-card[data-tech="CapCut"] .tech-icon-wrapper svg {
  width: 50%;
  height: 50%;
}

.tech-name {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  transition: var(--transition-fast);
}

/* Hover & Interactive Styles */
.tech-card:hover .tech-icon-wrapper {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.tech-card:hover .tech-icon-wrapper img,
.tech-card:hover .tech-icon-wrapper svg {
  transform: scale(1.12);
}

.tech-card:hover .tech-name {
  color: var(--text-primary);
}

/* Responsive grid layouts */
@media (max-width: 1024px) {
  .stack-container {
    grid-template-columns: repeat(8, 68px);
    gap: 0.25rem 8px;
  }

  .tech-icon-wrapper {
    border-radius: 12px;
  }
}

@media (max-width: 768px) {
  .stack-container {
    grid-template-columns: repeat(4, 72px);
    gap: 0.25rem 8px;
  }

  .tech-name {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .stack-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.2rem 6px;
  }

  .tech-name {
    font-size: 0.7rem;
  }

  .tech-icon-wrapper {
    border-radius: 10px;
  }
}

/* About Details Page */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

.about-intro-text {
  max-width: 780px;
  margin-bottom: 4.5rem;
}

.about-intro-text p {
  color: var(--text-secondary);
  font-size: 1.025rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.about-intro-text p strong {
  color: var(--text-primary);
}




.timeline-container {
  position: relative;
  margin-top: 2rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: calc(-1.5rem - 4.5px);
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  border: 1px solid var(--bg-primary);
  transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
  background-color: var(--text-primary);
  transform: scale(1.25);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-company {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Projects Page */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.filter-btn {
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: 6px;
}

.filter-btn:hover {
  color: var(--text-primary);
  background-color: var(--badge-bg);
}

.filter-btn.active {
  color: var(--text-primary);
  background-color: var(--badge-hover-bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.project-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-heading);
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  color: var(--text-secondary);
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-description {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.5;
}

.project-links {
  display: flex;
  gap: 1.25rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

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

.project-link svg {
  width: 0.95rem;
  height: 0.95rem;
}

/* Contact Page Styles */
.contact-layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 2.5rem;
  padding-left: 5rem;
}

.contact-info-panel h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.contact-info-desc {
  font-size: 1.025rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 400px;
}

.contact-card-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition-smooth);
  max-width: 380px;
  width: 100%;
}

.contact-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px var(--shadow);
}

.contact-card-icon {
  color: var(--text-secondary);
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card:hover .contact-card-icon {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.contact-card-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.contact-card-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-card-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

.contact-card-value[href]:hover {
  text-decoration: underline;
}

/* Form Styles */
.contact-form-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  justify-self: start;
  align-self: start;
  margin-top: 7rem;
}

.form-group {
  position: relative;
  margin-bottom: 1.25rem;
}

.form-control {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-smooth);
}

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

.form-control:focus {
  border-color: var(--text-secondary);
  box-shadow: 0 0 0 1px var(--text-secondary);
}

.form-label {
  position: absolute;
  left: 1rem;
  top: 0.95rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-smooth);
  background-color: var(--bg-secondary);
  padding: 0 0.25rem;
  line-height: 1;
}

/* Floating Label Logic */
.form-control:focus~.form-label,
.form-control:not(:placeholder-shown)~.form-label {
  top: -0.5rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-error-msg {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.35rem;
  display: none;
}

.form-group.has-error .form-control {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

.form-group.has-error .form-error-msg {
  display: block;
}

.submit-btn {
  width: 100%;
  background-color: var(--text-primary);
  border: 1px solid var(--text-primary);
  color: var(--bg-primary);
  padding: 0.9rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn svg {
  width: 0.95rem;
  height: 0.95rem;
}

.form-success-banner {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-align: center;
  display: none;
}

/* Floating Bottom Footer Connect Bar */
.bottom-connect-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-primary);
  background-image: repeating-linear-gradient(-45deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 8px);
  backdrop-filter: none;
  border-top: none;
  border-radius: 0;
  padding: 1.25rem max(3rem, calc((100vw - 1280px) / 2 + 3rem)) 1.25rem max(5.5rem, calc((100vw - 1280px) / 2 + 5.5rem));
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: none;
  z-index: 100;
  transition: var(--transition-smooth);
}

/* Full-width dark border — unchanged */
.bottom-connect-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  /* full screen width, not element width */
  height: 1px;
  background-color: var(--border-color);
  pointer-events: none;
}

/* Sky blue glow centered ON TOP of the border */
.bottom-connect-bar::after {
  content: '';
  position: absolute;
  top: 0;
  /* same level as border, no gap */
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(56, 189, 248, 0.5) 20%,
      rgba(186, 230, 253, 0.95) 50%,
      rgba(56, 189, 248, 0.5) 80%,
      transparent 100%);
  pointer-events: none;
}

[data-theme="light"] .bottom-connect-bar {
  background-color: var(--bg-primary);
  background-image: repeating-linear-gradient(-45deg,
      rgba(0, 0, 0, 0.025) 0px,
      rgba(0, 0, 0, 0.025) 1px,
      transparent 1px,
      transparent 8px);
}

.connect-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.connect-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.connect-btn svg {
  width: 0.85rem;
  height: 0.85rem;
}

.copyright-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {

  html,
  body {
    height: auto;
    overflow-y: auto;
  }

  .container {
    padding: 0 1.5rem 6.5rem;
    /* bottom padding to match top spacing (header margin-bottom) */
    height: auto;
    overflow: visible;
  }

  main {
    height: auto;
    overflow: visible;
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero {
    padding-top: 0;
  }

  header {
    margin-bottom: 1rem;
    /* spacing between nav bar underline and content */
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .menu-toggle-btn {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 280px;
    height: 100vh;
    background-color: rgba(18, 18, 20, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem;
    gap: 2.25rem;
    z-index: 999;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
    transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-menu.open {
    right: 0;
  }

  [data-theme="light"] .nav-menu {
    background-color: rgba(245, 245, 247, 0.98);
  }

  .nav-menu .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1.4rem;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1000;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    overflow: visible;
    height: auto;
    line-height: normal;
  }

  .nav-menu .nav-link-inner {
    transition: none;
  }

  .nav-menu .nav-link-inner::after {
    display: none;
  }

  .nav-menu .nav-link:hover .nav-link-inner,
  .nav-menu .nav-link.active .nav-link-inner {
    transform: none;
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link:active {
    color: var(--text-primary) !important;
  }

  /* Remove underline animation on mobile — use color change only */
  .nav-menu .nav-link::after {
    display: none;
  }

  .nav-menu.open .nav-link {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-menu.open .nav-link:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav-menu.open .nav-link:nth-child(2) {
    transition-delay: 0.2s;
  }

  .nav-menu.open .nav-link:nth-child(3) {
    transition-delay: 0.3s;
  }

  h1 {
    font-size: 2.8rem;
  }

  .status-badge {
    display: none !important;
  }

  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-form-wrapper {
    margin-top: 0;
    justify-self: stretch;
  }

  .contact-layout {
    padding-left: 0;
  }

  .about-photo-wrapper {
    order: -1;
    max-width: 320px;
    margin: 2rem auto 0;
  }

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

  .bottom-connect-bar {
    padding: 1.1rem 1.25rem;
  }

  .copyright-text {
    font-size: 0.7rem;
  }

  .connect-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
  }

  .bottom-sections {
    gap: 1.5rem;
    overflow: visible;
    flex: none;
    padding-top: 1.2rem;
    /* same as header margin-bottom */
    padding-bottom: 0;
    margin-top: -0.5rem;
  }

  .tech-stack-section {
    overflow: visible;
    flex: none;
  }
}

@media (max-width: 600px) {

  html,
  body {
    height: auto;
    overflow-y: auto;
  }

  .container {
    padding: 0 1rem 6.5rem;
    /* bottom padding to match top spacing (header margin-bottom) */
    height: auto;
    overflow: visible;
  }

  main {
    height: auto;
    overflow: visible;
    padding-top: 0;
    /* override desktop top padding */
    padding-bottom: 0;
    /* remove desktop bottom padding */
  }

  header {
    margin-bottom: 1rem;
    /* spacing between nav bar underline and body content */
    padding: 1.7rem 0;
    /* slightly more padding for mobile nav bar */
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    white-space: nowrap;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
  }

  .hero {
    padding: 0 0 1.5rem;
    /* remove top padding to keep spacing equal to header margin-bottom */
  }

  .hero-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
  }

  .about__links {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .link-h {
    font-size: 13px;
    padding: 8px 16px;
    height: auto;
    border-radius: 50px;
  }

  .resume-download-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }

  .bottom-sections {
    gap: 1.5rem;
    overflow: visible;
    flex: none;
    padding-top: 1.2rem;
    /* same as header margin-bottom */
    padding-bottom: 0;
    margin-top: -0.5rem;
  }

  .tech-stack-section {
    overflow: visible;
    flex: none;
  }


  .section-label {
    margin-bottom: 1.25rem;
  }

  .bottom-connect-bar {
    bottom: 0;
    width: 100%;
    padding: 1.0rem 1rem;
    border-radius: 0;
  }

  .bottom-connect-bar.footer-inline {
    padding: 0.25rem 0.75rem;
    margin-top: 0;
  }

  .bottom-connect-bar.footer-inline .connect-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
  }

  .bottom-connect-bar.footer-inline .copyright-text {
    font-size: 0.6rem;
  }
}

/* Add underline above footer */
footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

/* Bottom sections: Resume then Tech Stack stacked vertically */
.bottom-sections {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1.5rem;
  /* spacing between resume and tech stack */
  padding-top: 2rem;
  /* was 2.5rem */
  padding-bottom: 0;
  margin-top: 0;
  /* flow naturally under text */
  overflow: visible;
  /* allowed visible layout */
  max-width: 744px;
  width: 100%;
}

/* About page only — override the negative pull */
body:has(.about-intro-text) .bottom-sections {
  margin-top: 1.5rem;
}

.home__waves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Status Badge with blinking dot */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: #16a34a;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-family: var(--font-quantico);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  width: fit-content;
}

[data-theme="dark"] .status-badge {
  color: #4ade80;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: currentColor;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  border-radius: 50%;
  animation: pulse-green 2s infinite ease-in-out;
  opacity: 0.75;
}

@keyframes pulse-green {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }

  70% {
    transform: scale(2.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.sky-text {
  color: #0ea5e9;
}

[data-theme="dark"] .sky-text {
  color: #38bdf8;
}

/* ── Facts Section Flip Cards ─────────────────────────────────────── */
.facts-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  margin-top: 2rem;
  clear: both;
}

.facts-label {
  font-size: 6.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.facts-label::before,
.facts-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--border-color);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 240px));
  gap: 12px;
}

@media (max-width: 768px) {

  .facts-section {
    padding: 10px;
    margin-top: 1.25rem;
  }

  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  /* All 3 cards: fixed identical height, kill aspect-ratio */
  .flip-wrap {
    aspect-ratio: unset !important;
    height: 215px !important;
  }

  .flip-inner {
    height: 100%;
    min-height: unset;
  }

  /* Faces fill the full card */
  .face {
    position: absolute;
    inset: 0;
    padding: 12px 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    justify-content: space-between;
  }

  /* Third card: centered below, same width as the other two */
  .flip-wrap:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 4px);
    /* exact same width as 2-col cards */
    margin: 0 auto;
  }

  .flip-wrap:last-child .flip-inner {
    height: 100%;
  }

  .f-icon {
    font-size: 20px;
  }

  .f-tag {
    font-size: 8px;
    padding: 1px 5px;
  }

  .f-title {
    font-size: 13px;
    line-height: 1.3;
  }

  .f-funny {
    font-size: 10px;
    line-height: 1.35;
  }

  .f-hint {
    font-size: 9px;
  }

  .b-tag {
    font-size: 8px;
  }

  .b-quote {
    font-size: 11px;
    line-height: 1.4;
  }

  .b-funny-line {
    font-size: 9.5px;
  }
}

/* Folder Grid Layout */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem 1.5rem;
  padding: 2rem 0;
}

@media (max-width: 900px) {
  .folder-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .folder-grid {
    grid-template-columns: 1fr;
  }
}

.folder-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1rem;
  border-radius: 12px;
}

.folder-item:hover {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 0.03);
}

.folder-item:hover .click-hint {
  opacity: 1;
  transform: translateY(0);
}

.folder-icon {
  width: 85px;
  height: 85px;
  margin-right: 2.5rem;
  margin-bottom: 0;
  object-fit: contain;
  flex-shrink: 0;
}

.folder-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.folder-item .click-hint {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
}

.folder-title {
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--text-primary);
  text-align: left;
  line-height: 1.3;
}

.folder-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-align: left;
  line-height: 1.3;
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-item {
  width: 100%;
}

/* Education List */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 480px;
  width: 100%;
}

.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.edu-item:hover {
  border-color: var(--border-hover);
}

.edu-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.edu-degree {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.edu-school {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.edu-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}

.edu-year {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-quantico);
}

.edu-location {
  font-size: 0.725rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .edu-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .edu-right {
    align-items: flex-start;
  }
}

/* ── Flip mechanics ───────────────────────────────────────────────── */
.flip-wrap {
  aspect-ratio: 1;
  height: auto;
  perspective: 1200px;
  cursor: pointer;
}

.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-wrap:hover .flip-inner,
.flip-wrap.flipped .flip-inner {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 14px;
}

/* ── Front face ───────────────────────────────────────────────────── */
.front {
  background: var(--bg-tertiary);
  border: 0.5px solid var(--border-color);
}

.f-tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.08);
  border: 0.5px solid rgba(6, 182, 212, 0.2);
  border-radius: 3px;
  padding: 2px 6px;
  display: inline-block;
  width: fit-content;
}

.f-icon {
  font-size: 28px;
  color: #06b6d4;
}

.f-title {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 2px;
}

.f-funny {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

.f-hint {
  font-size: 10.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  opacity: 0.85;
}

/* ── Back faces ───────────────────────────────────────────────────── */
.back {
  transform: rotateY(180deg);
}

.back-1 {
  background: #061510;
  border: 0.5px solid #0c2e20;
}

.back-2 {
  background: #0c0c1a;
  border: 0.5px solid #1a1a30;
}

.back-3 {
  background: #160a08;
  border: 0.5px solid #2e1510;
}

[data-theme="light"] .back-1 {
  background: #e6f4ea;
  border: 0.5px solid #a3cfbb;
}

[data-theme="light"] .back-2 {
  background: #f3e8ff;
  border: 0.5px solid #d8b4fe;
}

[data-theme="light"] .back-3 {
  background: #fff7ed;
  border: 0.5px solid #ffedd5;
}

.b-tag {
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 3px;
  padding: 2px 6px;
  display: inline-block;
  width: fit-content;
}

.b-tag-1 {
  color: #4ade80;
  background: #071a0f;
  border: 0.5px solid #0d3020;
}

.b-tag-2 {
  color: #a78bfa;
  background: #100d1f;
  border: 0.5px solid #1e1540;
}

.b-tag-3 {
  color: #fb923c;
  background: #1a0c05;
  border: 0.5px solid #3a1a08;
}

[data-theme="light"] .b-tag-1 {
  color: #157347;
  background: #d1e7dd;
  border: 0.5px solid #a3cfbb;
}

[data-theme="light"] .b-tag-2 {
  color: #6f42c1;
  background: #e2d9f3;
  border: 0.5px solid #d8b4fe;
}

[data-theme="light"] .b-tag-3 {
  color: #fd7e14;
  background: #ffe5d0;
  border: 0.5px solid #ffedd5;
}

.b-quote {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: italic;
  flex: 1;
  display: flex;
  align-items: center;
}

.b-author {
  font-size: 10px;
  font-weight: 500;
  margin-top: 6px;
}

[data-theme="light"] .b-author {
  color: inherit !important;
}

.b-divider {
  height: 0.5px;
  background: var(--border-color);
  margin: 5px 0;
}

[data-theme="light"] .b-divider {
  background: rgba(0, 0, 0, 0.08);
}

.b-funny-line {
  font-size: 10.5px;
  font-style: italic;
  opacity: 0.45;
  line-height: 1.3;
}

[data-theme="light"] .b-funny-line {
  color: inherit !important;
  opacity: 0.75;
}

/* Inline Footer for About Page to allow scrolling */
.footer-inline {
  position: relative !important;
  bottom: auto !important;
  width: 100% !important;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.traits-section+.bottom-connect-bar.footer-inline {
  margin-top: 5.4rem;
}

html:has(body .footer-inline) {
  overflow-y: auto !important;
  height: auto !important;
}

body:has(.footer-inline) {
  overflow-y: auto !important;
  height: auto !important;
}

body:has(.footer-inline) .container {
  height: auto !important;
  overflow: visible !important;
}

body:has(.footer-inline) main {
  overflow-y: visible !important;
  padding-bottom: 0 !important;
  flex-grow: 0 !important;
}

/* About page hero subtitle to match homepage h1 greeting styling */
.about-subtitle {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  vertical-align: middle;
  line-height: 1.15;
}

.about-subtitle span.name-span {
  font-family: var(--font-viga);
  font-weight: 400;
  background: var(--name-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.about-subtitle span.name-span:hover {
  opacity: 0.95;
  filter: brightness(1.1);
}

@media (max-width: 900px) {
  .about-subtitle {
    font-size: 2.4rem;
  }
}

@media (max-width: 600px) {
  .about-subtitle {
    font-size: 2.0rem;
  }
}

/* ── Achievements Section ── */
:root {
  --rank-gold-bg: rgba(245, 192, 96, 0.08);
  --rank-gold-text: #f5c060;
  --rank-gold-border: rgba(245, 192, 96, 0.2);
  --rank-silver-bg: rgba(170, 170, 170, 0.08);
  --rank-silver-text: #b5b5b5;
  --rank-silver-border: rgba(170, 170, 170, 0.2);
  --rank-bronze-bg: rgba(212, 132, 90, 0.08);
  --rank-bronze-text: #d4845a;
  --rank-bronze-border: rgba(212, 132, 90, 0.2);
  --card-top-accent: #888780;
}

[data-theme="light"] {
  --rank-gold-bg: #fef3c7;
  --rank-gold-text: #b45309;
  --rank-gold-border: rgba(180, 83, 9, 0.2);
  --rank-silver-bg: #f3f4f6;
  --rank-silver-text: #4b5563;
  --rank-silver-border: rgba(75, 85, 99, 0.2);
  --rank-bronze-bg: #ffedd5;
  --rank-bronze-text: #9a3412;
  --rank-bronze-border: rgba(154, 52, 18, 0.2);
  --card-top-accent: #a1a1aa;
}

.achievements {
  padding: 0 0 3rem;
  width: 100%;
  margin-top: -0.5rem;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1080px;
}

/* No card-wrap needed — card is direct grid child */
.card-wrap {
  width: 100%;
}

.card {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}

/* Grey top accent */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-top-accent, #888780);
  border-radius: 12px 12px 0 0;
}

/* ── Top row ── */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-quantico);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.rank-pill i {
  font-size: 11px;
}

.rank-pill.gold {
  background: var(--rank-gold-bg);
  color: var(--rank-gold-text);
  border: 0.5px solid var(--rank-gold-border);
}

.rank-pill.silver {
  background: var(--rank-silver-bg);
  color: var(--rank-silver-text);
  border: 0.5px solid var(--rank-silver-border);
}

.rank-pill.bronze {
  background: var(--rank-bronze-bg);
  color: var(--rank-bronze-text);
  border: 0.5px solid var(--rank-bronze-border);
}

.li-link {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 6px;
  background: #0A66C2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.li-link:hover {
  opacity: 0.88;
  transform: scale(1.08);
}

.li-link i {
  font-size: 18px;
  color: #fff;
}

/* ── Icon box ── */
.icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.icon-wrap.gold {
  background: var(--rank-gold-bg);
  color: var(--rank-gold-text);
  border: 0.5px solid var(--rank-gold-border);
}

.icon-wrap.silver {
  background: var(--rank-silver-bg);
  color: var(--rank-silver-text);
  border: 0.5px solid var(--rank-silver-border);
}

.icon-wrap.bronze {
  background: var(--rank-bronze-bg);
  color: var(--rank-bronze-text);
  border: 0.5px solid var(--rank-bronze-border);
}

/* ── Card Middle Row (Icon + Event Title in same line) ── */
.card-middle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
  width: 100%;
}

/* ── Text — NO webkit-line-clamp, just normal wrap ── */
.card-event {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
  word-break: break-word;
  flex: 1;
}

.card-college {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
  word-break: break-word;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 4px;
}

.card-college i {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Bottom bar ── */
.card-bot {
  margin-top: auto;
  padding-top: 6px;
  border-top: 0.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.card-level {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.card-year {
  font-family: var(--font-quantico);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .achievements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    aspect-ratio: auto !important;
  }
}

@media (max-width: 580px) {
  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    aspect-ratio: auto !important;
    padding: 12px 10px 10px;
  }

  .card-event {
    font-size: 13.5px;
  }

  .card-college {
    font-size: 11.5px;
  }
}

/* ── Role & Impact Section ── */
.role-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 780px;
  width: 100%;
  margin-bottom: 0;
  padding-left: 2.25rem;
}

.role-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.15rem 1.5rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-height: 90px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Timeline Node */
.role-item::before {
  content: '';
  position: absolute;
  left: -1.125rem;
  top: 2.25rem;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  z-index: 3;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Timeline vertical line segment */
.role-item::after {
  content: '';
  position: absolute;
  left: -1.125rem;
  top: 0;
  bottom: -1.5rem;
  /* extends down to bridge the gap to the next item */
  width: 2px;
  background: var(--border-color);
  transform: translateX(-50%);
  z-index: 2;
}

/* First card starts line at the node */
.role-item:first-child::after {
  top: 2.25rem;
}

/* Last card ends line at the node */
.role-item:last-child::after {
  height: 2.25rem;
  bottom: auto;
}

.role-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* Hover effects for node when card is hovered */
.role-item:hover::before {
  transform: translate(-50%, -50%) scale(1.3);
  border-color: var(--border-hover);
  background-color: var(--border-hover);
}

.role-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  padding-right: 4.5rem;
}

.role-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.role-company {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.role-desc {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.role-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.role-year {
  font-family: var(--font-quantico);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.role-location {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .role-item {
    flex-direction: column;
    gap: 0.75rem;
    min-height: 120px;
    padding: 1.5rem 1.5rem 1.25rem;
  }

  .role-right {
    align-items: flex-start;
  }

  .role-left {
    padding-right: 4.5rem;
  }

  .role-action-text {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .role-list {
    padding-left: 1.25rem;
  }

  .role-item::before,
  .role-item::after {
    left: -0.625rem;
  }
}

.role-action {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
}

.role-arrow {
  font-size: 1.5rem;
  opacity: 0.55;
  color: var(--text-primary);
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s, color 0.2s ease;
  flex-shrink: 0;
}

.role-action-text {
  font-family: var(--font-body);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  opacity: 0.6;
  transition: color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.role-item:hover .role-arrow {
  transform: translate(3px, -3px);
  opacity: 1;
  color: #ffffff;
}

[data-theme="light"] .role-item:hover .role-arrow {
  color: var(--text-primary);
}

.role-item:hover .role-action-text {
  opacity: 1;
  color: #ffffff;
}

[data-theme="light"] .role-item:hover .role-action-text {
  color: var(--text-primary);
}

/* ── SCROLL ARROW COMPONENT ── */
.scroll-arrow-wrap {
  position: fixed;
  bottom: 36px;
  right: 36px;
  z-index: 100;
  transition: bottom 0.3s ease;
  display: none;
  /* hidden by default, shown only on laptop+ */
}

@media (min-width: 1024px) {
  .scroll-arrow-wrap {
    display: block;
  }
}

.scroll-arrow {
  --size: 52px;
  position: relative;
  width: var(--size);
  height: var(--size);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Pulse rings — inherit color from CSS var */
.scroll-arrow__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--sa-ring);
  animation: sa-pulse 3.6s cubic-bezier(0.2, 0, 0.6, 1) infinite;
  pointer-events: none;
}

.scroll-arrow__ring:nth-child(2) {
  animation-delay: 1.2s;
}

.scroll-arrow__ring:nth-child(3) {
  animation-delay: 2.4s;
}

@keyframes sa-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }

  80% {
    opacity: 0;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Inner circle */
.scroll-arrow__inner {
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 1px solid var(--sa-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.scroll-arrow:hover .scroll-arrow__inner {
  border-color: var(--sa-border-hv);
  transform: scale(1.08);
}

/* Chevron */
.scroll-arrow__icon {
  width: 18px;
  height: 18px;
  display: block;
  animation: sa-bob 2s ease-in-out infinite;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-arrow__icon path {
  stroke: var(--sa-stroke);
  transition: stroke 0.4s ease;
}

.scroll-arrow.is-up .scroll-arrow__icon {
  transform: rotate(180deg);
  animation: sa-bob-up 2s ease-in-out infinite;
}

.scroll-arrow:hover .scroll-arrow__icon {
  animation-play-state: paused;
}

@keyframes sa-bob {

  0%,
  100% {
    transform: translateY(-2px);
  }

  50% {
    transform: translateY(2px);
  }
}

@keyframes sa-bob-up {

  0%,
  100% {
    transform: rotate(180deg) translateY(-2px);
  }

  50% {
    transform: rotate(180deg) translateY(2px);
  }
}

/* Label */
.scroll-arrow__label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sa-label);
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--font-body);
  transition: color 0.4s ease;
}

/* Interactive Projects Section (Hover Preview List) */
.portfolio-section {
  font-family: var(--font-body);
  background: transparent;
  padding: 0.5rem 0;
  margin-top: 1rem;
}

.project-item {
  border-top: 1px solid var(--border-color);
  padding: 1.2rem 0;
  /* Slightly increased padding for premium breathing room */
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.project-item:last-child {
  border-bottom: 1px solid var(--border-color);
}

.project-title {
  font-size: 1.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
  user-select: none;
  padding-left: 0.5rem;
}

.project-tags {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  letter-spacing: 0.02em;
  transition: color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
  line-height: 1;
}

.proj-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  padding-right: 0.5rem;
}

.click-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  margin-top: -2px;
}

.project-item:hover .click-hint {
  opacity: 1;
  transform: translateY(0);
}

.click-hint-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.click-hint-arrow {
  color: var(--text-secondary);
}

.project-item:hover {
  border-top-color: var(--text-primary);
}

.project-item:hover+.project-item {
  border-top-color: var(--text-primary);
}

.project-item:last-child:hover {
  border-bottom-color: var(--text-primary);
}

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

.project-item:hover .project-tags {
  color: var(--text-secondary);
}

.preview-img {
  position: fixed;
  width: 260px;
  height: 165px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px var(--shadow);
  border: 1px solid var(--border-color);
  transform: translate(-50%, -60%) scale(0.95);
}

.preview-img.visible {
  opacity: 1;
  transform: translate(-50%, -60%) scale(1);
}

.preview-img .img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .project-title {
    font-size: 1.35rem;
    padding-left: 0.2rem;
  }

  .proj-right {
    padding-right: 0.2rem;
  }

  .project-tags {
    font-size: 0.7rem;
  }

  .preview-img {
    display: none !important;
  }
}

/* ── Project Details Layout ── */
a.project-item {
  text-decoration: none;
  color: inherit;
}

.project-detail-layout {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  padding-top: 2.25rem;
  padding-bottom: 3.5rem;
}

.back-link-container {
  margin-bottom: 0.8rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-quantico);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-fast);
}

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

.back-arrow {
  transition: transform 0.2s ease;
}

.back-link:hover .back-arrow {
  transform: translateX(-4px);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 4rem;
  align-items: start;
}

.project-detail-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-detail-tag {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.project-detail-title {
  font-family: var(--font-viga);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.project-detail-description {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.project-detail-description p {
  margin-bottom: 1.5rem;
}

.project-detail-description h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.project-detail-description ul {
  list-style: none;
  padding-left: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-detail-description li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.975rem;
  line-height: 1.6;
}

.project-detail-description li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.project-detail-description strong {
  color: var(--text-primary);
  font-weight: 600;
}

.github-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-quantico);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background-color: var(--badge-bg);
  transition: color 0.25s, background-color 0.25s, border-color 0.25s;
}

.github-source-btn:hover {
  background-color: var(--badge-hover-bg);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.project-detail-images-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  align-items: flex-end;
}

.project-detail-image-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  justify-self: end;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px var(--shadow);
  aspect-ratio: 16 / 10;
}

.project-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-detail-image-container:hover .project-detail-image {
  transform: scale(1.03);
}

.project-detail-image-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, var(--foot-glow) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 1024px) {
  .project-detail-grid {
    gap: 2.5rem;
  }

  .project-detail-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .project-detail-title {
    font-size: 2.25rem;
  }

  .project-detail-description {
    font-size: 1rem;
  }

  .project-detail-images-column {
    align-items: center;
  }

  .project-detail-image-container {
    justify-self: center;
  }
}

a,
button,
.nav-link,
.filter-btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.2s;
  display: inline-block;
}

a:hover,
button:hover,
.nav-link:hover,
.filter-btn:hover {
  transform: scale(1);
}

a.project-item:hover {
  transform: none;
}

/* Bypass loader overlay when skip class is present */
.skip-loader .loader-overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.loader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 0.4s ease 0.55s,
    visibility 0s linear 0.75s;
  overflow: hidden;
}

.loader-overlay.fade-out {
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}



.loader-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.loader-avatar-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid #2a2a2a;
  overflow: hidden;
  background: #141414;
  opacity: 0;
  animation: loaderFadeIn 0.5s ease 0.3s forwards;
  position: relative;
  flex-shrink: 0;
}

.loader-avatar-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.loader-avatar-inner img,
.loader-avatar-inner video {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
}

@keyframes loaderFadeIn {
  to {
    opacity: 1;
  }
}

.loader-name {
  font-size: 24px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.01em;
  opacity: 0;
  animation: loaderSlideUp 0.7s cubic-bezier(.22, 1, .36, 1) 1s forwards;
}



.loader-bar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 220px;
  opacity: 0;
  animation: loaderSlideUp 0.6s ease 1.4s forwards;
}

.loader-bar-track {
  width: 100%;
  height: 6px;
  background: #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 6px;
  transition: width 0.15s ease;
}

.loader-bar-labels {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.loader-bar-msg {
  font-size: 11px;
  color: #3a3a3a;
  letter-spacing: 0.06em;
}

.loader-bar-pct {
  font-size: 11px;
  color: #3a3a3a;
  font-family: monospace;
}

@keyframes loaderSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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


/* ── Custom Cursor ── */
* {
  cursor: none;
}

#cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .3s cubic-bezier(.34, 1.56, .64, 1),
    height .3s cubic-bezier(.34, 1.56, .64, 1),
    opacity .2s ease;
  will-change: left, top, width, height;
  opacity: 0;
}

#cursor.on-text {
  width: 50px;
  height: 50px;
}

#cursor.on-link {
  width: 22px;
  height: 22px;
}

/* Hide during page loader */
body.loading #cursor {
  opacity: 0 !important;
}

/* ── Stats Bar Section ── */
.stats-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
  gap: 5px;
}

.stat-item:first-child {
  padding-left: 0;
}

.stat-num {
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
}

.zero {
  color: #444;
  font-size: 28px;
  font-weight: 500;
}

.digit {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 2px;
}

.stat-plus {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary);
  margin-left: 2px;
  display: flex;
  align-items: center;
}

.stat-label {
  font-size: 12px;
  color: #888;
  text-align: center;
  letter-spacing: 0.04em;
}

.stats-bar .divider {
  width: 2px;
  height: 44px;
  background: #333;
  flex-shrink: 0;
}

[data-theme="light"] .zero {
  color: #c5c5c9;
}

[data-theme="light"] .stats-bar .divider {
  background: var(--border-color);
}

/* ── Traits Section (Three Cards) ── */
.traits-section {
  max-width: 880px;
  width: 100%;
  margin-top: 1.5rem;
  margin-bottom: 0rem;
}

.traits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.trait-card {
  --radius: 14;
  --border: 3;
  --backdrop: hsl(0 0% 60% / 0.12);
  --backup-border: var(--backdrop);
  --size: 200;
  --outer: 1;
  --border-size: calc(var(--border, 2) * 1px);
  --spotlight-size: calc(var(--size, 150) * 1px);
  --hue: calc(var(--base) + (var(--xp, 0) * var(--spread, 0)));

  background-image: radial-gradient(var(--spotlight-size) var(--spotlight-size) at calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
      hsl(var(--hue, 210) calc(var(--saturation, 100) * 1%) calc(var(--lightness, 70) * 1%) / var(--bg-spot-opacity, 0.1)), transparent);
  background-color: var(--backdrop, transparent);
  background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
  background-position: 50% 50%;
  background-attachment: fixed;
  border: var(--border-size) solid var(--backup-border);
  position: relative;
  touch-action: none;
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

[data-theme="light"] .trait-card {
  --backdrop: rgba(0, 0, 0, 0.02);
}

.trait-card {
  --border-spot-opacity: 0;
  --border-light-opacity: 0;
  --outer: 0;
}

.trait-card:hover {
  --border-spot-opacity: 1;
  --border-light-opacity: 1;
  --outer: 1;
}

.trait-card.glow-purple {
  --base: 280;
  --spread: 300;
}

.trait-card.glow-pink {
  --base: 330;
  --spread: 300;
}

.trait-card.glow-yellow {
  --base: 45;
  --spread: 300;
}

[data-glow]::before,
[data-glow]::after {
  pointer-events: none;
  content: "";
  position: absolute;
  inset: calc(var(--border-size) * -1);
  border: var(--border-size) solid transparent;
  border-radius: calc(var(--radius) * 1px);
  background-attachment: fixed;
  background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
  background-repeat: no-repeat;
  background-position: 50% 50%;
  mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
  mask-clip: padding-box, border-box;
  mask-composite: intersect;
  -webkit-mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
  -webkit-mask-clip: padding-box, border-box;
  -webkit-mask-composite: source-in;
}

[data-glow]::before {
  background-image: radial-gradient(calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
      hsl(var(--hue, 210) calc(var(--saturation, 100) * 1%) calc(var(--lightness, 50) * 1%) / var(--border-spot-opacity, 1)), transparent 100%);
  filter: brightness(2);
  transition: --border-spot-opacity 0.3s ease;
}

[data-glow]::after {
  background-image: radial-gradient(calc(var(--spotlight-size) * 0.5) calc(var(--spotlight-size) * 0.5) at calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
      hsl(0 100% 100% / var(--border-light-opacity, 1)), transparent 100%);
  transition: --border-light-opacity 0.3s ease;
}

[data-glow] [data-glow] {
  position: absolute;
  inset: 0;
  will-change: filter;
  opacity: var(--outer, 1);
  border-radius: calc(var(--radius) * 1px);
  border-width: calc(var(--border-size) * 20);
  filter: blur(calc(var(--border-size) * 10));
  background: none;
  pointer-events: none;
  border: none;
  transition: opacity 0.3s ease;
}

[data-glow]>[data-glow]::before {
  inset: -10px;
  border-width: 10px;
}




.trait-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  margin-top: 0;
  text-align: left;
}

.trait-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  text-align: left;
}

@media (max-width: 768px) {
  .traits-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}