/* =========================
   GLOBAL SAFETY FIX
   ========================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* CSS Variables for Theming */
:root {
  /* Light theme colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-elevated: #ffffff;
  --bg-canvas: #ffffff;

  --text-primary: #000000;
  --text-secondary: #333333;
  --text-tertiary: #666666;
  --text-muted: rgba(0, 0, 0, 0.7);

  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-strong: rgba(0, 0, 0, 0.2);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);

  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-scrolled: rgba(255, 255, 255, 0.98);
  --navbar-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);

  --footer-bg: #000000;
  --footer-text: #ffffff;

  --canvas-opacity-base: 0.2;
  --canvas-opacity-hover: 0.3;
  --canvas-opacity-max: 0.35;

  --loader-border: rgba(0, 0, 0, 0.1);
  --loader-border-top: #000000;

  --accent-blue: #0ea5e9;
  --accent-blue-glow: rgba(14, 165, 233, 0.4);

  --link-color: #0ea5e9;
  --link-hover: #0284c7;
}

/* Dark theme colors */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-elevated: #2a2a2a;
  --bg-canvas: #0a0a0a;

  --text-primary: #e5e5e5;
  --text-secondary: #b0b0b0;
  --text-tertiary: #808080;
  --text-muted: rgba(255, 255, 255, 0.6);

  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-strong: rgba(255, 255, 255, 0.2);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);

  --navbar-bg: rgba(26, 26, 26, 0.95);
  --navbar-scrolled: rgba(26, 26, 26, 0.98);
  --navbar-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);

  --footer-bg: #0a0a0a;
  --footer-text: #e5e5e5;

  --canvas-opacity-base: 0.3;
  --canvas-opacity-hover: 0.4;
  --canvas-opacity-max: 0.5;

  --loader-border: rgba(255, 255, 255, 0.1);
  --loader-border-top: #ffffff;

  --accent-blue: #38bdf8;
  --accent-blue-glow: rgba(56, 189, 248, 0.4);

  --link-color: #93c5fd;
  --link-hover: #bfdbfe;
}

/* Dark mode: make eye icon visible */
[data-theme="dark"] .toggle-password img {
  filter: invert(1);
}

/* Fix low-contrast status text in dark mode */
[data-theme="dark"] .github-status {
  color: #e5e7eb !important;
}

/* Reset and Base Styles */
@font-face {
  font-family: "OriginTech";
  src: url("assets/fonts/OriginTech.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Researcher";
  src: url("assets/fonts/researcher.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Eightgon";
  src: url("assets/fonts/Eightgon.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/pressstart2p/v15/e3t4euO8T-267oIAQAu6jDQyK3nVivNm4I81PtXkUo8.woff2)
    format("woff2");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Researcher", "OriginTech", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Content wrapper takes remaining space */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Canvas Container - 3D Background */
.canvas-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-canvas);
  transition: background-color 0.3s ease;
}

#three-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: var(--canvas-opacity-base);
  transition: opacity 0.3s ease;
}

#three-canvas:hover {
  opacity: var(--canvas-opacity-hover);
}

/* Auth user dropdown */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-button {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 4px 6px;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-block;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.user-email {
  margin-right: 6px;
  display: none;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 160px;
  z-index: 200;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
}


/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 6px;
  border-radius: 8px;
}

.theme-toggle:hover {
  background: var(--border-color);
  transform: scale(1.05);
}

