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

:root {
  --primary: #2d5016;
  --secondary: #8fbc8f;
  --accent: #ff8c00;
  --bg: #0a120a;
  --surface: #1a2e1a;
  --text: #f0f8e8;
  --text-muted: #c4d4a8;
  --forest-green: #228b22;
  --leaf-green: #32cd32;
  --nature-brown: #8b4513;
  --layout-max: 1200px;
  --layout-narrow: 1040px;
  --layout-gutter: clamp(12px, 4vw, 36px);
}

body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  background-image: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><defs><pattern id="treePattern" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><g fill="%23228b2215"><path d="M50,90 L45,70 Q50,65 55,70 L50,90"/><path d="M25,85 L20,65 Q25,60 30,65 L25,85"/><path d="M75,87 L70,67 Q75,62 80,67 L75,87"/><circle cx="50" cy="65" r="8"/><circle cx="25" cy="60" r="6"/><circle cx="75" cy="62" r="7"/></g><g fill="%232d501610"><path d="M50,90 L50,95"/><path d="M25,85 L25,90"/><path d="M75,87 L75,92"/></g></pattern></defs><rect width="400" height="400" fill="url(%23treePattern)"/><g fill="%2332cd3208"><circle cx="50" cy="50" r="3"><animate attributeName="r" values="3;5;3" dur="4s" repeatCount="indefinite"/></circle><circle cx="150" cy="80" r="2"><animate attributeName="r" values="2;4;2" dur="3s" repeatCount="indefinite"/></circle><circle cx="250" cy="30" r="2.5"><animate attributeName="r" values="2.5;4.5;2.5" dur="5s" repeatCount="indefinite"/></circle><circle cx="350" cy="70" r="3"><animate attributeName="r" values="3;5;3" dur="3.5s" repeatCount="indefinite"/></circle></g></svg>'),
    radial-gradient(circle at 20% 80%, rgba(34, 139, 34, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(50, 205, 50, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  cursor: none;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

html.fullpage-enabled {
  min-height: 100%;
}

html.fullpage-enabled body.fullpage-enabled {
  min-height: 100%;
}

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

body.fullpage-enabled {
  overscroll-behavior-y: contain;
}

body.fullpage-enabled [data-fullpage="true"] {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  transition: opacity 0.6s ease;
}

body.fullpage-enabled .hero {
  flex-direction: row;
}

body.fullpage-enabled.fullpage-has-active.fullpage-user-activated [data-fullpage="true"]:not(.is-active) {
  opacity: 0.35;
}

@media (prefers-reduced-motion: reduce) {
  body.fullpage-enabled [data-fullpage="true"] {
    transition: none;
  }
}

body.fullpage-enabled .fullpage-indicator {
  position: fixed;
  top: 50%;
  right: clamp(16px, 4vw, 48px);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1100;
  pointer-events: auto;
}

body.fullpage-enabled .fullpage-indicator button {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(240, 248, 232, 0.3);
  border: 2px solid rgba(240, 248, 232, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

body.fullpage-enabled .fullpage-indicator button::after {
  content: attr(data-label);
  position: absolute;
  right: 140%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 18, 10, 0.9);
  color: rgba(240, 248, 232, 0.92);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.fullpage-enabled .fullpage-indicator button:hover::after,
body.fullpage-enabled .fullpage-indicator button:focus-visible::after {
  opacity: 1;
  transform: translate(-4px, -50%);
}

body.fullpage-enabled .fullpage-indicator button.is-active {
  background: var(--leaf-green);
  border-color: var(--leaf-green);
  transform: scale(1.15);
}

body.fullpage-enabled .fullpage-indicator button:focus-visible {
  outline: 3px solid rgba(50, 205, 50, 0.4);
  outline-offset: 4px;
}

@media (max-width: 720px) {
  body.fullpage-enabled .fullpage-indicator {
    display: none;
  }
}

.fullpage-section-inner {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-block: clamp(20px, 4vh, 56px);
}

.fullpage-section-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  gap: clamp(12px, 2.5vh, 28px);
}

.fullpage-section-main > .container {
  width: 100%;
}

.hero .container {
  width: auto;
  max-width: 1100px;
}

.section-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-inline: var(--layout-gutter);
  padding-block: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  max-height: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease, max-height 0.25s ease, padding-block 0.25s ease;
}

.section-nav.section-nav--empty {
  padding-block: 0;
  max-height: 0;
}

.section-nav.section-nav--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  max-height: 160px;
  padding-block: clamp(6px, 1.25vh, 14px);
}

.section-nav-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--leaf-green);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.68rem;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.25s ease;
}

.section-nav-button:focus-visible {
  outline: 3px solid rgba(50, 205, 50, 0.35);
  outline-offset: 6px;
}

.section-nav-button-icon {
  width: clamp(40px, 4.5vw, 52px);
  height: clamp(40px, 4.5vw, 52px);
  border-radius: 999px;
  border: 2px solid rgba(50, 205, 50, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  background: rgba(10, 18, 10, 0.78);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.section-nav.section-nav--visible .section-nav-button:hover .section-nav-button-icon,
.section-nav.section-nav--visible .section-nav-button:focus-visible .section-nav-button-icon {
  transform: translateY(calc(var(--nav-direction, 1) * -4px));
  background: rgba(34, 139, 34, 0.88);
  border-color: var(--leaf-green);
}

.section-nav.section-nav--visible .section-nav-button:hover,
.section-nav.section-nav--visible .section-nav-button:focus-visible {
  color: var(--text);
}

.section-nav-button-label {
  opacity: 0.75;
}

.section-nav-button--prev .section-nav-button-icon {
  --nav-direction: -1;
}

.section-nav-button--next .section-nav-button-icon {
  --nav-direction: 1;
}

@media (max-width: 600px) {
  .fullpage-section-inner {
    padding-block: clamp(24px, 6vh, 56px);
  }

  .section-nav {
    padding-inline: clamp(18px, 6vw, 26px);
  }

  .section-nav-button {
    font-size: 0.62rem;
  }
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, var(--leaf-green), transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform 0.1s ease;
}

.cursor-trail {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--forest-green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.6;
}

.container {
  width: 100%;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}

/* Interactive Nature Elements */
.nature-element {
  position: absolute;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.leaf {
  width: 12px;
  height: 12px;
  background: var(--leaf-green);
  border-radius: 0 100% 0 100%;
  transform: rotate(45deg);
  opacity: 0.7;
  animation: leaf-sway 4s ease-in-out infinite;
}

.calendar-grid {
  --scrollbar-track-opacity: 0;
  --scrollbar-thumb-start: 0%;
  --scrollbar-thumb-end: 0%;
  --scrollbar-thumb-color: rgba(76, 175, 80, 0.9);
  --scrollbar-track-color: rgba(34, 139, 34, 0.18);
}

.calendar-grid::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(24px, 6vw, 48px);
  background: linear-gradient(90deg, rgba(10, 18, 10, 0), rgba(10, 18, 10, 0.75));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.calendar-grid::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 6px;
  border-radius: 999px;
  pointer-events: none;
  opacity: var(--scrollbar-track-opacity);
  transition: opacity 0.3s ease;
  background:
    linear-gradient(90deg,
      transparent calc(var(--scrollbar-thumb-start)),
      var(--scrollbar-thumb-color) calc(var(--scrollbar-thumb-start)),
      var(--scrollbar-thumb-color) calc(var(--scrollbar-thumb-end)),
      transparent calc(var(--scrollbar-thumb-end))
    ),
    var(--scrollbar-track-color);
}

.calendar-grid.show-scroll-indicator {
  --scrollbar-track-opacity: 0.85;
}

.calendar-grid.is-scrollable.show-right-gradient::before {
  opacity: 0.6;
}

.calendar-grid.is-scrollable.show-left-shadow {
  box-shadow: inset 28px 0 24px -28px rgba(8, 14, 8, 0.8);
}

.calendar-scroll-hint {
  position: absolute;
  right: 18px;
  bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(8, 14, 8, 0.88);
  color: rgba(240, 248, 232, 0.92);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.calendar-grid.show-scroll-hint .calendar-scroll-hint {
  opacity: 1;
  animation: scrollHintPulse 1.6s ease-in-out infinite;
}

@keyframes scrollHintPulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.85;
  }
  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

.contribution-tooltip {
  position: fixed;
  z-index: 1200;
  padding: 10px 14px;
  background: rgba(10, 18, 10, 0.92);
  border: 1px solid rgba(76, 205, 120, 0.35);
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  color: rgba(240, 248, 232, 0.95);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-width: 180px;
  max-width: 240px;
}

.contribution-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.contribution-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  background: inherit;
  border: inherit;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: inherit;
}

.contribution-tooltip[data-placement="top"]::after {
  bottom: -6px;
}

.contribution-tooltip[data-placement="bottom"]::after {
  top: -6px;
}

.contribution-tooltip .tooltip-count {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.contribution-tooltip .tooltip-date {
  font-size: 0.8rem;
  color: rgba(240, 248, 232, 0.8);
  line-height: 1.3;
}

.tree {
  width: 8px;
  height: 40px;
  background: linear-gradient(to top, var(--nature-brown), var(--forest-green));
  border-radius: 4px;
  opacity: 0.4;
  animation: tree-grow 6s ease-in-out infinite;
}

@keyframes leaf-sway {
  0%, 100% { transform: rotate(45deg) translateX(0px); }
  50% { transform: rotate(50deg) translateX(5px); }
}

@keyframes tree-grow {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.1); }
}

