/* Global */
:root {
  --bg: #0d0d0d;
  --text: #c5c6c7;
  --accent: #00ff41;
  --accent2: #0ff;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Code Pro', monospace;
  overflow-x: hidden;
}

/* Particle background */
#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Cursor trail */
.cursor-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  animation: fadeOut 0.5s forwards;
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 100;
  background: rgba(0, 0, 0, 0.5);
}
nav .logo {
  font-size: 1.2rem;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}
nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
nav ul li a {
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: all 0.3s;
}
nav ul li a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
nav ul li a:hover::after {
  width: 100%;
}
/* Hamburger */
nav .hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
nav .hamburger div {
  width: 25px;
  height: 3px;
  background: var(--text);
  margin: 4px;
}

/* Header */
header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 4rem;
}
header h1 {
  font-size: 3rem;
  color: var(--accent);
}
header .typed-wrap {
  margin-top: 1rem;
  display: inline-flex;
  align-items: baseline;
}
header .typed-text {
  font-size: 1.5rem;
  color: var(--text);
  white-space: nowrap;
}

/* Align Typed.js cursor with the text */
/* Terminal-style block cursor for Typed.js */
.typed-cursor {
  display: inline-block;
  width: 0.6ch;
  height: 1em;
  margin-left: 2px;
  background: var(--text);
  color: transparent; /* hide the default '|' */
  line-height: 1em;
  vertical-align: baseline;
  animation: cursorBlockBlink 1s steps(1, end) infinite !important;
}
@keyframes cursorBlockBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 10px var(--accent);
}

/* Sections */
section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
section h2 {
  font-size: 2rem;
  color: var(--accent);
  position: relative;
  margin-bottom: 2rem;
}
section h2::after {
  content: '';
  width: 50px;
  height: 3px;
  background: var(--accent2);
  position: absolute;
  bottom: -10px;
  left: 0;
}

/* About */
#about p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Skills */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.8rem;
}
.skills-list li {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1rem;
  border-radius: 4px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent2);
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-item h3 {
  margin-bottom: 0.3rem;
  color: var(--accent);
  font-size: 1.2rem;
}
.timeline-item span {
  font-size: 0.9rem;
  color: var(--accent2);
}
.timeline-item ul {
  margin-top: 0.5rem;
  list-style: disc;
  padding-left: 1.2rem;
  line-height: 1.5;
}

/* Projects */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px var(--accent);
}
.card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}
.card h3 a {
  color: var(--accent);
  text-decoration: none;
}
.card p {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Lists inside project cards */
.card ul {
  margin: 0.6rem 0 0 1.2rem;
  line-height: 1.4;
}
.card ul li {
  margin-bottom: 0.3rem;
}

/* Publications */
.publications-list {
  list-style: none;
  padding-left: 0;
}
.publications-list li {
  margin-bottom: 0.8rem;
}
.publications-list a {
  color: var(--accent);
  text-decoration: none;
}

/* Contact */
#contact .contact-item {
  display: inline-block;
  margin-bottom: 0.5rem;
}
#contact a {
  color: var(--accent);
  text-decoration: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.8rem;
  color: var(--accent2);
  background: rgba(0, 0, 0, 0.5);
  margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    flex-direction: column;
    padding: 1rem;
    border-radius: 8px;
  }
  nav .hamburger {
    display: flex;
  }
  nav ul.show {
    display: flex;
  }
  header h1 {
    font-size: 2.5rem;
  }
}
/* List styles for coursework, interests, and achievements */
.coursework-list,
.achievements-list,
.interests-list {
  list-style: disc inside;
  line-height: 1.6;
  margin: 1rem 0;
}
