/* ===================================================
   PORTFOLIO — Alina Marat, Senior Product Designer
   Pure CSS, Desktop-First, GSAP-animation-ready
   =================================================== */

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #fdfdff;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-accent: #ff4417;
  --color-accent-alt: #ff511b;
  --color-gray: #f2f3f4;
  --color-gray-dark: #f4f4f4;

  --font-display: 'Cal Sans', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --container-max: 1440px;
  --side-padding: 40px;

  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-pill: 32px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-black);
  overflow-x: hidden;
  max-width: 100vw;
}

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

ul {
  list-style: none;
}

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

/* ---------- UTILITY: word spans for GSAP ---------- */
.word {
  display: inline-block;
}

/* ===================================================
   NAVIGATION
   =================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px var(--side-padding);
  background: rgba(253, 253, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-accent);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-black);
  transition: color 0.3s;
}

.nav__link:hover {
  color: var(--color-accent);
}

.nav__dot {
  color: var(--color-accent);
  font-size: 16px;
  line-height: 1;
}

.nav__cta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-white);
  background: var(--color-black);
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  transition: background-color 0.3s, color 0.3s;
}

.nav__cta:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 180px var(--side-padding) 280px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 136px;
  line-height: 1.06;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-black);
  position: relative;
  z-index: 1;
}

/* Mask reveal wrappers */
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.line-mask__inner {
  display: block;
  will-change: transform;
}

.about__desc-mask,
.about__interests-mask,
.works__list-mask {
  overflow: hidden;
}


/* Floating 3D object */
.hero__float {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  height: 260px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  will-change: transform;
}

.hero__float-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  will-change: transform;
}

.hero__badges-mask {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.hero__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .hero__float {
    width: 180px;
    height: 180px;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-gray);
  border-radius: var(--radius-pill);
  padding: 4px 8px;
  font-weight: 500;
  font-size: 16px;
  height: 36px;
}

.badge__avatar-wrapper {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.badge__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge__icon {
  flex-shrink: 0;
}

.badge__text {
  white-space: nowrap;
}

/* ===================================================
   FEATURED WORKS
   =================================================== */
.works {
  padding: 16px;
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.works,
.pin-spacer {
  background: var(--color-bg);
}

.works__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: var(--color-gray);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

@media (min-width: 1025px) {
  .works {
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .works__inner {
    grid-template-columns: minmax(280px, 1fr) 2fr;
    grid-template-rows: 1fr;
    flex: 1;
    overflow: hidden;
  }
}

.works__sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

@media (min-width: 769px) {
  .works__sidebar {
    height: 100%;
    justify-content: space-between;
  }
}

.works__title {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 0.97;
  font-weight: 400;
  color: var(--color-black);
}

.works__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.works__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  background: var(--color-white);
  color: var(--color-black);
}

.works__item--active {
  background: var(--color-accent);
  color: var(--color-white);
}

.works__item-dot {
  display: none;
}

.works__item--active .works__item-dot {
  display: inline;
}

/* Showcase image area */
.works__showcase {
  position: relative;
  min-height: 0;
}

.works__slides {
  position: relative;
  width: 100%;
  height: 100%;
}

@media (min-width: 1025px) {
  .works__slides {
    position: absolute;
    inset: 0;
  }
}

.works__image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

.works__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}


.works__image-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.tag--nda {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
}

.tag--nda svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.works__project-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 24px;
}

.works__tags {
  display: flex;
  gap: 12px;
}

.tag--glass {
  background: rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 18px;
  font-weight: 400;
}

/* Cursor badge */
.works__cursor-badge {
  position: fixed;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

.works__cursor-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: #000;
}


/* Slides — vertical flow */
/* Slides — stacked on desktop, vertical on mobile */

@media (min-width: 1025px) {
  .works__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
  }

  .works__slide--active {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 1024px) {
  .works__slides {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: auto;
  }

  .works__slide {
    opacity: 1;
    visibility: visible;
  }
}

/* List mask for reveal animation */
.works__list-mask {
  overflow: hidden;
}