@keyframes float-nature {
  0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg) scale(1); opacity: 0.2; }
  25% { transform: translateY(-40px) translateX(20px) rotate(90deg) scale(1.4); opacity: 0.6; }
  50% { transform: translateY(-20px) translateX(-25px) rotate(180deg) scale(0.7); opacity: 0.3; }
  75% { transform: translateY(-35px) translateX(15px) rotate(270deg) scale(1.2); opacity: 0.7; }
}

/* Link styles */
.intro-link {
  color: var(--leaf-green);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.intro-link:hover {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(50, 205, 50, 0.5);
}

.intro-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--leaf-green), var(--accent));
  transition: width 0.3s ease;
}

.intro-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="20" r="1" fill="%23228b2220"><animate attributeName="cy" values="20;10;20" dur="4s" repeatCount="indefinite"/></circle><circle cx="90" cy="30" r="0.5" fill="%232d501620"><animate attributeName="cx" values="90;80;90" dur="6s" repeatCount="indefinite"/></circle><path d="M30,80 Q35,75 40,80 T50,80" stroke="%23228b2215" stroke-width="0.5" fill="none"><animate attributeName="d" values="M30,80 Q35,75 40,80 T50,80;M25,82 Q35,77 45,82 T55,82;M30,80 Q35,75 40,80 T50,80" dur="3s" repeatCount="indefinite"/></path></svg>');
  animation: float 20s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(120deg); }
  66% { transform: translateY(-8px) rotate(240deg); }
}

.hero-content {
  display: flex;
  flex-direction: row;
  gap: 60px;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-text h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--forest-green), var(--leaf-green), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow 3s ease-in-out infinite alternate;
  transition: all 0.3s ease;
}

.hero-text {
  flex: 0 1 500px;
  text-align: left;
}

.hero-text h1:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 30px rgba(50, 205, 50, 0.8));
}

@keyframes glow {
  from { filter: drop-shadow(0 0 5px rgba(50, 205, 50, 0.3)); }
  to { filter: drop-shadow(0 0 20px rgba(50, 205, 50, 0.6)); }
}

.hero-text .about-me {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  padding: 20px 0;
  line-height: 1.7;
  position: relative;
}

.hero-image {
  position: relative;
  text-align: center;
  width: 300px;
  height: 300px;
  margin: 0;
  flex-shrink: 0;
}

.profile-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 4px solid var(--forest-green);
  box-shadow: 
    0 20px 40px rgba(34, 139, 34, 0.4),
    inset 0 0 20px rgba(50, 205, 50, 0.1);
  animation: wildlife-pulse 4s ease-in-out infinite;
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  transform-origin: center center;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 
    0 30px 60px rgba(50, 205, 50, 0.6),
    inset 0 0 40px rgba(34, 139, 34, 0.3);
}

@keyframes wildlife-pulse {
  0%, 100% { 
    box-shadow: 0 20px 40px rgba(34, 139, 34, 0.4), inset 0 0 20px rgba(50, 205, 50, 0.1);
  }
  50% { 
    box-shadow: 0 25px 50px rgba(50, 205, 50, 0.6), inset 0 0 30px rgba(34, 139, 34, 0.2);
  }
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.social-links a {
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, var(--surface), var(--forest-green));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--forest-green);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform-origin: center center;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--leaf-green), var(--forest-green));
  transition: all 0.3s ease;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.social-links a:hover::before {
  width: 100%;
  height: 100%;
}

.social-links a:hover {
  transform: translateY(-5px) scale(1.1) rotate(360deg);
  box-shadow: 0 15px 25px rgba(34, 139, 34, 0.4);
}

/* AI Detector Section */
.ai-detector {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 50%, var(--bg) 100%);
  position: relative;
}

.detector-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
  border-radius: 25px;
  padding: 40px;
  border: 3px solid var(--forest-green);
  box-shadow: 0 20px 40px rgba(34, 139, 34, 0.2);
  position: relative;
  overflow: hidden;
  text-align: center;
  width: 100%;
  max-width: var(--layout-narrow);
  margin: 0 auto;
}

.detector-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="20" fill="none" stroke="%23228b2210" stroke-width="2"><animate attributeName="r" values="20;30;20" dur="3s" repeatCount="indefinite"/></circle></svg>');
  opacity: 0.1;
  animation: pulse-bg 4s ease-in-out infinite;
}

@keyframes pulse-bg {
  0%, 100% { transform: scale(1); opacity: 0.1; }
  50% { transform: scale(1.1); opacity: 0.2; }
}

.api-status {
  background: rgba(50, 205, 50, 0.1);
  border: 2px solid var(--leaf-green);
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
  transition: all 0.3s ease;
}

