/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #FFFFFF;
  --bg-alt:       #F8FAFC;
  --border:       #E2E8F0;
  --border-light: #F1F5F9;
  --text-primary: #0F172A;
  --text-sec:     #64748B;
  --text-muted:   #94A3B8;
  --accent:       #7C3AED;
  --accent-light: #F5F3FF;
  --accent-hover: #6D28D9;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm:    0 1px 2px rgba(0,0,0,0.05);
  --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.10);

  --nav-h:     64px;
  --max-w:     1160px;
  --sec-pad:   96px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

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

/* ─── Section alt bg ───────────────────────────────────────── */
.section-alt { background: var(--bg-alt); }

/* ─── Section header ───────────────────────────────────────── */
.section-header { margin-bottom: 56px; }

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-sec);
  max-width: 560px;
  line-height: 1.6;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124,58,237,0.25);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* ─── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--text-sec);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover { color: var(--text-primary); background: var(--bg-alt); }

.nav-links a.nav-cta {
  color: var(--accent);
  border: 1px solid var(--border);
  margin-left: 8px;
}
.nav-links a.nav-cta:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.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); }

/* Hire Me nav button */
.nav-hire {
  background: #14a800 !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 14px !important;
  font-weight: 500 !important;
  margin-left: 8px;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-hire:hover { background: #119000 !important; transform: translateY(-1px); }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 80px) 0 80px;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.hero-text h1 {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 400;
  color: var(--text-sec);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-description {
  font-size: 16px;
  color: var(--text-sec);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 32px;
}

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

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat { display: flex; flex-direction: column; gap: 2px; }

.stat-number {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Profile photo */
.hero-photo {
  flex-shrink: 0;
}

.profile-img {
  width: 280px;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

/* ─── About ────────────────────────────────────────────────── */
.about { padding: var(--sec-pad) 0; }

.about-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: start;
}

.about-video { width: 100%; }

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.about-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-content p {
  font-size: 16px;
  color: var(--text-sec);
  line-height: 1.75;
}

.about-content strong { color: var(--text-primary); font-weight: 600; }

/* ─── Products ─────────────────────────────────────────────── */
.products { padding: var(--sec-pad) 0; }

/* Featured cards (Remirro, Clout) — horizontal layout */
.featured-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.featured-card {
  display: grid;
  grid-template-columns: 420px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow var(--transition), transform var(--transition);
}
.featured-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.featured-card-img {
  height: 300px;
  background: var(--bg-alt);
  overflow: hidden;
  flex-shrink: 0;
}
.featured-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-card:hover .featured-card-img img { transform: scale(1.03); }

.featured-card-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.featured-card-body h3 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
  margin-top: 10px;
}

.featured-card-body p {
  font-size: 15px;
  color: var(--text-sec);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

/* ─── Project Cards ────────────────────────────────────────── */
.projects { padding: var(--sec-pad) 0; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.project-card-img {
  height: 200px;
  background: var(--bg-alt);
  overflow: hidden;
}
.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.04); }

.project-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card-body h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 8px;
  margin-top: 10px;
}

.project-card-body p {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

/* ─── Research Cards ───────────────────────────────────────── */
.research { padding: var(--sec-pad) 0; }

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.research-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.research-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.research-card-img {
  height: 160px;
  background: var(--bg-alt);
  overflow: hidden;
}
.research-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.research-card:hover .research-card-img img { transform: scale(1.04); }

.research-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.research-card-body h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 8px;
  margin-top: 10px;
}

.research-card-body p {
  font-size: 13.5px;
  color: var(--text-sec);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
}

/* Community card — no image, light bg */
.research-card--community {
  background: var(--accent-light);
  border-color: #DDD6FE;
}

/* ─── Tags ─────────────────────────────────────────────────── */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.tag-live     { background: #F0FDF4; color: #16A34A; border-color: #BBF7D0; }
.tag-ai       { background: var(--accent-light); color: var(--accent); border-color: #DDD6FE; }
.tag-enterprise { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; }
.tag-geo      { background: #F0F9FF; color: #0369A1; border-color: #BAE6FD; }
.tag-open     { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }

/* Default tag */
.tag:not([class*="tag-"]) {
  background: var(--bg-alt);
  color: var(--text-sec);
  border-color: var(--border);
}

/* ─── Stack Pills ──────────────────────────────────────────── */
.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.stack-pills span {
  font-size: 11.5px;
  color: var(--text-sec);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-weight: 450;
}

/* ─── Card Link ────────────────────────────────────────────── */
.card-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  transition: color var(--transition);
}
.card-link:hover { color: var(--accent-hover); }

/* ─── Skills ───────────────────────────────────────────────── */
.skills { padding: var(--sec-pad) 0; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 40px;
}

.skill-group h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

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

.skill-tags span {
  font-size: 13px;
  color: var(--text-sec);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), color var(--transition);
}
.skill-tags span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Contact ──────────────────────────────────────────────── */
.contact {
  padding: var(--sec-pad) 0;
  background: var(--bg);
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.contact-inner .section-label { margin-bottom: 12px; }

.contact-inner h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact-inner p {
  font-size: 16px;
  color: var(--text-sec);
  line-height: 1.65;
  margin-bottom: 32px;
}

.social-links {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}

.social-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sec);
  transition: color var(--transition);
}
.social-links a:hover { color: var(--text-primary); }

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Fade-up animation ────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .projects-grid,
  .research-grid { grid-template-columns: repeat(2, 1fr); }

  .featured-card { grid-template-columns: 320px 1fr; }
  .featured-card-img { height: 260px; }
}

@media (max-width: 960px) {
  .about-layout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 860px) {
  :root { --sec-pad: 72px; }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-text h1 { font-size: 48px; }
  .hero-description { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-photo { display: flex; justify-content: center; order: -1; }
  .profile-img { width: 200px; height: 240px; }

  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-card-img { height: 220px; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --sec-pad: 56px; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 16px; font-size: 15px; }
  .nav-links a.nav-cta { margin-left: 0; margin-top: 4px; }
  .nav-toggle { display: flex; }

  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 56px); }

  .projects-grid,
  .research-grid { grid-template-columns: 1fr; }

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

  .hero-stats { gap: 28px; }
}
