/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a0a;
  --bg2:      #111111;
  --bg3:      #1a1a1a;
  --accent:   #aaff00;
  --white:    #f0f0f0;
  --muted:    #888;
  --border:   #2a2a2a;
  --font:     'Courier New', Courier, monospace;
  --sans:     'Segoe UI', system-ui, sans-serif;
  --radius:   6px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

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

.accent { color: var(--accent); }
.code-inline {
  font-family: var(--font);
  background: var(--bg3);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85em;
}


/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(170,255,0,0.07); }

.nav-logo {
  font-family: var(--font);
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--transition);
  letter-spacing: 0.5px;
}
.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}


/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(170,255,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(170,255,0,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-tag {
  font-family: var(--font);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 1rem;
}

#hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.1;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  font-family: var(--font);
  font-size: 1.2rem;
  color: var(--muted);
  min-height: 1.8rem;
  margin-bottom: 2.5rem;
}
.hero-sub .accent { color: var(--accent); }

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 2px;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}


/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn.full-width { width: 100%; text-align: center; }


/* ===== SECTIONS ===== */
section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 3rem;
  font-family: var(--font);
}
.section-title .accent {
  margin-right: 0.5rem;
  font-size: 0.75em;
}


/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: #bbb;
  margin-bottom: 1rem;
}
.about-text strong { color: var(--white); }

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-num { font-size: 2rem; font-weight: 800; font-family: var(--font); }
.stat span:last-child { font-size: 0.8rem; color: var(--muted); }

/* Terminal */
.terminal-window {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(170,255,0,0.07);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--muted);
}
.terminal-body {
  padding: 1.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 2;
}
.t-prompt { color: var(--accent); margin-right: 0.5rem; }
.t-output { color: #ccc; margin-left: 1rem; }
.t-output.accent { color: var(--accent); }
.cursor-line { animation: blink 1s step-end infinite; color: var(--accent); }
.blink { animation: blink 1s step-end infinite; }


/* ===== SKILLS ===== */
#skills { background: var(--bg2); }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
}

.skill-cat-title {
  font-family: var(--font);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.skill-item { margin-bottom: 1.25rem; }
.skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 0.4rem;
}
.skill-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #77cc00);
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tag {
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.tag:hover, .tag.small:hover {
  background: var(--accent);
  color: #000;
}
.tag.small {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-color: var(--border);
  color: var(--muted);
}


/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(170,255,0,0.08);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-icon { font-size: 1.75rem; }
.project-links { display: flex; gap: 1rem; }
.icon-link {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color var(--transition);
  font-family: var(--font);
}
.icon-link:hover { color: var(--white); }
.icon-link.accent { color: var(--accent); }

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.project-desc {
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}


/* ===== CONTACT ===== */
#contact { background: var(--bg2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-lead {
  color: #bbb;
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-icon {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: bold;
  min-width: 24px;
  text-align: center;
}
.contact-link {
  color: #ccc;
  transition: color var(--transition);
  font-size: 0.95rem;
}
.contact-link:hover { color: var(--accent); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 1px;
}
.form-group input,
.form-group textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #555; }

.form-feedback {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2rem;
}


/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-family: var(--font);
}


/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); padding: 1rem 2rem 2rem; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .about-grid,
  .skills-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .about-stats { gap: 1rem; }
  #hero h1 { font-size: 2.2rem; }
}