.theme-toggle:focus {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  fill: none;
  transition: all 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

/* Language Switcher */
.lang-switcher {
  position: relative;
  margin: 0 10px;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: var(--border-color);
  border-color: var(--border-color-strong);
}

.lang-code {
  font-family: "OriginTech", sans-serif;
  letter-spacing: 1px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 8px;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown li {
  margin: 2px 0;
}

.lang-dropdown a {
  display: block;
  padding: 8px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95em;
  transition: all 0.2s ease;
}

.lang-dropdown a:hover {
  background: var(--border-color);
  color: var(--accent-blue);
}

.lang-dropdown a.active {
  background: var(--accent-blue-glow);
  color: var(--accent-blue);
  font-weight: 600;
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav-container {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .mini-3d {
  right: auto;
  left: -80px;
}

[dir="rtl"] .hero-buttons {
  flex-direction: row-reverse;
}

[dir="rtl"] .ri-arrow-right-line {
  transform: rotate(180deg);
}

[dir="rtl"] .ri-arrow-left-line {
  transform: rotate(180deg);
}

[dir="rtl"] .logo-text {
  letter-spacing: normal;
}

[dir="rtl"] .field-group label {
  text-align: right;
  display: block;
}

[dir="rtl"] .btn i {
  margin-left: 8px;
  margin-right: 0;
}

[dir="rtl"] .metric-card {
  text-align: right;
}

[dir="rtl"] .metric-icon {
  margin-left: 12px;
  margin-right: 0;
}

[dir="rtl"] .card-header h3 {
  text-align: right;
}

[dir="rtl"] .footer-content {
  text-align: right;
}

[dir="rtl"] .footer-brand p {
  text-align: right;
}

/* Fix for icons and text order in RTL */
[dir="rtl"] .btn {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-btn {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-btn i:first-child {
  margin-left: 0;
  margin-right: 0;
}

[dir="rtl"] .lang-code {
  margin: 0 4px;
}

/* Animations for language switch */
.lang-switching {
  pointer-events: none;
}

.lang-switching .content {
  opacity: 0.5;
  filter: blur(2px);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  margin-bottom: 40px;
}

.title-line {
  display: block;
  font-size: 1.4em;
  font-weight: 400;
  margin-bottom: 15px;
  opacity: 0.8;
  letter-spacing: 1px;
  /* color: #f0ebeb; */
  font-family: monospace;
  overflow: hidden; 
  border-right: .15em solid rgb(227, 222, 213); 
  white-space: nowrap;  
  width: 0; /* Start hidden */
  animation: 
    typing 3.5s steps(30, end) forwards,
    blink-caret .75s step-end infinite;
}

@keyframes typing {
  from { width:0 }
  to { width:100% } /* Animates to the full width of the text */
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: rgb(56, 46, 26); }
}


.title-main {
  display: block;
  font-size: 5em;
  font-weight: bold;
  letter-spacing: 6px;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #000000, #333333);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* When using the logo image instead of text */
.title-main--logo {
  background: none;
  -webkit-text-fill-color: initial;
  letter-spacing: 0;
}

.title-logo-img {
  height: 64px;
  width: auto;
  display: inline-block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
  transition: filter 0.3s ease;
}

/* Improve hero logo visibility in dark mode */
[data-theme="dark"] .title-logo-img {
  filter: brightness(0) invert(1)
    drop-shadow(0 2px 6px rgba(255, 255, 255, 0.15));
}

.title-subtitle {
  display: block;
  font-size: 1.6em;
  font-weight: 300;
  opacity: 0.7;
  margin-top: 10px;
}

/* Light blue accent with subtle glow */
.accent-glow {
  color: var(--accent-blue);
  text-shadow:
    0 0 6px var(--accent-blue-glow),
    0 0 12px var(--accent-blue-glow);
  font-weight: 600;
}

.hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  opacity: 0.8;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 30px;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Smooth transitions for interactive elements only */
button,
a,
.card,
.repo-item,
.dropdown-item {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

/* Enhanced step numbers */
.step-number::before {
  transition:
    width 0.3s ease,
    height 0.3s ease;
}

/* Mobile responsiveness fix */
@media (max-width: 768px) {
  .hero-title {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .github-form .field-group,
  .github-form .btn,
  .github-status {
    grid-column: span 1;
    width: 100%;
  }
}

/* Scroll to top button */
#scrollTopBtn {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

#scrollTopBtn:hover {
  transform: translateY(-4px);
}

#scrollTopBtn:active {
  transform: translateY(-1px);
}

/* Auth error */
.auth-error {
  display: none;
  background-color: #fdecea;
  color: #b71c1c;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 4px;
  font-size: 14px;
}

.card-body {
  padding: 16px;
}

a:hover {
  color: var(--link-hover);
}

/* Repo and activity links have specific styling */
.repo-name a,
.activity-item a {
  color: var(--link-color);
  text-decoration: none;
}

.repo-name a:hover,
.activity-item a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Projects Section */
/* GitHub Dashboard */
.github-section {
  background: transparent;
  /* allow 3D background to show through */
}

.github-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  /* anchor for floating 3D */
}

.mini-3d {
  width: 400px;
  height: 400px;
  position: absolute;
  /* float over header */
  top: -90px;
  /* move further up toward the corner */
  right: -80px;
  /* move further right toward the edge */
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: transparent;
  pointer-events: none;
  /* purely decorative */
}






.mini-3d canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.78;
  transition: opacity 0.3s ease;
}

.mini-3d:hover canvas {
  opacity: 0.88;
}

.mini-3d-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.9em;
  color: rgba(0, 0, 0, 0.6);
}

@media (max-width: 900px) {
  .github-header {
    flex-direction: column;
  }

  .mini-3d {
    position: relative;
    width: 100%;
    height: 240px;
    top: auto;
    right: auto;
  }
}

.github-form {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 60px;
  align-items: end;
  margin-bottom: 30px;
}

.github-form .field-group {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.github-form label {
  font-weight: 600;
}

.github-form input[type="text"],
.github-form input[type="password"] {
  padding: 12px 14px;
  border: 1px solid var(--border-color-strong);
  border-radius: 8px;
  outline: none;
  font-size: 0.95em;
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Community form fields */
.github-form select,
.github-form input[type="number"],
.github-form input[type="url"],
.github-form input[type="date"] {
  padding: 12px 14px;
  border: 1px solid var(--border-color-strong);
  border-radius: 8px;
  outline: none;
  font-size: 0.95em;
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.github-form input:focus {
  border-color: var(--text-primary);
}

.github-form .btn {
  grid-column: span 2;
  width: 100%;
}

.github-form .remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  opacity: 0.8;
}

.github-form .field-hint,
.muted {
  font-size: 0.85em;
  opacity: 0.7;
}

.muted.small {
  font-size: 0.8em;
}

.github-status {
  grid-column: 1 / -1;
  min-height: 1.2em;
}

.github-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.card {
  grid-column: span 6;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.card.profile-card {
  grid-column: span 5;
}

.card.contributions-card {
  grid-column: span 7;
}

.card.repos-card {
  grid-column: span 7;
}

.card.activity-card {
  grid-column: span 5;
}

.card-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.card-body {
  padding: 16px;
}


.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  margin-right: 14px;
}

.profile-row {
  display: flex;
  align-items: center;
}

.profile-name {
  font-size: 1.2em;
  font-weight: 700;
}

.profile-login {
  opacity: 0.7;
  margin-top: 2px;
}

.profile-bio {
  margin-top: 8px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.profile-stats span {
  font-weight: 700;
  font-size: 1.1em;
  display: block;
}

.profile-stats label {
  font-size: 0.85em;
  opacity: 0.7;
}

.repo-list {
  display: grid;
  gap: 12px;
}

.repo-item {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.repo-name {
  font-weight: 700;
}

.repo-meta {
  display: flex;
  gap: 12px;
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: 6px;
}

.repo-desc {
  margin-top: 6px;
}

.activity-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.activity-item {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.activity-time {
  opacity: 0.7;
  font-size: 0.85em;
}

.contrib-svg {
  min-height: 140px;
  display: grid;
  place-items: center;
}

/* Responsive layout for GitHub grid */
@media (max-width: 1024px) {
  .card {
    grid-column: span 12;
  }

  .card.profile-card,
  .card.contributions-card,
  .card.repos-card,
  .card.activity-card {
    grid-column: span 12;
  }
}

/* --- UPDATED MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  .github-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .github-form .field-group,
  .github-form .btn,
  .github-status {
    grid-column: span 1;
    width: 100%;
  }

  .github-form .btn {
    max-width: none;
    align-self: stretch;
  }

  /* Fix for the Map getting cut off or being too tall */
  #graph-wrap {
    height: 400px !important;
  }

  #graph-legend {
    font-size: 10px;
    padding: 6px;
    top: 8px;
    right: 8px;
  }
}

  .title-main {
    font-size: 2.5em;
    letter-spacing: 2px;
  }

  .title-logo-img {
    height: 44px;
  }

  .title-subtitle {
    font-size: 1.1em;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .section-title {
    font-size: 2em;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contribute-steps {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-methods {
    gap: 15px;
  }

  .contact-method {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }


@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  .title-main {
    font-size: 2em;
  }

  .hero-description {
    font-size: 1em;
  }

  .title-logo-img {
    height: 36px;
  }

  .section-title {
    font-size: 1.8em;
  }

  .project-card,
  .step {
    padding: 20px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scrolling offset for fixed navbar */
section {
  scroll-margin-top: 70px;
}

/* Additional polish and micro-interactions */
.navbar.scrolled {
  background: var(--navbar-scrolled);
  box-shadow: var(--navbar-shadow);
}

/* Enhanced button hover effects */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Improved focus states for accessibility */
.btn:focus,
.nav-link:focus {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Loading animation improvements */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.loading-screen p {
  animation: pulse 2s ease-in-out infinite;
}

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.3s ease;
}

.github-section {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 24px;
}

.card.trending-card {
  background-color: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 24px;
}

.github-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.field-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
}

.field-group input,
.field-group select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  transition: border 0.2s;
}

.field-group input:focus,
.field-group select:focus {
  border-color: #3b82f6;
  outline: none;
}

.form-buttons {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.repo-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.repo-card {
  background-color: var(--card-bg, #f9f9f9);
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.repo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.repo-card h4 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
}

.repo-card p {
  font-size: 0.9rem;
  color: #555;
}

.placeholder-text {
  text-align: center;
  color: #888;
  font-style: italic;
}
main {
  padding-top: 100px; /* adjust based on navbar height + some spacing */
}

/* Enhanced project card interactions */
.project-card {
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 15px;
}

.project-card:hover::before {
  opacity: 1;
}

/* Enhanced step numbers */
.step-number {
  position: relative;
  overflow: hidden;
}

.step-number::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.step:hover .step-number::before {
  width: 100%;
  height: 100%;
}

/* Improved contact method interactions */
.contact-method {
  position: relative;
}

.contact-method::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.contact-method:hover::before {
  opacity: 1;
}

.cursor-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background-color: #a4c7e4;
}

/* Default behavior (desktop & tablet) */
.hero-title {
  white-space: nowrap;
}

/* Mobile responsiveness fix */
@media (max-width: 768px) {
  .hero-title {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

#scrollTopBtn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: #000;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: none;
  z-index: 999;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}

#scrollTopBtn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  background: #000;
  color: #fff;
  border-color: #000;
}

#scrollTopBtn:active {
  transform: translateY(-1px);
}

/* Dark mode */
body.dark #scrollTopBtn {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

body.dark #scrollTopBtn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* Recommendation Grid Layout */
#rec-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

#rec-list .repo-card {
  height: auto;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  box-shadow: none;
  padding: 15px 0 15px 30px;
  color: #fff;
}

#rec-list .repo-desc {
  flex-grow: 1;
  margin-bottom: 10px;
  opacity: 0.9;
  line-height: 1.4;
}

#rec-list .repo-header {
  border-bottom: none;
  padding: 0 0 5px 0;
}

[data-theme="dark"] .github-status {
  color: #e5e7eb !important;
}


/* ===================================
   FOOTER STYLES - BLACK THEME
   =================================== */
.footer {
  background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
  color: #e0e0e0;
  padding: 60px 20px 20px;
  margin-top: 100px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

[data-theme="light"] .footer {
  background: #000000;
  color: #f5f5f5;
  border-top-color: rgba(255, 255, 255, 0.15);
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Footer Content Grid */
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

/* Brand Column */
.footer-brand {
  grid-column: span 1;
  animation: fadeInUp 0.6s ease-out;
}

.footer-logo,
.footer-brand .logo-text {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 2px;
  font-family: "Press Start 2P", monospace;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
  display: block;
}

.footer-logo:hover,
.footer-brand .logo-text:hover {
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
  cursor: pointer;
}

.footer-tagline,
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  margin-top: 10px;
  opacity: 0.8;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.nav-more {
  position: relative;
}

.more-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.more-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg, #fff);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 220px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1000;
}

.more-menu li {
  list-style: none;
}

.more-menu .nav-link {
  display: block;
  padding: 10px 16px;
  white-space: nowrap;
}

.more-menu .nav-link:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* Show dropdown on hover (desktop) */
.nav-more:hover .more-menu {
  display: block;
}

.btn-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap; /* 🔥 This prevents line breaks */
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 80px; /* ensures enough width */
}

.btn-signin:hover {
  background: #000;
  color: #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.8;
  }
}

[data-theme="light"] .footer-tagline,
[data-theme="light"] .footer-brand p {
  color: #e0e0e0;
}

/* Social Icons with Enhanced Animations */
.footer-social,
.footer-socials {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.footer-social a,
.footer-socials a,
.footer-socials a:link,
.footer-socials a:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  animation: slideIn 0.5s ease-out backwards;
  animation-delay: calc(var(--i) * 0.1s);
}

.footer-social a:nth-child(1),
.footer-socials a:nth-child(1) {
  --i: 1;
}
.footer-social a:nth-child(2),
.footer-socials a:nth-child(2) {
  --i: 2;
}
.footer-social a:nth-child(3),
.footer-socials a:nth-child(3) {
  --i: 3;
}
.footer-social a:nth-child(4),
.footer-socials a:nth-child(4) {
  --i: 4;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.footer-social a::before,
.footer-socials a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.5s ease,
    height 0.5s ease;
}

.footer-social a:hover::before,
.footer-socials a:hover::before {
  width: 100px;
  height: 100px;
}

.footer-social a:hover,
.footer-socials a:hover,
.footer-socials a:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-6px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

.footer-social a svg,
.footer-socials a svg,
.footer-socials a i {
  width: 22px;
  height: 22px;
  font-size: 22px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
}

.footer-social a:hover svg,
.footer-socials a:hover svg,
.footer-socials a:hover i {
  transform: scale(1.2) rotate(360deg);
}

/* Footer Columns with Stagger Animation */
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.6s ease-out backwards;
}

.footer-column:nth-child(2) {
  animation-delay: 0.1s;
}
.footer-column:nth-child(3) {
  animation-delay: 0.2s;
}
.footer-column:nth-child(4) {
  animation-delay: 0.3s;
}

.footer-heading {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #fff;
  transition: width 0.4s ease;
}

.footer-column:hover .footer-heading::after {
  width: 60px;
}

/* Footer Links - Vertical Stacking with Enhanced Animations */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links li {
  margin-bottom: 0;
  opacity: 0;
  animation: fadeInLeft 0.5s ease-out forwards;
}

.footer-links li:nth-child(1) {
  animation-delay: 0.4s;
}
.footer-links li:nth-child(2) {
  animation-delay: 0.5s;
}
.footer-links li:nth-child(3) {
  animation-delay: 0.6s;
}
.footer-links li:nth-child(4) {
  animation-delay: 0.7s;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.footer-links a {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  line-height: 1.6;
  position: relative;
  padding-left: 0;
}

.footer-links a::before {
  content: "→";
  position: absolute;
  left: -20px;
  opacity: 0;
  transition: all 0.3s ease;
}

.footer-links a:hover::before {
  left: -15px;
  opacity: 1;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(8px);
  padding-left: 8px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .footer-links a {
  color: #b0b0b0;
}

[data-theme="light"] .footer-links a:hover {
  color: #fff;
}

/* Footer Bottom with Animation */
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  animation: fadeIn 1s ease-out 0.8s both;
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-bottom:hover p {
  opacity: 1;
}

.footer-bottom-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-bottom-links a {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.7;
  transition: all 0.3s ease;
  position: relative;
}

.footer-bottom-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

.footer-bottom-links a:hover::after {
  width: 100%;
}

.footer-bottom-links a:hover {
  color: #fff;
  opacity: 1;
  transform: translateY(-2px);
}

.separator {
  opacity: 0.4;
  font-size: 13px;
  animation: pulse 2s ease-in-out infinite;
}

/* Remove old footer-label styling if it exists */
.footer-label {
  display: none;
}

/* Responsive Animations */
@media (max-width: 1200px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 40px 20px 20px;
    margin-top: 60px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-brand {
    grid-column: span 1;
    text-align: center;
  }

  .footer-social,
  .footer-socials {
    justify-content: center;
  }

  .footer-column {
    text-align: center;
  }

  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links a::before {
    display: none;
  }

  .footer-links a:hover {
    transform: scale(1.05);
    padding-left: 0;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-logo,
  .footer-brand .logo-text {
    font-size: 20px;
  }

  .footer-tagline,
  .footer-brand p {
    font-size: 12px;
  }

  .footer-heading {
    font-size: 12px;
  }

  .footer-links a {
    font-size: 12px;
  }
}

.btn-primary {
  display: inline-block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.45);
  filter: brightness(1.1);
   color: #ffffff;
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.4);
}