/* ============================================
   Erdem Volkan — Portfolio
   Premium, memorable, "wow" design
   ============================================ */

:root {
  --bg-primary: #050507;
  --bg-secondary: #0a0a0d;
  --bg-elevated: #0f0f12;
  --bg-card: #0c0c0f;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-subtle: rgba(59, 130, 246, 0.12);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.1);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(59, 130, 246, 0.08);
  --shadow-glow: 0 0 80px rgba(59, 130, 246, 0.06);
  
  --font-display: 'Syne', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --section-padding: clamp(5rem, 12vw, 8rem);
  --container-max: 1200px;
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #71717a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.3);
  --accent-subtle: rgba(37, 99, 235, 0.1);
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 40px rgba(37, 99, 235, 0.06);
  --shadow-glow: 0 0 80px rgba(37, 99, 235, 0.04);
}

[data-theme="light"] .hero-gradient {
  opacity: 0.4;
}

[data-theme="light"] .hero-dots {
  opacity: 0.15;
}

[data-theme="light"] .hero-code {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hero-code:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 40px rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .nav {
  background: rgba(248, 250, 252, 0.7);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(248, 250, 252, 0.95);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-logo {
  color: var(--text-primary);
}

[data-theme="light"] .nav-link {
  color: var(--text-secondary);
}

[data-theme="light"] .nav-logo:hover {
  color: var(--accent);
}

[data-theme="light"] .nav-toggle span {
  background: var(--text-primary);
}

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

  [data-theme="light"] .nav-overlay.open {
    background: rgba(0, 0, 0, 0.25);
  }
}

[data-theme="light"] .hero-badge {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
}

[data-theme="light"] .hero-badge-accent {
  color: var(--accent);
}

[data-theme="light"] .scroll-progress {
  background: linear-gradient(90deg, var(--accent) 0%, #1d4ed8 100%);
}

[data-theme="light"] .project-result {
  background: rgba(37, 99, 235, 0.08);
  border-left-color: var(--accent);
}

[data-theme="light"] .footer {
  background: linear-gradient(180deg, transparent 0%, rgba(37, 99, 235, 0.03) 100%);
}

[data-theme="light"] .section-header::after {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .btn-copy {
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-copy:hover {
  border-color: rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .btn-email {
  background: white;
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

[data-theme="light"] .btn-email:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent);
}

[data-theme="light"] .back-to-top {
  background: var(--bg-card);
}

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

html {
  scroll-behavior: smooth;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection */
::selection {
  background: var(--accent-subtle);
  color: var(--accent-hover);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  border-radius: 8px;
  z-index: 200;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient-accent);
  z-index: 101;
  transition: width 0.1s linear;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 98;
  text-decoration: none;
}

.back-to-top .back-to-top-icon {
  font-size: 1rem;
  line-height: 1;
}

.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .hero,
  section {
    scroll-margin-top: 4rem;
  }

  .back-to-top {
    bottom: 5.5rem;
    left: 1rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.75rem;
  }

  .back-to-top .back-to-top-text {
    display: none;
  }

  .back-to-top .back-to-top-icon {
    font-size: 1.1rem;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly */
@media (hover: none) {
  .btn, .project-card, .service-card, .nav-link, .contact-link, .skill-tag {
    cursor: pointer;
  }
}

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

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 2.5rem);
}

/* Section Headers */
.section-header {
  margin-bottom: 2.5rem;
}

.section-header-center {
  text-align: center;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.section-bracket {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.6;
  margin: 0 0.15em;
  padding: 0.25rem 0.5rem;
  background: var(--accent-subtle);
  border-radius: 4px;
  border-left: 2px solid var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

.section-header::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  margin-top: 1.25rem;
  background: var(--gradient-accent);
  border-radius: 2px;
  opacity: 0.85;
  box-shadow: 0 0 16px var(--accent-glow);
}

.section-header-center::after {
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0.75rem auto 0;
  line-height: 1.65;
}

.contact-trust {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem auto 1.5rem;
  font-weight: 500;
}

/* ============================================
   Navigation — Animated underline
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(5, 5, 7, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-smooth);
}

.nav.scrolled {
  background: rgba(5, 5, 7, 0.95);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.nav-logo-name {
  color: inherit;
}

.nav-logo-role {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

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

.nav-logo:hover .nav-logo-role {
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  padding: 0.25rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-smooth);
}

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

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

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

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

.nav-link-cta {
  padding: 0.45rem 1rem !important;
  background: var(--accent);
  color: white !important;
  border-radius: 8px;
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-link-cta::after {
  display: none;
}

.nav-link-cta:hover {
  background: var(--accent-hover);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.theme-icon {
  position: absolute;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.theme-icon-sun {
  opacity: 1;
}

.theme-icon-moon {
  opacity: 0;
}

[data-theme="light"] .theme-icon-sun {
  opacity: 0;
}

[data-theme="light"] .theme-icon-moon {
  opacity: 1;
}

.theme-toggle {
  position: relative;
}

.nav-overlay {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 102;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition-smooth), opacity var(--transition-fast);
  transform-origin: center;
}

.nav.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.nav.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   Hero — Split layout, editorial + code
   ============================================ */
.hero,
section {
  scroll-margin-top: 5rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 10rem 0 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(59, 130, 246, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 60% at 100% 80%, rgba(139, 92, 246, 0.05), transparent 50%);
  pointer-events: none;
  animation: heroGradientPulse 8s ease-in-out infinite;
}

@keyframes heroGradientPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to right, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.15em;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.hero-prompt {
  color: var(--accent);
  margin-right: 0.5rem;
  opacity: 0.8;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.08s forwards;
}

.hero-role {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.12s forwards;
}

.hero-tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.15s forwards;
}

.hero-accent {
  color: var(--accent);
  font-weight: 700;
}

.hero-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.18s forwards;
}

.hero-steps {
  position: relative;
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1rem 0 1rem 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.6s ease 0.24s forwards;
}

.hero-steps::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: var(--gradient-accent);
  opacity: 0.5;
  border-radius: 1px;
}

.hero-step {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.hero-step:hover {
  background: rgba(59, 130, 246, 0.06);
  transform: translateX(4px);
}

.hero-step:hover .hero-step-num {
  color: var(--accent-hover);
}

.hero-step-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.hero-step-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-badge {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.5s forwards;
}

.hero-badge-accent {
  color: var(--accent);
  font-weight: 600;
}

/* Code block visual */
.hero-visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-code {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 2;
  padding: 0 2rem 2rem;
  padding-top: 2.5rem;
  background: rgba(12, 12, 15, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 380px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.hero-code:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.08);
}

.hero-code-header {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-code-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.hero-code-path {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.6;
  font-weight: 500;
}

.hero-code-copy-hint {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.hero-code:hover .hero-code-copy-hint {
  opacity: 0.7;
}

.hero-code-copied {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #22c55e;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.hero-code.copied .hero-code-copy-hint {
  opacity: 0;
}

.hero-code.copied .hero-code-copied {
  opacity: 1;
  animation: copyFlash 2s ease forwards;
}

@keyframes copyFlash {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.code-dot-red { background: #ff5f56; }
.code-dot-yellow { background: #ffbd2e; }
.code-dot-green { background: #27c93f; }

.hero-code::before {
  content: '';
  position: absolute;
  left: 0;
  top: 44px;
  bottom: 12px;
  width: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
  opacity: 0.6;
}

.code-line-num {
  display: inline-block;
  width: 1.25em;
  margin-right: 1rem;
  color: var(--text-muted);
  font-size: 0.85em;
  opacity: 0.6;
  user-select: none;
}

.code-key { color: #c678dd; }
.code-var { color: #e06c75; }
.code-string { color: #98c379; }
.code-fn { color: #61afef; }
.code-op { color: var(--accent); }

.code-cmd { color: #98c379; margin-right: 0.35em; }

.code-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-code-line {
  display: block;
}

.code-line-reveal {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  animation: codeReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-code-line:nth-child(2) .code-line-reveal { animation-delay: 0.4s; }
.hero-code-line:nth-child(3) .code-line-reveal { animation-delay: 1.7s; }
.hero-code-line:nth-child(4) .code-line-reveal { animation-delay: 2.5s; }
.hero-code-line:nth-child(5) .code-line-reveal { animation-delay: 3.5s; }
.hero-code-line:nth-child(6) .code-line-reveal { animation-delay: 4.5s; }

@keyframes codeReveal {
  to { clip-path: inset(0 0 0 0); }
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

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

/* ============================================
   Buttons — Shine effect
   ============================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.85rem;
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn svg {
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(4px);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.45);
}

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

.btn-secondary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--text-muted);
  transform: translateY(-3px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ============================================
   About
   ============================================ */
/* Section dividers - thin gradient line between sections */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-hover) 20%, var(--accent) 50%, var(--border-hover) 80%, transparent 100%);
  opacity: 0.5;
}

[data-theme="light"] .section-divider {
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.08) 20%, var(--accent) 50%, rgba(0,0,0,0.08) 80%, transparent 100%);
  opacity: 0.6;
}

.about {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-image-wrapper {
  position: relative;
}

.about-avatar {
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.05), 0 0 40px rgba(59, 130, 246, 0.06);
  position: relative;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-content {
  opacity: 0;
  transform: translateY(30px);
}

.about-content.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-text:last-of-type {
  margin-bottom: 0;
}

.about-quote {
  position: relative;
  margin: 2rem 0 2rem;
  padding: 1.25rem 1.5rem 1.25rem 2.5rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.quote-mark {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  font-size: 2rem;
  font-family: var(--font-display);
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
}

.about-quote p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.about-cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-subtle);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.about-cv-link:hover {
  background: var(--accent);
  color: white;
}

.about-cv-link svg {
  flex-shrink: 0;
}

[data-theme="light"] .about-quote {
  background: rgba(37, 99, 235, 0.06);
  border-left-color: var(--accent);
}

.skills-section {
  margin-top: 2rem;
}

.skills-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.skills-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-group-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background: var(--accent-subtle);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--accent-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08), 0 0 20px rgba(59, 130, 246, 0.12);
}

.skill-tag-more {
  color: var(--text-muted);
  font-style: italic;
  border-style: dashed;
}

.skill-tag-more:hover {
  color: var(--accent);
}

.skill-group-more {
  padding-top: 0.25rem;
}

.skill-more-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.35rem;
}

/* ============================================
   Services — Staggered, glow on hover
   ============================================ */
.services {
  position: relative;
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all var(--transition-smooth);
  opacity: 0;
  transform: translateY(40px);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.service-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px);
}

.service-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border-radius: 12px;
  color: var(--accent);
  margin-bottom: 1rem;
  transition: all var(--transition-smooth);
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-card:hover .service-icon {
  background: rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.service-focus {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  line-height: 1.5;
}

.services-cta {
  text-align: center;
  padding: 1.75rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.services-cta-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* ============================================
   Projects — Gradient border, stagger
   ============================================ */
.projects {
  position: relative;
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition-smooth);
  opacity: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(40px);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: var(--gradient-accent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--delay, 0) * 0.12s);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(59, 130, 246, 0.2);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover .project-card-inner::before {
  opacity: 0.6;
}

.project-card-featured {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 10px 36px rgba(59, 130, 246, 0.16);
}

.project-card-featured::before {
  opacity: 0.45;
}

.project-card-featured:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 18px 52px rgba(59, 130, 246, 0.22);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project-card-inner {
  position: relative;
  min-height: 260px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-badge {
  align-self: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.project-stack {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

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

.project-result {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.5;
  padding: 0.6rem 0.85rem;
  background: var(--accent-subtle);
  border-radius: 8px;
  border-left: 2px solid var(--accent);
}

.project-result-label {
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.35rem;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  transition: all var(--transition-fast);
}

.project-card:hover .project-cta {
  color: var(--accent-hover);
  transform: translateX(4px);
}

/* ============================================
   Blog Preview
   ============================================ */
.blog-preview {
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 0 auto 2rem;
  max-width: 900px;
}

.blog-preview-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-smooth);
  opacity: 0;
  transform: translateY(30px);
  overflow: hidden;
}

.blog-preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.blog-preview-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.blog-preview-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px);
}

.blog-preview-card:hover::before {
  opacity: 1;
}

.blog-preview-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-preview-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-preview-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.blog-preview-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.blog-preview-card:hover .blog-preview-cta {
  color: var(--accent-hover);
  transform: translateX(4px);
}

.blog-preview-cta-wrap {
  text-align: center;
}

/* Blog page (blog/index.html) */
.blog-page {
  min-height: 100vh;
  padding: 5.5rem 0 var(--section-padding);
  background: var(--bg-primary);
}

.blog-header {
  margin-bottom: 3rem;
}

.blog-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color var(--transition-fast);
}

.blog-back:hover {
  color: var(--accent);
}

.blog-page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.blog-page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-list-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.blog-list-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: var(--shadow-card-hover);
}

.blog-list-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Blog post page */
.blog-post-page {
  min-height: 100vh;
  padding: 5.5rem 0 var(--section-padding);
  background: var(--bg-primary);
}

.blog-post {
  max-width: 720px;
  margin: 0 auto;
}

.blog-post-header {
  margin-bottom: 2.5rem;
}

.blog-post-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.blog-post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-post-content {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.blog-post-content p {
  margin-bottom: 1.25rem;
}

.blog-post-content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.blog-post-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
}

.blog-post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--accent);
}

.blog-post-content pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

.blog-post-content a {
  color: var(--accent);
  text-decoration: none;
}

.blog-post-content a:hover {
  text-decoration: underline;
}

.blog-post-content .blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.blog-post-content .blog-cta-btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ============================================
   Contact — WhatsApp
   ============================================ */
.contact {
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
}

.contact-whatsapp {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  opacity: 0;
  transform: translateY(30px);
}

.contact-whatsapp.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem 2rem;
  background: #25d366;
  color: white;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-smooth);
}

.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp svg {
  flex-shrink: 0;
}

.btn-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem 2rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all var(--transition-smooth);
}

