/* ===== Fonts & Variables ===== */
:root {
  --bg: #0b0d11;
  --bg-alt: #0e1117;
  --bg-card: rgba(15, 18, 25, 0.6);
  --bg-glass: rgba(20, 24, 35, 0.55);
  --border: rgba(55, 65, 85, 0.35);
  --border-hover: rgba(80, 95, 120, 0.5);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --aws: #ff9900;
  --azure: #0078d4;
  --gcp-blue: #4285f4;
  --gcp-red: #ea4335;
  --gcp-yellow: #fbbc04;
  --gcp-green: #34a853;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --purple: #a78bfa;
  --green: #34d399;
  --orange: #fb923c;
  --pink: #f472b6;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w: 1120px;
  --glow-blue: 0 0 40px rgba(59, 130, 246, 0.08);
  --glow-cyan: 0 0 40px rgba(34, 211, 238, 0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== Grid BG ===== */
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(59,130,246,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.6) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.glass-card:hover {
  border-color: var(--border-hover);
}

/* ===== Cloud provider highlights ===== */
.hl-aws { color: var(--aws); font-weight: 700; }
.hl-azure { color: var(--azure); font-weight: 700; }
.hl-gcp {
  background: linear-gradient(90deg, var(--gcp-blue), var(--gcp-red), var(--gcp-yellow), var(--gcp-green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 700;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(11, 13, 17, 0.75);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 13, 17, 0.92);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--cyan); }
.nav-logo-bracket { color: var(--blue); }
.nav-menu { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-link {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  color: var(--text-muted); padding: 6px 14px; border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--cyan); background: rgba(34, 211, 238, 0.06);
}
.nav-link--cta {
  color: var(--bg) !important; background: var(--cyan) !important;
  font-weight: 600; margin-left: 8px;
}
.nav-link--cta:hover {
  background: #06b6d4 !important;
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.3);
}
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform var(--transition), opacity var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; padding: 100px 0 60px; overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}

/* Terminal badge */
.terminal-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 10px;
  background: rgba(15, 18, 25, 0.8); border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 20px;
}
.terminal-dot { width: 8px; height: 8px; border-radius: 50%; }
.terminal-dot.red { background: #f87171; }
.terminal-dot.yellow { background: #fbbf24; }
.terminal-dot.green { background: #34d399; }
.terminal-badge-text {
  font-family: var(--mono); font-size: 0.75rem; color: var(--text-muted);
}

.hero-name {
  font-size: clamp(2.8rem, 5.5vw, 4rem); font-weight: 900;
  letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 4px;
  color: #fff;
}
.hero-title {
  font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 500;
  color: var(--text-muted); margin-bottom: 20px;
}

/* Typing block */
.typing-block {
  font-family: var(--mono); font-size: 0.9rem;
  background: rgba(15, 18, 25, 0.7); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  margin-bottom: 20px; display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%;
}
.typing-prompt { color: var(--green); font-weight: 700; }
.typing-text { color: var(--cyan); }
.typing-cursor {
  color: var(--cyan); animation: blink 1s step-end infinite; font-size: 0.85rem;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-summary {
  font-size: 1rem; color: var(--text-muted); line-height: 1.8;
  margin-bottom: 32px; max-width: 540px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; font-size: 0.85rem; font-weight: 600;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font); transition: all var(--transition);
}
.btn-primary {
  background: var(--blue); color: #fff;
}
.btn-primary:hover {
  background: #2563eb; color: #fff;
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text); border-color: var(--text-dim);
  transform: translateY(-2px);
}

/* Dashboard cards */
.dash-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.dash-card {
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; transition: all var(--transition);
}
.dash-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
}
.dash-card-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.dash-icon { color: var(--text-dim); }
.dash-label {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em;
}
.dash-value {
  font-size: 1.6rem; font-weight: 800; color: #fff;
  letter-spacing: -0.03em; margin-bottom: 10px;
}
.dash-unit { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.cloud-logos { display: flex; gap: 8px; font-size: 1.3rem; }
.dash-bar {
  height: 3px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden;
}
.dash-bar-fill {
  height: 100%; border-radius: 3px; transition: width 1.5s ease;
}
.dash-bar-fill[data-color="blue"] { background: var(--blue); }
.dash-bar-fill[data-color="cyan"] { background: var(--cyan); }
.dash-bar-fill[data-color="green"] { background: var(--green); }
.dash-bar-fill[data-color="multi"] {
  background: linear-gradient(90deg, var(--aws), var(--azure), var(--gcp-green));
}

.hero-scroll {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  animation: float 2.5s ease-in-out infinite;
}
.hero-scroll a { color: var(--text-dim); }
.hero-scroll a:hover { color: var(--cyan); }
@keyframes float {
  0%,100%{transform:translateX(-50%) translateY(0)}
  50%{transform:translateX(-50%) translateY(8px)}
}

/* ===== SECTIONS ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-header { margin-bottom: 48px; }
.section-tag {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 600;
  color: var(--cyan); letter-spacing: 0.05em; display: block; margin-bottom: 6px;
}
.section-title {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: #fff;
}

/* ===== ABOUT ===== */
.about-card { padding: 36px; }
.about-text p {
  font-size: 1rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.8;
}
.about-meta {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 24px;
}
.meta-item { display: flex; gap: 8px; align-items: baseline; }
.meta-key {
  font-family: var(--mono); font-size: 0.78rem; color: var(--cyan); font-weight: 600;
}
.meta-val { font-size: 0.9rem; color: var(--text); font-weight: 500; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 40px; }
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-node {
  position: absolute; left: -40px; top: 24px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-dim); z-index: 2;
  transition: all var(--transition);
}
.timeline-node.active {
  border-color: var(--cyan); background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15), 0 0 16px rgba(34, 211, 238, 0.2);
}
.timeline-line {
  position: absolute; left: -34px; top: 40px; bottom: -8px;
  width: 2px; background: linear-gradient(180deg, var(--border-hover), var(--border));
}
.timeline-item:last-child .timeline-line { display: none; }

