/* ===== Tievo.dev — INFRA_CORE portfolio ===== */
:root {
  --bg: #05060a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.55);
  --accent-glow: rgba(34, 211, 238, 0.15);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== Background layers ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  z-index: -1;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

/* ===== Nav ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(5, 6, 10, 0.6);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
}
.logo-sep { color: var(--muted); }
.accent { color: var(--accent); text-shadow: 0 0 12px var(--accent-glow); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-btn {
  color: var(--accent) !important;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  padding: 6px 14px;
}
.nav-btn:hover { background: var(--accent-glow); }

/* ===== Hero ===== */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 120px 24px 90px;
}
.term-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 5px;
  padding: 5px 12px;
}
h1 {
  margin-top: 26px;
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fff 20%, var(--accent) 50%, #fff 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero-sub {
  margin-top: 28px;
  max-width: 620px;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 300;
  color: var(--muted);
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #05060a;
  font-weight: 600;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-dim); background: var(--surface); }

/* ===== Section shell ===== */
.block { max-width: 1080px; margin: 0 auto; padding: 60px 24px; }
.sec-head { display: flex; align-items: center; gap: 20px; margin-bottom: 34px; }
.sec-tag {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-dim);
}
.sec-line { flex: 1; height: 1px; background: var(--border); }

/* ===== Services ===== */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.svc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.svc:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  background: var(--surface-2);
}
.svc-id { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-bottom: 14px; }
.svc h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.svc p { color: var(--muted); font-size: 0.95rem; font-weight: 300; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 9px;
}

/* ===== Certifications ===== */
.certs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.cert {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.25s, background 0.25s;
}
.cert:hover { border-color: var(--accent-dim); background: var(--surface-2); }
.cert-status {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.cert h4 { font-size: 1rem; font-weight: 700; letter-spacing: 0.5px; }
.cert-tech { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ===== Featured project ===== */
.project {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: border-color 0.25s, background 0.25s;
}
.project:hover { border-color: var(--accent-dim); background: var(--surface-2); }
.project-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0c12;
}
.project-media img { display: block; width: 100%; height: auto; }
.project-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 12px;
}
.project-body h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.project-body p { color: var(--muted); font-size: 0.97rem; font-weight: 300; }
.project-body em { color: var(--text); font-style: normal; }
.project-body strong { color: var(--accent); font-weight: 600; }
.project-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

@media (max-width: 720px) {
  .project { grid-template-columns: 1fr; }
}

/* ===== Contact ===== */
.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.contact:not(.static):hover {
  transform: translateY(-3px);
  border-color: var(--accent-dim);
  background: var(--surface-2);
}
.c-label { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.c-value { font-size: 1.05rem; font-weight: 700; }
.c-action { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 4px; }
.c-action.muted { color: var(--muted); }

/* ===== Footer ===== */
footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 50px 24px 70px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.foot-logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--muted);
  margin-bottom: 18px;
}
.foot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.term-chip.small { font-size: 10px; padding: 3px 9px; }
.foot-copy { font-family: var(--mono); font-size: 10px; color: rgba(255, 255, 255, 0.25); }
.foot-cuba { font-family: var(--mono); font-size: 10px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.foot-cookies { font-family: var(--mono); font-size: 10px; color: var(--muted); text-decoration: underline; transition: color 0.2s; }
.foot-cookies:hover { color: var(--accent); }
.heart { color: #ff3b3b; animation: beat 0.9s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

/* ===== Reveal on load ===== */
.reveal { opacity: 0; transform: translateY(16px); animation: rise 0.7s ease forwards; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .heart, h1 { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 620px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-btn) { display: none; }
  .hero { padding: 80px 24px 60px; }
}
