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

:root {
  --bg: #0a0a0f;
  --bg-alt: #0f0f17;
  --surface: #151520;
  --surface-hover: #1a1a28;
  --border: rgba(100, 255, 218, 0.08);
  --text: #c8cdd5;
  --text-bright: #e8ecf1;
  --text-muted: #5a6270;
  --accent: #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.12);
  --purple: #a78bfa;
  --blue: #60a5fa;
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Particle Canvas ===== */
#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Glow Orbs ===== */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.glow-orb--1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -200px; }
.glow-orb--2 { width: 500px; height: 500px; background: var(--purple); bottom: -150px; left: -150px; }
.glow-orb--3 { width: 400px; height: 400px; background: var(--blue); top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav--scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  display: flex; justify-content: space-between; align-items: center;
}
.nav__logo {
  font-family: var(--mono); font-size: 1rem; font-weight: 500;
  color: var(--accent); text-decoration: none; letter-spacing: 0.05em;
}
.nav__logo::before { content: '> '; opacity: 0.4; }
.nav__links { display: flex; gap: 2rem; align-items: center; }
.nav__link {
  color: var(--text-muted); text-decoration: none;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 400;
  letter-spacing: 0.02em; transition: color 0.3s ease;
  position: relative;
}
.nav__link::before {
  content: attr(data-index);
  color: var(--accent); margin-right: 0.4rem; font-size: 0.7rem; opacity: 0.6;
}
.nav__link:hover { color: var(--accent); }
.nav__lang {
  color: var(--accent); text-decoration: none;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.1em; padding: 0.3rem 0.8rem;
  border: 1px solid rgba(100,255,218,0.25); border-radius: 4px;
  transition: all 0.3s ease; cursor: pointer; background: none;
}
.nav__lang:hover { background: var(--accent-dim); box-shadow: 0 0 20px rgba(100,255,218,0.1); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); transition: all 0.3s ease; border-radius: 1px; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: left; padding: 6rem 2rem;
  position: relative; z-index: 1;
}
.hero__content { max-width: 750px; }

