/* —— Variables —— */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --text: #f0ebe3;
  --text-muted: rgba(240, 235, 227, 0.65);
  --accent: #c9956a;
  --accent-soft: rgba(201, 149, 106, 0.35);
  --rose: #b87a7a;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4rem;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  z-index: 200;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* —— Header / Nav —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.25rem;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.75) 70%,
    transparent 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav {
  max-width: 72rem;
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}

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

.nav__menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s var(--ease-out);
}

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

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav__toggle-bar {
  display: block;
  height: 2px;
  width: 1.5rem;
  background: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

.nav.is-open .nav__toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav.is-open .nav__toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1.5rem 0 2rem;
    background: rgba(10, 10, 10, 0.97);
    border-bottom: 1px solid rgba(201, 149, 106, 0.15);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s var(--ease-out), opacity 0.3s, visibility 0.3s;
  }

  .nav.is-open .nav__menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__menu li {
    width: 100%;
    text-align: center;
  }

  .nav__menu a {
    display: block;
    padding: 0.85rem 1rem;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
  overflow: hidden;
}

.hero__ambient {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, var(--accent-soft), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(184, 122, 122, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 15% 60%, rgba(201, 149, 106, 0.08), transparent 45%);
  animation: ambient-shift 22s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .hero__ambient {
    animation: none;
  }
}

@keyframes ambient-shift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(3%, -2%) scale(1.05);
    opacity: 0.92;
  }
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__inner {
  position: relative;
  text-align: center;
  max-width: 56rem;
}

.hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.hero__title {
  margin: 0;
  line-height: 0.95;
}

.hero__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.25rem, 12vw, 7.5rem);
  letter-spacing: -0.02em;
  font-style: italic;
  color: var(--text);
  text-shadow: 0 0 80px rgba(201, 149, 106, 0.15);
}

.hero__tagline {
  margin: 1.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.hero__actions {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    transform 0.25s var(--ease-out);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: #d4a57e;
  border-color: #d4a57e;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(240, 235, 227, 0.35);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--full {
  width: 100%;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-line {
    animation: none;
  }
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* —— Sections —— */
.section {
  padding: 5.5rem 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.section__head {
  margin-bottom: 3rem;
  text-align: center;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  font-style: italic;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.section__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* —— About —— */
.about {
  border-top: 1px solid rgba(201, 149, 106, 0.12);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.about__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 32rem;
  margin: 0 auto;
  width: 100%;
}

.about__frame::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(201, 149, 106, 0.25);
  pointer-events: none;
}

.about__placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(145deg, rgba(201, 149, 106, 0.12) 0%, transparent 45%),
    linear-gradient(215deg, rgba(184, 122, 122, 0.1) 0%, transparent 50%),
    var(--bg-elevated);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
}

.about__placeholder-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.about__content .section__title {
  text-align: left;
  margin-bottom: 1.25rem;
}

.about__lead {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 1.25rem;
}

.about__content p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.about__content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .about__content .section__title {
    text-align: center;
  }

  .about__lead {
    text-align: center;
  }
}

/* —— Projects —— */
.projects {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.projects .section__head {
  padding: 0 1.5rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.projects__track {
  display: flex;
  gap: 1.5rem;
  padding: 0 1.5rem 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-soft) transparent;
}

.projects__track::-webkit-scrollbar {
  height: 6px;
}

.projects__track::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 3px;
}

@media (min-width: 1024px) {
  .projects__track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    scroll-snap-type: none;
  }
}

.project-card {
  flex: 0 0 min(72vw, 16rem);
  scroll-snap-align: start;
}

@media (min-width: 1024px) {
  .project-card {
    flex: none;
  }
}

.project-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(240, 235, 227, 0.08);
}

.project-card__image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease-out);
}

.project-card__image--1 {
  background-image: linear-gradient(
      160deg,
      rgba(10, 10, 10, 0.2) 0%,
      rgba(10, 10, 10, 0.85) 100%
    ),
    linear-gradient(120deg, #2a1810 0%, #1a1512 50%, #0a0a0a 100%);
}

.project-card__image--2 {
  background-image: linear-gradient(
      160deg,
      rgba(10, 10, 10, 0.15) 0%,
      rgba(10, 10, 10, 0.8) 100%
    ),
    linear-gradient(200deg, #1f1618 0%, #121010 100%);
}

.project-card__image--3 {
  background-image: linear-gradient(
      160deg,
      rgba(10, 10, 10, 0.1) 0%,
      rgba(10, 10, 10, 0.88) 100%
    ),
    linear-gradient(90deg, #1a1512 0%, #2a2220 100%);
}

.project-card__image--4 {
  background-image: linear-gradient(
      160deg,
      rgba(10, 10, 10, 0.2) 0%,
      rgba(10, 10, 10, 0.9) 100%
    ),
    linear-gradient(45deg, #151820 0%, #0a0a0a 100%);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}

.project-card__desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.project-card__poster:hover .project-card__overlay,
.project-card__poster:focus-within .project-card__overlay {
  opacity: 1;
}

.project-card__poster:hover .project-card__image,
.project-card__poster:focus-within .project-card__image {
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .project-card__image {
    transition: none;
  }

  .project-card__overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.88) 0%, transparent 60%);
  }
}

.project-card__meta {
  margin-top: 1rem;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  margin: 0 0 0.25rem;
}

.project-card__type {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card__year {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* —— Skills —— */
.skills {
  border-top: 1px solid rgba(201, 149, 106, 0.12);
  text-align: center;
}

.skills__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.skills__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid rgba(240, 235, 227, 0.12);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition:
    border-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out);
}

.skills__item:hover {
  border-color: rgba(201, 149, 106, 0.45);
  color: var(--text);
}

.skills__icon {
  color: var(--accent);
  font-size: 0.5rem;
  vertical-align: middle;
}

/* —— Contact —— */
.contact {
  border-top: 1px solid rgba(201, 149, 106, 0.12);
  padding-bottom: 6rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

.contact__intro .section__title {
  text-align: left;
  margin-bottom: 1rem;
}

.contact__text {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.contact__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact__links li {
  margin-bottom: 0.65rem;
}

.contact__links a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

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

@media (max-width: 768px) {
  .contact__intro .section__title {
    text-align: center;
  }

  .contact__text {
    text-align: center;
  }

  .contact__links {
    text-align: center;
  }
}

.contact__form {
  background: var(--bg-elevated);
  border: 1px solid rgba(201, 149, 106, 0.12);
  padding: 2rem;
  border-radius: 2px;
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(240, 235, 227, 0.12);
  border-radius: 2px;
  transition: border-color 0.25s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.form__note {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--accent);
  min-height: 1.25rem;
}

/* —— Footer —— */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(201, 149, 106, 0.1);
}

.site-footer p {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* —— Reveal animations —— */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 {
  transition-delay: 0.1s;
}

.reveal--delay-2 {
  transition-delay: 0.2s;
}

.reveal--delay-3 {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
