:root {
  --bg: #090b1a;
  --bg-alt: #101431;
  --surface: #ffffff;
  --surface-alt: #f6f7fb;
  --accent: #4460ff;
  --accent-dark: #3044cc;
  --accent-light: #5c7aff;
  --text: #1f2337;
  --text-soft: #4c5572;
  --text-lighter: #6b7394;
  --border: rgba(31, 35, 55, 0.08);
  --shadow-sm: 0 2px 8px rgba(15, 27, 71, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 27, 71, 0.1);
  --shadow-lg: 0 20px 50px rgba(15, 27, 71, 0.12);
  --shadow-xl: 0 30px 70px rgba(15, 27, 71, 0.15);
  color-scheme: light;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg: #090b1a;
  --bg-alt: #0f1220;
  --surface: #1a1d2e;
  --surface-alt: #13152a;
  --accent: #5c7aff;
  --accent-dark: #4460ff;
  --accent-light: #7d96ff;
  --text: #e8eaf0;
  --text-soft: #b4b7c9;
  --text-lighter: #8b8fa8;
  --border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 30px 70px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--surface-alt);
  color: var(--text);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* TOPBAR / NAVIGATION */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 11, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  font-size: 0.95rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  padding: 0.4rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav a:focus-visible,
.nav a:hover {
  color: #fff;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

/* Language Selector */
.lang-selector {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 1.5rem;
}

.lang-btn {
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.lang-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
}

.theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(20deg);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  position: absolute;
  transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: rotate(45deg);
  position: absolute;
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg);
  position: absolute;
}

