:root {
  --bg: #ffffff; /* white background */
  --panel: #f9f9f9; /* light panel */
  --text: #222222; /* dark text */
  --muted: #555555; /* muted gray */
  --brand: #6ea8fe;
  --accent: #8dd6a9;
  --maxw: 1100px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Open Sans, Montserrat, Raleway, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { color: var(--muted); }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; }
.brand { font-weight: 800; letter-spacing: .5px; }
.brand__badge {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--panel); box-shadow: var(--shadow);
  color: var(--brand); margin-right: .6rem; font-weight: 800;
}
.nav__links { display: flex; gap: 1rem; align-items: center; }
.nav__link { opacity: .9; padding: .5rem .8rem; border-radius: 10px; }
.nav__link:hover { background: rgba(0,0,0,0.06); opacity: 1; }

/* Mobile menu */
.nav__toggle { display: none; }
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; border: 1px solid rgba(0,0,0,0.12); background: transparent; color: var(--text); padding: .6rem; border-radius: 12px; }
  .nav.open .nav__links { display: flex; position: absolute; right: 1rem; top: 64px; flex-direction: column; background: var(--panel); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; padding: .6rem; width: 220px; box-shadow: var(--shadow); }
  .nav.open .nav__links .nav__link { padding: .7rem .9rem; }
}

/* Hero */
.hero { padding: 5rem 0 3rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .4rem; }
.hero p { margin: 0 auto 1.2rem; max-width: 60ch; }
.hero .cta { display: inline-flex; gap: .6rem; }
.hero__pfp {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1rem auto; /* centers the image */
}
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--brand); color: white; font-weight: 700; border: none;
  padding: .8rem 1rem; border-radius: 12px; cursor: pointer;
  box-shadow: var(--shadow);
}
.btn--ghost { background: transparent; color: var(--text); border: 1px solid rgba(0,0,0,0.18); }
.btn:hover { filter: brightness(1.08); }

/* Section base */
section { padding: 3.25rem 0; }
.section__title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 1.25rem; }
.panel { background: var(--panel); border: 1px solid rgba(0,0,0,0.06); border-radius: var(--radius); box-shadow: var(--shadow); }



/* Skills */
.skills__tags { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem; }
.tag {
  padding: .5rem .7rem; border-radius: 999px; border: 1px solid rgba(0,0,0,.12);
  background: #ffffff;
  color: var(--text); font-size: .95rem;
}

/* Projects */
.projects__grid { display: grid; gap: 1rem; grid-template-columns: 1fr;}

.card { display: grid; gap: .6rem; padding: 1rem; transition: transform .2s ease, box-shadow .2s ease; background: #fff; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.15); }
.card__thumb { border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.06); aspect-ratio: 16/9; background: #eee; }
.card__title { margin: .2rem 0; font-weight: 700; }
.card__desc { color: var(--muted); font-size: .95rem; }
.chiprow { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-size: .8rem; padding: .25rem .5rem; border-radius: 999px; background: rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.08); color: var(--text); }

/* Contact */
.contact__grid { display: grid; gap: 1rem; }
@media (min-width: 820px) { .contact__grid { grid-template-columns: 1fr 1fr; } }
.form { display: grid; gap: .8rem; padding: 1rem; }
.input { width: 100%; padding: .9rem 1rem; border-radius: 12px; border: 1px solid rgba(0,0,0,.16); background: #fff; color: var(--text); }
.input::placeholder { color: #9aa4b2; }

/* Footer */
footer { padding: 2rem 0 3rem; color: var(--muted); text-align: center; border-top: 1px solid rgba(0,0,0,.06); margin-top: 2rem; background: #fff; }

/* Accessibility */
.skip-link { position: absolute; left: -999px; top: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; color: #000; padding: .5rem .7rem; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

/* ===== Logo Belt ===== */
.logo-belt {
  --logo-h: clamp(28px, 4vw, 44px);
  --gap: clamp(1rem, 3vw, 3rem);
  position: relative;
  overflow: hidden;
  padding: 1rem; /* keeps consistent with .panel spacing */
  /* soft edge fade */
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.logo-track {
  display: flex;
  align-items: center;
  gap: var(--gap);
  width: max-content;            /* allow the content to be as wide as needed */
  animation: belt-scroll 40s linear infinite;
  will-change: transform;
}

/* Pause on hover (so people can actually see a logo) */
.logo-belt:hover .logo-track { animation-play-state: paused; }

@keyframes belt-scroll {
  to { transform: translateX(-50%); }  /* content is duplicated, so -50% loops cleanly */
}

.logo {
  height: var(--logo-h);
  width: auto;
  flex: 0 0 auto;
  opacity: 0.85;
  filter: grayscale(0.15);
  transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}
.logo:hover {
  transform: translateY(-2px);
  opacity: 1;
  filter: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
}