* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /*cursor: url('cursor.png'), auto; */
}

body {
  font-family: 'Roboto Mono', monospace;
  background-color: #000;
  color: #00ff99;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

canvas#binary-rain {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 20px #00ff99;
  position: sticky;
  top: 0;
  z-index: 999;
}

.logo {
  font-size: 2.5rem;
  font-weight: 900;
  color: #00ff99;
  position: relative;
  letter-spacing: 0.12em;
  user-select: none;
}

.logo.glitch::before,
.logo.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  color: #00ff99;
  background: black;
  user-select: none;
  mix-blend-mode: screen;
}

.logo.glitch::before {
  animation: glitchTop 2s infinite linear;
  top: -3px;
  left: 2px;
  color: #00fff2;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
  opacity: 0.85;
}

.logo.glitch::after {
  animation: glitchBottom 2s infinite linear;
  top: 3px;
  left: -2px;
  color: #00ff66;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  opacity: 0.85;
}

@keyframes glitchTop {
  0%, 20%, 40%, 60%, 80%, 100% { clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%); }
  10%, 30%, 50%, 70%, 90% { clip-path: polygon(0 5%, 100% 0, 100% 45%, 0 45%); }
}

@keyframes glitchBottom {
  0%, 20%, 40%, 60%, 80%, 100% { clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%); }
  10%, 30%, 50%, 70%, 90% { clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%); }
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav-links li {
  display: inline-block;
  margin-left: 30px;
}

.nav-links a {
  font-weight: 700;
  font-size: 1.1rem;
  color: #00ff99;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  user-select: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #00fff2;
  text-shadow: 0 0 12px #00fff2, 0 0 20px #00fff2;
  outline: none;
}

.hero {
  max-width: 900px;
  margin: 80px auto 120px;
  padding: 0 20px;
  text-align: center;
  user-select: text;
}

.profile-pic {
  width: 180px;
  height:180px;
  border-radius: 50%;
  border: 3px solid #00ff99;
  box-shadow:
    0 0 15px #00ff99,
    inset 0 0 10px #00ff99;
  margin: 0 auto 30px;
  object-fit: cover;
  user-select: none;
}

.hero-text h1 {
  font-size: 3.8rem;
  font-weight: 900;
  color: #00ff99;
  text-shadow:
    0 0 15px #00ff99,
    0 0 30px #00fff2,
    0 0 40px #00fff2;
  margin-bottom: 15px;
}

.hero-text h1 .glitch.stable {
  cursor: default;
  color: #00fff2;
  text-shadow:
    0 0 30px #00fff2,
    0 0 40px #00fff2,
    0 0 60px #00fff2;
}

.hero-text p {
  font-size: 1.4rem;
  font-weight: 600;
  color: #00ffc2;
  line-height: 1.5;
  max-width: 650px;
  margin: 0 auto 12px;
}

.section {
  max-width: 720px;
  margin: 0 auto 80px;
  padding: 60px 30px;
  border-top: 1.5px solid #00ff99;
  user-select: text;
}

.section h2 {
  font-size: 2.6rem;
  font-weight: 900;
  color: #00fff2;
  margin-bottom: 36px;
  text-align: center;
  text-shadow: 0 0 20px #00fff2;
}

.card {
  background-color: rgba(0, 20, 0, 0.95);
  border: 2px solid #00ff99;
  border-radius: 16px;
  padding: 30px 40px;
  margin: 25px auto 45px;
  max-width: 620px;
  box-shadow:
    0 0 40px #00ff99,
    inset 0 0 25px #00ff99;
  color: #00ff99;
  transition: box-shadow 0.3s ease;
  user-select: text;
  overflow-wrap: break-word;   /* Fix long text overflow */
  word-break: break-word;
}

.card:hover {
  box-shadow:
    0 0 55px #00fff2,
    inset 0 0 35px #00fff2;
}

.card h3 {
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 1.7rem;
  text-shadow: 0 0 15px #00ff99;
}

.card a {
  color: #00fff2;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  user-select: text;
  overflow-wrap: break-word;   /* Fix long links overflow */
  word-break: break-word;
}

.card a:hover,
.card a:focus {
  color: #00ff99;
  text-shadow: 0 0 25px #00ff99;
  outline: none;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 35px;
}