/* ===================================================
   ABOUT
   =================================================== */
.about {
  padding: 60px 16px 16px;
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  background: var(--color-bg);
}

.about__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 32px;
}

.about__right-mask {
  overflow: hidden;
}

.about__right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about__title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-accent-alt);
}

.about__description {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  padding-top: 8px;
  display: none;
}

.about__description--active {
  display: block;
}

/* Interests */
.about__interests {
  display: flex;
  gap: 12px;
}

.about__interests-mask {
  margin-bottom: 0;
}


.interest {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-gray);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-black);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.interest--active {
  background: var(--color-accent);
  color: var(--color-white);
}

.interest__icon {
  flex-shrink: 0;
}

/* Gallery */
.about__gallery-mask {
  overflow: hidden;
}

.about__gallery {
  position: relative;
}

.about__gallery-set {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
}

.about__gallery-set--active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.about__gallery-set--three {
  grid-template-columns: 1fr 1fr 1fr;
}

.about__gallery-set--equal {
  grid-template-columns: 1fr 1fr;
}

.about__image-wrapper--up .about__image {
  object-position: center top;
}

.about__image-wrapper--down .about__image {
  object-position: center bottom;
}

.about__image-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 272px;
  position: relative;
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Ready for GSAP parallax */
  transform: scale(1);
  will-change: transform;
}

/* Main content wrapper */
#main-content {
  position: relative;
  background: var(--color-bg);
}

/* ===================================================
   FOOTER / CONTACT
   =================================================== */
.footer {
  padding: 0 16px 16px;
  max-width: var(--container-max);
  margin: 0 auto;
  overflow: hidden;
}

.footer__inner {
  background: var(--color-gray-dark);
  border-radius: var(--radius-md);
  padding: 60px 40px 40px;
  text-decoration: none;
  color: inherit;
  min-height: 332px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

/* Gradient hover layer */
.footer__gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 85% 5%, rgba(255, 75, 25, 0.75) 0%, transparent 35%),
    radial-gradient(circle at 100% 50%, rgba(255, 130, 80, 0.3) 0%, transparent 30%),
    radial-gradient(circle at 5% 80%, rgba(190, 210, 255, 0.45) 0%, transparent 40%),
    radial-gradient(circle at 40% 40%, rgba(235, 240, 255, 0.4) 0%, transparent 50%),
    var(--color-gray-dark);
}

/* Footer cursor badge */
.footer__cursor-badge {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
  mix-blend-mode: difference;
}

.footer__cursor-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: #000;
}

.footer__blob--peach {
  width: 550px;
  height: 550px;
  background: rgba(255, 200, 180, 0.3);
  right: -50px;
  top: -100px;
}

.footer__title {
  font-family: var(--font-display);
  font-size: 100px;
  font-weight: 400;
  line-height: 1.44;
  color: var(--color-black);
}

.footer__socials {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  gap: 24px;
  z-index: 30;
}

.footer__social-link {
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  transition: background-color 0.3s, transform 0.3s;
  position: relative;
}

.footer__social-link:hover {
  background-color: var(--color-accent);
  transform: scale(1.05);
}

.footer__social-link:hover circle {
  fill: var(--color-accent);
  transition: fill 0.3s;
}

.footer__social-link:hover path {
  fill: white;
  transition: fill 0.3s;
}

.footer__social-link circle,
.footer__social-link path {
  transition: fill 0.3s;
}

.footer__social-link svg,
.footer__social-link img {
  width: 100%;
  height: 100%;
  display: block;
}

.footer__social-link:hover img {
  filter: brightness(0) invert(1);
  transition: filter 0.3s;
}

.footer__social-link img {
  transition: filter 0.3s;
}

@media (max-width: 1024px) {
  .footer {
    position: relative;
    height: auto;
  }

  .footer__inner {
    padding: 40px 24px 32px;
    min-height: 360px;
  }

  .footer__gradient {
    opacity: 1;
  }

  .footer__title {
    font-size: 48px;
    color: #ff511b;
  }

  .footer__socials {
    position: static;
    margin-top: 32px;
    display: flex;
    gap: 16px;
  }

  .footer__social-link {
    width: 64px;
    height: 64px;
  }
}

