/* ─── TOKENS ─────────────────────────────────────────────────── */
:root {
  --cyan: #00d4d8;
  --cyan-dim: #00a8ab;
  --cyan-glow: rgba(0, 212, 216, 0.15);
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-panel: #16161f;
  --border: rgba(0, 212, 216, 0.2);
  --text: #f0f0f5;
  --muted: #888899;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: var(--cyan);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
}

/* ─── NAV ────────────────────────────────────────────────────── */
nav {
  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, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--cyan);
  text-decoration: none;
}

/* Hamburger Button Component */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}
.hamburger {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  background: var(--cyan);
  transition: background 0.2s ease-in-out;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--cyan);
  transition:
    transform 0.2s ease-in-out,
    top 0.2s ease-in-out;
}
.hamburger::before {
  top: -6px;
}
.hamburger::after {
  top: 6px;
}

/* ─── HERO ───────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 4rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 30%,
    transparent 100%
  );
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(0, 212, 216, 0.12) 0%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.hero-name span {
  color: var(--cyan);
}
.hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  height: 2rem;
  min-width: 0;
  overflow: hidden;
}
.hero-title-label {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--muted);
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--cyan);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  flex-shrink: 0;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero-bio {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  width: 100%;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--cyan);
  color: #0a0a0f;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  transition:
    background 0.2s,
    transform 0.15s;
}
.btn-primary:hover {
  background: var(--cyan-dim);
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  transition:
    border-color 0.2s,
    color 0.2s,
    transform 0.15s;
}
.btn-outline:hover {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Hero right - avatar + stat chips */
.hero-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}
.avatar-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  margin-bottom: 2rem;
}
.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  opacity: 0.6;
}
.avatar-ring-2 {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(20%);
  border: 3px solid var(--bg-card);
}
.avatar-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--cyan);
  color: #0a0a0f;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
}
.hero-stats {
  display: flex;
  gap: 1rem;
}
.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.25rem;
  text-align: center;
}
.stat-chip .val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
  display: block;
}
.stat-chip .label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── SECTION BASE ───────────────────────────────────────────── */
section {
  padding: 6rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--cyan);
  border-radius: 2px;
}

/* ─── EXPERIENCE ─────────────────────────────────────────────── */
#experience {
  position: relative;
}
.exp-track {
  position: relative;
  padding-left: 2.5rem;
}
.exp-track::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
}
.exp-item {
  position: relative;
  margin-bottom: 3rem;
}
.exp-item::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow:
    0 0 0 4px var(--bg),
    0 0 0 5px var(--border);
}
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.exp-card:hover {
  border-color: var(--cyan);
  transform: translateX(4px);
}
.exp-company {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.exp-role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.exp-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.exp-meta span {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.exp-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── SKILLS ─────────────────────────────────────────────────── */
#skills {
  background: var(--bg-panel);
  max-width: 100%;
  padding: 6rem 4rem;
}
#skills .inner {
  max-width: 1200px;
  margin: 0 auto;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.skill-card:hover {
  border-color: var(--cyan);
}
.skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.skill-icon {
  width: 38px;
  height: 38px;
  background: var(--cyan-glow);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  flex-shrink: 0;
}
.skill-icon svg {
  width: 20px;
  height: 20px;
}
.skill-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}

/* ─── EDUCATION ──────────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  transition: border-color 0.2s;
}
.edu-card:hover {
  border-color: var(--cyan);
}
.edu-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.edu-inst {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.edu-degree {
  font-size: 0.95rem;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}
.edu-years {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─── LANGUAGES ──────────────────────────────────────────────── */
.lang-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
}
.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

/* ─── CONTACT ────────────────────────────────────────────────── */
#contact {
  text-align: center;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--cyan),
    transparent
  );
}
.contact-text {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text);
  transition:
    border-color 0.2s,
    color 0.2s;
}
.contact-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  text-decoration: none;
}

/* ─── REFERENCES ─────────────────────────────────────────────── */
.ref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.ref-card:hover {
  border-color: var(--cyan);
}
.ref-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.ref-role {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.ref-email {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
}
footer .copy {
  font-size: 0.8rem;
  color: var(--muted);
}
footer .built-with {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
footer .built-with span {
  color: var(--cyan);
}

/* ─── SCROLL REVEAL ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }
  nav.nav-open .hamburger {
    background: transparent;
  }
  nav.nav-open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
  }
  nav.nav-open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
  }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(16, 16, 24, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 2rem;
    gap: 1.75rem;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }
  nav.nav-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* ── Hero mobile fix: single-column, tight padding, full-width content ── */
  #hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 7rem 1.5rem 4rem; /* reduced from 2rem to 1.5rem sides */
    width: 100%;
  }
  .hero-content {
    width: 100%;
    min-width: 0;
  }
  .hero-eyebrow {
    font-size: 0.7rem; /* slightly smaller so it fits on one line */
    letter-spacing: 0.08em;
    word-break: break-word;
  }
  .hero-name {
    font-size: clamp(
      2.5rem,
      12vw,
      4rem
    ); /* scale tighter on narrow screens */
  }
  .hero-title-wrap {
    justify-content: center;
    width: 100%;
  }
  .hero-title-label {
    font-size: 0.85rem; /* smaller so it doesn't overflow */
    max-width: calc(100% - 16px); /* leave room for cursor */
  }
  .hero-bio {
    max-width: 100%; /* override the 480px cap */
    margin: 0 auto 2rem;
  }
  .hero-cta {
    align-items: center;
  }
  .hero-cta-row {
    justify-content: center;
  }
  .hero-right {
    margin-top: 3rem;
  }

  /* Scale down stat chips a touch */
  .hero-stats {
    gap: 0.5rem;
  }
  .stat-chip {
    padding: 0.7rem 0.9rem;
  }
  .stat-chip .val {
    font-size: 1.25rem;
  }
  .stat-chip .label {
    font-size: 0.65rem;
  }

  section {
    padding: 4rem 1.5rem;
  }
  #skills {
    padding: 4rem 1.5rem;
  }
  .edu-grid,
  .ref-grid {
    grid-template-columns: 1fr;
  }
  footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  nav {
    padding: 1rem 1.5rem;
  }

  /* Contact card padding on mobile */
  .contact-card {
    padding: 2rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .cursor {
    animation: none;
  }
}
