:root {
  --primary-dark: #1d1d1f;
  --primary-gray: #86868b;
  --background-light: #fbfbfd;
  --accent-blue: #0071e3;
  --accent-blue-hover: #0077ED;
  --border-subtle: #d2d2d7;
  --success-green: #30d158;
  --card-background: #ffffff;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--background-light);
  color: var(--primary-dark);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

body.preload * {
  transition: none !important;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 56px;
  font-weight: 600;
}

h2 {
  font-size: 40px;
  font-weight: 600;
}

h3 {
  font-size: 28px;
  font-weight: 600;
}

h4 {
  font-size: 21px;
  font-weight: 600;
}

p {
  margin: 0 0 0.9em;
}

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

.narrow {
  max-width: 800px;
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-contact {
  padding-bottom: 100px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(251, 251, 253, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(210, 210, 215, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
}

.logo-text {
  font-weight: 600;
  font-size: 18px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 500;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch,
.theme-toggle,
.menu-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
}

.lang-switch {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 13px;
}

.theme-toggle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff 0, #fbbf24 40%, #f97316 100%);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background-color: var(--primary-dark);
  border-radius: 999px;
}

/* Scroll progress */

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background-color: var(--accent-blue);
  transform-origin: left;
}

/* Hero */

.hero {
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: center;
}

.hero-kicker {
  color: var(--primary-gray);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--primary-gray);
  max-width: 620px;
}

.hero-ctas {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.btn.primary {
  background-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 113, 227, 0.35);
}

.btn.primary:hover {
  background-color: var(--accent-blue-hover);
  box-shadow: 0 16px 40px rgba(0, 113, 227, 0.45);
  text-decoration: none;
}

.btn.ghost {
  background-color: transparent;
  color: var(--primary-dark);
  border-color: var(--border-subtle);
}

.btn.ghost:hover {
  background-color: #ffffff;
  box-shadow: 0 10px 30px var(--shadow-light);
  text-decoration: none;
}

.hero-links {
  margin-top: 18px;
  font-size: 15px;
  color: var(--primary-gray);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-photo-wrapper {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background-color: var(--card-background);
  border-radius: 16px;
  padding: 12px 10px;
  box-shadow: 0 10px 25px var(--shadow-light);
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 600;
}

.stat-label {
  font-size: 13px;
  color: var(--primary-gray);
}

.stat-detail {
  font-size: 12px;
  color: var(--primary-gray);
}

/* Generic cards */

.card {
  background-color: var(--card-background);
  border-radius: 18px;
  padding: 22px 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(210, 210, 215, 0.7);
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.card-subtitle {
  color: var(--primary-gray);
  font-size: 14px;
  margin-bottom: 4px;
}

.card-context {
  color: var(--primary-dark);
  font-size: 15px;
}

.card-list {
  padding-left: 18px;
  margin: 8px 0 8px;
}

.card-list li {
  margin-bottom: 4px;
}

.card-meta {
  font-size: 13px;
  color: var(--primary-gray);
  margin-top: 6px;
}

.badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background-color: #f5f5f7;
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}

/* Experience */

.experience-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Skills */

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

.skill-card ul {
  padding-left: 18px;
  margin: 0;
}

.skill-card li {
  margin-bottom: 4px;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-body {
  margin-top: 6px;
}

.tag-row,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid var(--border-subtle);
  background-color: #f5f5f7;
}

/* Timeline */

.timeline {
  position: relative;
  margin: 32px 0 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #d2d2d7, transparent);
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  margin-bottom: 24px;
}

.timeline-marker {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-blue);
}

.timeline-subtitle {
  font-size: 14px;
  color: var(--primary-gray);
}

/* Certifications */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Two-column */

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Contact */

.section-contact {
  background-color: #f5f5f7;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.contact-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.icon-wrapper {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-item h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(210, 210, 215, 0.7);
  padding: 18px 0;
  background-color: #ffffff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--primary-gray);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.language-redirect {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.language-redirect .lang-buttons {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Reveal animations */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

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