/* Premium Minimalist Styles */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --accent: #ffffff;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge */
}

*::-webkit-scrollbar {
  display: none;                /* Chrome / Safari / Opera */
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: transparent; /* Changed for Three.js canvas */
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  max-width: 100vw;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg-primary); /* Canvas handles the dark background now */
}

body.loading {
  overflow: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 3rem;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.subsection-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

.mt-4 {
  margin-top: 4rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  padding: 10rem 0;
}

@media (max-width: 480px) {
  .section { padding: 6rem 0; }
  .section-title { margin-bottom: 2rem; }
  .hero-title { font-size: clamp(3rem, 12vw, 8rem); }
}

/* Custom Cursor — hidden on touch devices */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.3s, width 0.3s, height 0.3s, background-color 0.3s;
}

@media (hover: none) or (pointer: coarse) {
  .cursor, .cursor-follower { display: none; }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1s cubic-bezier(0.86, 0, 0.07, 1);
}

.loading-content {
  width: 300px;
  text-align: center;
}

.loading-name {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  overflow: hidden;
}

.loading-bar-wrapper {
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.loading-percentage {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: padding 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: 1rem 5%;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Hamburger Button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .navbar {
    background: transparent;
  }
  .navbar.scrolled {
    background: rgba(10, 10, 10, 0.8);
  }

  .nav-hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 25vh;
    align-items: center;
    gap: 3rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1; /* Place it under the navbar elements but inside the fixed navbar */
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.5rem;
    letter-spacing: 0.2em;
  }
}

.nav-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
  position: relative;
}

/* CSS Glitch Effect */
.glitch {
  position: relative;
  display: inline-block;
}

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

.glitch:hover::before {
  left: 2px;
  text-shadow: -1px 0 rgba(255,0,0,0.8);
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch:hover::after {
  left: -2px;
  text-shadow: -1px 0 rgba(0,255,255,0.8);
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(10px, 9999px, 86px, 0); }
  5% { clip: rect(65px, 9999px, 81px, 0); }
  10% { clip: rect(89px, 9999px, 60px, 0); }
  15% { clip: rect(98px, 9999px, 6px, 0); }
  20% { clip: rect(84px, 9999px, 89px, 0); }
  25% { clip: rect(9px, 9999px, 50px, 0); }
  30% { clip: rect(4px, 9999px, 66px, 0); }
  35% { clip: rect(38px, 9999px, 82px, 0); }
  40% { clip: rect(83px, 9999px, 68px, 0); }
  45% { clip: rect(85px, 9999px, 99px, 0); }
  50% { clip: rect(32px, 9999px, 32px, 0); }
  55% { clip: rect(83px, 9999px, 53px, 0); }
  60% { clip: rect(97px, 9999px, 3px, 0); }
  65% { clip: rect(13px, 9999px, 61px, 0); }
  70% { clip: rect(20px, 9999px, 4px, 0); }
  75% { clip: rect(41px, 9999px, 73px, 0); }
  80% { clip: rect(2px, 9999px, 63px, 0); }
  85% { clip: rect(6px, 9999px, 15px, 0); }
  90% { clip: rect(16px, 9999px, 78px, 0); }
  95% { clip: rect(79px, 9999px, 17px, 0); }
  100% { clip: rect(62px, 9999px, 90px, 0); }
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

/* Hero */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 6rem; /* Account for navbar */
}

@media (max-width: 900px) {
  .hero-section {
    padding-top: 10rem; /* More space for stacked mobile navbar */
  }
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 3rem;
  }
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  filter: grayscale(100%) brightness(0.9);
  transition: filter 0.5s ease, border-color 0.5s ease;
  z-index: 2;
  position: relative;
}

.hero-image:hover {
  filter: grayscale(0%) brightness(1.1);
  border-color: rgba(255,255,255,0.3);
}

/* Subtle glow behind image */
.hero-image-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.15) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.hero-terminal {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2.5vw, 1.25rem);
  color: #34d399; /* Green hacker color */
  background: rgba(0,0,0,0.6);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  border: 1px solid rgba(52, 211, 153, 0.2);
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  word-break: break-all;
}

@media (max-width: 900px) {
  .hero-terminal {
    margin: 0 auto;
  }
}

.hero-terminal .prompt {
  color: var(--text-secondary);
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

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

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 5%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mouse {
  width: 20px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  position: relative;
}

.mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: var(--text-primary);
  border-radius: 2px;
  animation: scroll 1.5s infinite;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

@keyframes scroll {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 8px); opacity: 0; }
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
}

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

.about-text {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 300;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  perspective: 1200px;
}

/* 3D Skill Cards */
.skill-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: translateZ(0);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.45s ease,
              box-shadow 0.45s ease;
  will-change: transform;
}

/* Animated gradient top-border accent */
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, rgba(255,255,255,0.4)), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-card:hover::before {
  opacity: 1;
}

/* Subtle inner glow on hover */
.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 0%, var(--card-glow, rgba(255,255,255,0.04)) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.skill-card:hover::after {
  opacity: 1;
}

.skill-card:hover {
  transform: translateY(-8px) rotateX(4deg) scale(1.02);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5),
              0 0 0 1px rgba(255,255,255,0.04),
              inset 0 1px 0 rgba(255,255,255,0.08);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.skill-icon {
  font-size: 1.5rem;
}

.skill-category {
  font-weight: 500;
  font-size: 1.25rem;
}

.skill-items {
  list-style: none;
}

