/* ─── Design tokens ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #09090b;
  --surface:      #18181b;
  --surface-2:    #1f1f23;
  --border:       #27272a;
  --border-mid:   #3f3f46;
  --text:         #fafafa;
  --text-2:       #a1a1aa;
  --text-3:       #71717a;
  --accent:       #6366f1;
  --accent-2:     #8b5cf6;
  --accent-glow:  rgba(99, 102, 241, 0.12);
  --radius:       12px;
  --radius-sm:    6px;
  --max-w:        760px;
  --nav-h:        60px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --mono:         'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 5vw, 2rem);
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* ─── Main wrapper ───────────────────────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 5rem) 1.5rem 5rem;
}

/* ─── Section headers ────────────────────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

section { margin-bottom: 5.5rem; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding-top: 1rem;
  margin-bottom: 6rem;
}

.hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 4px var(--accent-glow);
  display: block;
  margin-bottom: 1.5rem;
}

.hero-name {
  font-size: clamp(2.8rem, 9vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 0.6rem;
  background: linear-gradient(140deg, #fff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.1rem;
  color: var(--text-2);
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

.location-pill svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  opacity: 0.7;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
}

.cta-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

/* ─── About ──────────────────────────────────────────────────────────────── */
.about-text {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  max-width: 620px;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.interest-tag {
  font-size: 0.85rem;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  transition: border-color 0.15s;
}

.interest-tag:hover { border-color: var(--border-mid); }

/* ─── Experience ─────────────────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.job-card:hover { border-color: var(--border-mid); }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.job-role {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.job-company {
  font-size: 0.825rem;
  color: var(--accent);
  font-weight: 500;
}

.job-period {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  white-space: nowrap;
  padding-top: 3px;
}

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.job-bullets li {
  font-size: 0.875rem;
  color: var(--text-2);
  padding-left: 1.1rem;
  position: relative;
}

.job-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--border-mid);
  font-size: 1rem;
  line-height: 1.4;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tech-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent-2);
  background: var(--accent-glow);
  border: 1px solid rgba(139, 92, 246, 0.18);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* ─── Skills ─────────────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.skill-name {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.skill-level {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.85rem;
}

.skill-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* ─── Education ──────────────────────────────────────────────────────────── */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.edu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  transition: border-color 0.15s;
}

.edu-row:hover { border-color: var(--border-mid); }

.edu-degree {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.edu-institution {
  font-size: 0.825rem;
  color: var(--text-2);
}

.edu-period {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  white-space: nowrap;
}

/* ─── Languages ──────────────────────────────────────────────────────────── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.lang-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lang-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.lang-level {
  font-family: var(--mono);
  font-size: 0.775rem;
  color: var(--text-2);
}

/* ─── Testimonial ────────────────────────────────────────────────────────── */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.6rem 1.75rem;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 0.9rem;
}

.testimonial-cite {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
  font-style: normal;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 2.5rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-email {
  font-size: 0.875rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-email:hover { color: var(--accent); }

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-social-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.footer-social-link:hover {
  color: var(--text-2);
  background: var(--surface);
}

.footer-social-sep {
  color: var(--border-mid);
  font-size: 0.7rem;
  user-select: none;
}

.easter-hint {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--border);
  letter-spacing: 0.06em;
  user-select: none;
  cursor: default;
  transition: color 0.4s;
}

.easter-hint:hover { color: var(--border-mid); }

@media (hover: none) and (pointer: coarse) {
  .easter-hint {
    font-size: 0.75rem;
    color: var(--text-3);
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .easter-hint:active { background: var(--surface); }
}

/* ─── Scroll animations ──────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  main { padding-inline: 1rem; }

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

  .job-header {
    flex-direction: column;
    gap: 0.4rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.4rem; }
}