.api-status.error {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  border-width: 3px;
  color: #ff6b6b;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.api-status.loading {
  background: rgba(255, 140, 0, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.api-status.success {
  background: rgba(50, 205, 50, 0.1);
  border-color: var(--leaf-green);
  color: var(--leaf-green);
}

.detector-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.detector-actions {
  margin-top: 20px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.detector-actions .btn {
  flex: 0 1 auto;
}

.control-group {
  display: flex;
  flex-direction: column;
}

.control-label {
  display: block;
  margin-bottom: 8px;
  color: var(--leaf-green);
  font-weight: 600;
  font-size: 0.9rem;
}

.upload-zone {
  border: 3px dashed var(--forest-green);
  border-radius: 15px;
  padding: 40px;
  margin: 20px 0;
  transition: all 0.3s ease;
  cursor: pointer;
  background: rgba(34, 139, 34, 0.05);
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.upload-zone:hover {
  border-color: var(--leaf-green);
  background: rgba(50, 205, 50, 0.1);
  transform: translateY(-5px);
}

.upload-zone:active {
  transform: translateY(-2px) scale(0.98);
  background: rgba(50, 205, 50, 0.15);
}

.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(255, 140, 0, 0.1);
  transform: scale(1.02);
}

.country-select, .threshold-slider {
  background: var(--surface);
  border: 2px solid var(--forest-green);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.country-select { padding: 12px; }

.country-select option { background: var(--surface) !important; color: var(--text) !important; }
.country-select:focus-visible { outline: 2px solid var(--leaf-green); outline-offset: 2px; }

@-moz-document url-prefix() {
  .country-select { color: var(--text) !important; background-color: var(--surface) !important; }
  .country-select option { color: var(--text) !important; background: var(--surface) !important; }
}
.country-select.changed { box-shadow: 0 0 0 3px rgba(50,205,50,0.25); }

.country-select:hover, .country-select:focus {
  border-color: var(--leaf-green);
  background: rgba(50, 205, 50, 0.1);
  outline: none;
}

.threshold-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--surface);
  border-radius: 5px;
  outline: none;
  padding: 0;
  margin-top: 8px;
}

.threshold-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--leaf-green);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #fff;
}

.threshold-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(50, 205, 50, 0.5);
}

.threshold-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--leaf-green);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}

.custom-cursor, .cursor-trail { pointer-events: none !important; }

.image-container { position: relative; display: inline-block; max-width: 100%; }
#imagePreview { display: block; max-width: 100%; height: auto; }
.image-container { margin: 20px 0; }
.image-container #imagePreview { margin: 0; }
#bboxCanvas { position: absolute; inset: 0; pointer-events: none; }

.bbox-label {
  position: absolute;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 4px;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  z-index: 5;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#imagePreview {
  max-width: 100%;
  max-height: 400px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(34, 139, 34, 0.3);
  transition: all 0.3s ease;
}

#imagePreview:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(34, 139, 34, 0.5);
}

.detection-results {
  background: rgba(50, 205, 50, 0.1);
  border: 2px solid var(--leaf-green);
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
  text-align: left;
  transition: all 0.3s ease;
}

.detection-item {
  background: rgba(34, 139, 34, 0.1);
  padding: 15px;
  margin: 10px 0;
  border-radius: 10px;
  border-left: 4px solid var(--leaf-green);
  transition: all 0.3s ease;
}

.detection-item:hover {
  background: rgba(50, 205, 50, 0.15);
  transform: translateX(5px);
}

/* Skills Section */
.skills {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
  position: relative;
}

.skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="leaves" x="0" y="0" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M20,5 Q30,15 20,25 Q10,15 20,5" fill="%23228b2210"/><path d="M5,20 Q15,30 25,20 Q15,10 5,20" fill="%232d501610"/></pattern></defs><rect width="200" height="200" fill="url(%23leaves)"/></svg>');
  opacity: 0.1;
  animation: drift 30s linear infinite;
}

@keyframes drift {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-40px) translateY(-40px); }
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: var(--text);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  transform-origin: center center;
}

.section-title:hover {
  transform: scale(1.02);
  text-shadow: 0 0 20px rgba(50, 205, 50, 0.5);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  width: 100%;
  max-width: var(--layout-narrow);
  gap: 30px;
  position: relative;
  z-index: 2;
  margin: 0 auto;
}

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

@media (max-width: 600px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

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

.skill-card {
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid var(--forest-green);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform-origin: center center;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(50, 205, 50, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.4s ease;
  transform: rotate(0deg);
}

.skill-card:hover::before {
  opacity: 1;
  transform: rotate(180deg);
}

.skill-card:hover {
  border-color: var(--leaf-green);
  transform: translateY(-15px) scale(1.02) rotate(1deg);
  box-shadow: 0 20px 40px rgba(34, 139, 34, 0.3);
}

.skill-card i {
  font-size: 3rem;
  color: var(--forest-green);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  transform-origin: center center;
}

.skill-card:hover i {
  color: var(--leaf-green);
  transform: scale(1.2) rotate(-5deg);
}

.skill-card h3, .skill-card p {
  position: relative;
  z-index: 2;
}

/* Projects Section */
.projects {
  padding: 80px 0;
  background: var(--bg);
  position: relative;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="%23228b2208"><circle cx="25" cy="25" r="2"><animate attributeName="r" values="2;4;2" dur="4s" repeatCount="indefinite"/></circle><circle cx="75" cy="75" r="3"><animate attributeName="r" values="3;1;3" dur="3s" repeatCount="indefinite"/></circle><circle cx="50" cy="10" r="1.5"><animate attributeName="cy" values="10;90;10" dur="8s" repeatCount="indefinite"/></circle></g></svg>');
  opacity: 0.15;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--layout-max);
  margin: 0 auto;
}

.project-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
  border-radius: 20px;
  padding: 30px;
  border: 2px solid var(--forest-green);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform-origin: center center;
  width: 100%;
  max-width: var(--layout-narrow);
  margin: 0 auto;
}

.project-card.horizontal {
  width: 100%;
}

.project-content {
  display: flex;
  align-items: center;
  gap: 30px;
  width: 100%;
}

.project-text {
  flex: 1;
  min-width: 0;
}


.project-image {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-visual {
  font-size: 4rem;
  background: linear-gradient(135deg, var(--forest-green), var(--leaf-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(50, 205, 50, 0.3));
  transition: all 0.3s ease;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(50, 205, 50, 0.1), 
    rgba(34, 139, 34, 0.1), 
    transparent);
  transition: left 0.6s ease;
}

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

.project-card:hover {
  border-color: var(--leaf-green);
  transform: translateY(-10px) rotate(0.5deg);
  box-shadow: 0 25px 50px rgba(34, 139, 34, 0.25);
}

.project-card:hover .project-visual {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 20px rgba(50, 205, 50, 0.6));
}

/* Blog Post Cards */
.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.blog-posts.loading {
  position: relative;
}

.blog-posts.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: rgba(18, 48, 18, 0.3);
  filter: blur(40px);
  opacity: 0.4;
  pointer-events: none;
}

.blog-post {
  background: rgba(7, 48, 7, 0.75);
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(76, 187, 23, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
}

.blog-post:hover {
  transform: translateY(-6px);
  border-color: rgba(144, 238, 144, 0.6);
  box-shadow: 0 18px 35px rgba(34, 139, 34, 0.25);
}

.blog-post-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(34, 139, 34, 0.2);
  border-bottom: 1px solid rgba(76, 187, 23, 0.25);
  transition: transform 0.4s ease;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-post:hover .blog-post-image img,
.blog-post:hover .blog-post-image::after {
  transform: scale(1.05);
}

.blog-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-post-image--error {
  color: rgba(224, 255, 224, 0.85);
  font-size: 2.4rem;
  background: rgba(139, 0, 0, 0.25);
}

.blog-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 10px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(224, 255, 224, 0.75);
  letter-spacing: 0.02em;
}

