/* ============================================
   REHAN PATHAN — PORTFOLIO
   Design System & Styles
   Inspired by brutalist monochrome aesthetic
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg: #f5f5f5;
  --fg: #0a0a0a;
  --fg-80: rgba(10, 10, 10, 0.8);
  --fg-60: rgba(10, 10, 10, 0.6);
  --fg-40: rgba(10, 10, 10, 0.4);
  --fg-20: rgba(10, 10, 10, 0.2);
  --fg-10: rgba(10, 10, 10, 0.1);
  --fg-05: rgba(10, 10, 10, 0.05);
  --accent: #0a0a0a;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --container: 1100px;
  --section-py: clamp(80px, 10vw, 120px);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body.loading {
  height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

/* ============================================
   LOADING SCREEN
   ============================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

#loader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.loader-text {
  font-family: var(--font-mono);
  font-size: clamp(14px, 3vw, 18px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg);
  z-index: 1;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================================
   CANVAS LAYERS (Background Effects)
   ============================================ */
#dotGridCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

#cursorTrailCanvas {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(245, 245, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--fg-10);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}

.nav-logo::after {
  content: '_';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.nav-links {
  display: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-60);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--fg);
  transition: width var(--transition);
}

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

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

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Sound Toggle Button */
.sound-toggle-btn {
  background: white;
  border: 2px solid var(--fg);
  box-shadow: 3px 3px 0 var(--fg);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.sound-toggle-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--fg);
}

.sound-toggle-btn svg {
  width: 18px;
  height: 18px;
  color: var(--fg);
}

/* Mobile Menu Button */
.nav-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 768px) {
  .nav-menu-btn {
    display: none;
  }
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg);
  transition: opacity var(--transition);
}

.mobile-menu a:hover {
  opacity: 0.6;
}

/* ============================================
   INFINITE TICKER BANNER
   ============================================ */
.ticker-banner {
  background: var(--fg);
  color: var(--bg);
  padding: 14px 0;
  border-top: none;
  border-bottom: none;
  position: relative;
  overflow: hidden;
  z-index: 100;
  margin-top: 0;
  margin-bottom: 0;
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
}

.ticker {
  display: inline-flex;
  white-space: nowrap;
  animation: tickerAnimation 35s linear infinite;
}

.ticker span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0 40px;
  display: flex;
  align-items: center;
}

@keyframes tickerAnimation {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
  padding: 80px 24px;
}

#matrixCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Hero Code tags overlay */
.hero-meta-left {
  position: absolute;
  top: 40px;
  left: 40px;
  font-size: 11px;
  color: var(--fg-40);
  line-height: 1.8;
  display: none;
  pointer-events: none;
}

.hero-meta-right {
  position: absolute;
  top: 40px;
  right: 40px;
  font-size: 11px;
  color: var(--fg-20);
  line-height: 1.8;
  text-align: right;
  display: none;
  pointer-events: none;
}

.hero-bottom-left {
  position: absolute;
  bottom: 40px;
  left: 40px;
  font-size: 11px;
  color: var(--fg-40);
  letter-spacing: 0.1em;
  display: none;
  pointer-events: none;
}

