/* ==========================================================================
   clairechen.dev - Modal-inspired dark layout, purple palette
   ========================================================================== */

:root {
  --bg: #0a0e27;
  --bg-deep: #060919;
  --surface: #131834;
  --surface-2: #1a1f3a;
  --line: rgba(167, 139, 250, 0.16);
  --line-strong: rgba(167, 139, 250, 0.34);

  --purple: #7c3aed;
  --purple-lit: #a78bfa;
  --purple-bright: #c4b5fd;
  --cyan: #00d9ff;

  --text: #ece9fb;
  --text-dim: #9aa3c0;
  --text-faint: #6b7396;

  --font-display: "Figtree", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Fira Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 1140px;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--purple-lit);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--purple-bright);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

::selection {
  background: rgba(124, 58, 237, 0.45);
  color: #fff;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}

/* --- eyebrow / mono label ------------------------------------------------ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-lit);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow--center {
  justify-content: center;
  color: var(--text-faint);
  margin-bottom: 24px;
}

/* The marker reads as an orphan once the label wraps, so drop it when centred. */
.eyebrow--center::before {
  display: none;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--purple);
  box-shadow: 0 0 12px var(--purple);
  transform: rotate(45deg);
  flex: none;
}

/* --- nav ---------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 56px);
  max-width: var(--shell);
  padding: 9px 14px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 14, 39, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav__brand img {
  height: 30px;
  width: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.nav__brand:hover {
  color: #fff;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
  background: rgba(124, 58, 237, 0.18);
}

/* --- hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 116px 0 34vh;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 14%;
  background: linear-gradient(to bottom, rgba(10, 14, 39, 0), rgba(10, 14, 39, 0.55));
  z-index: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.9rem, 8vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--purple-lit), var(--purple-bright) 55%, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__sub {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(1.02rem, 2.1vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-dim);
}

/* --- big social row ----------------------------------------------------- */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(19, 24, 52, 0.6);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.social i {
  font-size: 22px;
  color: var(--purple-lit);
  transition: color 0.18s ease;
}

.social:hover {
  color: #fff;
  transform: translateY(-3px);
  border-color: var(--purple-lit);
  background: rgba(124, 58, 237, 0.2);
  box-shadow: 0 10px 34px -12px rgba(124, 58, 237, 0.75);
}

.social:hover i {
  color: #fff;
}

.social--primary {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.social--primary i {
  color: #fff;
}

.social--primary:hover {
  background: #8b4cf5;
  border-color: #8b4cf5;
}

/* --- sections ----------------------------------------------------------- */

.section {
  padding: 108px 0;
  position: relative;
}

/* Keep in-page anchors clear of the fixed nav. */
[id] {
  scroll-margin-top: 124px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section__head {
  max-width: 700px;
  margin-bottom: 54px;
}

.section__head h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.1;
}

.section__head p {
  color: var(--text-dim);
  margin: 16px 0 0;
  font-size: 1.05rem;
}

/* --- now / work cards --------------------------------------------------- */

.work {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.tags--stack {
  margin-bottom: 38px;
}

.work__org {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
}

.work__role {
  color: var(--text-dim);
  font-size: 1.05rem;
}

.work__when {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin-left: auto;
  letter-spacing: 0.04em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 31, 58, 0.62), rgba(19, 24, 52, 0.32));
  transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(36, 30, 74, 0.7), rgba(19, 24, 52, 0.4));
  transform: translateY(-3px);
}

.card h3 {
  font-size: 1.16rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.97rem;
  line-height: 1.62;
}

.note {
  margin: 34px 0 0;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 760px;
}

/* --- project list (titles only) ----------------------------------------- */

.projects {
  border-top: 1px solid var(--line);
}

.project {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.project:hover {
  background: rgba(124, 58, 237, 0.07);
  padding-left: 14px;
}

.project__index {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--purple);
  width: 34px;
  flex: none;
}

.project__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  margin-right: auto;
}

.project a.project__title:hover {
  color: #fff;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--purple-lit);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

.project__when {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  min-width: 68px;
  text-align: right;
}

/* --- footer ------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 46px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.footer__links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 14.5px;
  color: var(--text-dim);
}

.footer__links a:hover {
  color: var(--text);
}

/* --- responsive --------------------------------------------------------- */

@media (max-width: 820px) {
  .nav__inner {
    width: calc(100% - 32px);
  }
  .nav__brand span {
    display: none;
  }
  .nav__link {
    padding: 7px 10px;
    font-size: 13.5px;
  }
  .section {
    padding: 76px 0;
  }
  .shell {
    padding: 0 20px;
  }
  .work__when {
    margin-left: 0;
  }
  .project__when {
    text-align: left;
  }
  .social {
    padding: 12px 20px;
    font-size: 15.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
