:root {
  --primary: #00ff00;
  --background: #0a0a0a;
  --text: #00ff00;
  --secondary-bg: #1a1a1a;
  --glitch-color: #ff0000;
}

[data-theme="dark"] {
  --primary: #0f0;
  --background: #000;
  --text: #0f0;
  --secondary-bg: #111;
  --glitch-color: #f00;
}

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

@keyframes glitch {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 2px) }
  40% { transform: translate(-2px, -2px) }
  60% { transform: translate(2px, 2px) }
  80% { transform: translate(2px, -2px) }
  100% { transform: translate(0) }
}

@keyframes scanline {
  0% { transform: translateY(-100%) }
  100% { transform: translateY(100%) }
}

body {
  font-family: 'Courier New', monospace;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  position: relative;
  text-shadow: 0 0 5px var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(0, 255, 0, 0.15);
  animation: scanline 6s linear infinite;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  background-color: var(--background);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

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

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  position: relative;
}

.nav-links a:hover {
  animation: glitch 0.3s linear infinite;
}

.nav-links a::before {
  content: ">";
  margin-right: 5px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1.5rem;
}

#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
}

.hero-content {
  max-width: 600px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: glitch 5s infinite;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--text);
  text-decoration: none;
  border: 2px solid var(--text);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background-color: var(--text);
  color: var(--background);
  animation: glitch 0.3s infinite;
}

section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

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

.project-card {
  background-color: var(--secondary-bg);
  border: 1px solid var(--text);
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  animation: glitch 0.3s infinite;
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.skill-item {
  background: var(--secondary-bg);
  padding: 2rem;
  border: 1px solid var(--text);
  position: relative;
  overflow: hidden;
}

.skill-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  animation: glitch 2s infinite;
}

.skill-item i {
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 1rem;
  display: inline-block;
}

.skill-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.skill-item p {
  font-size: 0.9rem;
  opacity: 0.8;
  font-family: 'Courier New', monospace;
}

.skill-item:hover {
  animation: glitch 0.3s infinite;
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.certification-item {
  background: var(--secondary-bg);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.certification-item:hover {
  transform: translateY(-5px);
}

.certification-item i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.certification-item h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.cert-issuer {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.cert-domain {
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.cert-date {
  color: var(--text);
  opacity: 0.6;
  font-size: 0.9rem;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--text);
  background-color: var(--background);
  color: var(--text);
  font-family: 'Courier New', monospace;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--text);
}

footer {
  text-align: center;
  padding: 2rem 0;
  background-color: var(--secondary-bg);
}

/* Timeline Section */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    height: calc(100% - 4rem);
    background: var(--primary);
    left: 50%;
    top: 2rem;
    opacity: 0.3;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: calc(50% + 2rem);
    padding-left: 2rem;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: calc(50% + 2rem);
    padding-right: 2rem;
    text-align: right;
}

.timeline-content {
    position: relative;
    width: calc(50% - 4rem);
    background: var(--secondary-bg);
    padding: 1.5rem;
    border-radius: 8px;
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 3px solid var(--background);
    box-shadow: 0 0 0 1px var(--primary);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    left: -3rem;
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: -3rem;
}

.year {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--secondary-bg);
    color: var(--primary);
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    border: 1px solid var(--primary);
}

.timeline-content h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--text);
    opacity: 0.8;
    line-height: 1.6;
}

/* Timeline Hover Effects */
.timeline-item:hover .timeline-content::before {
    transform: scale(1.3);
    transition: transform 0.3s ease;
}

.timeline-item:hover .year {
    background: var(--primary);
    color: var(--background);
    transition: all 0.3s ease;
}

/* Timeline Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        justify-content: flex-start !important;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0 0 0 60px;
        padding: 1rem;
        text-align: left;
        width: calc(100% - 60px);
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -38px;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
}