.hero-bottom-right {
  position: absolute;
  bottom: 40px;
  right: 40px;
  font-size: 11px;
  color: var(--fg-40);
  line-height: 1.8;
  text-align: right;
  display: none;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero-meta-left, .hero-meta-right, .hero-bottom-left, .hero-bottom-right {
    display: block;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 100%;
  padding: 0 24px;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-content.visible {
  opacity: 1;
}

.hero-name {
  font-size: clamp(72px, 15vw, 180px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.88;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Glitch Text Effect for Hero Name */
.glitch-text {
  position: relative;
  display: inline-block;
  color: var(--fg);
}

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

.glitch-hover-name {
  position: relative;
  display: block;
  cursor: crosshair;
  color: var(--fg);
}

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

.glitch-hover-name:hover {
  animation: name-flicker 0.08s step-end 3;
}

.glitch-hover-name:hover::before {
  opacity: 1;
  color: #0ff;
  z-index: -1;
  animation: glitch-anim-1 1.2s ease-in-out infinite;
}

.glitch-hover-name:hover::after {
  opacity: 1;
  color: #f0f;
  z-index: -2;
  animation: glitch-anim-2 1.4s ease-in-out infinite;
}

@keyframes name-flicker {
  0%   { opacity: 0.9; }
  25%  { opacity: 1; }
  50%  { opacity: 0.85; }
  75%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes glitch-anim-1 {
  0%   { clip-path: polygon(0 5%,  100% 5%,  100% 20%, 0 20%);  transform: translate(-6px,  2px) skewX(-1deg); }
  25%  { clip-path: polygon(0 45%, 100% 45%, 100% 65%, 0 65%);  transform: translate( 4px, -3px) skewX( 2deg); }
  50%  { clip-path: polygon(0 75%, 100% 75%, 100% 88%, 0 88%);  transform: translate(-2px,  4px) skewX(-2deg); }
  75%  { clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);  transform: translate( 6px, -1px) skewX( 1deg); }
  100% { clip-path: polygon(0 10%, 100% 10%, 100% 35%, 0 35%);  transform: translate(-4px,  2px) skewX(-1deg); }
}

@keyframes glitch-anim-2 {
  0%   { clip-path: polygon(0 55%, 100% 55%, 100% 80%, 0 80%);  transform: translate( 6px, -2px) skewX( 2deg); }
  25%  { clip-path: polygon(0 8%,  100% 8%,  100% 22%, 0 22%);  transform: translate(-3px,  1px) skewX(-1deg); }
  50%  { clip-path: polygon(0 35%, 100% 35%, 100% 55%, 0 55%);  transform: translate( 2px,  3px) skewX( 1deg); }
  75%  { clip-path: polygon(0 70%, 100% 70%, 100% 92%, 0 92%);  transform: translate(-5px, -2px) skewX(-2deg); }
  100% { clip-path: polygon(0 25%, 100% 25%, 100% 42%, 0 42%);  transform: translate( 3px,  1px) skewX( 1deg); }
}

#typewriter {
  display: inline-block;
}

#typewriter::after {
  content: '_';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.glitch-text:hover::before,
.glitch-text:hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg); /* Match background so it overlays cleanly */
}

.glitch-text:hover::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip-path: inset(44% 0 56% 0); /* Alternative to clip: rect */
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text:hover::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  clip-path: inset(20% 0 80% 0);
  animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip-path: inset(10% 0 10% 0); }
  20% { clip-path: inset(80% 0 1% 0); }
  40% { clip-path: inset(43% 0 1% 0); }
  60% { clip-path: inset(25% 0 58% 0); }
  80% { clip-path: inset(90% 0 5% 0); }
  100% { clip-path: inset(1% 0 70% 0); }
}

@keyframes glitch-anim2 {
  0% { clip-path: inset(25% 0 58% 0); }
  20% { clip-path: inset(1% 0 70% 0); }
  40% { clip-path: inset(90% 0 5% 0); }
  60% { clip-path: inset(43% 0 1% 0); }
  80% { clip-path: inset(80% 0 1% 0); }
  100% { clip-path: inset(10% 0 10% 0); }
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--fg-60);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

/* Skills/Tech list in hero */
.hero-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tech-badges span {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--fg-20);
  background: white;
  color: var(--fg-60);
}

/* Inline icon list in hero */
.hero-social-list {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--fg);
  background: white;
  color: var(--fg);
  box-shadow: 4px 4px 0 var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.social-icon-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--fg);
}

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

/* Dual Actions Buttons */
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-direction: column;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
  }
}

.hero-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 16px 32px;
  border: 2px solid var(--fg);
  box-shadow: 6px 6px 0 var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease, color 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

.hero-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--fg);
}

.hero-btn:active {
  transform: translate(6px, 6px);
  box-shadow: 0px 0px 0 var(--fg);
}

/* VIEW RESUME — filled black with shadow */
.hero-btn-fill {
  background: var(--fg);
  color: white;
  box-shadow: 6px 6px 0 var(--fg);
}

.hero-btn-fill span,
.hero-btn-fill svg {
  position: relative;
  z-index: 1;
  color: white;
  stroke: white;
}

/* DOWNLOAD — outline with shadow that fills black on hover */
.hero-btn-outline {
  background: white;
  color: var(--fg);
  box-shadow: 6px 6px 0 var(--fg);
}

.hero-btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 0;
}

.hero-btn-outline:hover::before {
  transform: scaleX(1);
}

.hero-btn-outline span,
.hero-btn-outline svg {
  position: relative;
  z-index: 1;
  transition: color 0.25s ease, stroke 0.25s ease;
}

.hero-btn-outline:hover span,
.hero-btn-outline:hover svg {
  color: white;
  stroke: white;
}

.hero-btn-outline:hover svg {
  stroke: white;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-40);
}

