:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #6a6a80;
  --accent: #6c63ff;
  --accent-hover: #5a52e0;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --border: #2a2a3e;
  --success: #4ade80;
  --gradient-1: #6c63ff;
  --gradient-2: #e040fb;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
  --nav-height: 70px;
  --radius: 12px;
  --radius-lg: 20px;
}

[data-theme="light"] {
  --bg-primary: #f5f5fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f5;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #7a7a8a;
  --accent: #6c63ff;
  --accent-hover: #5a52e0;
  --accent-glow: rgba(108, 99, 255, 0.08);
  --border: #e0e0e8;
  --success: #4ade80;
  --gradient-1: #6c63ff;
  --gradient-2: #e040fb;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1100px;
  --nav-height: 70px;
  --radius: 12px;
  --radius-lg: 20px;
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.98);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: 50px 0 30px;
  display: flex;
  align-items: center;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 60px;
  position: relative;
}

.section-title .accent {
  color: var(--accent);
  font-family: monospace;
  font-size: 1.2rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-glow);
}

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

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

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.navbar.nav-hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  overflow-x: hidden;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  min-width: 0;
}

.nav-links li {
  display: flex;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
  width: 100%;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 20px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 40px);
}

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

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

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Hero */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  min-height: 100vh;
  overflow-x: hidden;
}

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

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

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

.hero-social a {
  color: var(--text-muted);
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.hero-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* Hero photo */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo-wrapper {
  position: relative;
  width: max(150px, 30vw);
  height: max(150px, 30vw);
}

.hero-photo-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  filter: blur(30px);
  opacity: 0.4;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tech-list span {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.tech-list span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.8;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
  width: 100%;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
  width: 100%;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  font-family: monospace;
  margin-bottom: 8px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s ease;
  width: 100%;
}

.timeline-row {
  display: flex;
  gap: 20px;
}

.timeline-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: 4px;
}

.timeline-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
  background: #fff;
}

.timeline-logo-wrap .timeline-logo {
  border-radius: 0;
  padding: 0;
  background: none;
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-content:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.timeline-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0;
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tags span {
  padding: 4px 10px;
  background: var(--accent-glow);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project-folder {
  font-size: 2.2rem;
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

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

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 10px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
  font-weight: 500;
}

/* Studies */
.studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.study-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}

.study-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.study-icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.study-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.study-card h4 {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.study-card > p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-family: monospace;
}

.study-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Failed project phone carousel */
.project-card-wide {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 32px;
}

.phone-mockup {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.phone-frame {
  width: 198px;
  background: #1a1a2e;
  border: 2px solid #333;
  border-radius: 24px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 426 / 944;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

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

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease;
  cursor: pointer;
}

.carousel-dots .dot.active {
  background: var(--accent);
}

.phone-content {
  flex: 1;
  min-width: 0;
}

.carousel-caption {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.carousel-caption b {
  color: var(--text-primary);
}

.project-collab {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.project-collab a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.project-collab a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.laptop-mockup {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.laptop-frame {
  width: 476px;
  background: #1a1a2e;
  border: 2px solid #444;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.laptop-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 946;
  border-radius: 4px;
  background: #000;
}

.laptop-base {
  width: 196px;
  height: 8px;
  background: #222;
  border: 2px solid #444;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-top: -1px;
}

@media (max-width: 768px) {
  .project-card-wide,
  .project-card-wide.reverse {
    flex-direction: column;
    align-items: center;
    gap: 9px;
  }

  .phone-content {
    display: contents;
  }

  .project-card-wide .project-title {
    order: 0;
    margin-bottom: 0;
  }

  .phone-mockup,
  .laptop-mockup {
    order: 1;
    margin-bottom: 8px;
  }

  .project-card-wide .carousel-caption {
    order: 2;
    margin-bottom: 6px;
  }

  .project-card-wide .project-desc {
    order: 3;
    margin-bottom: 6px;
  }

  .project-card-wide .study-techs {
    order: 4;
    margin-top: 0;
  }

  .project-card-wide .project-collab {
    order: 5;
    margin-top: 0;
  }

  .phone-frame {
    width: 180px;
  }

  .laptop-frame {
    width: 392px;
  }
}

/* Contact */
#contacto.section {
  padding-bottom: 60px;
}

#contacto .section-title {
  margin-bottom: 30px;
}

.contact-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-info {
  max-width: 500px;
  width: 100%;
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.contact-item:hover {
  color: var(--text-primary);
}

.contact-item i {
  width: 20px;
  color: var(--accent);
  font-size: 1.1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.cv-btn {
  margin-top: 28px;
  width: 100%;
  justify-content: center;
}

.study-techs {
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
  width: 100%;
}

.study-techs i {
  font-size: 1.6rem;
  transition: transform 0.2s ease;
  cursor: default;
  padding: 7px;
  min-width: 2.2rem;
  text-align: center;
}

.study-techs:has(i:hover) i:not(:hover) {
  transform: scale(0.8);
}

.study-techs i:hover {
  transform: scale(1.8);
}

.study-grade {
  font-size: 0.8rem;
  color: var(--accent);
  margin: 2px 0 4px;
  font-weight: 500;
}

/* Languages */
.langs-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.langs-visual {
  flex: 1;
  min-width: 0;
  max-width: 320px;
}

.langs-svg {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 1200px) {
  .langs-wrap {
    max-width: 920px;
  }
}

.langs-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
}

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

.langs-bar {
  width: 4px;
  height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
}

.langs-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 70px;
}

.langs-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .langs-wrap {
    flex-direction: column;
    gap: 24px;
  }

  .langs-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }

  .langs-item {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .langs-bar {
    width: 32px;
    height: 4px;
  }

  .langs-name {
    min-width: auto;
  }
}

.cv-btn i {
  color: #ef4444;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer p + p {
  margin-top: 4px;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--success);
  border-radius: 8px;
  color: var(--success);
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 968px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    max-width: 100%;
  }

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

  .hero-desc {
    margin: 0 auto 32px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-social {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-photo-wrapper {
    margin: 0 auto;
  }

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

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

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

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

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .langs-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--nav-height));
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    overflow-x: hidden;
  }

  .nav-links.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .timeline-item {
    padding-bottom: 32px;
  }

  .section-title {
    margin-bottom: 32px;
  }

  .section {
    padding: 100px 0 60px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-container {
    gap: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-photo-wrapper {
    width: 180px;
    height: 180px;
  }

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

  .laptop-frame {
    width: 280px;
  }

  .carousel-bar {
    padding: 0 12px;
  }

  .section {
    padding: 40px 0 20px;
  }

  .timeline-item {
    padding-bottom: 24px;
  }

  .timeline-content {
    padding: 14px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
