/* ═══════════════════════════════════════
   BTK PORTFOLIO — SHARED STYLESHEET
   ═══════════════════════════════════════ */
:root {
  --ink: #0e0c0a;
  --paper: #f5f0e8;
  --rust: #b84c2a;
  --warm: #d4a96a;
  --muted: #8a7f72;
  --light: #e8e2d6;
  --dark: #1a1612;
  --accent: #c4501e;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  cursor: none;
}

/* Vietnamese version uses Be Vietnam Pro */
body.lang-vi {
  font-family: 'Be Vietnam Pro', sans-serif;
}

/* LOADER */
#loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-svg {
  width: min(480px, 85vw);
  height: auto;
  display: block;
}

.loader-svg text {
  font-family: 'Bebas Neue', sans-serif;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.dl {
  stroke-dasharray: var(--len, 1800);
  stroke-dashoffset: var(--len, 1800);
  animation: drawStroke 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dl-r {
  stroke: #b84c2a;
}

.dl-w {
  stroke: #f5f0e8;
}

@keyframes drawStroke {
  to {
    stroke-dashoffset: 0;
  }
}

.loader-bar-wrap {
  width: 160px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.loader-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--rust);
  animation: loaderFill 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

@keyframes loaderFill {
  to {
    width: 100%;
  }
}

.loader-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -0.5rem;
  opacity: 0;
  animation: ldFadeIn 0.5s ease 1.2s forwards;
}

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

/* CURSOR */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--rust);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  mix-blend-mode: multiply;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 3.5px solid var(--rust);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.18s ease;
  opacity: 0.85;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  transition: background 0.3s ease;
}

nav.nav-dark {
  background: rgba(15, 12, 10, 0.55);
  backdrop-filter: blur(10px);
}

nav.nav-dark .nav-logo {
  color: white;
}

nav.nav-dark .nav-links a {
  color: rgba(255, 255, 255, 0.65);
}

nav.nav-dark .nav-links a:hover {
  color: white;
}

nav.nav-dark .nav-lang {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.3);
}

nav.nav-dark .nav-lang:hover {
  color: white;
  border-color: white;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* THEME TOGGLE */
.nav-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.theme-toggle {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  background: transparent;
  transition: border-color 0.2s;
}

nav.nav-dark .theme-toggle {
  border-color: rgba(255, 255, 255, 0.2);
}

.theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: none;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-dot:hover {
  transform: scale(1.25);
}

.theme-dot.active {
  border-color: var(--rust);
  transform: scale(1.2);
}

nav.nav-dark .theme-dot.active {
  border-color: white;
}

.theme-dot[data-theme="light"] {
  background: #f5f0e8;
  border-color: #c8b89a;
}

.theme-dot[data-theme="dark"] {
  background: #1a1612;
}

.theme-dot[data-theme="blueprint"] {
  background: #0d2137;
}

.theme-dot[data-theme="mono"] {
  background: linear-gradient(135deg, #fff 50%, #111 50%);
}

/* THEMES */
body.theme-dark {
  --ink: #f5f0e8;
  --paper: #0e0c0a;
  --rust: #c4652a;
  --warm: #d4a96a;
  --muted: #7a7068;
  --light: #1e1a16;
  --dark: #050403;
  background: #0e0c0a;
  color: #f5f0e8;
}

body.theme-dark .hero-left {
  background: #0e0c0a;
}

body.theme-dark #about {
  background: #0e0c0a;
}

body.theme-dark #activities {
  background: #1a1612;
}

body.theme-dark .activity-card {
  background: #0e0c0a;
  color: #f5f0e8;
}

body.theme-dark .act-desc {
  color: #7a7068;
}

body.theme-dark #contact-form-section {
  background: #0e0c0a;
}

body.theme-dark .cf-input,
.theme-dark .cf-textarea {
  color: #f5f0e8;
  border-bottom-color: #2a2520;
}

body.theme-dark .timeline-dot {
  background: #0e0c0a;
}

body.theme-blueprint {
  --ink: #e0f4ff;
  --paper: #0a1929;
  --rust: #00bcd4;
  --warm: #4dd0e1;
  --muted: #7bb8cc;
  --light: #0d2137;
  --dark: #050e1a;
  background: #0a1929;
  color: #e0f4ff;
}