.skill-items li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-items li::before {
  content: '→';
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Tech Stack Marquee */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  width: 100%;
  max-width: 100vw;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 80s linear infinite;
  flex-shrink: 0;
  will-change: transform;
}

.marquee-item {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  font-family: var(--font-mono);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.2);
  text-transform: uppercase;
  transition: color 0.3s, -webkit-text-stroke-color 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.marquee-item:hover {
  color: var(--text-primary);
  -webkit-text-stroke-color: transparent;
  transform: scale(1.05);
}

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

/* Expertise Showcase */
.expertise-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  max-width: 600px;
}

.expertise-cards {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.exp-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.exp-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.exp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}

.exp-card:hover::before {
  transform: translateX(100%);
}

.exp-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.exp-title {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 1rem;
}

.exp-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 800px;
}

.exp-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  background: rgba(0,0,0,0.3);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  max-width: 100%;
  overflow-wrap: break-word;
}

.exp-flow .arr {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .exp-card { padding: 2rem; }
  .exp-title { font-size: 1.5rem; }
}

/* Projects */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease;
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

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

.project-info {
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 300;
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

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

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.project-link {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent);
  transition: opacity 0.3s;
}

.project-link:hover {
  opacity: 0.7;
}

.project-visual {
  background: var(--bg-secondary);
  aspect-ratio: 16/9;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 5rem;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: brightness(0.8) grayscale(50%);
}

.project-card:hover .project-img {
  transform: scale(1.05);
  filter: brightness(0.6) grayscale(0%);
}

.project-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  text-decoration: none;
}

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

.view-project-btn {
  padding: 0.8rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.project-card:hover .view-project-btn {
  transform: translateY(0);
}

.project-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%);
}

/* Contact */
.contact-section {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-content {
  max-width: 800px;
}

.contact-text {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 4rem;
  line-height: 1.4;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.1rem, 4vw, 4rem);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
  position: relative;
  word-break: break-all;
  max-width: 100%;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-socials {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-social-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

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

/* Magnetic Utility */
.magnetic {
  display: inline-block;
  cursor: pointer;
  /* padding to increase hit area without affecting layout visually */
}

/* Skills Terminal Game */
.skills-game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4rem 0;
  min-height: 250px;
}

.skills-terminal {
  width: 100%;
  max-width: 650px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  font-family: var(--font-mono);
  transition: transform 0.3s;
}

.skills-terminal:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.4);
}

.skills-term-header {
  background: #1a1a1a;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.skills-term-dots {
  display: flex;
  gap: 8px;
}

.skills-term-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}

.skills-term-dots span:nth-child(1) { background: #ff5f56; }
.skills-term-dots span:nth-child(2) { background: #ffbd2e; }
.skills-term-dots span:nth-child(3) { background: #27c93f; }

.skills-term-body {
  padding: 1.5rem;
  min-height: 200px;
  font-size: 0.95rem;
  color: #34d399; /* Hack green */
  display: flex;
  flex-direction: column;
  position: relative;
}

.skills-term-output p {
  margin: 0;
  opacity: 0;
  animation: typeLines 0.1s forwards;
}

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

.skills-term-intro {
  text-align: center;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.matrix-text {
  color: #ff4a4a;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 1px;
  animation: pulse-red 3s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 0.9; text-shadow: 0 0 8px rgba(255, 74, 74, 0.4); }
  50% { opacity: 0.6; text-shadow: 0 0 0px transparent; }
}

.matrix-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cyber-btn {
  background: transparent;
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #34d399;
  font-family: var(--font-mono);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
  border-radius: 4px;
}

.cyber-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: rgba(52, 211, 153, 0.1);
  transition: left 0.4s ease;
  z-index: -1;
}

.cyber-btn:hover::before { left: 0; }
.cyber-btn:hover {
  border-color: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

.cyber-btn.text-red {
  border-color: rgba(255, 74, 74, 0.5);
  color: #ff4a4a;
}
.cyber-btn.text-red::before {
  background: rgba(255, 74, 74, 0.1);
}
.cyber-btn.text-red:hover {
  border-color: #ff4a4a;
  box-shadow: 0 0 10px rgba(255, 74, 74, 0.3);
}

.cyber-progress-container {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

.cyber-progress-bar {
  height: 100%;
  width: 0%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  transition: width 0.1s linear, background-color 0.3s, box-shadow 0.3s;
}

.skills-grid.revealed {
  display: grid !important;
  opacity: 1 !important;
}

/* Scroll To Top Progress Button */
.progress-wrap {
  position: fixed;
  right: 30px;
  bottom: 30px;
  height: 46px;
  width: 46px;
  cursor: pointer;
  display: block;
  border-radius: 50px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 200ms linear;
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
}

.progress-wrap.active-progress {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.progress-wrap::after {
  position: absolute;
  content: '↑';
  text-align: center;
  line-height: 46px;
  font-size: 20px;
  color: var(--text-primary);
  left: 0;
  top: 0;
  height: 46px;
  width: 46px;
  cursor: pointer;
  display: block;
  z-index: 1;
  transition: all 200ms linear;
}

.progress-wrap:hover::after {
  color: #34d399; /* Hack green */
  transform: translateY(-3px);
}

.progress-wrap svg path {
  fill: none;
}

.progress-wrap svg.progress-circle path {
  stroke: var(--accent);
  stroke-width: 4;
  box-sizing: border-box;
  transition: all 200ms linear;
}

@media (max-width: 768px) {
  .progress-wrap {
    right: 20px;
    bottom: 20px;
  }
}

/* Base styles for a tag nav brand */
.nav-brand {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: inline-block;
  transform-origin: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

