/* =====================================================================
   Modern UI refresh — scoped to the homepage (index.html)
   Loaded AFTER style.css so it takes precedence.
   Design tokens + fluid type + modern nav / hero / cards / footer
   ===================================================================== */

:root {
  /* Color — light theme */
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5f5f5f;
  --border: #e8e8e4;
  --accent: #122381;          /* deep indigo used in the original nav hover */
  --accent-soft: #4d638c;
  --overlay: rgba(12, 14, 30, 0.72);

  /* Typography */
  --font-sans: "Inter", "Work Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Spacing / shape */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.22);
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f12;
    --bg-soft: #16171b;
    --surface: #17181c;
    --text: #f2f2f0;
    --text-muted: #a6a6a6;
    --border: #26272c;
    --accent: #8ea2ff;
    --accent-soft: #b9c4e6;
    --overlay: rgba(6, 7, 14, 0.78);
    --shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ----------------------------- Base --------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

a { color: var(--accent-soft); }

/* --------------------------- Navigation ----------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-nav.is-scrolled {
  border-bottom-color: var(--border);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.site-nav__brand img { height: 34px; width: auto; display: block; }
.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2.4vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__links a {
  position: relative;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 6px 2px;
  transition: color 0.25s var(--ease);
}
.site-nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] { color: var(--accent); }
.site-nav__links a:hover::after,
.site-nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* ------------------------------ Hero -------------------------------- */
.hero {
  padding: clamp(72px, 12vw, 150px) 0 clamp(48px, 7vw, 90px);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero__eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 18px;
  padding: 0;
  color: var(--text);
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lead {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-muted);
  margin: 0;
}

/* --------------------------- Filter tabs ---------------------------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 36px;
}
.section-head h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.filter-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  list-style: none;
  margin: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.filter-tabs a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s var(--ease);
}
.filter-tabs a:hover { color: var(--text); }
.filter-tabs .is-active a {
  background: var(--accent);
  color: #fff;
}

/* -------------------------- Portfolio grid -------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(20px, 3vw, 34px);
  padding-bottom: clamp(60px, 8vw, 110px);
}
.project-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.05); }

.project-card__body {
  padding: 20px 22px 24px;
}
.project-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.project-card__title {
  font-size: 1.12rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.project-card__arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 18px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.35s var(--ease);
}
.project-card:hover .project-card__arrow {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------ Footer ------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(40px, 6vw, 70px) 0;
  background: var(--bg-soft);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-footer__brand img { height: 30px; width: auto; }
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Logo: dark-mode color flip (Option A) --------------------------------
   Artwork is a solid dark single-color mark; invert it in dark mode so
   it stays legible on the near-black background. */
@media (prefers-color-scheme: dark) {
  .site-nav__brand img,
  .site-footer__brand img {
    filter: invert(1) brightness(1.6);
  }
}
.site-footer__meta a {
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.site-footer__meta a:hover { border-bottom-color: var(--accent); }

/* --------------------------- Scroll reveal -------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .project-card, .project-card__media img { transition: none; }
}

/* --------------------------- Mobile nav ----------------------------- */
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { display: block; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav__links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px clamp(20px, 5vw, 48px) 22px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .site-nav__links.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__links a { width: 100%; padding: 10px 0; font-size: 17px; }
}

/* ------------------------ Sub-page hero ---------------------------- */
.hero--sm { padding: clamp(70px, 10vw, 130px) 0 clamp(24px, 5vw, 60px); }
.hero--sm h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

/* -------------------------- About page ----------------------------- */
.about-hero {
  padding: clamp(70px, 10vw, 130px) 0 clamp(40px, 6vw, 72px);
}
.about-hero__intro {
  text-align: left;
  margin-bottom: clamp(32px, 5vw, 60px);
}
.about-hero__intro .hero__eyebrow {
  display: block;
  margin-bottom: 10px;
}
.about-hero__intro h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}
.about-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.about-hero__body { text-align: left; }
.about-hero__lead {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
  margin: 0 0 26px;
}
.about-hero__body p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 16px;
  margin: 0 0 16px;
}
.about-hero__body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}
.about-hero__media {
  position: sticky;
  top: 96px;
}
.about-hero__slider {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.about-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.about-hero__slide.is-active { opacity: 1; }
.about-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-hero__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.about-hero__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.25s var(--ease), width 0.25s var(--ease);
}
.about-hero__dots button.is-active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}
.about-hero__dots button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 56px 0 clamp(60px, 8vw, 110px);
  margin-top: 20px;
  border-top: 1px solid var(--border);
}
.about-facts > div {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 22px 20px;
}
.about-facts h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.about-facts ul { list-style: none; padding: 0; margin: 0; }
.about-facts li {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  padding: 6px 0;
}
.about-facts li + li { border-top: 1px dashed transparent; }

@media (max-width: 900px) {
  .about-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .about-hero__media { position: static; max-width: 460px; margin: 0 auto; }
  .about-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .about-facts { grid-template-columns: 1fr; }
}

/* --------------------------- Blog list ----------------------------- */
.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(60px, 8vw, 110px);
}
.blog-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.blog-card:hover .blog-card__media img { transform: scale(1.04); }
.blog-card__body {
  padding: 24px 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-card__meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.blog-card__title {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.blog-card__title a { color: inherit; text-decoration: none; }
.blog-card__title a:hover { color: var(--accent); }
.blog-card__excerpt {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.blog-card__more {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.blog-card__more:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .blog-card { grid-template-columns: 1fr; }
  .blog-card__body { padding: 22px 22px 26px; }
}
