/* ===== Variables ===== */
:root {
  --bg: #0a0a0c;
  --bg-card: #12121a;
  --surface: #16161f;
  --text: #e8e6e3;
  --text-muted: #8b8b9a;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { max-width: 100%; height: auto; }

/* ===== Noise overlay ===== */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* ===== Container ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--header-h) 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-dim) 0%, transparent 55%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

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

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1.35rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-desc {
  max-width: 520px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 170, 0.35);
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}

/* ===== Section titles ===== */
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

/* ===== About ===== */
.about {
  padding: 5rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.about-lead {
  font-size: 1.2rem;
  color: var(--text) !important;
}

.about-text strong {
  color: var(--accent);
}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  min-width: 180px;
  text-align: center;
}

.about-stat {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}

.about-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Skills ===== */
.skills {
  padding: 5rem 0;
  background: var(--surface);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Experience timeline ===== */
.experience {
  padding: 5rem 0;
}

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin: 0.25rem 0 0.2rem;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-content p:last-child {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== Projects ===== */
.projects {
  padding: 5rem 0;
  background: var(--surface);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-label {
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Contact ===== */
.contact {
  padding: 5rem 0;
}

.contact-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
}

.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-icon {
  font-size: 1.1rem;
}

/* ===== Footer ===== */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle span {
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-visual {
    order: -1;
  }

  .about-card {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

  .btn { width: 100%; }

  .contact-links {
    flex-direction: column;
  }
}
