/* ============================================================
   Design Tokens — Color Palette & Typography
   ============================================================ */
:root {
  --bg:          #0F172A;
  --bg-card:     #1A1F35;
  --fg:          #F8FAFC;
  --accent:      #3B82F6;
  --muted:       #94A3B8;
  --border:      #1E293B;
  --secondary:   #1E293B;

  --font-sans:   'Inter', system-ui, sans-serif;
  --font-mono:   'IBM Plex Mono', 'Courier New', monospace;

  --radius:      0.5rem;
  --transition:  0.3s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg);
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* ============================================================
   Layout — Container
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container { padding-inline: 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding-inline: 2rem; }
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.nav__links {
  display: none;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent);
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
}

@media (min-width: 768px) {
  .nav__hamburger { display: none; }
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.nav__mobile.open { display: flex; }

.nav__mobile a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}

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

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 4rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://d2xsxph8kpxj0f.cloudfront.net/310419663029370828/PUizJxc5zStPuoEyPNX7eE/hero-background-DKCPafqbUw2RQb7mUfXs46.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero__title .accent { color: var(--accent); }

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero__socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.hero__socials a {
  color: var(--muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

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

.hero__socials svg {
  width: 24px;
  height: 24px;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  animation: bounce 2s infinite;
}

.hero__scroll svg { width: 24px; height: 24px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  min-height: 48px;
}

.btn--primary {
  background: var(--accent);
  color: #0F172A;
  border: 2px solid var(--accent);
}

.btn--primary:hover {
  background: rgba(59, 130, 246, 0.85);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

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

.btn--outline:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

/* ============================================================
   Section Base
   ============================================================ */
section {
  padding-block: 5rem;
  border-top: 1px solid var(--border);
}

.section__header {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
}

/* ============================================================
   Scroll Reveal Animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   About Section
   ============================================================ */
.about__grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 768px) {
  .about__grid {
    flex-direction: row;
    align-items: flex-start;
  }
}

.about__profile {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.about__avatar {
  position: relative;
  width: 16rem;
  height: 22rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.1);
}

.about__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}

.about__name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  text-align: center;
}

.about__role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-align: center;
}

.about__body {
  flex: 1;
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .about__body {
    grid-template-columns: 1fr 1fr;
  }
}

.about__bio p {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about__bio p:last-child { margin-bottom: 0; }

.about__stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
}

.stat-card__number {
  font-family: var(--font-mono);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.375rem;
}

.stat-card__label {
  font-size: 0.875rem;
  color: var(--muted);
}

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

.timeline__item {
  position: relative;
}


.exp-card {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: block;
}

.exp-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08);
}

.exp-card.expanded {
  border-color: rgba(59, 130, 246, 0.5);
}

.exp-card__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.exp-card__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.4rem;
  flex-shrink: 0;
}

.exp-card__logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}

.exp-card__info { flex: 1; }

.exp-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.exp-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.exp-card__company {
  font-size: 0.875rem;
  color: var(--accent);
}

.exp-card__period {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-mono);
  margin-left: 3.5rem;
}

.exp-card__duration {
  font-size: 0.6875rem;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-left: 1.5rem;
  margin-top: 0.15rem;
}

@media (min-width: 768px) {
  .exp-card__period,
  .exp-card__duration {
    margin-left: 0;
  }
}

.exp-card__chevron {
  color: var(--muted);
  transition: transform var(--transition);
  flex-shrink: 0;
  align-self: center;
}

.exp-card.expanded .exp-card__chevron {
  transform: rotate(180deg);
}

.exp-card__details {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.exp-card__details.open {
  max-height: 1000px;
  opacity: 1;
}

.exp-card__details-inner {
  padding-top: 1.25rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

.exp-card__bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.exp-card__bullet {
  display: flex;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.exp-card__bullet::before {
  content: "▸";
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.05em;
}

.exp-card__tech-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.625rem;
  font-family: var(--font-mono);
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  padding: 0.25rem 0.625rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ============================================================
   Education
   ============================================================ */
.edu-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .edu-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .edu-grid { grid-template-columns: repeat(3, 1fr); }
}

.edu-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.edu-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
}

.edu-card__period {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

.edu-card__degree {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.edu-card__field {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.375rem;
}

.edu-card__school {
  font-size: 0.8125rem;
  color: var(--muted);
  opacity: 0.75;
}

/* ============================================================
   Skills
   ============================================================ */
.skills-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
}

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

.skill-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
}

.skill-card__category {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--muted);
  transition: color var(--transition), border-color var(--transition);
  cursor: default;
}

.pill:hover {
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.5);
}

/* ============================================================
   Projects
   ============================================================ */
.projects-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.project-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-card__name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--fg);
  transition: color var(--transition);
}

.project-card:hover .project-card__name { color: var(--accent); }

.project-card__ext svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color var(--transition);
}

.project-card:hover .project-card__ext svg { color: var(--accent); }

.project-card__desc {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.project-card__lang {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.project-card__date {
  font-size: 0.75rem;
  color: var(--muted);
}

.projects__more {
  margin-top: 2rem;
  text-align: center;
}

.projects__more a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--accent);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.projects__more a:hover { color: rgba(59, 130, 246, 0.75); }

.projects__more svg { width: 16px; height: 16px; }

/* ============================================================
   Contact
   ============================================================ */
.contact {
  text-align: center;
}

.contact__desc {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 38rem;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

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

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

/* ============================================================
   Utility
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Nav Actions (lang toggle + hamburger wrapper)
   ============================================================ */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================================
   Language Toggle
   ============================================================ */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.1875rem;
}

.lang-toggle--mobile {
  align-self: flex-start;
  margin-bottom: 0.5rem;
}

.lang-toggle__opt {
  padding: 0.2rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1.5;
}

.lang-toggle__opt.active {
  background: var(--accent);
  color: #0F172A;
}

.lang-toggle__opt:not(.active):hover {
  color: var(--accent);
}

.lang-toggle__sep {
  font-size: 0.625rem;
  color: var(--border);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