/* HERO SECTION */
.hero {
  background: radial-gradient(ellipse at top left, #1c1f41, #090b1a);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(68, 96, 255, 0.1), transparent);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Desktop: reverse order (intro first, profile second) */
@media (min-width: 769px) {
  .hero__inner {
    display: flex;
    flex-direction: row;
  }

  .hero__profile {
    order: 2; /* Profile on the right on desktop */
  }

  .hero__intro {
    order: 1; /* Intro on the left on desktop */
    flex: 1;
  }
}

.hero__intro h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  margin: 0 0 1.5rem;
  line-height: 1.1;
  font-weight: 800;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.lead {
  font-size: 1.15rem;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2.5rem 0 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(68, 96, 255, 0.3);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(68, 96, 255, 0.4);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.button.ghost:hover,
.button.ghost:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.button.full {
  width: 100%;
  text-align: center;
}

.social-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.social-list li {
  display: flex;
}

.social-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.social-list a:hover,
.social-list a:focus-visible {
  color: #fff;
  transform: translateY(-2px);
}

.hero__profile {
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out;
}

.hero__profile img {
  width: min(340px, 70vw);
  border-radius: 50%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

/* SECTIONS */
.section {
  padding: clamp(4.5rem, 10vw, 7rem) 0;
}

.section--alt {
  background: var(--surface);
}

.section--cta {
  background: linear-gradient(135deg, var(--bg) 0%, #1c1f41 100%);
  color: #fff;
}

.section__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.section__header {
  max-width: 65ch;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--text);
  font-weight: 800;
  line-height: 1.2;
}

.section--cta h2 {
  color: #fff;
}

.section p {
  color: var(--text-soft);
  font-size: 1.05rem;
}

.section--cta p {
  color: rgba(255, 255, 255, 0.85);
}

.two-columns {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.highlights {
  background: var(--surface);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.highlights h3 {
  margin: 0 0 1.5rem;
  color: var(--text);
  font-size: 1.4rem;
}

.highlights ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.highlights li {
  margin-bottom: 0.5rem;
}

/* SKILLS SECTION */
.skills-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.skill-category {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.skill-icon {
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.skill-category h3 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  color: var(--text);
}

.tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.tech-list li {
  color: var(--text-soft);
  padding-left: 1.5rem;
  position: relative;
}

.tech-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

/* EXPERIENCE / TIMELINE - Border-left with flexbox column */
.timeline {
  margin-top: 2rem;
  padding-left: 2rem; /* Space for the border line */
  padding-bottom: 0.5rem; /* Extend line beyond last marker */
  border-left: 3px solid var(--accent); /* Continuous vertical line */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3rem; /* Space between items - contributes to container height */
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  position: relative;
  /* No margin-bottom needed - using gap on parent */
}

/* Marker - overlaps the border-left line */
.timeline-marker {
  flex-shrink: 0; /* Don't shrink */
  width: 16px;
  height: 16px;
  margin-top: 0.5rem; /* Align with content top */
  margin-left: -2.5rem; /* Position over the border line (padding 2rem + half marker 0.5rem) */
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface-alt);
  box-shadow: 0 0 0 3px var(--accent-light);
  position: relative;
  z-index: 2; /* Above the border line */
}

.timeline-content {
  background: var(--surface);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.timeline-period {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.timeline-content h3 {
  margin: 0.5rem 0 0.3rem;
  font-size: 1.6rem;
  color: var(--text);
}

.timeline-content h4 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--text-soft);
  font-weight: 600;
}

.achievement-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.achievement-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.6rem;
  color: var(--text-soft);
}

.achievement-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* PORTFOLIO SECTION */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.filter-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.portfolio-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.portfolio-item {
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.portfolio-item.hidden {
  display: none;
}

.portfolio-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.portfolio-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--surface-alt);
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-content {
  padding: 2rem;
}

.portfolio-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(68, 96, 255, 0.1);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.portfolio-content h3 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  color: var(--text);
}

.portfolio-content p {
  color: var(--text-soft);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.portfolio-tech span {
  padding: 0.4rem 0.9rem;
  background: var(--surface-alt);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.portfolio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.app-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(68, 96, 255, 0.1);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.app-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(68, 96, 255, 0.3);
}

.app-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 3rem;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--surface);
  border-radius: 20px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  min-width: 300px;
}

.store-badge:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.store-badge div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.store-badge span {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.store-badge strong {
  font-size: 1.2rem;
  color: var(--text);
}

/* TESTIMONIALS */
.testimonials-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.testimonial {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.testimonial.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border: 2px solid var(--accent);
}

/* Dark mode featured testimonials */
[data-theme="dark"] .testimonial.featured {
  background: linear-gradient(135deg, #1f2237 0%, #1a1d2e 100%) !important;
  border: 2px solid var(--accent) !important;
}

.testimonial-content {
  position: relative;
}

.testimonial-text {
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  position: relative;
}

.testimonial.featured .testimonial-text {
  font-size: 1.08rem;
  line-height: 1.8;
}

.quote-mark {
  font-size: 1.3em;
  color: rgba(68, 96, 255, 0.4);
  font-weight: 700;
  line-height: 0;
  display: inline;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.author-info strong {
  color: var(--text);
  font-size: 1.1rem;
}

.author-info span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.author-info a {
  color: var(--accent);
  font-size: 0.9rem;
}

.author-info a:hover {
  text-decoration: underline;
}

/* Stars Rating */
.stars {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: #ffc107;
}

.stars svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* VIDEO SECTION */
.video-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.video-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

/* CONTACT / CTA SECTION */
.cta-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.cta-content p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.cta-content .lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: none;
}

.contact-methods {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin: 3rem 0 2rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

.contact-card svg {
  flex-shrink: 0;
  color: var(--accent-light);
}

.contact-card div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.contact-card strong {
  font-size: 1.1rem;
  color: #fff;
}

.contact-card span {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  word-break: break-word;
  overflow-wrap: break-word;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  margin-top: 2rem;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

/* FOOTER */
.footer {
  background: var(--bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  text-transform: uppercase;
  margin: 0;
}

.footer-brand span {
  color: var(--accent);
}

.footer-info p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.back-to-top {
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.back-to-top:hover {
  transform: translateY(-2px);
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    inset: 80px 1rem auto;
    background: rgba(9, 11, 26, 0.98);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    flex-direction: column;
    align-items: stretch;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }

  .nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  .nav a {
    padding: 0.8rem 0;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
  }

  .nav .lang-selector {
    margin-left: 0;
    margin-top: 1rem;
    justify-content: center;
  }

  .nav .theme-toggle {
    margin-left: 0;
    margin-top: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -1.5px;
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -1.5px;
  }

  .hero {
    padding: 6rem 0 4rem;
  }

  .hero__inner {
    gap: 3rem;
    display: flex;
    flex-direction: column; /* Natural order: profile first, intro second */
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .social-list {
    flex-direction: column;
    gap: 0.8rem;
  }

  .section {
    padding: 3rem 0;
  }

  /* Timeline mobile adjustments */
  .timeline {
    padding-left: 1.5rem; /* Less padding on mobile */
    gap: 2rem; /* Slightly less gap between items on mobile */
  }

  .timeline-marker {
    margin-left: -2rem; /* Adjust for smaller padding (1.5rem + 0.5rem) */
  }

  .timeline-item {
    gap: 1rem; /* Reduce gap between marker and content on mobile */
  }

  .filter-buttons {
    justify-content: flex-start;
  }

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

  .app-stores {
    flex-direction: column;
    align-items: stretch;
  }

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

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero__intro h1 {
    font-size: 2rem;
  }

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

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

/* TESTIMONIAL AVATAR IMAGES */
.author-avatar-link {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.author-avatar-link:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(68, 96, 255, 0.3);
}

.author-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  padding-top: 3rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--surface);
  border-radius: 24px;
  padding: 3rem;
  max-width: 600px;
  max-height: 85vh;
  width: 100%;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  right: 2rem;
  top: 2rem;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #fff;
  transform: rotate(90deg);
}

.modal-content h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  color: #2a2a3e;
}

.modal-content > p {
  margin: 0 0 2rem 0;
  color: #4a4a5e;
  line-height: 1.6;
}

/* FORM STYLES */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2a2a3e;
  font-size: 0.95rem;
}

.form-group .optional {
  font-weight: 400;
  color: #5a5a6e;
  font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #d0d0d8;
  border-radius: 12px;
  color: #1a1a2e;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="url"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group textarea::placeholder {
  color: rgba(26, 26, 46, 0.5);
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(68, 96, 255, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: #5a5a6e;
  font-size: 0.85rem;
}

/* RATING INPUT - Play Store Style */
.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input label {
  cursor: pointer;
  font-size: 2rem;
  color: #ddd;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
  margin: 0;
  user-select: none;
}

.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #ffc107;
  transform: scale(1.1);
}

.rating-input input[type="radio"]:checked ~ label {
  color: #ffc107;
}

/* CAPTCHA GROUP */
.captcha-group #captcha-question {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

/* FORM ACTIONS */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.form-actions .button {
  flex: 1;
  min-width: 150px;
}

.form-actions .button.ghost {
  background: transparent;
  border: 2px solid #e74c3c;
  color: #e74c3c;
}

.form-actions .button.ghost:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: #c0392b;
  color: #c0392b;
  transform: translateY(-2px);
}

.form-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(68, 96, 255, 0.1);
  border-left: 3px solid #4460ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #4a4a5e;
  line-height: 1.6;
}

/* MOBILE MODAL */
@media (max-width: 768px) {
  .modal.active {
    padding: 1rem;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .modal-content {
    padding: 2rem 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    max-height: none;
    height: auto;
  }

  .modal-close {
    right: 1rem;
    top: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .button {
    width: 100%;
  }

  /* iOS-specific fixes for keyboard layout issues */
  /* Prevent zoom on input focus */
  .form-group input[type="text"],
  .form-group input[type="url"],
  .form-group input[type="number"],
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom when focusing inputs */
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  /* Only apply to iOS devices */
  @media (max-width: 768px) {
    .modal.active {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      width: 100% !important;
      height: 100% !important;
      z-index: 9999 !important;
      display: flex !important;
      align-items: flex-start !important;
      justify-content: center !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
      background-color: rgba(0, 0, 0, 0.8) !important;
    }

    .modal-content {
      position: relative !important;
      min-height: auto;
      margin: 3rem auto 3rem auto;
      max-height: none;
      display: block !important;
      z-index: 10000 !important;
    }

    /* Lock body scroll on iOS when modal is open */
    body.modal-open {
      position: fixed;
      width: 100%;
      overflow: hidden;
      left: 0;
      right: 0;
    }

    /* Make inputs more stable with GPU acceleration */
    .form-group input,
    .form-group textarea {
      position: relative;
      transform: translate3d(0, 0, 0);
      -webkit-transform: translate3d(0, 0, 0);
      will-change: transform;
    }

    /* Ensure modal content has enough space */
    .modal-content {
      padding-bottom: 5rem;
    }
  }
}
