.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-light);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 97, 201, 0.08);
  margin-bottom: 24px;
}
.hero-tag .dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 18px;
}
.hero h1 .glow {
  background: linear-gradient(135deg, #fff 0%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-subtitle::before {
  content: '//';
  color: var(--blue-light);
}
.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

/* Terminal visual */
.hero-visual {
  position: relative;
  perspective: 1200px;
}
.terminal {
  border-radius: var(--radius-xl);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform 0.6s var(--ease);
  box-shadow:
    0 40px 100px rgba(0,0,0,0.5),
    0 0 80px rgba(59, 130, 246, 0.15);
}
.terminal:hover { transform: rotateY(-4deg) rotateX(2deg); }
.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.terminal-dots span:nth-child(1) { background: #ef4444; opacity: 0.6; }
.terminal-dots span:nth-child(2) { background: #eab308; opacity: 0.6; }
.terminal-dots span:nth-child(3) { background: #22c55e; opacity: 0.6; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.terminal-body {
  padding: 24px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  min-height: 320px;
}
.term-line { margin-bottom: 4px; }
.term-prompt { color: var(--blue-light); }
.term-out { color: var(--text-secondary); }
.term-cmd { color: #fff; }
.term-key { color: var(--blue-light); }
.term-str { color: #60a5fa; }
.term-cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--blue-light);
  vertical-align: middle;
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Snapshot */
.snapshot {
  padding: 44px 0 72px;
  margin-top: -40px;
}
.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.snapshot-card { padding: 28px 24px; text-align: center; }
.snapshot-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, var(--blue-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.snapshot-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Quick about */
.quick-about { padding: 62px 0; }
.about-intro {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Featured preview */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.preview-card {
  padding: 32px;
}
.preview-card h3 {
  font-size: 1.4rem;
  margin: 16px 0 12px;
}
.preview-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Services preview */
.services-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.service-mini {
  padding: 28px;
  border-left: 2px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.service-mini:hover { border-left-color: var(--blue-light); }
.service-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--blue-light);
  margin-bottom: 12px;
}
.service-mini h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.service-mini p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; max-width: 560px; margin: 0 auto; }
  .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero { padding: 120px 0 60px; min-height: auto; }
  .hero h1 { font-size: 2.4rem; }
  .terminal { transform: none; }
}

@media (max-width: 520px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .terminal-body { font-size: 11px; padding: 18px 14px; }
}
/* Profile visual replacing the terminal card */
.profile-visual { position: relative; min-height: 0; height: clamp(360px, 42vw, 500px); display: grid; place-items: center; padding: 16px; overflow: hidden; transform: rotateY(-8deg) rotateX(4deg); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.profile-visual:hover { transform: rotateY(-4deg) rotateX(2deg); }
.profile-visual > img { position: relative; z-index: 2; width: min(100%, 440px); aspect-ratio: 1 / 1; object-fit: contain; filter: grayscale(1) contrast(1.04); border: 0; border-radius: 0; }
.profile-visual-glow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(59,130,246,.30), transparent 68%); filter: blur(24px); }
.profile-visual-caption { position: absolute; z-index: 3; left: 28px; right: 28px; bottom: 24px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 13px 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(5,7,10,.62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.profile-visual-caption span { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg,var(--blue-dark),var(--blue-primary)); font-family: var(--font-mono); font-size: 11px; color: #fff; }
.profile-visual-caption strong { font-family: var(--font-display); font-size: .95rem; }
.profile-visual-caption small { color: var(--text-muted); font-family: var(--font-mono); font-size: 10px; }
@media (max-width: 768px) { .profile-visual { min-height: auto; transform: none; padding: 18px; } .profile-visual:hover { transform: none; } .profile-visual > img { width: min(100%, 420px); } .profile-visual-caption { left: 20px; right: 20px; bottom: 18px; } }
@media (prefers-reduced-motion: reduce) { .profile-visual, .profile-visual:hover { transform: none; } }

.preview-projects-cta { text-align: center; margin-top: 20px; }
.profile-visual > img { height: 100%; }

@media (max-width: 980px) {
  .profile-visual { height: clamp(340px, 68vw, 480px); }
}

@media (max-width: 520px) {
  .profile-visual { height: 330px; padding: 10px; border-radius: 22px; }
  .profile-visual > img { width: min(100%, 300px); }
  .profile-visual-caption { left: 14px; right: 14px; bottom: 14px; padding: 10px 12px; }
  .preview-projects-cta { margin-top: 22px; }
}

@media (max-width: 380px) {
  .profile-visual { height: 300px; }
  .profile-visual-caption strong { font-size: .9rem; }
  .profile-visual-caption small { font-size: .72rem; }
}

/* Hero profile caption: keep the identity strip below the portrait, not over it. */
.profile-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
}
.profile-visual > img {
  position: relative;
  z-index: 2;
  width: min(100%, 440px);
  height: auto;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  align-self: center;
  flex: 1 1 auto;
  min-height: 0;
}
.profile-visual-caption {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 2px;
  padding: 12px 16px;
  flex: 0 0 auto;
}
.profile-visual-caption strong,
.profile-visual-caption small {
  grid-column: 1;
}
.hero-social .social-whatsapp {
  width: auto;
  min-width: 44px;
  padding: 0 12px;
  gap: 8px;
}
.hero-whatsapp-number {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .02em;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .profile-visual {
    height: auto;
    min-height: 0;
    padding: 16px;
  }
  .profile-visual > img {
    width: min(100%, 420px);
    flex: 0 1 auto;
  }
  .profile-visual-caption {
    left: auto;
    right: auto;
    bottom: auto;
  }
}
@media (max-width: 480px) {
  .hero-social .social-whatsapp {
    padding: 0 10px;
  }
  .hero-whatsapp-number {
    display: none;
  }
}
