:root {
  --color-bg: #FAFAF8;
  --color-bg-alt: #F2F1EE;
  --color-text: #1A1A1A;
  --color-text-muted: #6B6B6B;
  --color-text-light: #999999;
  --color-accent: #8B6DB5;
  --color-border: #E8E6E1;
  --color-card-bg: #FFFFFF;
  --font-heading: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

/* ---- Nav ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  height: 72px;
  background-color: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 300ms ease;
  border-bottom: 1px solid transparent;
}

@supports not (backdrop-filter: blur(12px)) {
  .nav {
    background-color: var(--color-bg);
  }
}

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

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  position: relative;
}

.nav__logo::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-accent);
  margin-left: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.nav__links {
  display: flex;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  transition: color 300ms ease;
}

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

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

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 72px;
}

.hero__label,
.hero__title,
.hero__sub,
.hero__cta {
  opacity: 0;
  transform: translateY(20px);
}

.hero__label.animate,
.hero__title.animate,
.hero__sub.animate,
.hero__cta.animate {
  animation: fadeInUp 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero__logo {
  height: 62px;
  width: auto;
  display: block;
  margin: 0 auto 2.5rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text);
  max-width: 900px;
}

.hero__sub {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 580px;
  margin-top: 2rem;
}

.hero__cta {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 4px;
  transition: border-color 300ms ease;
}

.hero__cta:hover {
  border-bottom-color: var(--color-accent);
}

/* ---- Projects ---- */

.projects {
  background-color: var(--color-bg-alt);
  padding: clamp(5rem, 10vw, 8rem) 0;
  scroll-margin-top: 80px;
}

.projects__header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.projects__desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin-top: 1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--color-card-bg);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  border-top: 2px solid transparent;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  transform: translateY(24px);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-top-color: var(--color-accent);
}

.project-card.visible:hover {
  transform: translateY(-4px);
}

.project-card__tag {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.project-card__title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.project-card__desc {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-muted);
  flex-grow: 1;
}

.project-card__link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 300ms ease;
}

.project-card:hover .project-card__link {
  color: var(--color-text);
}

/* ---- About ---- */

.about {
  padding: clamp(5rem, 10vw, 8rem) 0;
  scroll-margin-top: 80px;
}

.about__inner {
  max-width: 680px;
}

.about__content .section-title {
  margin-bottom: 2rem;
}

.about__text {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.about__text:last-child {
  margin-bottom: 0;
}

/* ---- Contact ---- */

.contact {
  padding: clamp(6rem, 12vw, 10rem) 0;
  background-color: var(--color-bg-alt);
  scroll-margin-top: 80px;
}

.contact__inner {
  text-align: center;
}

.contact__inner .section-title {
  margin-bottom: 1.5rem;
}

.contact__text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto;
}

.contact__btn {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 1rem 2.5rem;
  border: 1px solid var(--color-text);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: all 300ms ease;
}

.contact__btn {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.contact__btn:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(139, 109, 181, 0.25);
}

.contact__email {
  display: block;
  margin-top: 2.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  transition: color 300ms ease;
}

.contact__email:hover {
  color: var(--color-text);
  text-decoration: underline;
}

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

.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

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

.footer__copy {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.footer__links {
  display: flex;
  gap: 2rem;
}

.footer__links a {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  transition: color 300ms ease;
}

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

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

@media (max-width: 639px) {
  .nav {
    height: 60px;
  }

  .hero {
    padding-top: 60px;
  }


  .nav__links {
    gap: 1.5rem;
  }

  .nav__links a {
    font-size: 0.8125rem;
  }

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

  .project-card {
    padding: 1.5rem;
  }

  .footer__inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Animations ---- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .hero__label,
  .hero__title,
  .hero__sub,
  .hero__cta {
    opacity: 1;
    transform: none;
  }

  .project-card {
    opacity: 1;
    transform: none;
  }
}
