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

:root {
  --bg-color: #030303;
  --text-color: #e0e0e0;
  --accent-color: #0f0;
  --secondary-color: #003300;
  --card-bg: rgba(0, 20, 0, 0.7);
  --font-main: "Share Tech Mono", monospace;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  background: var(--bg-color);
  color: var(--text-color);
  cursor: none;
  overflow-x: hidden;
}

body,
body * {
  cursor: none !important;
}

/* Restore default cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  body,
  body * {
    cursor: auto !important;
  }
  .cursor-trail {
    display: none !important;
  }
}

/* Custom Cursor */
.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.1s ease-out;
  mix-blend-mode: screen;
  box-shadow: 0 0 10px var(--accent-color);
}

/* Background Animation */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.3;
}

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

/* Typography */
h1,
h2,
h3 {
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

h1 {
  font-size: 4rem;
}
h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}
h3 {
  font-size: 1.5rem;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-color);
}

/* Header & Nav */
header {
  background: rgba(3, 3, 3, 0.9);
  backdrop-filter: blur(5px);
  padding: 1.5rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: padding 0.3s;
  border-bottom: 1px solid var(--secondary-color);
}

header.scrolled {
  padding: 1rem 2rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent-color);
  text-shadow: 0 0 5px var(--accent-color);
}

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

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--accent-color);
  margin: 5px 0;
  transition: 0.3s;
}

/* Active Mobile Menu State */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Main Sections */
section {
  padding: 100px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Section */
#home {
  text-align: center;
  height: 65vh;
  min-height: 400px;
  position: relative;
}

.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: var(--accent-color);
  opacity: 0.6;
  transition: opacity 0.3s;
  animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-indicator:hover {
  opacity: 1;
  color: var(--accent-color);
}