body.theme-blueprint .hero-right::before {
  background: linear-gradient(135deg, #00bcd4 0%, #0a1929 100%);
}

body.theme-blueprint #about {
  background: #0a1929;
}

body.theme-blueprint #projects {
  background: #050e1a;
}

body.theme-blueprint #activities {
  background: #0d2137;
}

body.theme-blueprint .activity-card {
  background: #0a1929;
  color: #e0f4ff;
}

body.theme-blueprint .act-desc {
  color: #7bb8cc;
}

body.theme-blueprint #contact-form-section {
  background: #0a1929;
}

body.theme-blueprint .cf-input,
.theme-blueprint .cf-textarea {
  color: #e0f4ff;
  border-bottom-color: #0d3350;
}

body.theme-blueprint .timeline-dot {
  background: #0a1929;
}

body.theme-blueprint .stats-bar {
  background: #00bcd4;
}

body.theme-blueprint .ai-section {
  background: #00838f;
}

body.theme-blueprint footer {
  background: #050e1a;
}

body.theme-blueprint .skill-fill {
  background: #00bcd4;
}

body.theme-blueprint .section-num {
  color: #00bcd4;
}

body.theme-blueprint .tag {
  border-color: #00bcd4;
  color: #00bcd4;
}

body.theme-blueprint .about-block h3 {
  color: #00bcd4;
}

body.theme-blueprint .hero-label {
  color: #00bcd4;
}

body.theme-blueprint .hero-name span {
  color: #00bcd4;
}

body.theme-blueprint .scroll-line {
  background: #00bcd4;
}

body.theme-blueprint .loader-bar {
  background: #00bcd4;
}

body.theme-mono {
  --ink: #111;
  --paper: #fff;
  --rust: #111;
  --warm: #555;
  --muted: #777;
  --light: #eee;
  --dark: #111;
  background: #fff;
  color: #111;
}

body.theme-mono .hero-right::before {
  background: linear-gradient(135deg, #222 0%, #000 100%);
}

body.theme-mono .stats-bar {
  background: #111;
}

body.theme-mono .ai-section {
  background: #333;
}

body.theme-mono #projects {
  background: #111;
}

body.theme-mono footer {
  background: #111;
}

body.theme-mono .skill-fill {
  background: #111;
}

body.theme-mono .section-num,
.theme-mono .hero-label,
.theme-mono .hero-name span,
.theme-mono .scroll-line {
  color: #111;
}

body.theme-mono .tag {
  border-color: #111;
  color: #111;
}

body.theme-mono .about-block h3 {
  color: #333;
}

body.theme-mono .btn-cv {
  background: #111;
  border-color: #111;
}

body.theme-mono .btn-cv:hover {
  background: transparent;
  color: #111;
}

/* smooth theme transition */
body {
  transition: background 0.4s ease, color 0.4s ease;
}

.nav-lang {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--muted);
  padding: 0.3rem 0.8rem;
  transition: all 0.2s;
}

.nav-lang:hover {
  color: var(--rust);
  border-color: var(--rust);
}

/* HERO */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 3rem 5rem;
  position: relative;
  z-index: 2;
}

.hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.5rem;
}

.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 8vw, 8rem);
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.hero-name span {
  color: var(--rust);
}

.hero-tagline {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 1.5rem;
  font-weight: 300;
  max-width: 320px;
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.hero-meta span {
  display: block;
}

.hero-meta strong {
  color: var(--ink);
  font-size: 0.75rem;
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.75rem 1.4rem;
  background: var(--rust);
  color: white;
  text-decoration: none;
  border: 1px solid var(--rust);
  transition: all 0.2s;
}

.btn-cv:hover {
  background: transparent;
  color: var(--rust);
}

.hero-right {
  position: relative;
  overflow: hidden;
}

.hero-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--rust) 0%, #3a1f12 100%);
  opacity: 0.88;
  z-index: 1;
}

.hero-bg-text {
  position: absolute;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28vw;
  color: rgba(255, 255, 255, 0.04);
  z-index: 2;
  bottom: -2rem;
  right: -2rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-right-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6rem 3rem 4rem;
  color: white;
}

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

