@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #08080c;
  --surface: #111118;
  --surface-2: #16161f;
  --border: #1e1e2a;
  --border-hover: #2a2a3a;
  --text: #eeeef0;
  --text-secondary: #9595a8;
  --accent: #c084fc;
  --accent-2: #f472b6;
  --accent-glow: rgba(192, 132, 252, 0.15);
  --gradient: linear-gradient(135deg, #c084fc, #f472b6);
  --gradient-subtle: linear-gradient(135deg, rgba(192,132,252,0.12), rgba(244,114,182,0.08));
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1100px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
}

/* ─── Topbar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(8, 8, 12, 0.8);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav a.active {
  color: var(--text);
}

/* ─── Animated Background Orbs ─── */
.bg-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow::before,
.bg-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  animation: float 20s ease-in-out infinite;
}

.bg-glow::before {
  width: 600px;
  height: 600px;
  background: rgba(192, 132, 252, 0.07);
  top: -200px;
  right: -100px;
}

.bg-glow::after {
  width: 500px;
  height: 500px;
  background: rgba(244, 114, 182, 0.05);
  bottom: -100px;
  left: -150px;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ─── Fade In Animation ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fade-in-1 { animation-delay: 0.05s; }
.fade-in-2 { animation-delay: 0.15s; }
.fade-in-3 { animation-delay: 0.25s; }
.fade-in-4 { animation-delay: 0.35s; }
.fade-in-5 { animation-delay: 0.45s; }

/* ─── Hero ─── */
.hero {
  padding: 80px 0 60px;
  position: relative;
  z-index: 1;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
}

.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0.6;
  z-index: 0;
  filter: blur(1px);
}

.hero-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  position: relative;
  z-index: 1;
  border: 3px solid var(--bg);
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-bio {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 540px;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.hero-link--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(192, 132, 252, 0.25);
}

.hero-link--primary:hover {
  box-shadow: 0 6px 28px rgba(192, 132, 252, 0.35);
  transform: translateY(-1px);
}

.hero-link--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-link--ghost:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.03);
}

/* ─── Section ─── */
.section {
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

/* ─── Skill Chips (Home) ─── */
.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--gradient-subtle);
  border: 1px solid rgba(192,132,252,0.12);
  color: var(--text);
  transition: var(--transition);
}

.skill:hover {
  border-color: rgba(192,132,252,0.3);
  background: rgba(192,132,252,0.1);
}

/* ─── Feature Cards (Home) ─── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.feature {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
}

.feature:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-subtle);
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.feature h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.feature-arrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.feature:hover .feature-arrow {
  gap: 10px;
}

/* ─── Page Header ─── */
.page-header {
  padding: 72px 0 20px;
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
}

/* ─── Project Cards ─── */
.project-grid {
  display: grid;
  gap: 16px;
}

.project {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.project:hover {
  border-color: var(--border-hover);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.project h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.badge {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--gradient-subtle);
  border: 1px solid rgba(192,132,252,0.15);
  color: var(--accent);
  white-space: nowrap;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.project-desc li {
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

.project-desc li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.tag:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
}

.project-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(192,132,252,0.05);
}

.project-cta--primary {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(192, 132, 252, 0.25);
}

.project-cta--primary:hover {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 28px rgba(192, 132, 252, 0.35);
  transform: translateY(-1px);
}

/* ─── AI Hub Page ─── */
.hub-portal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--gradient-subtle);
  border: 1px solid rgba(192,132,252,0.18);
  margin-bottom: 24px;
}

.hub-portal-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.hub-portal-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 540px;
}

.hub-overview {
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.hub-overview h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hub-overview p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.back-link {
  margin-top: 32px;
  text-align: center;
}

.back-link a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.back-link a:hover {
  color: var(--accent);
}

/* ─── Certificate Grid ─── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.cert {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.cert:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.cert-img-wrap {
  overflow: hidden;
  height: 200px;
  background: var(--surface-2);
}

.cert img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cert:hover img {
  transform: scale(1.06);
}

.cert-body {
  padding: 18px 20px;
}

.cert-body h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.cert-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.cert-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: var(--transition);
}

.cert:hover .cert-view {
  gap: 10px;
}

/* ─── Footer ─── */
.footer {
  padding: 48px 0 32px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--accent);
  font-weight: 600;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--accent-2);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .container {
    width: min(var(--max-width), calc(100% - 32px));
  }

  .hero { padding: 48px 0 40px; }

  .hero-layout {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hero-photo { width: 140px; height: 140px; }

  .hero-bio { max-width: 100%; }

  .hero-links { justify-content: center; }

  .features { grid-template-columns: 1fr; }

  .topbar-inner {
    height: auto;
    padding: 14px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav { flex-wrap: wrap; gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 0.85rem; }

  .project-top { flex-direction: column; }

  .cert-grid { grid-template-columns: 1fr; }

  .page-header { padding-top: 48px; }

  .hub-portal {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2rem; }
  .hero-links { flex-direction: column; align-items: stretch; }
  .hero-link { justify-content: center; }
}