/* Profile Picture */
.profile-container {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  object-fit: cover;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.profile-img:hover {
  box-shadow: 0 0 30px rgba(0, 255, 0, 0.6), inset 0 0 20px rgba(0, 255, 0, 0.4);
  transform: scale(1.05);
}

.scroll-text {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: lowercase;
}

.scroll-chevron {
  width: 24px;
  height: 24px;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-chevron svg {
  width: 100%;
  height: 100%;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.typing-text::after {
  content: "|";
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Glitch Effect */
.glitch {
  position: relative;
}

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

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

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

@keyframes glitch-anim {
  0% {
    clip: rect(32px, 9999px, 83px, 0);
  }
  20% {
    clip: rect(6px, 9999px, 87px, 0);
  }
  40% {
    clip: rect(98px, 9999px, 11px, 0);
  }
  60% {
    clip: rect(4px, 9999px, 55px, 0);
  }
  80% {
    clip: rect(58px, 9999px, 78px, 0);
  }
  100% {
    clip: rect(12px, 9999px, 35px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(65px, 9999px, 100px, 0);
  }
  20% {
    clip: rect(3px, 9999px, 35px, 0);
  }
  40% {
    clip: rect(56px, 9999px, 12px, 0);
  }
  60% {
    clip: rect(78px, 9999px, 85px, 0);
  }
  80% {
    clip: rect(16px, 9999px, 4px, 0);
  }
  100% {
    clip: rect(93px, 9999px, 54px, 0);
  }
}

/* Project Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--accent-color);
  padding: 2rem;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px var(--accent-color);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 0, 0.2),
    transparent
  );
  transition: 0.5s;
}

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

/* Skills */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.skill-tag {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  font-size: 1.1rem;
  transition: 0.3s;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.skill-tag:hover {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 0 10px var(--accent-color);
}

/* Experience Timeline */
.timeline {
  border-left: 2px solid var(--accent-color);
  padding-left: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.6rem;
  top: 5px;
  width: 15px;
  height: 15px;
  background: var(--bg-color);
  border: 2px solid var(--accent-color);
  border-radius: 50%;
}

.timeline .date {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.timeline-tag {
  padding: 0.25rem 0.8rem;
  border: 1px solid rgba(0, 255, 0, 0.3);
  color: var(--accent-color);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: 0.3s;
}

.timeline-tag:hover {
  background: rgba(0, 255, 0, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.2);
}

/* Contact */
.contact-info {
  text-align: center;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  font-weight: bold;
  margin-top: 2rem;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-button:hover {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 0 20px var(--accent-color);
}

/* Socials Section */
#socials {
  min-height: auto;
  padding-bottom: 60px;
}

.socials-subtitle {
  text-align: center;
  color: var(--accent-color);
  opacity: 0.7;
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  letter-spacing: 1px;
}

.socials-subtitle::after {
  content: "█";
  animation: blink 1s infinite;
  margin-left: 2px;
}

.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.social-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.8rem 1rem 1.4rem;
  background: rgba(0, 15, 0, 0.6);
  border: 1px solid rgba(0, 255, 0, 0.15);
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  cursor: pointer;
  /* Global blur effect */
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

/* Scanline overlay */
.social-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.015) 2px,
    rgba(0, 255, 0, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Green sweep on hover */
.social-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 0, 0.08),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.social-card:hover::after {
  left: 100%;
}

.social-card:hover {
  border-color: var(--accent-color);
  box-shadow:
    0 0 15px rgba(0, 255, 0, 0.2),
    0 0 30px rgba(0, 255, 0, 0.05),
    inset 0 0 20px rgba(0, 255, 0, 0.03);
  transform: translateY(-4px);
  background: rgba(0, 20, 0, 0.8);
}

.social-icon {
  width: 36px;
  height: 36px;
  color: var(--accent-color);
  transition: all 0.35s ease;
  filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.3));
  position: relative;
  z-index: 2;
}

.social-icon svg {
  width: 100%;
  height: 100%;
}

.social-card:hover .social-icon {
  filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.6));
  transform: scale(1.1);
}

.social-name {
  font-size: 1rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  position: relative;
  z-index: 2;
}

.social-handle {
  font-size: 0.8rem;
  color: rgba(0, 255, 0, 0.45);
  letter-spacing: 1px;
  position: relative;
  z-index: 2;
}

.social-card:hover .social-handle {
  color: rgba(0, 255, 0, 0.7);
}

/* Staggered animation on load */
.social-card:nth-child(1) {
  animation-delay: 0.05s;
}
.social-card:nth-child(2) {
  animation-delay: 0.1s;
}
.social-card:nth-child(3) {
  animation-delay: 0.15s;
}
.social-card:nth-child(4) {
  animation-delay: 0.2s;
}
.social-card:nth-child(5) {
  animation-delay: 0.25s;
}
.social-card:nth-child(6) {
  animation-delay: 0.3s;
}
.social-card:nth-child(7) {
  animation-delay: 0.35s;
}
.social-card:nth-child(8) {
  animation-delay: 0.4s;
}
.social-card:nth-child(9) {
  animation-delay: 0.45s;
}
.social-card:nth-child(10) {
  animation-delay: 0.5s;
}

@keyframes cardFlicker {
  0%,
  100% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  93% {
    opacity: 0.8;
  }
  94% {
    opacity: 1;
  }
  96% {
    opacity: 0.9;
  }
  97% {
    opacity: 1;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: #000;
  border-top: 1px solid var(--secondary-color);
  font-size: 0.9rem;
}

/* Audio Widget */
.audio-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;
  font-family: var(--font-main);
}

.audio-prompt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 15, 0, 0.9);
  border: 1px solid rgba(0, 255, 0, 0.3);
  color: var(--accent-color);
  font-size: 0.75rem;
  letter-spacing: 1px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: promptPulse 2.5s ease-in-out infinite;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.audio-prompt:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.2);
}

.audio-prompt.slide-out {
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
}

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

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: rgba(0, 15, 0, 0.9);
  border: 1px solid rgba(0, 255, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.audio-controls.hidden {
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
}

.audio-controls.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.audio-mute-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: 0.2s;
}

.audio-mute-btn:hover {
  filter: drop-shadow(0 0 6px rgba(0, 255, 0, 0.5));
}

/* Show/hide mute icons */
.audio-mute-btn .icon-muted {
  display: none;
}
.audio-mute-btn.muted .icon-unmuted {
  display: none;
}
.audio-mute-btn.muted .icon-muted {
  display: block;
}

/* Volume Slider */
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(0, 255, 0, 0.2);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.4);
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.4);
  border: none;
  cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    border-left: 1px solid var(--accent-color);
  }

  .nav-links.active {
    right: 0;
  }

  .socials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    padding: 0 0.5rem;
  }

  .social-card,
  .project-card,
  .skill-tag {
    /* Mobile specific adjustments */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    background: rgba(0, 15, 0, 0.85); 
  }

  .social-card {
    padding: 1.2rem 0.6rem 1rem;
  }

  .social-icon {
    width: 28px;
    height: 28px;
  }

  .social-name {
    font-size: 0.75rem;
    letter-spacing: 1px;
  }

  .social-handle {
    font-size: 0.65rem;
  }

  #matrix-canvas {
    opacity: 0.4;
  }

  section {
    padding: 60px 15px;
    min-height: auto;
  }
}