.hero-portrait {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

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

.hero-portrait-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  padding: 1rem;
}

.hero-portrait-placeholder svg {
  opacity: 0.4;
}

.hero-role {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.hero-school {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 2rem;
}

.hero-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.08em;
}

.hero-contact-list a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.hero-contact-list a:hover {
  color: white;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 5;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--rust);
  animation: scrollPulse 1.5s ease-in-out infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    width: 40px;
    opacity: 1;
  }

  50% {
    width: 60px;
    opacity: 0.5;
  }
}

/* STATS */
.stats-bar {
  background: var(--rust);
  padding: 2.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: white;
  letter-spacing: 0.05em;
  line-height: 1;
}

.stat-num .stat-suffix {
  font-size: 0.6em;
  color: rgba(255, 255, 255, 0.6);
}

.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.4rem;
}

/* SECTIONS */
section {
  padding: 7rem 3rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--light);
  padding-bottom: 1.5rem;
}

.section-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--rust);
  letter-spacing: 0.15em;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.05em;
  color: var(--ink);
}

.section-en {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-left: auto;
  text-transform: uppercase;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.about-block h3 {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light);
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.2rem;
  margin-bottom: 1.8rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: -1.8rem;
  width: 1px;
  background: var(--light);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--rust);
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.timeline-period {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.skill-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.skill-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  width: 80px;
  flex-shrink: 0;
}

.skill-pct {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  color: var(--muted);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.4s ease 0.8s;
}

.skill-fill.animated~.skill-pct,
.skill-row:has(.skill-fill.animated) .skill-pct {
  opacity: 1;
}

.skill-bar {
  flex: 1;
  height: 3px;
  background: var(--light);
  position: relative;
  overflow: hidden;
}

.skill-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--rust);
  width: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-fill.animated {
  width: var(--w);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--rust);
  color: var(--rust);
  border-radius: 2px;
  transition: all 0.2s;
}

.tag:hover {
  background: var(--rust);
  color: white;
}

/* PROJECTS */
#projects {
  background: var(--dark);
}

#projects .section-title {
  color: var(--paper);
}

#projects .section-num {
  color: var(--warm);
}

#projects .section-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

#projects .section-en {
  color: rgba(255, 255, 255, 0.3);
}

.project-tabs {
  display: flex;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.8rem 1.8rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  cursor: none;
  position: relative;
  transition: color 0.2s;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--warm);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.tab-btn.active {
  color: var(--warm);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5px;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
  cursor: none;
  min-height: 360px;
  transform-style: preserve-3d;
}

.project-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.project-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s;
  opacity: 0.7;
}

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

.project-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(212, 169, 106, 0.08) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.1em;
}

.project-card-body {
  padding: 2rem 2.5rem 2.5rem;
}

.project-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--warm);
  transition: height 0.3s ease;
  z-index: 1;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.project-card:hover::before {
  height: 100%;
}

.project-card-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--warm);
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
}

.project-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.project-card-sub {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

.project-card-instructor {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.08em;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.project-card-arrow {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.15);
  transition: all 0.3s;
}

.project-card:hover .project-card-arrow {
  color: var(--warm);
  transform: translate(3px, -3px);
}

.real-project-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: start;
}

.real-project-item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rp-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-top: 0.6rem;
}

.rp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.4s;
}

.real-project-item:hover .rp-thumb img {
  opacity: 1;
  transform: scale(1.03);
}

.rp-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.1em;
}

.rp-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: white;
  line-height: 1.2;
}

.rp-type {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--warm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.rp-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  font-style: italic;
}

.rp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rp-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  letter-spacing: 0.08em;
}

/* AI */
.ai-section {
  background: var(--rust);
  padding: 4rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.ai-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.ai-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: white;
  line-height: 1;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

.ai-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  font-style: italic;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.ba-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem;
  border-radius: 4px;
  overflow: hidden;
}

