:root {
  --indigo-700: #303F9F;
  --indigo-600: #3F51B5;
  --indigo-500: #5C6BC0;
  --violet-500: #7C4DFF;
  --violet-400: #9575CD;
  --accent-pink: #FF4081;
  --accent-pink-dark: #E91E63;

  --ink: #1a1a1a;
  --ink-soft: #4a4a52;
  --ink-faint: #6b6b76;

  --bg: #ffffff;
  --bg-alt: #f5f6fa;
  --card-bg: #ffffff;
  --card-border: #e3e5ec;

  --shadow-sm: 0 1px 2px rgba(20, 24, 55, 0.06), 0 2px 8px rgba(20, 24, 55, 0.05);
  --shadow-md: 0 4px 12px rgba(20, 24, 55, 0.08), 0 8px 28px rgba(20, 24, 55, 0.07);

  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
  font-family: "Manrope", sans-serif;
  scroll-behavior: smooth;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p {
  margin: 0;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(120deg, var(--indigo-700) 0%, var(--indigo-600) 45%, var(--violet-500) 100%);
  box-shadow: 0 2px 12px rgba(30, 20, 90, 0.18);
}

.topbar-inner {
  width: min(1200px, 94vw);
  margin: 0 auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
  font-size: 0.95rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.menu {
  display: flex;
  gap: 1.4rem;
  flex: 1 1 auto;
}

.menu a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.menu a:hover {
  color: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0.42rem 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  flex: 0 1 240px;
}

.search-box input {
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  width: 100%;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.repo-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  flex: 0 0 auto;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.repo-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Hero ---------- */

.hero {
  background:
    linear-gradient(150deg, rgba(48, 63, 159, 0.82) 0%, rgba(63, 81, 181, 0.78) 40%, rgba(124, 77, 255, 0.72) 100%),
    url("assets/hero-bg.jpg");
  background-size: cover;
  background-position: center 65%;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero-inner {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(4.5rem, 13vw, 9rem);
  display: grid;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
}

h1 {
  margin: 0.6rem 0 1.1rem;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

.intro {
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.05rem);
  font-weight: 500;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 1.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.cta {
  border: 0;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-family: "Manrope", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 180ms ease, filter 180ms ease, background 180ms ease;
}

.cta-primary {
  background: var(--accent-pink-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(233, 30, 99, 0.35);
}

.cta-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.cta-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.cta-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

/* ---------- Content ---------- */

.site-shell {
  position: relative;
}

.content {
  width: min(1200px, 94vw);
  margin: -2.75rem auto 0;
  padding-bottom: 6vh;
  display: grid;
  gap: 1.6rem;
  position: relative;
  z-index: 2;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

h2 {
  margin: 0 0 0.9rem;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: var(--ink);
  letter-spacing: -0.005em;
  font-weight: 800;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 700;
}

.panel p {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.94rem;
  font-weight: 500;
  max-width: 68ch;
}

.interest-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 760px) {
  .interest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature-card {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.2rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  margin-bottom: 0.7rem;
  background: linear-gradient(140deg, var(--indigo-600), var(--violet-500));
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.feature-card p {
  font-size: 0.87rem;
}

.section-intro {
  margin-bottom: 1rem;
  color: var(--ink-faint);
  font-size: 0.86rem;
  font-weight: 500;
}

.project-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 760px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 172px;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.1rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.project-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.project-card p {
  color: var(--ink-soft);
  font-size: 0.87rem;
  line-height: 1.5;
  font-weight: 500;
}

.project-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: rgba(63, 81, 181, 0.1);
  color: var(--indigo-600);
  font-size: 0.72rem;
  font-weight: 700;
}

.project-card a {
  color: var(--indigo-600);
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

.text-link {
  color: var(--indigo-600);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */

.foot {
  margin-top: 0.6rem;
  border-top: 1px solid var(--card-border);
  color: var(--ink-faint);
  font-size: 0.8rem;
  font-weight: 500;
}

.foot-inner {
  width: min(1200px, 94vw);
  margin: 0 auto;
  padding: 1.6rem 0 2.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.9rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.social-link:hover {
  color: var(--indigo-600);
}

.social-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: 0 0 auto;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .search-box {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    gap: 0.9rem;
  }

  .menu {
    display: none;
  }

  .content {
    margin-top: -1.6rem;
  }
}