.hero__terminal {
  font-family: var(--mono); font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem;
}
.hero__terminal-dots {
  display: flex; gap: 5px; margin-right: 0.75rem;
}
.hero__terminal-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.hero__terminal-dots span:nth-child(1) { background: #ff5f57; }
.hero__terminal-dots span:nth-child(2) { background: #febc2e; }
.hero__terminal-dots span:nth-child(3) { background: #28c840; }

.hero__greeting {
  font-family: var(--mono); font-size: 1rem; color: var(--accent);
  font-weight: 400; letter-spacing: 0.03em; margin-bottom: 1.25rem;
  opacity: 0; animation: fadeUp 0.6s 0.3s forwards;
}

.hero__name {
  font-size: clamp(2.75rem, 7vw, 4.5rem); font-weight: 700;
  color: #ffffff; letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 0.5rem;
  opacity: 0; animation: fadeUp 0.6s 0.5s forwards;
}
.hero__name-accent {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-family: var(--mono); font-size: 0.9rem; color: var(--text-muted);
  font-weight: 300; letter-spacing: 0.02em; margin-bottom: 1.75rem;
  opacity: 0; animation: fadeUp 0.6s 0.7s forwards;
}
.hero__tagline .sep { color: var(--accent); opacity: 0.4; margin: 0 0.3rem; }

.hero__subtitle {
  font-size: 1.05rem; color: var(--text); font-weight: 300;
  line-height: 1.9; margin-bottom: 2.5rem; max-width: 550px;
  opacity: 0; animation: fadeUp 0.6s 0.9s forwards;
}

.hero__actions {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.6s 1.1s forwards;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.75rem; text-decoration: none;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.03em; border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.btn--primary {
  color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent);
}
.btn--primary:hover {
  box-shadow: 0 0 30px rgba(100,255,218,0.25);
  transform: translateY(-2px);
}
.btn--outline {
  color: var(--accent); background: transparent;
  border: 1px solid rgba(100,255,218,0.3);
}
.btn--outline:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ===== Scroll indicator ===== */
.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  opacity: 0; animation: fadeIn 1s 1.5s forwards;
}
.scroll-indicator__line {
  width: 1px; height: 50px; background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
.scroll-indicator__text {
  font-family: var(--mono); font-size: 0.65rem; color: var(--text-muted);
  letter-spacing: 0.15em; text-transform: uppercase;
}

/* ===== Sections ===== */
.section {
  padding: 8rem 2rem; position: relative; z-index: 1;
}
.section--alt { background: var(--bg-alt); }
.section__inner { max-width: 800px; margin: 0 auto; }

.section__label {
  font-family: var(--mono); font-size: 0.8rem; color: var(--accent);
  letter-spacing: 0.05em; margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section__label::after {
  content: ''; flex: 1; height: 1px; max-width: 200px;
  background: linear-gradient(to right, var(--border), transparent);
}
.section__title {
  font-size: 2rem; font-weight: 600; color: #ffffff;
  letter-spacing: -0.02em; margin-bottom: 2rem;
}
.section__text {
  font-size: 1.05rem; color: var(--text-muted); font-weight: 300;
  line-height: 1.9; margin-bottom: 2rem;
}

/* ===== Skill Tags ===== */
.skills {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem;
}
.skill-tag {
  font-family: var(--mono); font-size: 0.75rem; color: var(--accent);
  background: var(--accent-dim); padding: 0.4rem 1rem;
  border-radius: 100px; border: 1px solid rgba(100,255,218,0.1);
  transition: all 0.3s ease; cursor: default;
}
.skill-tag:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(100,255,218,0.08);
  transform: translateY(-1px);
}

/* ===== Contact Card ===== */
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 3rem; text-align: center;
  transition: all 0.4s ease;
}
.contact-card:hover {
  border-color: rgba(100,255,218,0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

/* ===== Contact Form ===== */
.contact-form {
  max-width: 480px; margin: 2rem auto 0; text-align: left;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-family: var(--mono); font-size: 0.75rem;
  color: var(--text-muted); letter-spacing: 0.03em; margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-family: var(--font);
  font-size: 0.9rem; transition: all 0.3s ease; outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(100,255,218,0.4);
  box-shadow: 0 0 0 3px rgba(100,255,218,0.06);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted); opacity: 0.5;
}
.form-group textarea { min-height: 120px; }
.form-actions {
  display: flex; justify-content: center; margin-top: 1.5rem;
}
.form-status {
  text-align: center; margin-top: 1rem;
  font-family: var(--mono); font-size: 0.8rem;
}
.form-status--success { color: var(--accent); }
.form-status--error { color: #ff5f57; }

/* ===== Footer ===== */
.footer {
  padding: 3rem 2rem; border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.footer__inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer p {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--text-muted); font-weight: 300;
}
.footer__code {
  margin-top: 0.5rem; color: rgba(100,255,218,0.3);
  font-family: var(--mono); font-size: 0.65rem;
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ===== Cursor blink ===== */
.cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--accent); margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .nav__links {
    position: fixed; top: 0; right: -100%;
    width: 75%; max-width: 300px; height: 100vh;
    background: var(--surface); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center;
    gap: 2rem; transition: right 0.3s ease; padding: 2rem;
    border-left: 1px solid var(--border);
  }
  .nav__links.open { right: 0; }
  .nav__toggle { display: flex; }
  .hero { text-align: center; padding: 5rem 1.5rem; }
  .hero__content { display: flex; flex-direction: column; align-items: center; }
  .hero__name { font-size: 2.25rem; }
  .hero__tagline { font-size: 0.8rem; }
  .hero__actions { justify-content: center; }
  .section { padding: 5rem 1.5rem; }
  .section__label { justify-content: center; }
  .section__label::after { display: none; }
  .skills { justify-content: center; }
  .contact-card { padding: 2rem; }
  .glow-orb { display: none; }
}