.ba-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.ba-img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.ba-visual {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ba-row {
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.ba-row.after {
  background: rgba(255, 255, 255, 0.4);
}

.ba-row.w60 {
  width: 60%;
}

.ba-row.w80 {
  width: 80%;
}

.ba-row.w45 {
  width: 45%;
}

.ba-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ACTIVITIES */
#activities {
  background: var(--light);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.activity-card {
  background: white;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.activity-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.activity-card:hover::after {
  transform: scaleX(1);
}

.act-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.act-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.act-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}

/* HOBBIES */
#hobbies {
  background: var(--ink);
  padding-top: 5rem;
  padding-bottom: 5rem;
}

#hobbies .section-title {
  color: var(--paper);
}

#hobbies .section-num {
  color: var(--warm);
}

#hobbies .section-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

#hobbies .section-en {
  color: rgba(255, 255, 255, 0.25);
}

.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 4px;
}

.photo-item {
  background: #222;
  position: relative;
  overflow: hidden;
  cursor: none;
}

.photo-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-item:nth-child(6) {
  grid-column: span 2;
}

.photo-item:nth-child(9) {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s;
  opacity: 0.85;
}

.photo-item:hover img {
  transform: scale(1.05);
  opacity: 1;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.12);
  transition: all 0.3s;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 1rem;
}

.photo-item:hover .photo-placeholder {
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.photo-icon {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.photo-caption {
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.photo-item::after {
  content: 'âŠ•';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 2rem;
  color: white;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.photo-item:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* CONTACT FORM */
#contact-form-section {
  background: var(--paper);
  padding: 7rem 3rem;
}

.contact-form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-form-info h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--ink);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.contact-form-info p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  font-style: italic;
  max-width: 360px;
}

.cfi-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 2rem;
}

.cfi-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.2s;
}

.cfi-link:hover {
  color: var(--rust);
}

.cf-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.cf-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cf-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.cf-input,
.cf-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--light);
  padding: 0.6rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  cursor: none;
}

.cf-input:focus,
.cf-textarea:focus {
  border-bottom-color: var(--rust);
}

.cf-textarea {
  height: 100px;
}

.cf-submit {
  align-self: flex-start;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: none;
  transition: all 0.2s;
}

.cf-submit:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: white;
}

.cf-success {
  display: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--rust);
  padding: 1rem 0;
}

.cf-success.show {
  display: block;
}

/* FOOTER */
footer {
  background: var(--dark);
  padding: 5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
}

.footer-greeting {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 6rem);
  color: var(--paper);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.footer-bio {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  font-style: italic;
  max-width: 420px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--warm);
  transform: scaleY(0);
  transition: transform 0.2s;
}

.contact-link:hover::before {
  transform: scaleY(1);
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.cl-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.cl-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 80px;
}

.cl-value {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-copy {
  grid-column: span 2;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.1em;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
}

/* ANIMATIONS */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

.fade-up:nth-child(2) {
  transition-delay: 0.1s;
}

.fade-up:nth-child(3) {
  transition-delay: 0.2s;
}

.fade-up:nth-child(4) {
  transition-delay: 0.3s;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 6, 0);
  pointer-events: none;
  transition: background 0.3s ease;
}

.lightbox.active {
  background: rgba(10, 8, 6, 0.92);
  pointer-events: all;
}

.lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  transform: scale(0.88);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.lightbox.active .lightbox-img-wrap {
  transform: scale(1);
  opacity: 1;
}

.lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  position: absolute;
  bottom: -2.4rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.lightbox-close {
  position: fixed;
  top: 2rem;
  right: 2.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  cursor: none;
  transition: all 0.2s;
  background: transparent;
  font-family: 'DM Mono', monospace;
}

.lightbox-close:hover {
  border-color: var(--rust);
  color: var(--rust);
}

.lightbox-counter {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  cursor: none;
  transition: all 0.2s;
  background: transparent;
  font-family: 'DM Mono', monospace;
}

