/* ===================================================
   style.css – Portfolio Jasper Haas
   Dark Premium Aesthetic
   =================================================== */

/* ---- Custom Properties ---- */
:root {
  --bg:        #0d0d14;
  --bg-card:   rgba(255,255,255,0.04);
  --border:    rgba(255,255,255,0.08);
  --accent:    #7c3aed;
  --accent2:   #f59e0b;
  --text:      #e8e8f0;
  --text-muted:#888899;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --radius:    16px;
  --shadow:    0 8px 32px rgba(0,0,0,0.4);
  --transition:0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
ul { list-style: none; }

/* ---- Background Canvas ---- */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Navigation ---- */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.9rem 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(13,13,20,0.7);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

#main-nav.scrolled {
  background: rgba(13,13,20,0.92);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #7c3aed, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  position: relative;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
}

.lang-toggle {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  letter-spacing: 0.04em;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(124,58,237,0.1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 6px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

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

/* ---- Hero ---- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-svg {
  width: 100%;
  height: auto;
  animation: heroRotate 20s linear infinite;
}

@keyframes heroRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #a78bfa;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(135deg, #e8e8f0 0%, #a78bfa 40%, #7c3aed 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: #a78bfa;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #9d5cf5);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124,58,237,0.45);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(124,58,237,0.6);
  background: linear-gradient(135deg, #8b47f5, #a96bf7);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(124,58,237,0.1);
  box-shadow: 0 4px 16px rgba(124,58,237,0.2);
}

/* ---- Sections ---- */
section { padding: 6rem 0; position: relative; }

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  position: relative;
}

.section-title span {
  background: linear-gradient(135deg, #e8e8f0, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 3.5rem;
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

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

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.avatar-container {
  position: relative;
  width: 200px; height: 200px;
}

.avatar-container::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.2), transparent 70%);
  border-radius: 50%;
}

.avatar-svg {
  width: 200px; height: 200px;
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
}

/* ---- Projects ---- */
#projects { background: rgba(124,58,237,0.02); }

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  transform-style: preserve-3d;
  will-change: transform;
  cursor: default;
}

.project-card:hover {
  border-color: rgba(124,58,237,0.35);
  box-shadow: 0 0 40px rgba(124,58,237,0.25), var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-icon {
  width: 48px; height: 48px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-number {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  background: rgba(124,58,237,0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  border: 1px solid rgba(124,58,237,0.2);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: rgba(124,58,237,0.15);
  color: #a78bfa;
  border-radius: 99px;
  border: 1px solid rgba(124,58,237,0.25);
  letter-spacing: 0.03em;
}

.card-footer {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.08);
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-card:hover {
  background: rgba(124,58,237,0.2);
  box-shadow: 0 0 12px rgba(124,58,237,0.3);
}

/* ---- Websites ---- */
#websites { background: rgba(6,182,212,0.015); }

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

.website-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.website-card:hover {
  transform: translateY(-8px);
  border-color: rgba(6,182,212,0.35);
  box-shadow: 0 0 40px rgba(6,182,212,0.18), var(--shadow);
}

.web-preview-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #04040e;
  line-height: 0;
}

.web-preview {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.website-card:hover .web-preview {
  transform: scale(1.04);
}

.website-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.website-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.website-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.web-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.3);
  flex-shrink: 0;
}

.website-card-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  flex: 1;
}

.website-card .card-tags { margin-bottom: 0.25rem; }

.tag-cyan {
  background: rgba(6,182,212,0.15);
  color: #06b6d4;
  border-color: rgba(6,182,212,0.25);
}

.tag-amber {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.25);
}

.tag-green {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border-color: rgba(34,197,94,0.25);
}

.tag-blue {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  border-color: rgba(59,130,246,0.25);
}

.tag-red {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border-color: rgba(239,68,68,0.25);
}

.website-card .card-footer {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-card-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  transition: color var(--transition), border-color var(--transition);
}

.btn-card-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}

/* ---- Skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem 2.5rem;
  margin-bottom: 3rem;
}

.skill-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.skill-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.skill-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

.skill-fill.animated {
  width: var(--pct);
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1rem;
}

.pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  background: rgba(124,58,237,0.1);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.2);
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition);
}

.pill:hover {
  background: rgba(124,58,237,0.22);
  transform: translateY(-2px);
}

.pill.accent2 {
  background: rgba(245,158,11,0.1);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.2);
}

.pill.accent2:hover {
  background: rgba(245,158,11,0.2);
}

/* ---- Timeline ---- */
#timeline { background: rgba(245,158,11,0.02); }

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  transform: translateX(-50%);
  opacity: 0.35;
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 2.5rem);
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item.right {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 2.5rem);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 1.25rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item.right .timeline-marker {
  left: 50%;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 4px 24px rgba(124,58,237,0.15);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.4rem;
}

.timeline-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.timeline-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  padding-top: 0.5rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.contact-info p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.6rem 1.25rem;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 10px;
  transition: background var(--transition), box-shadow var(--transition);
}

.contact-email:hover {
  background: rgba(124,58,237,0.2);
  box-shadow: 0 4px 16px rgba(124,58,237,0.25);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: rgba(124,58,237,0.3);
  background: rgba(255,255,255,0.06);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
  background: rgba(124,58,237,0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(136,136,153,0.5);
}

.form-message {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80;
}

.form-message.error {
  display: block;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

.form-fallback {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.form-fallback a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Footer ---- */
#footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-icon {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  line-height: 0;
}

.footer-icon:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Scroll Animations ---- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

[data-animate][data-visible] {
  opacity: 1;
  transform: none;
}

/* Stagger children */
[data-animate]:nth-child(2) { transition-delay: 0.1s; }
[data-animate]:nth-child(3) { transition-delay: 0.2s; }
[data-animate]:nth-child(4) { transition-delay: 0.3s; }

/* ---- Focus Visible ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

  .hero-svg { animation: none; }

  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-visual { order: -1; }
}

@media (max-width: 768px) {
  section { padding: 4rem 0; }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(13,13,20,0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    backdrop-filter: blur(16px);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
    border-radius: 8px;
  }

  .nav-toggle { display: flex; }

  .lang-toggle { margin-left: 0; }

  #main-nav .nav-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-logo { margin-right: auto; }

  #hero {
    padding: 5rem 1.5rem 3rem;
    min-height: auto;
    padding-top: 7rem;
  }

  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }

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

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

  .timeline::before { left: 24px; transform: none; }

  .timeline-item,
  .timeline-item.right {
    padding-left: 60px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-marker,
  .timeline-item.right .timeline-marker {
    left: 24px;
    transform: none;
  }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .about-stats { gap: 1.5rem; }
}

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