:root {
  --bg:          #060d1a;
  --bg-card:     #0c1527;
  --bg-card-h:   #0f1d35;
  --border:      #1a2a45;
  --border-h:    #2a4060;
  --text:        #e2e8f0;
  --muted:       #7a8fad;
  --cyan:        #38bdf8;
  --purple:      #a78bfa;
  --green:       #4ade80;
  --orange:      #fb923c;
  --pink:        #f472b6;
  --grad:        linear-gradient(135deg, #38bdf8, #a78bfa);
  --grad-r:      linear-gradient(135deg, #a78bfa, #38bdf8);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', monospace;
  --r:           14px;
  --nav-h:       64px;
  --max-w:       980px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { color: var(--text); font-weight: 600; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
section { padding: 6rem 0; }

/* ─── Section titles ─────────────────────────────────── */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.875rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--grad);
  border-radius: 2px;
}
.section-title.centered { text-align: center; }
.section-title.centered::after { left: 50%; transform: translateX(-50%); }
.mono { font-family: var(--mono); }

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 9px;
  font-weight: 500; font-size: 0.875rem;
  border: 1px solid transparent;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary {
  background: var(--grad); color: #030810;
  border-color: transparent;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-secondary {
  background: transparent; color: var(--text);
  border-color: var(--border-h);
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost {
  background: transparent; color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-h); }

/* ─── Nav ────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 100;
  background: rgba(6, 13, 26, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
#nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 600;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: 0.05em;
}
.nav-links { display: flex; align-items: center; gap: 2.5rem; }
.nav-links a { font-size: 0.875rem; color: var(--muted); transition: color 0.2s; }
.nav-links a:not(.btn-nav):hover,
.nav-links a.active { color: var(--text); }
.btn-nav {
  padding: 6px 18px !important; border-radius: 7px;
  border: 1px solid rgba(167, 139, 250, 0.4) !important;
  color: var(--purple) !important;
}
.btn-nav:hover { background: rgba(167, 139, 250, 0.08) !important; border-color: var(--purple) !important; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all 0.25s;
}
.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;
  padding-top: var(--nav-h); position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(56,189,248,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 40%, rgba(167,139,250,0.07) 0%, transparent 70%);
  background-image:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(56,189,248,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 40%, rgba(167,139,250,0.07) 0%, transparent 70%),
    linear-gradient(rgba(56,189,248,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.025) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  gap: 3rem; padding: 5rem 28px;
  width: 100%; max-width: var(--max-w); margin: 0 auto;
}
.hero-text { flex: 1; min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--border-h);
  background: rgba(12,21,39,0.8); font-size: 0.8rem;
  color: var(--muted); margin-bottom: 1.75rem;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  flex-shrink: 0; animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.35} }

#hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 4.5rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 1rem;
  white-space: nowrap;
  background: linear-gradient(135deg, #f0f6fc 0%, #94a3b8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  font-weight: 600; margin-bottom: 0.875rem;
}
.hero-sub { color: var(--muted); font-size: 0.875rem; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1.75rem; }
.hero-loc {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--muted);
}

/* Photo */
.hero-photo-wrap {
  flex-shrink: 0; position: relative;
  width: 260px; height: 260px;
}
.hero-photo-ring {
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--grad); padding: 3px;
  box-shadow: 0 0 40px rgba(56,189,248,0.15), 0 0 80px rgba(167,139,250,0.1);
}
.hero-photo-inner {
  width: 100%; height: 100%; border-radius: 50%;
  overflow: hidden; background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
}
.hero-photo-inner img { width: 100%; height: 100%; object-fit: cover; }
.photo-monogram {
  font-size: 4rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  font-family: var(--mono); display: flex;
  align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.hero-photo-glow {
  position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.12) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
}

/* ─── About ──────────────────────────────────────────── */
#about { background: linear-gradient(180deg, rgba(56,189,248,0.02) 0%, transparent 60%); }

.about-pro-card {
  display: grid; grid-template-columns: 1fr 200px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 1.5rem;
}
.about-text { padding: 2.5rem; border-right: 1px solid var(--border); }
.about-text p { color: var(--muted); line-height: 1.85; margin-bottom: 1.1rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-certs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 1.5rem; }
.cert-tag {
  padding: 4px 12px;
  background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.2);
  border-radius: 100px; font-size: 0.78rem; color: var(--cyan);
  font-family: var(--mono);
}
.about-stats {
  display: flex; flex-direction: column; justify-content: center;
  gap: 2rem; padding: 2.5rem;
}
.stat-num {
  display: block; font-size: 2.75rem; font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Personal card */
.about-personal-card {
  display: flex; gap: 1.5rem; align-items: flex-start;
  background: linear-gradient(135deg, rgba(167,139,250,0.06) 0%, rgba(56,189,248,0.04) 100%);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: var(--r); padding: 2rem;
}
.personal-icon { font-size: 2rem; flex-shrink: 0; }
.personal-content h3 {
  font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem;
  background: var(--grad-r); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.personal-content p { color: var(--muted); line-height: 1.8; font-size: 0.93rem; }

/* ─── Experience ─────────────────────────────────────── */
#experience { background: var(--bg); }
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute;
  left: 7px; top: 12px; bottom: 12px; width: 2px;
  background: linear-gradient(180deg, var(--cyan) 0%, var(--purple) 60%, var(--border) 100%);
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 1.75rem; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
  position: absolute; left: -32px; top: 26px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(56,189,248,0.1); z-index: 1;
}
.tl-item:nth-child(2) .tl-dot { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(167,139,250,0.1); }
.tl-item:nth-child(3) .tl-dot { border-color: var(--muted); box-shadow: none; }
.tl-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.tl-card:hover {
  background: var(--bg-card-h);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}
.tl-item:nth-child(1) .tl-card:hover { border-color: rgba(56,189,248,0.3); }
.tl-item:nth-child(2) .tl-card:hover { border-color: rgba(167,139,250,0.3); }
.tl-item:nth-child(3) .tl-card:hover { border-color: var(--border-h); }
.tl-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.tl-role { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.tl-company { font-size: 0.875rem; font-weight: 500; }
.tl-item:nth-child(1) .tl-company { color: var(--cyan); }
.tl-item:nth-child(2) .tl-company { color: var(--purple); }
.tl-item:nth-child(3) .tl-company { color: var(--muted); }
.acquired { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.tl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tl-date { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.tl-loc { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.tl-bullets { margin-bottom: 1.25rem; }
.tl-bullets li {
  position: relative; padding-left: 1.5rem;
  margin-bottom: 0.625rem; font-size: 0.875rem;
  color: var(--muted); line-height: 1.75;
}
.tl-bullets li::before { content: '▸'; position: absolute; left: 0; font-size: 0.75em; top: 0.25em; }
.tl-item:nth-child(1) .tl-bullets li::before { color: var(--cyan); }
.tl-item:nth-child(2) .tl-bullets li::before { color: var(--purple); }
.tl-item:nth-child(3) .tl-bullets li::before { color: var(--muted); }
.tl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-tags span {
  padding: 3px 10px; border-radius: 4px;
  font-size: 0.73rem; font-family: var(--mono);
}
.tag-cloud { background: rgba(56,189,248,0.07); border: 1px solid rgba(56,189,248,0.18); color: var(--cyan); }
.tag-data  { background: rgba(167,139,250,0.07); border: 1px solid rgba(167,139,250,0.18); color: var(--purple); }
.tag-sre   { background: rgba(74,222,128,0.07); border: 1px solid rgba(74,222,128,0.18); color: var(--green); }

/* ─── Skills ─────────────────────────────────────────── */
#skills { background: linear-gradient(180deg, rgba(167,139,250,0.02) 0%, transparent 80%); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 1.25rem; }
.skill-group {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
  position: relative; overflow: hidden;
}
.skill-group::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  border-radius: 2px 2px 0 0;
}
.sg-cloud::before  { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.sg-infra::before  { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.sg-db::before     { background: linear-gradient(90deg, #fb923c, #f59e0b); }
.sg-data::before   { background: linear-gradient(90deg, #f472b6, #ec4899); }
.sg-sre::before    { background: linear-gradient(90deg, #4ade80, #22c55e); }
.sg-cloud:hover  { border-color: rgba(56,189,248,0.3); background: var(--bg-card-h); }
.sg-infra:hover  { border-color: rgba(167,139,250,0.3); background: var(--bg-card-h); }
.sg-db:hover     { border-color: rgba(251,146,60,0.3); background: var(--bg-card-h); }
.sg-data:hover   { border-color: rgba(244,114,182,0.3); background: var(--bg-card-h); }
.sg-sre:hover    { border-color: rgba(74,222,128,0.3); background: var(--bg-card-h); }
.skill-cat { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 1rem; }
.sg-cloud .skill-cat { color: var(--cyan); }
.sg-infra .skill-cat { color: var(--purple); }
.sg-db    .skill-cat { color: var(--orange); }
.sg-data  .skill-cat { color: var(--pink); }
.sg-sre   .skill-cat { color: var(--green); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  padding: 5px 11px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.8rem; color: var(--muted);
  transition: all 0.2s; cursor: default;
}
.sg-cloud .skill-tags span:hover { border-color: var(--cyan); color: var(--text); }
.sg-infra .skill-tags span:hover { border-color: var(--purple); color: var(--text); }
.sg-db    .skill-tags span:hover { border-color: var(--orange); color: var(--text); }
.sg-data  .skill-tags span:hover { border-color: var(--pink); color: var(--text); }
.sg-sre   .skill-tags span:hover { border-color: var(--green); color: var(--text); }

/* ─── Education ──────────────────────────────────────── */
#education { background: var(--bg); }
.edu-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.edu-card {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 2rem; transition: border-color 0.2s;
}
.edu-card.featured {
  border-color: rgba(56,189,248,0.2);
  background: linear-gradient(135deg, rgba(56,189,248,0.04) 0%, rgba(12,21,39,1) 100%);
}
.edu-card.featured:hover { border-color: rgba(56,189,248,0.4); }
.edu-icon { font-size: 2rem; flex-shrink: 0; }
.edu-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 5px; }
.edu-degree { font-size: 0.875rem; color: var(--cyan); margin-bottom: 4px; }
.edu-year { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); }
.cert-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.cert-card {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem; transition: all 0.2s;
}
.cert-rhcsa:hover { border-color: rgba(251,146,60,0.35); background: rgba(251,146,60,0.04); }
.cert-azure:hover { border-color: rgba(56,189,248,0.35); background: rgba(56,189,248,0.04); }
.cert-icon { font-size: 1.75rem; flex-shrink: 0; }
.cert-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; }
.cert-card p { font-size: 0.8rem; color: var(--muted); }

/* ─── Contact ────────────────────────────────────────── */
#contact { background: linear-gradient(180deg, rgba(167,139,250,0.02) 0%, transparent 100%); }
.contact-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.contact-sub { color: var(--muted); margin-bottom: 2.5rem; font-size: 0.95rem; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 1.75rem 1rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--muted); transition: all 0.25s;
}
.contact-card:hover {
  background: var(--bg-card-h); transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.contact-icon-wrap {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.contact-card:hover .contact-icon-wrap { transform: scale(1.1); }
.ci-email    { background: rgba(56,189,248,0.1);  border: 1px solid rgba(56,189,248,0.2);  color: var(--cyan); }
.ci-gmail    { background: rgba(251,146,60,0.1);  border: 1px solid rgba(251,146,60,0.2);  color: var(--orange); }
.ci-phone    { background: rgba(74,222,128,0.1);  border: 1px solid rgba(74,222,128,0.2);  color: var(--green); }
.ci-whatsapp { background: rgba(74,222,128,0.1);  border: 1px solid rgba(74,222,128,0.2);  color: #25d366; }
.ci-linkedin   { background: rgba(56,189,248,0.1);  border: 1px solid rgba(56,189,248,0.2);  color: var(--cyan); }
.ci-github     { background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.2); color: var(--purple); }
.ci-instagram  { background: rgba(244,114,182,0.1); border: 1px solid rgba(244,114,182,0.2); color: var(--pink); }
.ci-x          { background: rgba(226,232,240,0.08); border: 1px solid rgba(226,232,240,0.15); color: var(--text); }
.contact-card:hover.contact-card:nth-child(1) { border-color: rgba(56,189,248,0.35); }
.contact-card:hover.contact-card:nth-child(2) { border-color: rgba(74,222,128,0.35); }
.contact-card:hover.contact-card:nth-child(3) { border-color: rgba(56,189,248,0.35); }
.contact-card:hover.contact-card:nth-child(4) { border-color: rgba(167,139,250,0.35); }
.contact-label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.contact-val { font-size: 0.82rem; word-break: break-all; color: var(--text); }

/* ─── Footer ─────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 1.75rem 0; text-align: center; }
footer p { font-size: 0.78rem; color: var(--muted); }
footer a { color: var(--cyan); }
footer a:hover { color: var(--purple); }

/* ─── Scroll animations ──────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner { flex-direction: column-reverse; align-items: center; text-align: center; padding: 4rem 28px; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  #hero h1 { white-space: normal; font-size: clamp(2.2rem, 8vw, 3.5rem); }
  .hero-photo-wrap { width: 200px; height: 200px; }
  .hero-photo-ring { width: 200px; height: 200px; }
  .hero-cta { justify-content: center; }
  .hero-loc { justify-content: center; }
}
@media (max-width: 768px) {
  section { padding: 4rem 0; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(6,13,26,0.97); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px); padding: 1rem 1.5rem 1.5rem;
    flex-direction: column; align-items: flex-start; gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { padding: 0.8rem 0; display: block; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: none; }
  .btn-nav { border: none !important; border-radius: 0 !important; padding: 0.8rem 0 !important; }
  .about-pro-card { grid-template-columns: 1fr; }
  .about-text { border-right: none; border-bottom: 1px solid var(--border); }
  .about-stats { flex-direction: row; gap: 1.5rem; justify-content: space-around; }
  .tl-header { flex-direction: column; gap: 0.5rem; }
  .tl-meta { align-items: flex-start; }
  .cert-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { padding: 9px 16px; font-size: 0.82rem; }
}