.lightbox-nav:hover {
  border-color: var(--rust);
  color: var(--rust);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

/* RESPONSIVE */
@media(max-width:900px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

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

  .hero-right {
    min-height: 50vh;
  }

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

  .project-grid,
  .real-project-item,
  .before-after {
    grid-template-columns: 1fr;
  }

  .ai-section,
  .contact-form-wrap {
    grid-template-columns: 1fr;
  }

  footer {
    grid-template-columns: 1fr;
  }

  .footer-copy {
    grid-column: 1;
  }

  section,
  #contact-form-section {
    padding: 4rem 1.5rem;
  }

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

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

  .photo-item:nth-child(1) {
    grid-column: span 2;
  }

  .photo-item:nth-child(9) {
    grid-column: span 2;
  }

  .cf-row {
    grid-template-columns: 1fr;
  }
}

@media(max-width:540px) {

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

  .stats-bar {
    padding: 2rem 1.5rem;
  }
}

/* SCROLL PROGRESS BAR */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--rust);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* SECTION WATERMARK NUMBER */
.section-watermark {
  position: absolute;
  right: -0.05em;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(6rem, 18vw, 14rem);
  color: var(--rust);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

section {
  position: relative;
  overflow: hidden;
}

/* IMAGE TILT 3D */
.project-card-thumb,
.rp-thumb,
.ba-box {
  transform-style: preserve-3d;
  will-change: transform;
}

/* IMAGE SKELETON SHIMMER */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.img-skeleton {
  background: linear-gradient(90deg, var(--light) 25%, rgba(255, 255, 255, 0.5) 50%, var(--light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* BACK TO TOP */
#back-top {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: none;
  z-index: 500;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 1rem;
}

#back-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#back-top:hover {
  background: var(--rust);
}

/* PAGE TRANSITION WIPE */
#page-wipe {
  position: fixed;
  inset: 0;
  z-index: 99997;
  background: var(--ink);
  transform: translateX(-100%);
  pointer-events: none;
}

#page-wipe.wipe-in {
  transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1);
  transform: translateX(0);
}

#page-wipe.wipe-out {
  transition: transform 0.45s cubic-bezier(0.76, 0, 0.24, 1) 0.05s;
  transform: translateX(100%);
}

/* DIMENSION LINES on project card hover */
.project-card::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(212, 169, 106, 0);
  transition: border-color 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.project-card:hover::after {
  border-color: rgba(212, 169, 106, 0.25);
}

.project-card .dim-h,
.project-card .dim-v {
  position: absolute;
  font-family: 'DM Mono', monospace;
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: rgba(212, 169, 106, 0);
  transition: color 0.3s ease;
  pointer-events: none;
  z-index: 3;
}

.project-card:hover .dim-h,
.project-card:hover .dim-v {
  color: rgba(212, 169, 106, 0.5);
}

.project-card .dim-h {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.project-card .dim-v {
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

/* GRAIN TEXTURE */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* MORPH CURSOR LABEL */
#cursor-label {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: white;
  background: var(--rust);
  padding: 0.25rem 0.6rem;
  opacity: 0;
  transform: translate(14px, -50%) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

#cursor-label.show {
  opacity: 1;
  transform: translate(14px, -50%) scale(1);
}

/* GLITCH */
@keyframes glitch1 {

  0%,
  100% {
    clip-path: inset(0 0 100% 0);
  }

  10% {
    clip-path: inset(20% 0 60% 0);
    transform: translate(-4px, 0);
  }

  20% {
    clip-path: inset(50% 0 30% 0);
    transform: translate(4px, 0);
  }

  30% {
    clip-path: inset(70% 0 10% 0);
    transform: translate(-2px, 0);
  }

  40% {
    clip-path: inset(0 0 100% 0);
  }
}

@keyframes glitch2 {

  0%,
  100% {
    clip-path: inset(0 0 100% 0);
  }

  10% {
    clip-path: inset(60% 0 20% 0);
    transform: translate(4px, 0);
  }

  20% {
    clip-path: inset(30% 0 50% 0);
    transform: translate(-4px, 0);
  }

  30% {
    clip-path: inset(10% 0 70% 0);
    transform: translate(2px, 0);
  }

  40% {
    clip-path: inset(0 0 100% 0);
  }
}

.hero-name {
  position: relative;
}

.hero-name::before,
.hero-name::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.hero-name.glitching::before {
  opacity: 0.8;
  color: #00ffff;
  animation: glitch1 0.3s steps(1) forwards;
}

.hero-name.glitching::after {
  opacity: 0.8;
  color: #ff0040;
  animation: glitch2 0.3s steps(1) 0.05s forwards;
}

/* TYPEWRITER */
.typewriter-wrap {
  overflow: hidden;
}

.typewriter-text {
  border-right: 2px solid var(--rust);
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typeCaret 0.6s step-end infinite;
}

@keyframes typeCaret {
  50% {
    border-color: transparent;
  }
}

/* MAGNETIC WATERMARK */
.section-watermark {
  transition: transform 0.3s ease;
}

/* â”€â”€ ACTIVE NAV HIGHLIGHT â”€â”€ */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--rust);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a.nav-active {
  color: var(--rust);
}

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