.social-links a img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  filter: drop-shadow(0 0 8px #00ff99);
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.social-links a:hover img,
.social-links a:focus img {
  transform: scale(1.25);
  filter: drop-shadow(0 0 18px #00fff2);
  outline: none;
}

footer {
  text-align: center;
  padding: 36px 0;
  color: #00ff99;
  font-weight: 700;
  letter-spacing: 0.07em;
  border-top: 2px solid #00ff99;
  user-select: none;
}

.terminal-section {
  max-width: 720px;
  margin: 40px auto 100px;
  padding: 30px 40px;
  background-color: rgba(0, 40, 0, 0.95);
  border-radius: 18px;
  border: 3px solid #00ff99;
  box-shadow:
    0 0 50px #00ff99,
    inset 0 0 30px #00ff99;
  font-family: 'Roboto Mono', monospace;
  user-select: text;
}

.terminal {
  display: flex;
  flex-direction: column;
  height: 370px;
  background-color: #001a00;
  border-radius: 14px;
  padding: 25px 30px;
  box-shadow: inset 0 0 22px #00ff99;
  overflow-y: auto;
  color: #00ff99;
  font-size: 1.15rem;
  line-height: 1.6;
  outline: none;
}

.terminal-output {
  flex-grow: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding-right: 12px;
  user-select: text;
  caret-color: transparent;
}

.terminal-input {
  display: flex;
  align-items: center;
  margin-top: 15px;
  gap: 14px;
}

.prompt {
  font-weight: 900;
  font-size: 1.4rem;
  color: #00fff2;
  user-select: none;
}

#terminal-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  border-bottom: 3px solid #00ff99;
  color: #00ff99;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.3rem;
  padding: 8px 14px;
  outline: none;
  caret-color: #00fff2;
  user-select: text;
}

#terminal-input::placeholder {
  color: #00ff9977;
}

.terminal::-webkit-scrollbar,
.terminal-output::-webkit-scrollbar {
  width: 11px;
}

.terminal::-webkit-scrollbar-thumb,
.terminal-output::-webkit-scrollbar-thumb {
  background-color: #00ff9966;
  border-radius: 9px;
}

.terminal::-webkit-scrollbar-track,
.terminal-output::-webkit-scrollbar-track {
  background-color: transparent;
}

.contact-form {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid #0f0;
  box-shadow: 0 0 15px #0f0;
  font-family: 'Roboto Mono', monospace;
}

.contact-form label {
  display: block;
  margin-bottom: 15px;
  color: #0f0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  background: black;
  border: 1px solid #0f0;
  color: #0f0;
  font-family: 'Roboto Mono', monospace;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #00ffcc;
  box-shadow: 0 0 10px #00ffcc;
}

.glitch-btn {
  display: inline-block;
  padding: 10px 20px;
  background: black;
  color: #0f0;
  border: 1px solid #0f0;
  cursor: pointer;
  font-size: 1.1em;
  position: relative;
  text-transform: uppercase;
}

.glitch-btn::before,
.glitch-btn::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  background: black;
  color: #0f0;
}

.glitch-btn::before {
  animation: glitchTop 2s infinite linear;
  top: -2px;
}

.glitch-btn::after {
  animation: glitchBottom 2s infinite linear;
  top: 2px;
}

.glitch-btn:hover {
  border-color: #00ffcc;
  color: #00ffcc;
}

@keyframes glitchTop {
  0%, 100% { clip: rect(0, 900px, 0, 0); }
  10% { clip: rect(0, 900px, 10px, 0); }
}

@keyframes glitchBottom {
  0%, 100% { clip: rect(0, 900px, 0, 0); }
  10% { clip: rect(10px, 900px, 20px, 0); }
}

/* Hamburger menu styles */
.hamburger {
  display: none;
}

/* Responsive Navbar & Hamburger */
@media (max-width: 1024px) {
  .navbar {
    position: relative;
  }

  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    background: rgba(0,0,0,0.95);
    width: 220px;
    padding: 18px 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px #00ff99;
    display: none;
    z-index: 1000;
  }
  .nav-links.show {
    display: flex;
  }
  .nav-links li {
    margin: 12px 0;
    text-align: left;
    margin-left: 24px;
    margin-right: 0;
  }

  /* Hamburger icon fix */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    position: absolute;
    top: 18px; /* move up to avoid logo overlap */
    left: 18px;
    z-index: 1100;
  }
  .hamburger span {
    display: block;
    height: 6px; /* thinner bars */
    width: 32px;
    background: #00ff99; /* bright green for visibility */
    border-radius: 4px;
    transition: all 0.3s;
  }
  .hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  /* Add space between hamburger and logo */
  .logo {
    margin-left: 56px;
  }
}

/* Mobile-specific project links fix */
@media (max-width: 768px) {
  .projects .project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .projects .project-links a {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    text-align: center;
    white-space: normal;
    word-break: break-word;
  }
}  