/* ===================================================
   RESPONSIVE — Small desktop / iPad landscape
   =================================================== */
@media (max-width: 1280px) {
  .works__title {
    font-size: 72px;
  }

  .works__image-content {
    padding: 24px;
  }

  .works__project-title {
    font-size: 36px;
    margin-bottom: 16px;
  }

  .works__tags {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tag--glass {
    font-size: 13px;
    padding: 6px 12px;
  }

  .tag--nda {
    font-size: 13px;
    padding: 6px 12px;
  }
}

/* ===================================================
   RESPONSIVE — Tablet (max-width: 1024px)
   =================================================== */
@media (max-width: 1024px) {
  :root {
    --side-padding: 24px;
  }

  .hero__title {
    font-size: 80px;
  }

  .works__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    overflow: hidden;
  }

  .works__sidebar {
    overflow: hidden;
  }

  .works__title {
    font-size: 64px;
  }

  .works__project-title {
    font-size: 40px;
  }

  .about__header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about__right {
    gap: 12px;
  }

  .about__description {
    max-width: 100%;
  }

  .works__list {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .works__list::-webkit-scrollbar {
    display: none;
  }

  .works__item {
    white-space: nowrap;
    flex-shrink: 0;
  }

}

/* ===================================================
   RESPONSIVE — Works Mobile (max-width: 768px)
   =================================================== */
@media (max-width: 768px) {
  .works__list {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .works__item {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .works__slides {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .works__slide {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
  }

  .works__slide .works__image-wrapper {
    height: 350px;
  }
}

/* ===================================================
   RESPONSIVE — Mobile (max-width: 640px)
   =================================================== */
@media (max-width: 640px) {
  :root {
    --side-padding: 16px;
  }

  /* Nav */
  .nav {
    padding: 16px var(--side-padding);
  }

  .nav__link,
  .nav__dot {
    display: none;
  }

  .nav__cta {
    font-size: 14px;
    padding: 10px 14px;
  }

  /* Hero */
  .hero {
    padding: 100px var(--side-padding) 60px;
    min-height: 95vh;
  }

  .hero__title {
    font-size: 48px;
    line-height: 1.1;
  }

  .hero__badges {
    flex-direction: column;
    margin-top: 24px;
  }

  /* Works */
  .works {
    padding: 8px;
    overflow: hidden;
  }

  .works__inner {
    padding: 8px;
    gap: 8px;
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .works__sidebar,
  .works__showcase {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius-sm);
  }

  .works__slide .works__image-wrapper {
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .works__title {
    font-size: 48px;
    margin-bottom: 8px;
  }

  .works__list-mask {
    overflow: visible;
  }

  .works__list {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .works__list::-webkit-scrollbar {
    display: none;
  }

  .works__item {
    font-size: 14px;
    padding: 8px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .works__showcase {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  .works__slides {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    position: relative;
    width: 100%;
  }

  .works__slide {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    width: 100%;
  }

  .works__slide .works__image-wrapper {
    height: auto;
    aspect-ratio: 4 / 5;
    width: 100%;
  }

  .works__slide .works__image {
    object-fit: cover;
  }

  .works__slide[data-index="0"] .works__image {
    object-fit: cover;
    object-position: top left;
  }

  .works__image-content {
    padding: 16px;
  }

  .works__project-title {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .works__tags {
    flex-wrap: wrap;
    gap: 6px;
  }

  .tag--glass {
    font-size: 12px;
    padding: 5px 10px;
  }

  .tag--nda {
    font-size: 12px;
    padding: 5px 12px;
  }

  /* About */
  .about {
    padding: 48px var(--side-padding);
  }

  .about__title {
    font-size: 36px;
  }

  .about__gallery-set {
    grid-template-columns: 1fr;
  }

  .about__image-wrapper {
    height: 220px;
  }

}