nav.nav-dark .nav-links a.nav-active {
  color: white;
}

nav.nav-dark .nav-links a.nav-active::after {
  background: white;
}

/* â”€â”€ CURSOR BLEND MODE â”€â”€ */
.cursor-blend {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9996;
  mix-blend-mode: difference;
  background: white;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}

.cursor-blend.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* â”€â”€ CUSTOM SCROLLBAR â”€â”€ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color, var(--rust));
  border-radius: 2px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  opacity: 0.8;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-color, var(--rust)) transparent;
}

/* â”€â”€ IMAGE LAZY LOAD fade-in â”€â”€ */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* â”€â”€ FOCUS STYLES â”€â”€ */
*:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}

/* â”€â”€ SPLIT TEXT REVEAL â”€â”€ */
.split-reveal {
  overflow: hidden;
  display: block;
}

.split-reveal .word {
  display: inline-block;
  overflow: hidden;
  margin-right: 0.25em;
}

.split-reveal .char {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s ease;
}

.split-reveal.revealed .char {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
}

/* â”€â”€ SCROLL LINE DRAWING â”€â”€ */
.draw-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.draw-path {
  fill: none;
  stroke: var(--rust);
  stroke-width: 1;
  opacity: 0.12;
  stroke-dasharray: var(--path-len, 1000);
  stroke-dashoffset: var(--path-len, 1000);
  transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.draw-path.drawn {
  stroke-dashoffset: 0;
}

.section-header {
  position: relative;
  z-index: 1;
}

/* â”€â”€ PARTICLE CANVAS â”€â”€ */
#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease 0.5s;
}

#particle-canvas.visible {
  opacity: 1;
}

.hero-left {
  position: relative;
  z-index: 2;
}

/* 3. CARD SHINE */
.project-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.project-card:hover .project-card-thumb::after {
  opacity: 1;
}

.shine-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s;
}

/* 8. NOISE FILTER on image hover */
.photo-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  mix-blend-mode: overlay;
}

.photo-item:hover::before {
  opacity: 1;
}

/* 9. TEXT OUTLINE on footer name hover */
.footer-name {
  transition: all 0.4s ease;
  cursor: default;
}

.footer-name:hover {
  -webkit-text-stroke: 2px var(--paper);
  color: transparent;
}

/* 10. TIME GREETING */
#time-greeting {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: ldFadeIn 0.8s ease 2.2s forwards;
}

/* CLOCK */
.footer-clock {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 2rem;
}

.clock-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.clock-flag {
  font-size: 0.9rem;
  line-height: 1;
}

.clock-label {
  color: var(--muted);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  width: 24px;
}

.clock-time {
  color: var(--paper);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.clock-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rust);
  animation: clockPulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes clockPulse {

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

  50% {
    opacity: 0.3;
    transform: scale(0.6);
  }
}

/* â”€â”€ MUSIC TOGGLE â”€â”€ */
.music-btn {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.7rem;
  cursor: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.music-btn:hover {
  color: var(--rust);
  border-color: var(--rust);
}

.music-btn.playing {
  color: var(--rust);
  border-color: var(--rust);
}

nav.nav-dark .music-btn {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.3);
}

nav.nav-dark .music-btn:hover {
  color: white;
  border-color: white;
}