.scroll-indicator .scroll-line {
  width: 1px;
  height: 40px;
  background: var(--fg-20);
  position: relative;
  overflow: hidden;
}

.scroll-indicator .scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fg);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 0;
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--fg-40);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* ============================================
   ELASTIC DIVIDER
   ============================================ */
.elastic-divider {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.elastic-divider svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.elastic-divider path {
  fill: transparent;
  stroke: var(--fg-20);
  stroke-width: 1.5;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-bento-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {
  .about-bento-grid {
    grid-template-columns: 320px 1fr;
    gap: 48px;
  }
}

.about-left-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-brutalist {
  border: 2px solid var(--fg);
  background: white;
  box-shadow: 6px 6px 0 var(--fg);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card-brutalist:hover {
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 var(--fg);
}

.profile-image-card {
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--fg-20);
}

.animated-grayscale {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.1) brightness(0.9);
  transition: filter 0.5s ease, transform 0.5s ease;
  transform: scale(1);
}

.profile-image-card:hover .animated-grayscale {
  filter: grayscale(0%) contrast(1.1) brightness(1);
  transform: scale(1.03);
}

.status-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 6px 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #27c93f;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(39, 201, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0); }
}

.profile-info-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  border-bottom: 1px dashed var(--fg-20);
  padding-bottom: 8px;
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  color: var(--fg-40);
  letter-spacing: 0.1em;
}

.info-value {
  text-align: right;
  color: var(--fg);
}

.font-bold {
  font-weight: 700;
}

.about-right-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--fg-80);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.stat-card {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-number {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.stat-text {
  font-size: 9px;
  color: var(--fg-40);
  letter-spacing: 0.1em;
}

.workflow-card {
  padding: 0;
}

.workflow-header {
  padding: 16px 24px;
  border-bottom: 2px solid var(--fg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.workflow-grid {
  display: grid;
  padding: 24px;
  gap: 32px;
}

@media (min-width: 640px) {
  .workflow-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.workflow-item h4 {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.workflow-item p {
  font-size: 13px;
  color: var(--fg-60);
  line-height: 1.6;
}

/* Github Activity Card */
.github-activity-card {
  margin-top: 48px;
  padding: 24px;
}

.github-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--fg);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.github-header h3 {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.sync-status {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-60);
  font-weight: 600;
}

.sync-dot {
  width: 8px;
  height: 8px;
  background: #27c93f;
  border-radius: 0;
  display: inline-block;
  animation: pulse-dot-square 2s infinite;
}

@keyframes pulse-dot-square {
  0% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(39, 201, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0); }
}

.github-graph-container {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--fg-10);
  background: #fdfdfd;
  padding: 24px;
  position: relative;
  margin-bottom: 24px;
}

.github-chart-img {
  filter: grayscale(100%) contrast(1.5) brightness(0.9);
  width: 800px;
  max-width: none;
  animation: pan-graph 15s linear infinite alternate;
}

@keyframes pan-graph {
  0% { transform: translateX(0); }
  100% { transform: translateX(-30%); }
}

@media (min-width: 1024px) {
  .github-chart-img {
    animation: none;
    width: 100%;
    min-width: auto;
  }
}

.github-chart-interactive rect {
  transition: fill 0.2s, transform 0.2s;
  cursor: crosshair;
}

.github-chart-interactive rect.interactive-rect:hover {
  fill: #fff !important;
  stroke: var(--fg) !important;
  stroke-width: 1px !important;
  transform: scale(1.4);
  transform-origin: center;
  z-index: 10;
}

.github-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--fg-60);
}

.github-total strong {
  color: var(--fg);
  font-size: 12px;
}

/* ============================================
   EDUCATION & EXPERIENCE TIMELINE
   ============================================ */
.education-timeline {
  position: relative;
}

.education-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 48px;
  border-left: 1px solid var(--fg-20);
}

.education-item:last-child {
  padding-bottom: 0;
}

.education-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  background: var(--fg);
}

.education-degree {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.education-school {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-80);
  margin-bottom: 4px;
}

.education-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.education-year {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-40);
}

.education-grade {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--fg-60);
  padding: 3px 10px;
  border: 1px solid var(--fg-10);
  background: var(--fg-05);
}