.blog-post-meta .author-pill {
  background: rgba(76, 187, 23, 0.25);
  border: 1px solid rgba(144, 238, 144, 0.35);
  color: var(--leaf-green);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.blog-post-title {
  font-weight: 700;
  color: var(--leaf-green);
  line-height: 1.35;
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
  min-height: 2.6rem;
}

.blog-post-excerpt {
  font-size: 0.85rem;
  color: rgba(224, 255, 224, 0.85);
  line-height: 1.5;
  min-height: 3.8rem;
}

.blog-post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-post-tags .tag-pill {
  background: rgba(76, 187, 23, 0.2);
  color: var(--leaf-green);
  border: 1px solid rgba(76, 187, 23, 0.35);
  border-radius: 999px;
  font-size: 0.68rem;
  padding: 3px 8px;
  letter-spacing: 0.01em;
}

.blog-post-meta time {
  font-size: 0.78rem;
  color: rgba(224, 255, 224, 0.65);
}

.blog-post-footer {
  margin-top: auto;
  font-size: 0.75rem;
  color: rgba(224, 255, 224, 0.6);
}

.blog-post--placeholder {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.blog-post--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(18, 48, 18, 0.5) 0%, rgba(76, 187, 23, 0.4) 45%, rgba(18, 48, 18, 0.5) 100%);
  animation: shimmer 1.6s infinite;
  opacity: 0.6;
}

.blog-post--placeholder .blog-post-content,
.blog-post--placeholder .blog-post-image {
  background: rgba(18, 48, 18, 0.8);
}

.blog-post--placeholder .placeholder-bar {
  height: 12px;
  border-radius: 6px;
  background: rgba(34, 139, 34, 0.3);
  width: 100%;
}

.blog-post--placeholder .placeholder-bar.short {
  width: 60%;
}

.blog-post--placeholder .placeholder-bar.tiny {
  width: 40%;
}

.blog-post--placeholder .placeholder-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-post--placeholder .placeholder-tag {
  width: 50px;
  height: 16px;
  border-radius: 999px;
  background: rgba(34, 139, 34, 0.4);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.project-tech {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.tech-tag {
  background: linear-gradient(45deg, var(--forest-green), var(--leaf-green));
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(34, 139, 34, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  transform-origin: center center;
}

.tech-tag:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(50, 205, 50, 0.4);
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--forest-green);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform-origin: center center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--forest-green), var(--leaf-green));
  transition: left 0.3s ease;
  z-index: -1;
}

.btn-primary {
  background: linear-gradient(45deg, var(--forest-green), var(--leaf-green));
  color: white;
  border-color: var(--leaf-green);
}

.btn-secondary {
  background: transparent;
  color: var(--forest-green);
  border-color: var(--forest-green);
}

.btn-secondary::before {
  background: linear-gradient(45deg, var(--forest-green), var(--leaf-green));
}

.btn-secondary:hover {
  color: white;
}

.btn-secondary:hover::before {
  left: 0;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(34, 139, 34, 0.4);
}

/* Secret Project Button */
.secret-project-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 10px 16px;
  background: linear-gradient(45deg, #6a0dad, #8a2be2);
  color: #ffffff;
  text-decoration: none;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  border: 2px solid #8a2be2;
  transition: all 0.2s ease;
  z-index: 999999;
  box-shadow: 0 3px 12px rgba(138, 43, 226, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

.secret-project-btn:hover,
.secret-project-btn:focus {
  transform: translateY(-1px);
  background: linear-gradient(45deg, #8a2be2, #9932cc);
  border-color: #9932cc;
  box-shadow: 0 5px 16px rgba(138, 43, 226, 0.6);
  color: #ffffff;
  text-decoration: none;
}

.secret-project-btn:visited,
.secret-project-btn:active,
.secret-project-btn:link {
  color: #ffffff;
  text-decoration: none;
}

@keyframes pulse-secret {
  0%, 100% { 
    box-shadow: 0 3px 12px rgba(138, 43, 226, 0.4);
  }
  50% { 
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.6);
  }
}

.secret-project-btn {
  animation: pulse-secret 3s ease-in-out infinite;
}

/* Mini Games Dropdown */
.mini-games-dropdown {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 999998;
}

.mini-games-btn {
  padding: 10px 16px;
  background: linear-gradient(45deg, #2d6cdf, #4d8cff);
  color: #ffffff;
  border: 2px solid #4d8cff;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(45, 108, 223, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  white-space: nowrap;
  line-height: 1;
  user-select: none;
}

.mini-games-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(45deg, #4d8cff, #6da3ff);
  border-color: #6da3ff;
  box-shadow: 0 5px 16px rgba(45, 108, 223, 0.6);
}

.mini-games-btn i {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.mini-games-dropdown:hover .mini-games-btn i {
  transform: rotate(180deg);
}

.mini-games-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: rgba(26, 46, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(77, 140, 255, 0.3);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mini-games-dropdown:hover .mini-games-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mini-game-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.mini-game-item:hover {
  background: rgba(77, 140, 255, 0.2);
  color: #4d8cff;
  transform: translateX(4px);
}

.mini-game-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .mini-games-dropdown {
    top: 10px;
    left: 10px;
  }

  .mini-games-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .mini-games-menu {
    min-width: 140px;
  }

  .mini-game-item {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* GitHub Section */
.github-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 50%, var(--surface) 100%);
  position: relative;
}

.github-wide-card {
  /* Remove border to match projects section - clean layout */
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: var(--layout-max);
  margin: 0 auto;
}

.github-wide-card::before {
  /* Remove pseudo-element effects for clean layout */
  display: none;
}

.github-content {
  position: relative;
  z-index: 2;
}

.github-repos {
  /* Remove redundant inner border - parent github-wide-card already has border */
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
}

.repo-section {
  margin-bottom: 40px;
  padding: 20px 30px 20px 20px; /* Add extra right padding */
  border: 2px solid var(--forest-green);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.05) 0%, rgba(27, 94, 32, 0.05) 100%);
}

.repo-section:last-child {
  margin-bottom: 0;
}

.repo-section h4 {
  color: var(--text); /* Changed from var(--leaf-green) to white */
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--forest-green);
  font-size: 1.3rem;
  font-weight: 700;
}

.repo-subsection {
  margin-bottom: 25px;
}

.repo-subsection:last-child {
  margin-bottom: 0;
}

.repo-subsection h5 {
  color: var(--text); /* Changed from var(--leaf-green) to white */
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.9;
}

.repo-separator {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--forest-green), transparent);
  margin-bottom: 20px;
  border-radius: 1px;
}

/* Blog-post style for repositories */
.repo-item.blog-post-style {
  background: rgba(34, 139, 34, 0.1);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid var(--leaf-green);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 10px;
}

.repo-item.blog-post-style:hover {
  background: rgba(50, 205, 50, 0.15);
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(34, 139, 34, 0.2);
}

.repo-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.repo-title {
  font-weight: 600;
  color: var(--leaf-green);
  line-height: 1.3;
  font-size: 0.95rem;
  word-break: break-word; /* Allow long words to break */
  overflow-wrap: break-word; /* Ensure very long words break */
}

.repo-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.repo-meta {
  font-size: 0.75rem;
  color: var(--forest-green);
  font-weight: 600;
}