.btn-email:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-3px);
}

.btn-email svg {
  flex-shrink: 0;
}

.contact-copy-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.3);
  background: var(--accent-subtle);
}

.btn-copy.copied {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

.contact-whatsapp-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 2.5rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.02) 100%);
}

.footer-available {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-link-whatsapp {
  color: #25d366;
}

.footer-link-whatsapp:hover {
  color: #20bd5a;
}

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

.footer-code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--text-muted);
  opacity: 0.7;
  margin-left: 0.5rem;
}

/* WhatsApp floating button — min 44px touch target */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: white;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  z-index: 99;
  transition: all var(--transition-fast);
}

.whatsapp-float:hover {
  background: #20bd5a;
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

.whatsapp-float:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

/* ============================================
   Responsive — Mobile First
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.25rem;
  }

  .about {
    padding: 4rem 0;
  }

  .services, .projects, .blog-preview, .contact {
    padding: 4rem 0;
  }

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

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .about-grid {
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .nav {
    padding: 1rem 0;
  }

  .nav-container {
    padding: 0 1.25rem;
  }

  .nav-logo {
    font-size: 1.1rem;
    gap: 0.35rem;
  }

  .nav-logo-role {
    font-size: 0.65rem;
  }

  .nav-toggle {
    display: flex;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 99;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
  }

  .nav-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 10, 13, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 5.5rem 1.5rem 2rem;
    gap: 0;
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    z-index: 101;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

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

  .nav-links.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.1s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.25s; }
  .nav-links.open li:nth-child(6) { transition-delay: 0.3s; }

  .nav-link {
    display: block;
    padding: 1rem 0;
    min-height: 44px;
    align-items: center;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
    min-width: 44px;
    min-height: 44px;
  }

  .hero {
    padding: 6rem 0 4rem;
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.25rem;
  }

  .hero-content {
    max-width: none;
  }

  .hero-name {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .hero-role {
    font-size: 0.9rem;
  }

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

  .hero-subtitle {
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .hero-steps {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0 0.75rem 0.75rem;
    margin-bottom: 1.5rem;
  }

  .hero-step {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 120px;
  }

  .hero-step:nth-child(3) {
    flex: 1 1 100%;
    justify-content: center;
  }

  .hero-step-num {
    flex-shrink: 0;
    font-size: 0.55rem;
  }

  .hero-step-text {
    font-size: 0.65rem;
    line-height: 1.25;
  }

  .hero-cta-group {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .hero-cta-group .btn {
    min-height: 48px;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
    margin-top: 1rem;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-code {
    font-size: 0.8rem;
    padding: 0 1.5rem 1.25rem;
    padding-top: 2.25rem;
    max-width: 100%;
  }

  .hero-code::before {
    top: 40px;
  }

  .hero-code-header {
    left: 14px;
    top: 10px;
  }

  .code-dot {
    width: 6px;
    height: 6px;
  }

  .hero-scroll {
    bottom: 1.5rem;
  }

  .about {
    padding: 3.5rem 0;
  }

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

  .about-image-wrapper {
    max-width: 200px;
    margin: 0 auto;
  }

  .about-text {
    font-size: 1rem;
  }

  .about-quote {
    margin: 1.5rem 0 1.5rem;
    padding: 1rem 1.25rem 1rem 2rem;
  }

  .quote-mark {
    font-size: 1.5rem;
    left: 0.6rem;
    top: 0.4rem;
  }

  .about-quote p {
    font-size: 0.95rem;
  }

  .skills {
    gap: 0.5rem;
  }

  .skill-tag {
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
  }

  .services {
    padding: 3.5rem 0;
  }

  .services .section-header {
    margin-bottom: 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .service-card {
    padding: 1.25rem;
  }

  .service-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
  }

  .service-icon svg {
    width: 20px;
    height: 20px;
  }

  .service-name {
    font-size: 1rem;
  }

  .service-desc {
    font-size: 0.8rem;
  }

  .service-focus {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }

  .services-cta {
    padding: 1.25rem;
  }

  .services-cta .btn {
    min-height: 48px;
  }

  .service-card {
    transition: none;
  }

  .service-card:hover,
  .service-card:active {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
  }

  .service-card:hover .service-icon,
  .service-card:active .service-icon {
    transform: none;
    background: var(--accent-subtle);
  }

  .skill-tag {
    transition: none;
  }

  .skill-tag:hover {
    transform: none;
  }

  .whatsapp-float {
    transition: none;
  }

  .whatsapp-float:hover {
    transform: none;
  }

  .projects,
  .blog-preview {
    padding: 3.5rem 0;
  }

  .blog-preview-grid {
    grid-template-columns: 1fr;
  }

  .projects .section-header {
    margin-bottom: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .project-card-inner {
    min-height: 220px;
    padding: 1.25rem;
  }

  .project-name {
    font-size: 1.1rem;
  }

  .project-stack {
    font-size: 0.65rem;
  }

  .project-desc {
    font-size: 0.8rem;
  }

  .project-result {
    font-size: 0.75rem;
  }

  .project-card {
    transition: none;
  }

  .project-card:hover,
  .project-card:active {
    transform: none;
    box-shadow: none;
  }

  .project-card:hover::before {
    opacity: 0;
  }

  .project-card:hover .project-card-inner::before {
    opacity: 0;
  }

  .project-card:hover .project-cta {
    transform: none;
  }

  .contact {
    padding: 3.5rem 0;
  }

  .contact-whatsapp {
    max-width: none;
  }

  .contact-options {
    flex-direction: column;
  }

  .btn-whatsapp,
  .btn-email {
    width: 100%;
    min-height: 52px;
    padding: 1rem 1.5rem;
  }

  .footer {
    padding: 2rem 1.25rem;
    padding-bottom: 5.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-available {
    text-align: center;
  }

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

/* Small mobile */
@media (max-width: 600px) {
  .section-header {
    margin-bottom: 1.5rem;
  }

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

  .section-subtitle {
    font-size: 0.95rem;
  }
}

/* Extra small */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 5.5rem 0 3rem;
  }

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

  .hero-step-text {
    font-size: 0.55rem;
  }

  .hero-step-num {
    font-size: 0.5rem;
  }

  .hero-code {
    font-size: 0.75rem;
    padding: 0 1.25rem 1rem;
    padding-top: 2rem;
  }

  .hero-code::before {
    top: 36px;
  }

  .hero-code-header {
    left: 12px;
    top: 8px;
  }

  .code-dot {
    width: 6px;
    height: 6px;
  }

  .about-image-wrapper {
    max-width: 180px;
  }

  .skill-group-label {
    font-size: 0.6rem;
  }

  .project-card-inner {
    min-height: 220px;
    padding: 1rem;
  }

  .project-name {
    font-size: 1rem;
  }

  .whatsapp-float {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
    width: 52px;
    height: 52px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }
}

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: max(5rem, calc(5rem + env(safe-area-inset-bottom)));
  }

  .whatsapp-float {
    bottom: max(1.5rem, env(safe-area-inset-bottom));
    right: max(1.5rem, env(safe-area-inset-right));
  }
}
