/* === BASE === */
:root {
  --bg: #F2EDE4;
  --text: #0F0F0F;
  --muted: #888888;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none) {
  body { cursor: auto; }
}

/* === CUSTOM CURSOR === */
.cursor-dot,
.cursor-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--text);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--text);
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
              background 0.3s, opacity 0.3s;
}

.cursor-ring.is-hover {
  width: 56px;
  height: 56px;
  background: rgba(15, 15, 15, 0.06);
}

/* === NAVIGATION === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
  background: rgba(242, 237, 228, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #BD371A;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 0.5;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-sep {
  font-size: 0.7rem;
  color: var(--muted);
}

.lang-btn {
  background: none;
  border: none;
  cursor: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.lang-btn.is-active {
  color: var(--text);
  font-weight: 400;
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 4rem;
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(5rem, 12vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: -0.025em;
  overflow: hidden;
  color: #BD371A;
}

.hero-line {
  display: block;
  transform: translateY(105%);
  animation: slideUp 0.9s var(--ease) forwards;
}

.hero-line:nth-child(2) {
  animation-delay: 0.08s;
}

.hero-sub {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-role {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 0.8s 0.4s var(--ease) forwards;
}

.hero-scroll {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 0.8s 0.55s var(--ease) forwards;
}

/* === PROJECTS === */
.projects {
  padding: 5rem 3rem 6rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Uniform grid — all items same size */
.project-item {
  grid-column: span 1;
}

.project-image-wrap {
  height: 380px;
}

.project-link {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.project-image-wrap {
  position: relative;
  overflow: hidden;
  background: #ddd;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  transition: background 0.45s var(--ease);
}

.overlay-cat {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.4s var(--ease);
}

.overlay-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  line-height: 1.2;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.4s 0.05s var(--ease);
}

.project-link:hover .project-image-wrap img {
  transform: scale(1.04);
}

.project-link:hover .project-overlay {
  background: rgba(15, 15, 15, 0.58);
}

.project-link:hover .overlay-cat,
.project-link:hover .overlay-title {
  transform: translateY(0);
  opacity: 1;
}

.project-meta {
  display: none;
}

.project-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.project-cat {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* === ABOUT PAGE === */
.about-page {
  background: var(--bg);
}

.about-section {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: start;
  padding: 9rem 3rem 5rem;
  gap: 5rem;
}

.about-left {
  position: sticky;
  top: 9rem;
}

.about-heading {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: #BD371A;
}

.about-right {
  padding-top: 0.5rem;
  display: flex;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  width: 280px;
  flex-shrink: 0;
  height: auto;
  display: block;
}

.about-right-content {
  flex: 1;
  max-width: 380px;
}

.bio p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.4rem;
  color: var(--text);
}

.lang-block {
  display: none;
}

.lang-block.is-visible {
  display: block;
}

.about-contact {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(15, 15, 15, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-link {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
  display: inline-block;
}

.contact-link:hover {
  opacity: 0.5;
}

.contact-linkedin {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

/* === FOOTER === */
footer {
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(15, 15, 15, 0.1);
}

footer p {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-copy {
  color: #BD371A;
}

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.94);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-close {
  position: fixed;
  top: 2rem;
  right: 2.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: none;
  font-family: 'Syne', sans-serif;
  line-height: 1;
  z-index: 501;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-inner {
  max-width: 88vw;
  transform: scale(0.96);
  transition: transform 0.4s var(--ease);
}

.lightbox.is-open .lightbox-inner {
  transform: scale(1);
}

.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.lightbox-info {
  margin-top: 1.25rem;
}

.lightbox-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.lightbox-cat {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 0.3rem;
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

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

/* === ANIMATIONS === */
@keyframes slideUp {
  to { transform: translateY(0); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  nav { padding: 1.5rem 1.5rem; }
  .hero { padding: 0 1.5rem 3rem; }
  .projects { padding: 4rem 1.5rem 5rem; }

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

  .project-image-wrap { height: 260px; }

  /* Show project names on mobile (no hover) */
  .project-meta {
    display: block;
    padding: 0.6rem 0 0.2rem;
  }

  .about-section {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 4rem;
    gap: 2.5rem;
  }

  .about-left { position: static; }

  /* Stack photo and text vertically — text first */
  .about-right {
    flex-direction: column;
  }

  .about-photo {
    order: 2;
    width: 160px;
    max-width: 160px;
  }

  .about-right-content {
    order: 1;
    max-width: 100%;
  }

  footer { padding: 2rem 1.5rem; }
}

@media (max-width: 560px) {
  .hero-name { font-size: clamp(3.5rem, 16vw, 5rem); }

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

  .project-image-wrap { height: 220px; }

  .nav-links { gap: 1.2rem; }
}