.repo-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.repo-stars {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.repo-forks {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.repo-forks-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.repo-language {
  font-size: 0.75rem;
  color: var(--forest-green);
  font-weight: 600;
}

.repo-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(34, 139, 34, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  transform-origin: left center;
}

.repo-item:hover {
  background: rgba(50, 205, 50, 0.1);
  padding-left: 15px;
  border-radius: 8px;
  transform: translateX(10px);
}

.repo-item:last-child {
  border-bottom: none;
}

.repo-stars {
  color: var(--accent);
  font-weight: 600;
}

.placeholder-subsection {
  position: relative;
}

.repo-placeholder-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: rgba(34, 139, 34, 0.12);
  border: 1px dashed rgba(50, 205, 50, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  margin: 12px 0 18px;
}

.repo-placeholder-status::before {
  content: '⏳';
  font-size: 0.85rem;
}

.repo-placeholder {
  border-bottom: none !important;
  background: var(--surface);
  border: 1px solid rgba(50, 205, 50, 0.18);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 18px;
  cursor: default;
  pointer-events: none;
  position: relative;
  overflow: hidden;
  transition: none;
}

.repo-placeholder:last-child {
  margin-bottom: 0;
}

.repo-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(240, 248, 232, 0) 0%, rgba(240, 248, 232, 0.18) 50%, rgba(240, 248, 232, 0) 100%);
  transform: translateX(-100%);
  animation: repoPlaceholderShimmer 1.4s ease-in-out infinite;
}

@keyframes repoPlaceholderShimmer {
  100% { transform: translateX(100%); }
}

.repo-placeholder .repo-content {
  gap: 10px;
}

.repo-placeholder .repo-stats {
  gap: 10px;
}

.placeholder-bar {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: rgba(240, 248, 232, 0.08);
}

.placeholder-bar + .placeholder-bar {
  margin-top: 10px;
}

.placeholder-bar--title {
  width: 65%;
  height: 16px;
  background: rgba(240, 248, 232, 0.16);
}

.placeholder-bar--desc {
  width: 90%;
}

.placeholder-bar--meta {
  width: 45%;
  height: 10px;
  margin-top: 12px;
}

.placeholder-pill {
  display: block;
  background: rgba(240, 248, 232, 0.08);
  border-radius: 999px;
}

.placeholder-pill--large {
  width: 72px;
  height: 20px;
  background: rgba(240, 248, 232, 0.16);
}

.placeholder-pill--small {
  width: 48px;
  height: 12px;
}

.repo-fork-icon {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  filter: drop-shadow(0 0 2px rgba(34, 139, 34, 0.35));
}

.loading {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px;
}

/* Lines of Code Counter */
.lines-of-code-container {
  background: transparent;
  border: none;
  padding: 0 8px;
}

.lines-counter {
  margin-bottom: 20px;
  text-align: center;
}

.lines-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--forest-green);
  margin-bottom: 5px;
  transition: all 0.3s ease;
  line-height: 1;
}

.lines-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lines-breakdown {
  --language-tile-min: clamp(90px, 28vw, 130px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--language-tile-min), 1fr));
  gap: clamp(12px, 3vw, 20px);
  margin-top: 12px;
  justify-items: center;
}