nav.nav-dark .music-btn.playing {
  color: var(--warm);
  border-color: var(--warm);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.music-bar {
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  animation: none;
}

.music-btn.playing .music-bar:nth-child(1) {
  animation: musicBar 0.8s ease-in-out infinite;
}

.music-btn.playing .music-bar:nth-child(2) {
  animation: musicBar 0.8s ease-in-out 0.15s infinite;
}

.music-btn.playing .music-bar:nth-child(3) {
  animation: musicBar 0.8s ease-in-out 0.3s infinite;
}

.music-btn.playing .music-bar:nth-child(4) {
  animation: musicBar 0.8s ease-in-out 0.45s infinite;
}

.music-bar:nth-child(1) {
  height: 4px;
}

.music-bar:nth-child(2) {
  height: 8px;
}

.music-bar:nth-child(3) {
  height: 6px;
}

.music-bar:nth-child(4) {
  height: 10px;
}

@keyframes musicBar {

  0%,
  100% {
    transform: scaleY(0.4);
  }

  50% {
    transform: scaleY(1.4);
  }
}

/* 1. CUSTOM CONTEXT MENU */
#ctx-menu {
  position: fixed;
  z-index: 99996;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(-4px);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: top left;
}

#ctx-menu.show {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1.2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  cursor: none;
  transition: all 0.15s;
  text-transform: uppercase;
}

.ctx-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding-left: 1.6rem;
}

.ctx-item .ctx-icon {
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
}

.ctx-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.3rem 0;
}

/* 3. CONFETTI */
.confetti-piece {
  position: fixed;
  pointer-events: none;
  z-index: 99995;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  animation: confettiFall var(--dur, 1s) ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translate(var(--tx, 20px), var(--ty, 200px)) rotate(var(--rot, 360deg));
    opacity: 0;
  }
}

/* 4. HERO SCROLL OPACITY */
.hero-left,
.hero-right {
  transition: opacity 0.1s linear;
}

/* 5. FLOATING LABELS */
.float-label {
  position: absolute;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
  background: rgba(184, 76, 42, 0.1);
  border: 1px solid rgba(184, 76, 42, 0.3);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
  animation: floatUpDown var(--float-dur, 3s) ease-in-out infinite;
}

@keyframes floatUpDown {

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

  50% {
    transform: translateY(-8px);
  }
}

/* 6. CARD FLIP */
.project-card {
  perspective: 1000px;
}

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

.project-card.flipped .project-card-inner {
  transform: rotateY(180deg);
}

.project-card-front,
.project-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.project-card-front {
  background: rgba(255, 255, 255, 0.03);
}

.project-card-back {
  background: rgba(255, 255, 255, 0.06);
  transform: rotateY(180deg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.project-card-back .back-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: var(--warm);
  letter-spacing: 0.05em;
}

.project-card-back .back-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  font-style: italic;
}

.project-card-back .back-flip {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: auto;
}

/* 7. BLUEPRINT CURSOR TRAIL */
.bp-trail {
  position: fixed;
  pointer-events: none;
  z-index: 9989;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bp-trail line {
  stroke: var(--rust);
  stroke-width: 0.5;
  opacity: 0.4;
}

/* 8. CAD COORDINATES */
#cad-coords {
  position: fixed;
  bottom: 1.2rem;
  left: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  pointer-events: none;
  z-index: 500;
  opacity: 0.5;
  transition: opacity 0.2s;
}

#cad-coords:hover {
  opacity: 1;
}

/* 9. SCALE RULER */
#scale-ruler {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  pointer-events: none;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.4;
}

#scale-ruler .ruler-bar {
  height: 6px;
  width: 60px;
  border: 1px solid currentColor;
  border-top: none;
  position: relative;
}

#scale-ruler .ruler-bar::before,
#scale-ruler .ruler-bar::after {
  content: '';
  position: absolute;
  top: 0;
  height: 6px;
  width: 1px;
  background: currentColor;
}

#scale-ruler .ruler-bar::before {
  left: 0;
}

#scale-ruler .ruler-bar::after {
  right: 0;
}

/* 10. SHAKE indicator */
.shake-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--rust);
  color: white;
  padding: 0.5rem 1.2rem;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9000;
  pointer-events: none;
}

.shake-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* â”€â”€ PROJECT SLIDESHOW â”€â”€ */
.project-card-thumb {
  position: relative;
  overflow: hidden;
}