.timeline-card { padding: 24px; }
.timeline-card:hover { transform: translateX(4px); box-shadow: var(--glow-blue); }

.timeline-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.timeline-role { font-size: 1.05rem; font-weight: 700; color: #fff; }
.timeline-company { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.timeline-date {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  color: var(--cyan); padding: 4px 12px; border-radius: 20px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.15);
  white-space: nowrap;
}
.timeline-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.timeline-list li {
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.7;
  padding-left: 18px; position: relative;
}
.timeline-list li::before {
  content: '▹'; position: absolute; left: 0; color: var(--cyan); font-weight: 700;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px;
}
.project-card {
  padding: 28px; position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; opacity: 0; transition: opacity var(--transition);
}
.project-card:hover::before { opacity: 1; }
.project-card:hover { transform: translateY(-4px); }

.project-card[data-accent="aws"]::before { background: var(--aws); }
.project-card[data-accent="aws"]:hover { box-shadow: 0 0 30px rgba(255,153,0,0.08); }
.project-card[data-accent="purple"]::before { background: var(--purple); }
.project-card[data-accent="purple"]:hover { box-shadow: 0 0 30px rgba(167,139,250,0.08); }
.project-card[data-accent="cyan"]::before { background: var(--cyan); }
.project-card[data-accent="cyan"]:hover { box-shadow: 0 0 30px rgba(34,211,238,0.08); }
.project-card[data-accent="multi"]::before { background: linear-gradient(90deg, var(--aws), var(--azure), var(--gcp-green)); }
.project-card[data-accent="multi"]:hover { box-shadow: 0 0 30px rgba(59,130,246,0.08); }
.project-card[data-accent="green"]::before { background: var(--green); }
.project-card[data-accent="green"]:hover { box-shadow: 0 0 30px rgba(52,211,153,0.08); }
.project-card[data-accent="orange"]::before { background: var(--orange); }
.project-card[data-accent="orange"]:hover { box-shadow: 0 0 30px rgba(251,146,60,0.08); }

.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.project-icon-wrap {
  width: 42px; height: 42px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center;
}
.aws-bg { background: rgba(255,153,0,0.1); color: var(--aws); }
.purple-bg { background: rgba(167,139,250,0.1); color: var(--purple); }
.cyan-bg { background: rgba(34,211,238,0.1); color: var(--cyan); }
.multi-bg { background: rgba(59,130,246,0.1); color: var(--blue); }
.green-bg { background: rgba(52,211,153,0.1); color: var(--green); }
.orange-bg { background: rgba(251,146,60,0.1); color: var(--orange); }

.project-cloud-tag {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.08em;
}
.aws-tag { background: rgba(255,153,0,0.1); color: var(--aws); border: 1px solid rgba(255,153,0,0.2); }
.purple-tag { background: rgba(167,139,250,0.1); color: var(--purple); border: 1px solid rgba(167,139,250,0.2); }
.cyan-tag { background: rgba(34,211,238,0.1); color: var(--cyan); border: 1px solid rgba(34,211,238,0.2); }
.multi-tag { background: rgba(59,130,246,0.1); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
.green-tag { background: rgba(52,211,153,0.1); color: var(--green); border: 1px solid rgba(52,211,153,0.2); }
.orange-tag { background: rgba(251,146,60,0.1); color: var(--orange); border: 1px solid rgba(251,146,60,0.2); }

.project-name { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.project-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 18px; }

.project-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.project-stack code {
  font-family: var(--mono); font-size: 0.7rem; padding: 3px 8px;
  border-radius: 4px; background: rgba(255,255,255,0.04); color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.skill-card { padding: 22px; }
.skill-card:hover { box-shadow: var(--glow-blue); }
.skill-title {
  font-size: 0.9rem; font-weight: 600; color: #fff;
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.skill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot-color); flex-shrink: 0;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--mono); font-size: 0.72rem; padding: 4px 10px;
  border-radius: 5px; background: rgba(255,255,255,0.03); color: var(--text-muted);
  border: 1px solid var(--border); transition: all var(--transition);
}
.chip:hover { color: var(--cyan); border-color: rgba(34,211,238,0.3); }
.chip-aws { color: var(--aws); border-color: rgba(255,153,0,0.25); }
.chip-aws:hover { color: var(--aws); border-color: rgba(255,153,0,0.5); }
.chip-azure { color: var(--azure); border-color: rgba(0,120,212,0.25); }
.chip-azure:hover { color: var(--azure); border-color: rgba(0,120,212,0.5); }
.chip-gcp { color: var(--gcp-blue); border-color: rgba(66,133,244,0.25); }
.chip-gcp:hover { color: var(--gcp-blue); border-color: rgba(66,133,244,0.5); }

/* ===== CERTS ===== */
.certs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px;
}
.cert-card { padding: 24px; text-align: center; }
.cert-card:hover { transform: translateY(-3px); }
.cert-logo {
  display: inline-block; font-family: var(--mono); font-size: 0.7rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  padding: 5px 16px; border-radius: 6px; margin-bottom: 12px;
}
.aws-cert { background: rgba(255,153,0,0.15); color: var(--aws); border: 1px solid rgba(255,153,0,0.25); }
.azure-cert { background: rgba(0,120,212,0.15); color: var(--azure); border: 1px solid rgba(0,120,212,0.25); }
.aviatrix-cert { background: rgba(231,76,60,0.15); color: #e74c3c; border: 1px solid rgba(231,76,60,0.25); }
.cert-card:hover .aws-cert { box-shadow: 0 0 16px rgba(255,153,0,0.2); }
.cert-card:hover .azure-cert { box-shadow: 0 0 16px rgba(0,120,212,0.2); }
.cert-card:hover .aviatrix-cert { box-shadow: 0 0 16px rgba(231,76,60,0.2); }
.cert-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* ===== CONTACT ===== */
.contact-intro {
  font-size: 1.05rem; color: var(--text-muted); margin-bottom: 36px; max-width: 540px;
}
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 32px; text-align: center;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--glow-cyan); border-color: rgba(34,211,238,0.3); }
.contact-svg { color: var(--cyan); }
.contact-label {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim);
}
.contact-value { font-size: 0.88rem; color: var(--text); font-weight: 500; }

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0; border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-prompt {
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim);
}
.fp-user { color: var(--green); }
.fp-sep { color: var(--text-dim); }
.fp-path { color: var(--blue); }
.fp-dollar { color: var(--text-dim); margin: 0 4px 0 0; }
.fp-cmd { color: var(--text-muted); }
.footer-copy { font-size: 0.78rem; color: var(--text-dim); }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Stagger */
.projects-grid .fade-in:nth-child(2){transition-delay:.08s}
.projects-grid .fade-in:nth-child(3){transition-delay:.16s}
.projects-grid .fade-in:nth-child(4){transition-delay:.24s}
.projects-grid .fade-in:nth-child(5){transition-delay:.32s}
.projects-grid .fade-in:nth-child(6){transition-delay:.4s}
.skills-grid .fade-in:nth-child(2){transition-delay:.06s}
.skills-grid .fade-in:nth-child(3){transition-delay:.12s}
.skills-grid .fade-in:nth-child(4){transition-delay:.18s}
.skills-grid .fade-in:nth-child(5){transition-delay:.24s}
.skills-grid .fade-in:nth-child(6){transition-delay:.3s}
.skills-grid .fade-in:nth-child(7){transition-delay:.36s}
.skills-grid .fade-in:nth-child(8){transition-delay:.42s}
.certs-grid .fade-in:nth-child(2){transition-delay:.08s}
.certs-grid .fade-in:nth-child(3){transition-delay:.16s}
.certs-grid .fade-in:nth-child(4){transition-delay:.24s}
.certs-grid .fade-in:nth-child(5){transition-delay:.32s}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .dash-grid { max-width: 400px; }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(11, 13, 17, 0.98); backdrop-filter: blur(16px);
    flex-direction: column; padding: 20px; gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform var(--transition);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-link { padding: 10px 14px; font-size: 0.9rem; width: 100%; }
  .nav-link--cta { margin-left: 0; text-align: center; margin-top: 8px; }
  .hero { padding: 90px 0 50px; min-height: auto; }
  .section { padding: 64px 0; }
  .section-title { font-size: 1.6rem; }
  .timeline { padding-left: 28px; }
  .timeline-node { left: -28px; }
  .timeline-line { left: -22px; }
  .timeline-top { flex-direction: column; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-meta { flex-direction: column; gap: 12px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 2.2rem; }
  .dash-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-card { padding: 14px; }
  .dash-value { font-size: 1.3rem; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; text-align: center; }
  .certs-grid { grid-template-columns: 1fr 1fr; }
}