/* Contribution-style language tiles */
.language-stat {
  --tile-size: clamp(82px, 22vw, 120px);
  position: relative;
  width: 100%;
  max-width: var(--tile-size);
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(34, 139, 34, 0.25);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.language-stat::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.language-stat:hover {
  transform: scale(1.08);
  border-color: var(--leaf-green);
  box-shadow: 0 6px 18px rgba(34, 139, 34, 0.45);
  z-index: 2;
}

/* Placeholder language stats during loading */
.language-stat.placeholder-lang {
  background: rgba(34, 139, 34, 0.1);
  border-color: rgba(34, 139, 34, 0.18);
  animation: contributionPlaceholderPulse 2.5s ease-in-out infinite;
}

.language-stat.placeholder-lang .language-lines,
.language-stat.placeholder-lang .language-name {
  color: rgba(240, 248, 232, 0.7);
}

/* Contribution color levels */
.language-stat[data-level="0"] {
  background-color: #161b22;
  border-color: #21262d;
}

.language-stat[data-level="1"] {
  background-color: #0e4429;
  border-color: #146338;
}

.language-stat[data-level="2"] {
  background-color: #006d32;
  border-color: #17863f;
}

.language-stat[data-level="3"] {
  background-color: #26a641;
  border-color: #2cc24e;
}

.language-stat[data-level="4"] {
  background-color: #39d353;
  border-color: #49e062;
}

.language-lines {
  font-size: clamp(0.8rem, 1.6vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(12, 18, 12, 0.9);
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.language-name {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(0.55rem, 1.1vw, 0.7rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(240, 248, 232, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.language-stat[data-level="0"] .language-lines,
.language-stat[data-level="0"] .language-name {
  color: var(--text-muted);
  text-shadow: none;
}

.language-stat[data-level="1"] .language-lines,
.language-stat[data-level="2"] .language-lines,
.language-stat[data-level="1"] .language-name,
.language-stat[data-level="2"] .language-name,
.language-stat[data-level="3"] .language-lines,
.language-stat[data-level="3"] .language-name {
  color: rgba(240, 248, 232, 0.92);
}

.language-stat[data-level="4"] .language-lines,
.language-stat[data-level="4"] .language-name {
  color: #083017;
  text-shadow: none;
}

@keyframes placeholderPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

@keyframes completionFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .lines-breakdown {
    --language-tile-min: clamp(78px, 32vw, 120px);
    gap: clamp(10px, 4vw, 16px);
  }

  .language-stat {
    --tile-size: clamp(72px, 26vw, 108px);
  }

  .language-name {
    bottom: 6px;
    font-size: 0.6rem;
  }

  .language-lines {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .lines-breakdown {
    --language-tile-min: clamp(70px, 40vw, 110px);
    gap: clamp(8px, 4vw, 14px);
  }
  
  .language-stat {
    --tile-size: clamp(64px, 34vw, 100px);
  }
  
  .language-name {
    bottom: 5px;
    font-size: 0.55rem;
  }
  
  .language-lines {
    font-size: 0.7rem;
  }
}

/* Completed state - MAXIMUM visibility */

/* GitHub Activity Chart */
.github-activity-chart {
  /* Remove redundant inner border - parent github-wide-card already has border */
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

.contribution-calendar {
  --weeks-count: 53;
  --day-size: clamp(9px, 1.6vw, 16px);
  --day-gap: clamp(2px, 0.7vw, 4px);
  --calendar-min-width: calc(var(--weeks-count) * var(--day-size) + (var(--weeks-count) - 1) * var(--day-gap));
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 200px;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Placeholder calendar during loading */
.placeholder-calendar {
  opacity: 0.7;
}

.placeholder-calendar-skeleton {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  width: 100%;
}

.skeleton-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  animation: placeholderPulse 2s ease-in-out infinite;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-header h4 {
  margin: 0;
  padding-top: calc(var(--day-gap) * 2 + 12px);
  padding-bottom: calc(var(--day-gap) * 2 + 12px);
  padding-left: calc(var(--day-gap) + 2px);
  padding-right: calc(var(--day-gap) * 2 + 9px);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: none;
  padding-bottom: 0;
}

.calendar-header span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.calendar-wrapper {
  display: flex;
  gap: var(--day-gap);
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  padding: 6px 0 0 0;
  position: relative;
}

.day-labels {
  display: grid;
  grid-template-rows: repeat(7, var(--day-size));
  row-gap: var(--day-gap);
  align-content: start;
  padding-top: calc(var(--day-gap) * 2 + 12px);
  padding-bottom: calc(var(--day-gap) * 2 + 12px);
  padding-right: calc(var(--day-gap) + 2px);
  flex-shrink: 0;
}

.day-labels span {
  font-size: clamp(0.55rem, 1vw, 0.75rem);
  color: rgba(240, 248, 232, 0.85);
  text-align: left;
  height: var(--day-size);
  min-height: var(--day-size);
  max-height: var(--day-size);
  width: clamp(30px, calc(var(--day-size) * 2.4), 46px);
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Left-align text inside the label cell */
  padding-left: 4px; /* Nudge text to the left edge for alignment */
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-sizing: border-box;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: var(--day-gap);
  flex: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: calc(var(--day-gap) * 2 + 12px);
  padding-bottom: calc(var(--day-gap) * 2 + 12px);
  padding-left: calc(var(--day-gap) * 2 + 10px);
  padding-right: calc(var(--day-gap) * 2 + 14px);
  margin-bottom: 4px;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 139, 34, 0.55) rgba(34, 139, 34, 0.12);
  -ms-overflow-style: auto;
  --scrollbar-track-opacity: 0;
  --scrollbar-thumb-start: 0%;
  --scrollbar-thumb-end: 100%;
  --scrollbar-thumb-color: rgba(76, 205, 120, 0.95);
  --scrollbar-track-color: rgba(34, 139, 34, 0.22);
  overscroll-behavior-x: contain;
  cursor: grab;
}

.calendar-grid::-webkit-scrollbar {
  height: 8px;
}

.calendar-grid::-webkit-scrollbar-track {
  background: rgba(34, 139, 34, 0.12);
  border-radius: 999px;
}

.calendar-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(34, 139, 34, 0.45), rgba(50, 205, 50, 0.6));
  border-radius: 999px;
}

.calendar-grid.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.calendar-grid.is-dragging .contribution-day {
  pointer-events: none;
}

.calendar-row {
  display: flex;
  gap: var(--day-gap);
  min-width: var(--calendar-min-width);
  width: max-content; /* Ensure each row shows all columns */
  flex-shrink: 0; /* Prevent shrinking */
}

.contribution-day {
  width: var(--day-size);
  height: var(--day-size);
  min-width: var(--day-size);
  min-height: var(--day-size);
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid rgba(34, 139, 34, 0.2);
  transition: all 0.2s ease;
  cursor: pointer;
}

.contribution-day:focus-visible {
  outline: 2px solid rgba(76, 205, 120, 0.55);
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(76, 205, 120, 0.15);
}

.contribution-day.is-selected {
  outline: 2px solid rgba(76, 205, 120, 0.85);
  outline-offset: 1px;
  box-shadow: 0 0 10px rgba(76, 205, 120, 0.35);
  position: relative;
  z-index: 2;
}

/* Placeholder days during loading */
.contribution-day.placeholder-day {
  background: rgba(34, 139, 34, 0.08);
  border: 1px solid rgba(34, 139, 34, 0.15);
  animation: contributionPlaceholderPulse 2.5s ease-in-out infinite;
}

@keyframes contributionPlaceholderPulse {
  0%, 100% { 
    background: rgba(34, 139, 34, 0.05);
    border-color: rgba(34, 139, 34, 0.1);
  }
  50% { 
    background: rgba(34, 139, 34, 0.15);
    border-color: rgba(34, 139, 34, 0.25);
  }
}

/* Loading text for calendar placeholder */
.placeholder-loading-text, .loading-calendar {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 40px 20px;
  animation: placeholderPulse 2s ease-in-out infinite;
}

/* Snake Animation Styles */
.loading-square {
  background: rgba(34, 139, 34, 0.08) !important;
  border: 1px solid rgba(34, 139, 34, 0.15) !important;
  animation: loadingSquarePulse 3s ease-in-out infinite;
}

@keyframes loadingSquarePulse {
  0%, 100% { 
    background: rgba(34, 139, 34, 0.05) !important;
    opacity: 0.5;
  }
  50% { 
    background: rgba(34, 139, 34, 0.12) !important;
    opacity: 0.8;
  }
}

.snake-head {
  background: #32cd32 !important; /* Bright green head */
  border: 2px solid #228b22 !important;
  animation: snakeHeadPulse 0.8s ease-in-out infinite;
  z-index: 10;
  position: relative;
}

@keyframes snakeHeadPulse {
  0%, 100% { 
    background: #32cd32 !important;
    transform: scale(1);
  }
  50% { 
    background: #00ff00 !important;
    transform: scale(1.1);
  }
}

.snake-body {
  background: rgba(50, 205, 50, 0.7) !important;
  border: 1px solid #228b22 !important;
  animation: snakeBodyFade 1.5s ease-out forwards;
}

@keyframes snakeBodyFade {
  0% { 
    background: rgba(50, 205, 50, 0.8) !important;
    opacity: 1;
  }
  100% { 
    background: rgba(50, 205, 50, 0.4) !important;
    opacity: 0.6;
  }
}

.snake-apple {
  background: #ff4444 !important; /* Red apple */
  border: 2px solid #cc0000 !important;
  animation: appleEaten 0.5s ease-in-out;
}

@keyframes appleEaten {
  0% { 
    background: #ff4444 !important;
    transform: scale(1);
  }
  50% { 
    background: #ff0000 !important;
    transform: scale(1.3);
  }
  100% { 
    background: #ff4444 !important;
    transform: scale(1);
  }
}

/* Snake Game Over Overlay */
.snake-game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  z-index: 1000;
  border: 2px solid #ff4444;
}

.game-over-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff4444;
  margin-bottom: 5px;
}

.game-over-subtitle {
  font-size: 0.9rem;
  color: #ccc;
}

.snake-game-over.blinking {
  animation: gameOverBlink 0.3s ease-in-out 6;
}

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

.contribution-day.empty {
  opacity: 0.1; /* Make barely visible for debugging instead of hidden */
  background: rgba(255, 0, 0, 0.1); /* Temporary red tint to see empty squares */
}

.contribution-day:hover {
  border-color: var(--leaf-green);
  transform: scale(1.2);
  z-index: 5;
  position: relative;
  box-shadow: 0 4px 12px rgba(34, 139, 34, 0.4);
}

.contribution-day[data-level="0"] {
  background: rgba(34, 139, 34, 0.1);
}

.contribution-day[data-level="1"] {
  background: rgba(34, 139, 34, 0.3);
}

.contribution-day[data-level="2"] {
  background: rgba(34, 139, 34, 0.5);
}

.contribution-day[data-level="3"] {
  background: rgba(34, 139, 34, 0.7);
}

.contribution-day[data-level="4"] {
  background: rgba(34, 139, 34, 0.9);
}

/* Special styling for today */
.contribution-day[data-is-today="true"] {
  border: 2px solid var(--leaf-green) !important;
  box-shadow: 0 0 6px rgba(50, 205, 50, 0.6);
  animation: todayPulse 2s infinite;
}

/* Game over squares */
.contribution-day.game-over-square {
  background: #ff4444 !important;
  border-color: #ff4444 !important;
  box-shadow: 0 0 10px #ff4444;
  animation: gameOverBlink 0.5s infinite alternate;
  z-index: 10;
}

@keyframes gameOverBlink {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes todayPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(50, 205, 50, 0.6);
  }
  50% {
    box-shadow: 0 0 12px rgba(50, 205, 50, 0.8);
  }
}

.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-colors {
  display: flex;
  gap: 3px;
}

.legend-day {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(34, 139, 34, 0.2);
}

/* Calendar stats section */

.calendar-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  margin: 20px auto 0;
  padding: 16px 14px;
  background: rgba(34, 139, 34, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(34, 139, 34, 0.15);
  width: clamp(280px, 85%, 520px);
}

.calendar-stat {
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(34, 139, 34, 0.2);
  background: rgba(50, 205, 50, 0.08);
  display: grid;
  gap: 6px;
  justify-items: center;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest-green);
  margin-bottom: 2px;
}

.stat-value.highlight {
  color: var(--leaf-green);
  text-shadow: 0 1px 6px rgba(50, 205, 50, 0.3);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .calendar-stats {
    width: min(100%, 540px);
    gap: 14px;
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .contribution-calendar {
    --day-size: clamp(7px, 2.6vw, 13px);
    --day-gap: clamp(2px, 1vw, 3px);
  }

  .calendar-wrapper {
    padding-bottom: 6px;
  }

  .calendar-grid {
    padding-top: calc(var(--day-gap) * 2 + 10px);
    padding-bottom: calc(var(--day-gap) * 2 + 12px);
    padding-left: calc(var(--day-gap) + 2px);
    padding-right: calc(var(--day-gap) * 2 + 6px);
  }

  .day-labels {
    padding-top: calc(var(--day-gap) * 2 + 10px);
    padding-bottom: calc(var(--day-gap) * 2 + 12px);
    padding-right: calc(var(--day-gap) + 2px);
  }

  .lines-breakdown {
    --language-tile-min: clamp(78px, 32vw, 120px);
    gap: clamp(10px, 4vw, 16px);
  }

  .calendar-stats {
    width: min(100%, 480px);
    gap: 12px;
    padding: 16px;
  }

  .day-labels span {
    font-size: clamp(0.5rem, 1.8vw, 0.65rem);
    width: clamp(28px, calc(var(--day-size) * 2.2), 40px);
  }
}

@media (max-width: 480px) {
  .contribution-calendar {
    --day-size: clamp(6px, 3vw, 11px);
    --day-gap: clamp(2px, 1.3vw, 3px);
  }

  .calendar-stats {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
    padding: 14px;
  }

  .calendar-stat {
    padding: 12px;
  }

  .lines-breakdown {
    --language-tile-min: clamp(70px, 40vw, 110px);
  }

  .day-labels span {
    width: clamp(26px, calc(var(--day-size) * 2), 36px);
    font-size: clamp(0.48rem, 3vw, 0.6rem);
    padding-left: 2px;
  }
}

@media (min-width: 1400px) {
  .contribution-calendar {
    --day-size: clamp(10px, 1.6vw, 18px);
    --day-gap: clamp(3px, 0.6vw, 5px);
  }
}

.legend-day[data-level="0"] { background: rgba(34, 139, 34, 0.1); }
.legend-day[data-level="1"] { background: rgba(34, 139, 34, 0.3); }
.legend-day[data-level="2"] { background: rgba(34, 139, 34, 0.5); }
.legend-day[data-level="3"] { background: rgba(34, 139, 34, 0.7); }
.legend-day[data-level="4"] { background: rgba(34, 139, 34, 0.9); }

/* Repository sections styling */
.repo-section {
  margin-bottom: 25px;
}

.repo-section h4 {
  margin-bottom: 15px;
  color: var(--leaf-green);
  font-size: 1.1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(34, 139, 34, 0.3);
}

.repo-section .contribution-calendar .calendar-header h4 {
  color: #ffffff;
  border-bottom: none;
  text-decoration: none;
  padding-bottom: 0;
}

.calendar-stat .stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--leaf-green);
  margin-bottom: 2px;
  font-family: 'Monaco', monospace;
}