.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: block;
}

.slide-img.active {
  opacity: 0.7;
  position: relative;
}

.project-card:hover .slide-img.active {
  opacity: 1;
}

.slide-dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 4;
}

.slide-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: none;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.slide-dot.active {
  background: white;
  transform: scale(1.3);
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: white;
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  opacity: 0;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}

.project-card:hover .slide-btn {
  opacity: 1;
}

.slide-btn-prev {
  left: 6px;
}

.slide-btn-next {
  right: 6px;
}

.slide-counter {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  z-index: 4;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15rem 0.4rem;
}

/* â”€â”€ MESSENGER CHAT POPUP â”€â”€ */
#chat-btn {
  position: fixed;
  bottom: 2.5rem;
  right: 5rem;
  z-index: 600;
  background: #0099ff;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  box-shadow: 0 4px 20px rgba(0, 153, 255, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

#chat-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(0, 153, 255, 0.6);
}

#chat-btn svg {
  width: 26px;
  height: 26px;
}

#chat-popup {
  position: fixed;
  bottom: 7rem;
  right: 5rem;
  z-index: 601;
  width: 300px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#chat-popup.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  background: linear-gradient(135deg, #0099ff, #0066cc);
  padding: 1.2rem 1.2rem 2.5rem;
  color: white;
  position: relative;
}

.chat-header-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  margin-bottom: 0.6rem;
}

.chat-header-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.chat-header-name {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.chat-header-status {
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4cff91;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.chat-bubble-wrap {
  background: white;
  padding: 1rem 1rem 0;
  margin-top: -1.2rem;
  position: relative;
}

.chat-bubble {
  background: #f0f0f0;
  border-radius: 18px 18px 18px 4px;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: #111;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: inline-block;
  max-width: 85%;
}

.chat-bubble-time {
  font-size: 0.6rem;
  color: #999;
  margin-left: 0.5rem;
}

.chat-cta {
  padding: 0.8rem 1rem 1rem;
}

.chat-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: #0099ff;
  color: white;
  border-radius: 24px;
  text-decoration: none;
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
}

.chat-cta-btn:hover {
  background: #0077dd;
  transform: translateY(-1px);
}

.chat-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  cursor: none;
  line-height: 1;
  padding: 0.2rem;
}

.chat-close:hover {
  color: white;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0 0.8rem 0;
}

.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bbb;
  animation: typingDot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {

  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-5px);
  }
}

.chat-notify {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #ff3b30;
  border-radius: 50%;
  font-size: 0.6rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-weight: 700;
  animation: notifyPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 2s both;
}

@keyframes notifyPop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

@media(max-width:900px) {
  #chat-btn {
    right: 1.2rem;
    bottom: 5rem;
  }

  #chat-popup {
    right: 1rem;
    width: calc(100vw - 2rem);
    max-width: 320px;
  }
}

@keyframes chatBounce {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.2);
  }

  70% {
    transform: scale(0.95);
  }

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

/* â”€â”€ LIQUID GLASS â”€â”€ */
/* SVG filter for displacement/distortion */
.liquid-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(1.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.03) 40%,
      rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

/* Specular highlight on top edge */
.liquid-glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.6) 30%,
      rgba(255, 255, 255, 0.8) 50%,
      rgba(255, 255, 255, 0.6) 70%,
      transparent);
  pointer-events: none;
  z-index: 2;
}

/* Apply to chat popup */
#chat-popup {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1) !important;
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* Apply to nav when scrolling */
nav.nav-dark {
  background: rgba(15, 12, 10, 0.45) !important;
  backdrop-filter: blur(24px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Apply to theme toggle pill */
.theme-toggle {
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Lightbox glass effect */
.lightbox-close,
.lightbox-nav {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Music button glass */
.music-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

nav.nav-dark .music-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Back to top glass */
#back-top {
  background: rgba(14, 12, 10, 0.6) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Activity cards glass on light bg */
#activities .activity-card {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Easter egg glass */
#eggOverlay>div:first-child~div {
  backdrop-filter: blur(8px);
}

.btn-view-cv:hover {
  background: var(--rust);
  color: white;
}