:root {
  --bg: #0d1117;
  --bg-deep: #0b0e14;
  --hero-from: #0a1128;
  --surface: #161b22;
  --primary: #0052ff;
  --primary-2: #0066ff;
  --accent: #0080ff;
  --cyan: #00d2ff;
  --green: #69f0ae;
  --text: #ffffff;
  --text-70: rgba(255, 255, 255, 0.7);
  --text-60: rgba(255, 255, 255, 0.6);
  --text-54: rgba(255, 255, 255, 0.54);
  --text-38: rgba(255, 255, 255, 0.38);
  --border: rgba(255, 255, 255, 0.1);
  --divider: rgba(255, 255, 255, 0.12);
  --appbar-h: 64px;
  --gutter: 80px;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--appbar-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p {
  margin: 0;
}

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}
.icon--cyan { color: var(--cyan); }
.icon--green { color: var(--green); }

.muted { color: var(--text-60); font-weight: 400; }
.accent { color: var(--accent); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- APP BAR ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--appbar-h);
  background: rgba(22, 27, 34, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.appbar.is-scrolled { border-bottom-color: var(--border); }

.appbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 16px 32px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__badge {
  background: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
}
.brand__name { font-weight: 600; font-size: 18px; }

.nav { display: flex; gap: 4px; }
.nav__link {
  color: var(--text-70);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.nav__link:hover { background: rgba(0, 102, 255, 0.1); color: var(--text); }
.nav__link.is-active { color: var(--cyan); }

.menu-btn {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
}
.menu-btn .icon { width: 24px; height: 24px; }

/* ---------- DRAWER ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
}
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  width: min(304px, 85vw);
  background: var(--surface);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }
.drawer__header {
  position: relative;
  background: var(--primary);
  height: 170px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}
.drawer__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: 0;
  color: #fff;
  padding: 6px;
  cursor: pointer;
}
.drawer__nav a {
  display: block;
  padding: 16px 20px;
  font-size: 16px;
}
.drawer__nav a:hover { background: rgba(255, 255, 255, 0.05); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 82, 255, 0.35);
}
.btn--primary:hover { background: var(--primary-2); box-shadow: 0 6px 20px rgba(0, 102, 255, 0.45); }
.btn--outline { border: 1px solid rgba(255, 255, 255, 0.3); }
.btn--outline:hover { border-color: var(--cyan); background: rgba(0, 210, 255, 0.06); }

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--bg));
  padding-block: 80px;
}
.hero__inner {
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero__text { flex: 1; }

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0, 82, 255, 0.2);
  border: 1px solid var(--primary);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
}
.hero h1 {
  margin-top: 16px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
}
.hero__role {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-70);
  letter-spacing: 1.1px;
}
.hero__desc {
  margin-top: 20px;
  max-width: 760px;
  color: var(--text-60);
  line-height: 1.6;
}
.hero__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.avatar {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 4px solid var(--primary-2);
  box-shadow: 0 0 30px 10px rgba(0, 102, 255, 0.3);
  background: var(--surface);
  display: grid;
  place-items: center;
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar__icon { width: 100px; height: 100px; fill: var(--text-54); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- SECTIONS ---------- */
.section { padding-block: 60px; }
.section--tight { padding-block: 40px; }
.section__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 24px;
}
.section__num { color: var(--cyan); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.card--lg { border-radius: var(--radius); padding: 24px; }

hr {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 16px 0 12px;
}

/* About */
.edu__head { display: flex; align-items: center; gap: 10px; }
.edu__head h3 { font-size: 16px; font-weight: 700; }
.edu__degree { margin-top: 8px; color: var(--text-70); }

.cert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.cert__label { display: flex; align-items: center; gap: 10px; }
.text-link {
  color: var(--accent);
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
}
.text-link:hover { background: rgba(0, 128, 255, 0.1); }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-card {
  min-height: 140px;
  transition: border-color 0.2s, transform 0.2s;
}
.skill-card:hover { border-color: rgba(0, 210, 255, 0.4); transform: translateY(-3px); }
.skill-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-sm {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-70);
}

/* Experience */
.companies { display: grid; gap: 40px; }
.company__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.company__name { font-size: 22px; font-weight: 700; color: var(--cyan); }
.company__period { color: var(--text-54); font-size: 13px; }
.company__role {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-70);
}
.company hr { margin-top: 20px; }

.project { padding-block: 8px 20px; }
.project:last-child { padding-bottom: 0; }
.project h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.project h4::before { content: "• "; color: var(--cyan); }
.project p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-60);
  line-height: 1.5;
}
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.tag {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 82, 255, 0.15);
  border: 1px solid rgba(0, 82, 255, 0.4);
  color: var(--cyan);
  font-size: 11px;
}

/* Contact */
.contact {
  background: var(--bg-deep);
  padding-block: 60px;
}
.contact__inner { text-align: center; }
.contact h2 { font-size: 28px; font-weight: 700; }
.contact .muted { margin-top: 12px; }
.contact__chips {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-70);
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
}
.chip .icon { width: 18px; height: 18px; color: var(--accent); }
a.chip:hover { border-color: var(--accent); color: var(--text); }
.footer {
  margin-top: 40px;
  color: var(--text-38);
  font-size: 12px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------- RESPONSIVE (Flutter breakpoint: 800px) ---------- */
@media (max-width: 1100px) and (min-width: 800px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 799px) {
  :root { --gutter: 24px; --appbar-h: 56px; }
  .appbar__inner { padding-inline: 8px 16px; flex-direction: row-reverse; justify-content: flex-end; gap: 8px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .hero { padding-block: 48px; }
  .hero h1 { font-size: 32px; }
  .hero__role { font-size: 15px; }
  .avatar { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 0; }
  .company__name { font-size: 20px; }
  .card--lg { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