.calendar-stat .stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.calendar-fallback {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.calendar-fallback h4 {
  color: var(--leaf-green);
  margin-bottom: 15px;
}

.calendar-fallback a {
  color: var(--leaf-green);
  text-decoration: none;
  display: inline-block;
  padding: 12px 24px;
  background: var(--forest-green);
  color: white;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.calendar-fallback a:hover {
  background: var(--leaf-green);
  transform: translateY(-2px);
}

/* Country Search */
.country-select-wrapper { position: relative; }
.country-search { position: relative; }
.country-search input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--forest-green);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color .25s, background .25s;
}
.country-search input:focus { outline: none; border-color: var(--leaf-green); background: rgba(50,205,50,0.1); }
.country-results {
  list-style: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--surface);
  border: 2px solid var(--forest-green);
  border-radius: 10px;
  margin: 6px 0 0;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 0;
  z-index: 30;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.country-results li { padding: 6px 10px; cursor: pointer; font-size: 0.85rem; display: flex; justify-content: space-between; gap: 10px; }
.country-results li span { opacity: 0.75; font-family: monospace; }
.country-results li:hover, .country-results li.active { background: rgba(50,205,50,0.15); }
.country-results .no-results { text-align: center; color: var(--text-muted); font-style: italic; }

/* Counter Animation */
@keyframes counterComplete {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    cursor: auto;
    overflow-x: hidden;
  }

  .custom-cursor, .cursor-trail {
    display: none;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-text {
    flex: 1 1 auto;
    max-width: 100%;
    text-align: center;
  }

  .hero-image {
    width: 250px;
    height: 250px;
  }

  .profile-img {
    width: 250px;
    height: 250px;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .skill-card {
    padding: 20px; /* Reduce padding on tablet */
  }
  
  .project-card {
    padding: 20px; /* Reduce padding on tablet */
  }
  
  .project-content {
    flex-direction: column;
    text-align: center;
  }

  .project-image {
    order: -1;
    width: 100%;
    margin-bottom: 20px;
  }

  .project-visual {
    font-size: 3rem;
  }

  .blog-posts {
    grid-template-columns: 1fr;
  }

  .detector-controls {
    grid-template-columns: 1fr !important;
  }

  .secret-project-btn {
    top: 15px;
    right: 15px;
    padding: 8px 12px;
    font-size: 11px;
    border-radius: 16px;
    gap: 4px;
    border-width: 1px;
  }

  /* GitHub Section Mobile Fixes */
  .repo-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    word-wrap: break-word;
  }

  .repo-item {
    padding: 15px 0;
    flex-direction: column;
    align-items: center; /* Center items on tablet */
    gap: 10px;
    text-align: center; /* Center text on tablet */
  }

  .repo-item:hover {
    transform: none;
    padding-left: 0;
  }

  .lines-value {
    font-size: 2.5rem;
  }

  .lines-breakdown {
    --language-tile-min: clamp(78px, 32vw, 120px);
    gap: clamp(10px, 4vw, 16px);
  }

  .language-stat {
    --tile-size: clamp(72px, 26vw, 108px);
  }

  .language-name {
    bottom: 6px;
    font-size: 0.6rem;
  }

  .language-lines {
    font-size: 0.75rem;
  }

  .github-activity-chart {
    padding: 15px 0;
  }

  /* Mobile snake game adjustments */
  .game-over-title {
    font-size: 1.2rem;
  }
  
  .game-over-subtitle {
    font-size: 0.8rem;
  }
  
  .snake-game-over {
    padding: 15px 20px;
    font-size: 0.9rem;
  }
  
  .calendar-header {
    order: -2;
    margin-bottom: 15px;
    text-align: center;
  }

  .calendar-header h4 {
    font-size: 1rem;
    margin-bottom: 5px;
  }

  .calendar-legend {
    margin-top: 15px;
    justify-content: center;
  }

  .calendar-stat .stat-value {
    font-size: 1.35rem;
  }

  .calendar-stat .stat-label {
    font-size: 0.7rem;
  }

  .github-wide-card {
    padding: 0; /* Remove extra padding to match other sections */
  }

  .github-repos {
    padding: 0; /* Remove extra padding */
  }

  .lines-of-code-container {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px; /* Reduce mobile padding to match other sections */
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .skill-card {
    padding: 15px; /* Further reduce padding on mobile */
  }
  
  .project-card {
    padding: 15px; /* Further reduce padding on mobile */
  }

  .project-links {
    flex-direction: column;
    align-items: center;
  }

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

  .detector-actions {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .detector-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .secret-project-btn {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    font-size: 10px;
    border-radius: 14px;
    gap: 3px;
    border-width: 1px;
  }

  /* Blog posts mobile fix */
  .blog-post {
    flex-direction: column;
    text-align: left;
    gap: 10px;
  }
  
  .blog-post-image {
    align-self: stretch;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
  }

  .blog-post-image img {
    border-radius: inherit;
  }

  .lines-breakdown {
    --language-tile-min: clamp(70px, 40vw, 110px);
    gap: clamp(8px, 4vw, 14px);
  }
  
  .lines-value {
    font-size: 2rem;
  }

  .calendar-stats {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
    padding: 14px;
    margin-top: 15px;
  }
  
  .calendar-stat {
    padding: 12px;
    text-align: center;
  }
  
  .calendar-stat .stat-value {
    font-size: 1.45rem;
    line-height: 1.2;
  }
  
  .calendar-stat .stat-label {
    font-size: 0.7rem;
    line-height: 1.2;
    word-break: break-word;
  }

  .repo-section {
    margin-bottom: 30px;
    padding: 15px; /* Match other sections' mobile padding */
  }

  .repo-section h4 {
    font-size: 1rem;
    text-align: center;
  }
  
  .repo-item.blog-post-style {
    padding: 12px;
    flex-direction: column;
    gap: 8px;
    text-align: center; /* Center text on mobile */
  }
  
  .repo-item.blog-post-style:hover {
    transform: none; /* Disable hover animation on mobile */
  }
  
  .repo-content {
    width: 100%;
  }
  
  .repo-title {
    font-size: 0.85rem; /* Smaller on mobile */
    word-break: break-word;
    hyphens: auto; /* Enable hyphenation */
  }
  
  .repo-description {
    font-size: 0.75rem; /* Smaller on mobile */
    line-height: 1.3;
  }
  
  .repo-stats {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
  }

  .github-wide-card {
    padding: 0; /* Remove extra padding to match other sections */
    overflow-x: hidden; /* Prevent horizontal overflow */
  }

  .github-repos {
    padding: 0; /* Remove extra padding */
  }
  
  .lines-of-code-container {
    padding: 15px;
    overflow-x: hidden; /* Prevent horizontal overflow */
  }
  
  .lines-breakdown {
    overflow-x: auto; /* Allow horizontal scroll for language stats */
    padding-bottom: 10px;
  }
  
  .github-activity-chart {
    overflow: visible;
    padding-bottom: 0;
  }
}

/* Footer Styles - Now integrated within the last section */
.footer-content {
  text-align: center;
  padding: 40px var(--layout-gutter) 20px;
  margin: 60px auto 0;
  border-top: 1px solid rgba(34, 139, 34, 0.3);
  position: relative;
  width: 100%;
  max-width: var(--layout-max);
}

.footer-content p {
  color: var(--text);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-content p:first-child {
  font-weight: 600;
  color: var(--leaf-green);
  margin-bottom: 8px;
}

.footer-tagline {
  color: var(--text-muted) !important;
  font-style: italic;
  font-size: 0.8rem !important;
}

/* Wildlife Detector Mobile Optimizations */
@media (max-width: 768px) {
  .ai-detector .container {
    padding: 0 15px;
  }
  
  .detector-card {
    padding: 20px;
    margin: 15px 0;
  }
  
  .upload-zone {
    padding: 30px 20px;
    margin: 15px 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  .upload-zone h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  
  .upload-zone p {
    font-size: 0.9rem;
  }
  
  .detector-controls {
    gap: 15px;
  }
  
  .control-group {
    margin-bottom: 15px;
  }
  
  .country-select, .threshold-slider {
    font-size: 0.9rem;
    padding: 8px 10px;
  }
  
  .image-container {
    max-width: 100%;
    margin: 0 auto;
  }
  
  #imagePreview {
    max-width: 100%;
    height: auto;
  }
  
  .detection-results {
    margin-top: 15px;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .detector-card {
    padding: 15px;
    border-radius: 12px;
  }
  
  .upload-zone {
    padding: 25px 15px;
    border-radius: 12px;
  }
  
  .upload-zone h3 {
    font-size: 1rem;
    margin-bottom: 6px;
  }
  
  .upload-zone p {
    font-size: 0.85rem;
  }
  
  .upload-zone i {
    font-size: 2.5rem !important;
  }
  
  .detector-controls {
    flex-direction: column;
    gap: 12px;
  }
  
  .control-group {
    margin-bottom: 12px;
  }
  
  .control-label {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }
  
  .country-select, .threshold-slider {
    font-size: 0.85rem;
    padding: 8px;
  }
  
  .detection-results {
    padding: 12px;
    margin-top: 12px;
  }
  
  .detection-results h4 {
    font-size: 1rem;
    margin-bottom: 8px;
  }
}

/* Mobile Footer Styles */
@media (max-width: 768px) {
  .footer-content {
    padding: 30px var(--layout-gutter) 15px;
    margin: 40px auto 0;
  }
  
  .footer-content p {
    font-size: 0.85rem;
  }
  
  .footer-tagline {
    font-size: 0.75rem !important;
  }
}

@media (max-width: 480px) {
  .footer-content {
    padding: 25px var(--layout-gutter) 15px;
    margin: 30px auto 0;
  }
  
  .footer-content p {
    font-size: 0.8rem;
  }
  
  .footer-tagline {
    font-size: 0.7rem !important;
  }
}

/* Enhanced loading animation for language placeholders */
.language-stat.placeholder-lang.enhanced-loading {
  animation: enhancedPlaceholderPulse 1.8s ease-in-out infinite;
  border-style: solid;
  border-color: rgba(34, 139, 34, 0.3);
}

@keyframes enhancedPlaceholderPulse {
  0%, 100% { 
    background: rgba(50, 205, 50, 0.05);
    border-color: rgba(34, 139, 34, 0.2);
    opacity: 0.4;
  }
  50% { 
    background: rgba(50, 205, 50, 0.15);
    border-color: rgba(34, 139, 34, 0.4);
    opacity: 0.8;
  }
}