@media (min-width: 768px) {
  .education-timeline {
    padding-left: 40px;
  }
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  border-bottom: 2px solid var(--fg-10);
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 1px solid var(--fg-20);
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.filter-count {
  background: var(--fg-10);
  color: var(--fg);
  padding: 2px 6px;
  font-size: 9px;
}

.filter-btn:hover .filter-count, .filter-btn.active .filter-count {
  background: var(--bg);
  color: var(--fg);
}

.filter-status {
  font-size: 11px;
  color: var(--fg-40);
  letter-spacing: 0.1em;
}

.projects-bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .projects-bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-bento-card {
  border: 4px solid var(--fg);
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 500px;
  box-shadow: 12px 12px 0 var(--fg-10);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.project-bento-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 16px 16px 0 var(--fg);
}

.project-watermark {
  position: absolute;
  bottom: -40px;
  right: -20px;
  font-size: 200px;
  font-weight: 900;
  color: rgba(0,0,0,0.03);
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.project-ribbon {
  position: absolute;
  top: -2px;
  right: 24px;
  background: var(--fg);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 12px;
  letter-spacing: 0.1em;
  z-index: 2;
}

.project-content {
  position: relative;
  z-index: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-top-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.top-tag {
  font-size: 9px;
  border: 1px solid var(--fg-20);
  padding: 4px 8px;
  color: var(--fg-60);
  letter-spacing: 0.05em;
}

.project-main-info {
  flex-grow: 1;
}

.project-title-large {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.project-subtitle {
  font-size: 10px;
  color: var(--fg-40);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.project-desc-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-80);
}

.project-bottom-actions {
  margin-top: auto;
  position: relative;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tech-tag {
  background: var(--fg-05);
  font-size: 10px;
  padding: 6px 10px;
  font-weight: 600;
}

.live-demo-btn {
  position: absolute;
  bottom: -40px;
  right: -40px;
  background: var(--fg);
  color: white;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 30px;
  transition: transform var(--transition);
}

.project-bento-card:hover .live-demo-btn {
  transform: translate(-16px, -16px);
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .skills-bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skills-bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-bento-card {
  border: 4px solid var(--fg);
  background: white;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 8px 8px 0 var(--fg-10);
  transition: box-shadow var(--transition), transform var(--transition);
}

.skill-bento-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 var(--fg);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.skill-card-header .skill-card-icon {
  background: var(--fg);
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.skill-card-header .skill-card-icon svg {
  width: 20px;
  height: 20px;
}

.skill-card-header .skill-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag-outline {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--fg-20);
  color: var(--fg-80);
  transition: all var(--transition);
}

.skill-tag-outline:hover {
  background: var(--fg);
  color: white;
  border-color: var(--fg);
}

.always-learning-card {
  background: var(--fg-05);
  border: 2px dashed var(--fg-20);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.always-learning-card:hover {
  box-shadow: none;
  transform: none;
  background: var(--fg-10);
}

.always-learning-content {
  text-align: center;
  color: var(--fg-40);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.learning-icon {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section-container {
  position: relative;
  text-align: center;
  padding: 80px 24px;
  z-index: 1;
}

/* Giant background watermark */
.contact-watermark {
  font-size: clamp(60px, 12vw, 150px);
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(10, 10, 10, 0.03);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.contact-heading-container {
  position: relative;
  z-index: 1;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pixel-ornament {
  font-size: 14px;
  color: var(--fg);
  display: inline-flex;
  gap: 3px;
  opacity: 0.85;
}

.contact-main-text {
  font-size: clamp(22px, 3.8vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0;
}

.contact-text-italic {
  font-style: italic;
  font-weight: 900;
}

.unforgettable-badge {
  font-style: normal;
  font-weight: 900;
  background: var(--fg);
  color: var(--bg);
  padding: 4px 16px;
  border: 2px solid var(--fg);
  display: inline-block;
  vertical-align: middle;
  transition: background var(--transition), color var(--transition);
}

/* Social Grid buttons in card style */
.social-retro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .social-retro-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .social-retro-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.social-retro-card {
  border: 2px solid var(--fg);
  background: white;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 8px 8px 0 var(--fg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.social-retro-card:hover {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0 var(--fg);
}

/* Make email span full width or center on desktop */
@media (min-width: 768px) {
  .email-card {
    grid-column: span 4;
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
}

.social-card-icon svg {
  width: 32px;
  height: 32px;
  color: var(--fg);
}

.social-card-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--fg-80);
}

#thankyou {
  padding-top: 40px !important;
  padding-bottom: 20px !important;
}

#thankyou .contact-section-container {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

.contact-footer-badge {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.freelance-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #27c93f;
  color: #27c93f;
  padding: 12px 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.footer-text {
  font-size: 10px;
  color: var(--fg-40);
  letter-spacing: 0.15em;
  line-height: 1.8;
  text-transform: uppercase;
}

/* ============================================
   RETRO TERMINAL RESUME PREVIEW MODAL
   ============================================ */
.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 16px;
}

.resume-modal.active {
  opacity: 1;
  visibility: visible;
}

.resume-window {
  width: 100%;
  max-width: 900px;
  height: 90vh;
  background: #121212;
  border: 2px solid var(--fg);
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(15px);
  transition: transform 0.3s ease;
}

.resume-modal.active .resume-window {
  transform: scale(1) translateY(0);
}

.resume-header {
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.resume-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.resume-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.resume-title {
  font-size: 11px;
  color: #ccc;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

.resume-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resume-action-btn {
  color: #888;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.resume-action-btn:hover {
  color: #fff;
}

.resume-download-btn {
  background: white;
  color: black;
  border: none;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.resume-download-btn:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.resume-close-btn {
  background: none;
  border: none;
  color: #888;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.resume-close-btn:hover {
  color: #ff5f56;
}

.resume-toolbar {
  background: #161616;
  border-bottom: 1px solid #242424;
  padding: 6px 16px;
  font-size: 10px;
  color: #777;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.toolbar-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toolbar-left .divider {
  color: #444;
}

.resume-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px 20px;
  background: #1e1e1e !important;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Paper Document */
.resume-paper {
  background: #ffffff !important;
  color: #111111 !important;
  width: 100%;
  max-width: 780px;
  min-height: fit-content;
  height: auto;
  flex-shrink: 0;
  padding: 44px 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.65;
  border-radius: 2px;
  margin-bottom: 40px;
}

.resume-paper *,
.resume-paper p,
.resume-paper li,
.resume-paper div,
.resume-paper span,
.resume-paper strong,
.resume-paper h1,
.resume-paper h2,
.resume-paper h3 {
  color: #111111 !important;
}

.resume-paper-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.resume-paper-name {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: #111111 !important;
}

.resume-paper-links {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resume-paper-links a {
  color: #111111 !important;
  text-decoration: underline;
}

.resume-header-right {
  text-align: right;
}

.resume-contact-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  color: #111111 !important;
}

.resume-contact-details {
  font-size: 11px;
  color: #111111 !important;
}

.resume-contact-details a {
  color: #111111 !important;
  text-decoration: underline;
}

.resume-divider-line {
  height: 2px;
  background: #111111 !important;
  margin: 16px 0;
  width: 100%;
}

.resume-section {
  margin-bottom: 16px;
}

.resume-section-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: #111111 !important;
}

.resume-text {
  font-size: 12.5px;
  color: #222222 !important;
  line-height: 1.6;
}

.resume-timeline {
  position: relative;
  padding-left: 18px;
  border-left: 1px dashed #666666;
  margin-left: 4px;
}

.resume-timeline-item {
  position: relative;
  padding-bottom: 14px;
}

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

.timeline-dot {
  position: absolute;
  left: -23px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff !important;
  border: 2px solid #111111 !important;
}

.project-title-heading {
  font-size: 13px;
  font-weight: 800;
  color: #111111 !important;
  text-decoration: underline;
  display: block;
  margin-bottom: 4px;
}

.resume-skills-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  font-size: 11.5px;
}

.skill-col strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 800;
}

.resume-item {
  margin-bottom: 14px;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 700;
  color: #111111 !important;
}

.resume-date {
  font-size: 11px;
  color: #555555 !important;
  font-weight: 500;
}

.resume-sub {
  font-size: 12px;
  color: #555555 !important;
  font-style: italic;
}

.resume-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #f0f0f0 !important;
  border: 1px solid #dddddd !important;
  color: #111111 !important;
  padding: 2px 8px;
  margin-top: 4px;
}

.resume-timeline-item ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.resume-timeline-item li {
  margin-bottom: 4px;
  font-size: 12px;
  color: #222222 !important;
}

.resume-footer {
  background: #1a1a1a;
  border-top: 1px solid #2a2a2a;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #777;
  user-select: none;
}

.footer-hint kbd {
  background: #333;
  color: #eee;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 9px;
}

.resume-save-btn {
  background: none;
  border: 1px solid #444;
  color: #ccc;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.resume-save-btn:hover {
  background: white;
  color: black;
  border-color: white;
}

/* ============================================
   THEME TOGGLE & DARK MODE OVERRIDES
   ============================================ */
.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--fg);
  box-shadow: 3px 3px 0 var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.theme-toggle-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--fg);
}

.theme-toggle-btn svg {
  width: 17px;
  height: 17px;
  color: var(--fg);
}

/* DARK THEME STYLES */
body.dark-theme {
  --bg: #0a0a0c;
  --fg: #ffffff;
  --fg-80: #f1f5f9;
  --fg-60: #cbd5e1;
  --fg-40: #94a3b8;
  --fg-20: #334155;
  --fg-10: #1e293b;
  --fg-05: #0f172a;
  background-color: #0a0a0c;
  color: #ffffff;
}

body.dark-theme .navbar {
  background: rgba(10, 10, 12, 0.95);
  border-bottom-color: #26262e;
}

body.dark-theme .nav-logo,
body.dark-theme .nav-links a {
  color: #ffffff;
}

body.dark-theme .nav-links a:hover {
  color: #38bdf8;
}

body.dark-theme .hero-meta-left,
body.dark-theme .hero-meta-right {
  color: #94a3b8;
}

body.dark-theme .hero-subtitle {
  color: #cbd5e1;
}

body.dark-theme .hero-name,
body.dark-theme .glitch-hover-name {
  color: #ffffff;
}

body.dark-theme .hero-tech-badges span {
  background: #14141a;
  color: #f1f5f9;
  border-color: #334155;
}

body.dark-theme .social-icon-btn {
  background: #14141a;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

body.dark-theme .hero-btn-fill {
  background: #ffffff;
  color: #0a0a0c;
  border-color: #ffffff;
  box-shadow: 6px 6px 0 #ffffff;
}

body.dark-theme .hero-btn-fill span,
body.dark-theme .hero-btn-fill svg {
  color: #0a0a0c;
  stroke: #0a0a0c;
}

body.dark-theme .hero-btn-outline {
  background: #0a0a0c;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 6px 6px 0 #ffffff;
}

body.dark-theme .hero-btn-outline::before {
  background: #ffffff;
}

body.dark-theme .hero-btn-outline:hover span,
body.dark-theme .hero-btn-outline:hover svg {
  color: #0a0a0c;
  stroke: #0a0a0c;
}

body.dark-theme .section-title {
  color: #ffffff !important;
}

body.dark-theme .section-label {
  color: #94a3b8 !important;
}

body.dark-theme .card-brutalist,
body.dark-theme .project-bento-card,
body.dark-theme .skill-bento-card,
body.dark-theme .social-retro-card,
body.dark-theme .profile-image-card,
body.dark-theme .profile-info-card,
body.dark-theme .stat-card,
body.dark-theme .workflow-card,
body.dark-theme .github-activity-card {
  background: #14141a !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 6px 6px 0 #ffffff !important;
}

body.dark-theme .card-brutalist *,
body.dark-theme .project-bento-card *,
body.dark-theme .skill-bento-card *,
body.dark-theme .social-retro-card *,
body.dark-theme .profile-info-card *,
body.dark-theme .stat-card *,
body.dark-theme .workflow-card * {
  color: #ffffff;
}

body.dark-theme .about-description p {
  color: #cbd5e1 !important;
}

body.dark-theme .info-row .info-label {
  color: #94a3b8 !important;
}

body.dark-theme .info-row .info-value {
  color: #ffffff !important;
}

body.dark-theme .stat-text {
  color: #94a3b8 !important;
}

body.dark-theme .workflow-item p {
  color: #cbd5e1 !important;
}

body.dark-theme .education-degree {
  color: #ffffff !important;
}

body.dark-theme .education-school {
  color: #cbd5e1 !important;
}

body.dark-theme .education-year {
  color: #94a3b8 !important;
}

body.dark-theme .education-grade {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

body.dark-theme .project-watermark {
  color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .project-title-large {
  color: #ffffff !important;
}

body.dark-theme .project-subtitle {
  color: #94a3b8 !important;
}

body.dark-theme .project-desc-text {
  color: #cbd5e1 !important;
}

body.dark-theme .top-tag,
body.dark-theme .tech-tag {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

body.dark-theme .live-demo-btn {
  background: #ffffff !important;
  color: #0a0a0c !important;
  border-color: #ffffff !important;
}

body.dark-theme .filter-btn {
  background: #14141a !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 3px 3px 0 #ffffff !important;
}

body.dark-theme .filter-btn.active {
  background: #ffffff !important;
  color: #0a0a0c !important;
}

body.dark-theme .skill-card-title {
  color: #ffffff !important;
}

body.dark-theme .skill-tag-outline {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

body.dark-theme .always-learning-card {
  background: #14141a !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

body.dark-theme .github-header h3,
body.dark-theme .github-total {
  color: #ffffff !important;
}

body.dark-theme .github-graph-container rect {
  stroke: #14141a;
}

body.dark-theme .contact-watermark {
  color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .contact-main-text {
  color: #ffffff !important;
}

body.dark-theme .social-card-name {
  color: #ffffff !important;
}

body.dark-theme .social-card-icon svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

body.dark-theme .footer {
  background: #09090b !important;
  border-top-color: #26262e !important;
  color: #94a3b8 !important;
}

body.dark-theme .footer-left,
body.dark-theme .footer-right {
  color: #94a3b8 !important;
}

/* Dashed Line Divider & Live Pulse Bar */
.dashed-line-divider {
  width: 100%;
  height: 0;
  border-top: 2.5px dashed var(--fg);
  margin: 48px 0 28px 0;
  opacity: 0.85;
}

.live-pulse-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--fg);
}

.pulse-square {
  color: #22c55e;
  font-size: 11px;
  line-height: 1;
  animation: pulseGlow 1.5s ease-in-out infinite;
}

.live-pulse-text {
  color: var(--fg);
}

.live-pulse-line {
  flex: 1;
  height: 1px;
  background: var(--fg-20);
}

.github-activity-card {
  margin-top: 20px;
  margin-bottom: 64px !important;
}

body.dark-theme .dashed-line-divider {
  border-top-color: #ffffff !important;
}

body.dark-theme .live-pulse-line {
  background: #334155 !important;
}

body.dark-theme .contact-info-card {
  background: #14141a !important;
  border-color: #ffffff !important;
  box-shadow: 5px 5px 0 #ffffff !important;
}

body.dark-theme .contact-info-icon {
  background: #ffffff !important;
  color: #0a0a0c !important;
}

body.dark-theme .connect-icon-btn {
  background: #14141a !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 4px 4px 0 #ffffff !important;
}

body.dark-theme .connect-icon-btn:hover {
  background: #ffffff !important;
  color: #0a0a0c !important;
}

body.dark-theme .contact-input,
body.dark-theme .contact-textarea {
  background: #16161c !important;
  border-color: #334155 !important;
  color: #ffffff !important;
}

body.dark-theme .contact-input:focus,
body.dark-theme .contact-textarea:focus {
  border-color: #ffffff !important;
  background: #1e1e26 !important;
  box-shadow: 4px 4px 0 #ffffff !important;
}

body.dark-theme .contact-submit-btn {
  background: #ffffff !important;
  color: #0a0a0c !important;
  border-color: #ffffff !important;
  box-shadow: 6px 6px 0 #ffffff !important;
}

body.dark-theme .contact-submit-btn svg {
  stroke: #0a0a0c !important;
}

body.dark-theme .ticker-banner {
  background: #14141a !important;
  border-top: 2px solid #ffffff !important;
  border-bottom: 2px solid #ffffff !important;
}

body.dark-theme .ticker span {
  color: #ffffff !important;
}

body.dark-theme .contact-main-text span {
  background: #ffffff !important;
  color: #0a0a0c !important;
}

body.dark-theme .social-retro-card {
  background: #14141a !important;
  border-color: #ffffff !important;
  box-shadow: 6px 6px 0 #ffffff !important;
  color: #ffffff !important;
}

body.dark-theme .social-retro-card:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 #ffffff !important;
}

body.dark-theme .freelance-badge {
  border-color: #22c55e !important;
  color: #22c55e !important;
  background: #052e16 !important;
}

/* ============================================
   CONTACT SECTION (Matching Reference Photo)
   ============================================ */
.contact-container-photo {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px;
}

.contact-photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-photo-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
  }
}

.contact-photo-title {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
  color: var(--fg);
}

.contact-photo-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-60);
  margin-bottom: 32px;
  max-width: 460px;
}

.contact-info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: white;
  border: 2px solid var(--fg);
  box-shadow: 5px 5px 0 var(--fg);
  margin-bottom: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-info-card:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--fg);
}

.contact-info-icon {
  width: 42px;
  height: 42px;
  background: var(--fg);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.info-card-label {
  font-size: 10px;
  color: var(--fg-40);
  letter-spacing: 0.12em;
  font-weight: 600;
}

.info-card-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  word-break: break-all;
}

.copy-email-btn {
  background: none;
  border: none;
  color: var(--fg-40);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-email-btn:hover {
  color: var(--fg);
  transform: scale(1.15);
}

.status-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  margin-right: 6px;
}

.contact-connect-block {
  margin-top: 28px;
}

.connect-label {
  font-size: 11px;
  color: var(--fg-40);
  letter-spacing: 0.15em;
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}

.connect-icons-row {
  display: flex;
  gap: 12px;
}

.connect-icon-btn {
  width: 44px;
  height: 44px;
  background: white;
  color: var(--fg);
  border: 2px solid var(--fg);
  box-shadow: 4px 4px 0 var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.connect-icon-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--fg);
  background: var(--fg);
  color: white;
}

/* Contact Form */
.contact-form-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-input,
.contact-textarea {
  width: 100%;
  padding: 18px 20px;
  background: #f8f8fa;
  border: 2px solid var(--fg-20);
  color: var(--fg);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: var(--fg-40);
  letter-spacing: 0.08em;
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: var(--fg);
  background: white;
  box-shadow: 4px 4px 0 var(--fg);
}

.textarea-group {
  position: relative;
}

.contact-textarea {
  resize: vertical;
  min-height: 150px;
}

.char-counter {
  text-align: right;
  font-size: 10px;
  color: var(--fg-40);
  margin-top: 6px;
}

.contact-submit-btn {
  width: 100%;
  padding: 18px;
  background: var(--fg);
  color: white;
  border: 2px solid var(--fg);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--fg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-submit-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--fg);
}

.contact-submit-btn:active {
  transform: translate(6px, 6px);
  box-shadow: 0px 0px 0 var(--fg);
}

.contact-submit-btn svg {
  stroke: white;
}

/* ============================================
   BOTTOM CONTROLS & TERMINAL
   ============================================ */
.bottom-left-controls {
  position: fixed;
  bottom: 32px;
  left: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.bottom-right-controls {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.cmd-btn {
  width: 46px;
  height: 46px;
  background: white;
  border: 2px solid var(--fg);
  box-shadow: 4px 4px 0 var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
}

.cmd-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--fg);
}

.scroll-to-top-btn {
  width: 46px;
  height: 46px;
  background: white;
  border: 2px solid var(--fg);
  border-radius: 50% !important; /* Circle style matching photo */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition), visibility var(--transition);
  opacity: 0;
  visibility: hidden;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top-btn:hover {
  transform: translateY(-2px);
}

.scroll-to-top-btn svg {
  width: 20px;
  height: 20px;
  color: var(--fg);
}


/* ============================================
   TERMINAL MODAL
   ============================================ */
.terminal-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.terminal-modal.active {
  opacity: 1;
  visibility: visible;
}

.terminal-window {
  width: 90%;
  max-width: 650px;
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.terminal-modal.active .terminal-window {
  transform: scale(1) translateY(0);
}

.terminal-header {
  background: #2d2d2d;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a0a0a0;
  flex-grow: 1;
  text-align: center;
}

.terminal-close {
  background: none;
  border: none;
  color: #a0a0a0;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

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

.terminal-body {
  padding: 16px;
  height: 400px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e0e0e0;
  line-height: 1.6;
}

.terminal-line {
  margin-bottom: 4px;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.terminal-prompt {
  color: #e0e0e0;
  margin-right: 8px;
  white-space: nowrap;
}

#terminalInput {
  background: transparent;
  border: none;
  color: #e0e0e0;
  font-family: var(--font-mono);
  font-size: 13px;
  flex-grow: 1;
  outline: none;
}

.text-green { color: #27c93f; }
.text-red { color: #ff5f56; }
.text-yellow { color: #ffbd2e; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  margin-bottom: -80px;
  z-index: 1;
  padding: 24px 0;
  border-top: 1px solid var(--fg-10);
  background: white;
}

.footer::after {
 .footer::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: inherit;
}
}

.scramble-hover {
  display: inline-block !important;
  width: max-content !important;
  max-width: 100% !important;
}

.footer-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-40);
}

.footer-right {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-40);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-heart {
  color: var(--fg);
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(1); }
  75% { transform: scale(1.1); }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.social-retro-grid.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 480px) {
  .hero-socials {
    flex-wrap: wrap;
    gap: 16px;
  }

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

  .project-card {
    padding: 24px;
  }

  .contact-cta {
    padding: 24px;
  }

  .elastic-divider {
    height: 60px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--fg) 0%, var(--fg-60) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
