/* @file Modern portfolio stylesheet tuned for smooth, recruiter-friendly readability. */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&family=Fira+Code:wght@400;500&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Modern Developer Color Palette */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #475569;
  --bg-dark: #0f172a;
  --bg-light: #1e293b;
  --bg-lighter: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-highlight: #60a5fa;
  --shadow: rgba(2, 6, 23, 0.7);
  --card-shadow: 0 18px 42px -26px rgba(2, 6, 23, 0.9);

  /* Typography */
  --font-main: "Open Sans", sans-serif;
  --font-heading: "Poppins", sans-serif;
  --font-code: "Fira Code", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 50px;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  z-index: 1000;
  box-shadow: 0 10px 30px -10px var(--shadow);
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-highlight);
}

.brand-icon {
  font-family: var(--font-code);
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text-highlight);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-highlight);
}

.nav-link:focus-visible,
.btn:focus-visible,
.lang-btn:focus-visible,
.social-link:focus-visible,
.contact-card:focus-visible {
  outline: 2px solid var(--text-highlight);
  outline-offset: 3px;
  border-radius: 8px;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-highlight);
  transition: all 0.3s ease;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 5px;
  background: var(--bg-light);
  padding: 4px;
  border-radius: 5px;
  border: 1px solid var(--bg-lighter);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  color: var(--text-highlight);
}

.lang-btn.active {
  background: var(--text-highlight);
  color: var(--bg-dark);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-greeting {
  font-family: var(--font-code);
  color: var(--text-highlight);
  font-size: 16px;
  margin-bottom: 20px;
}

.hero-name {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 30px;
  line-height: 1.1;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 24px;
  line-height: 1.8;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 36px;
  max-width: 700px;
}

.quick-fact {
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.85), rgba(30, 41, 59, 0.92));
  border: 1px solid var(--bg-lighter);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--card-shadow);
}

.quick-fact-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.quick-fact strong {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.btn {
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
}

.btn-primary {
  background: rgba(37, 99, 235, 0.16);
  color: var(--text-highlight);
  border: 2px solid var(--text-highlight);
}

.btn-primary:hover {
  background: rgba(37, 99, 235, 0.24);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.65);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-secondary);
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.14);
  border-color: var(--text-highlight);
  color: var(--text-highlight);
}

.btn-ghost {
  color: var(--text-secondary);
  border: 2px dashed #475569;
  background: rgba(30, 41, 59, 0.7);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-link {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 22px;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--text-highlight);
  transform: translateY(-5px);
}

/* Profile Photo */
.profile-photo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--text-highlight);
  box-shadow:
    0 0 0 8px rgba(96, 165, 250, 0.14),
    0 20px 60px -10px var(--shadow);
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
  transition: all 0.3s ease;
}

.profile-photo:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ===== Section Styles ===== */
section {
  padding: 100px 0;
}

.section-intro {
  max-width: 760px;
  margin: -38px 0 40px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 60px;
}

.title-number {
  font-family: var(--font-code);
  color: var(--text-highlight);
  font-size: 1.3rem;
  font-weight: 400;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--bg-lighter);
  max-width: 300px;
}

/* ===== About Section ===== */
.about {
  background: var(--bg-dark);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.06rem;
  line-height: 1.78;
}

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

.tech-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  list-style: none;
  margin-top: 20px;
}

.tech-list li {
  font-family: var(--font-code);
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-list i {
  color: var(--text-highlight);
  font-size: 10px;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-card {
  background: var(--bg-light);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid var(--bg-lighter);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--text-highlight);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: rgba(96, 165, 250, 0.16);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-highlight);
  font-size: 24px;
}

.stat-info h3 {
  font-size: 1.8rem;
  color: var(--text-highlight);
  margin-bottom: 5px;
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Experience Section ===== */
.experience {
  background: var(--bg-dark);
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg-lighter);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-marker {
  position: absolute;
  left: -46px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-highlight);
  border: 3px solid var(--bg-dark);
  box-shadow: 0 0 0 4px var(--bg-lighter);
}

.timeline-content {
  background: var(--bg-light);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid var(--bg-lighter);
  transition: transform 0.25s ease;
  box-shadow: var(--card-shadow);
}

.timeline-content:hover {
  transform: translateX(6px);
  border-color: var(--text-highlight);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-header h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.company {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.timeline-location {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-location i {
  color: var(--text-highlight);
}

.timeline-duration {
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--text-highlight);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.78;
}

.timeline-highlights {
  display: grid;
  gap: 12px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.65;
}

.highlight-item i {
  color: var(--text-highlight);
  margin-top: 3px;
  font-size: 14px;
}

/* ===== Skills Section ===== */
.skills {
  background: var(--bg-dark);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.skill-category {
  background: var(--bg-light);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid var(--bg-lighter);
  transition: transform 0.25s ease;
  box-shadow: var(--card-shadow);
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--text-highlight);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.category-header i {
  font-size: 28px;
  color: var(--text-highlight);
}

.category-header h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-badge {
  font-family: var(--font-code);
  padding: 8px 16px;
  background: var(--bg-dark);
  color: var(--text-highlight);
  border: 1px solid var(--bg-lighter);
  border-radius: 5px;
  font-size: 13px;
  transition: all 0.3s ease;
}

.skill-badge:hover {
  background: rgba(96, 165, 250, 0.16);
  border-color: var(--text-highlight);
  transform: translateY(-2px);
}

/* ===== Contact Section ===== */
.contact {
  background: var(--bg-dark);
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 50px;
  line-height: 1.78;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.contact-card {
  background: var(--bg-light);
  padding: 40px 30px;
  border-radius: 8px;
  border: 1px solid var(--bg-lighter);
  text-decoration: none;
  transition: transform 0.25s ease;
  box-shadow: var(--card-shadow);
}

.contact-card:hover {
  transform: translateY(-10px);
  border-color: var(--text-highlight);
}

.contact-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: rgba(96, 165, 250, 0.16);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-highlight);
  font-size: 28px;
}

.contact-card h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

.education-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 25px;
  background: var(--bg-light);
  border-radius: 8px;
  border: 1px solid var(--bg-lighter);
  box-shadow: var(--card-shadow);
}

.education-info i {
  font-size: 32px;
  color: var(--text-highlight);
}

.education-info div {
  text-align: left;
}

.education-info strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.education-info span {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--bg-lighter);
}

.footer p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 5px 0;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 40px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-image {
    order: -1;
  }

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

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

  .contact-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 25px;
  }

  .nav-menu {
    position: fixed;
    right: -100%;
    top: 0;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: var(--bg-light);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    transition: right 0.3s ease;
    padding: 40px;
    box-shadow: -10px 0 30px var(--shadow);
  }

  .nav-menu.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

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

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

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

  .hero-name {
    font-size: 3rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-intro {
    margin-top: -26px;
    margin-bottom: 30px;
    font-size: 0.98rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .quick-facts {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }

  .lang-switcher {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

  .hero-title {
    font-size: 2rem;
  }

  .profile-photo {
    width: 150px;
    height: 150px;
  }
}
