/* ==========================================================================
   layout.css — Structure, sections, grids, cards, modals and UI components.
   (Navigation chrome, section scaffolding, spacing, borders, buttons.)
   ========================================================================== */

/* ---------- Navigation ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--page-pad);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, padding 0.3s;
}
nav.scrolled {
  border-bottom-color: var(--border);
  padding: 18px var(--page-pad);
}

.nav-logo {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.8rem;
  color: var(--gray);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--black); }

/* ---------- About ---------- */
#about {
  padding: var(--section-pad) var(--page-pad);
  border-top: 1px solid var(--border);
}

.about-content {
  max-width: 760px;
}

.about-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1.5px solid var(--black);
  padding-bottom: 2px;
  transition: gap 0.25s ease;
}
.about-cta:hover { gap: 16px; }

.about-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: var(--white);
}
.marquee-track {
  display: flex;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }

/* ---------- Work ---------- */
#work {
  padding: var(--section-pad) var(--page-pad);
  border-top: 1px solid var(--border);
}
.work-header { margin-bottom: 64px; }

/* Featured text-row projects */
.proj-list { margin-bottom: 72px; }

.proj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: padding-left 0.3s ease;
}
.proj-row:first-child { border-top: 1px solid var(--border); }
.proj-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--light);
  transition: width 0.3s ease;
  z-index: 0;
}
.proj-row:hover::before { width: 100%; }
.proj-row:hover { padding-left: 28px; }

.proj-row-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.proj-arrow {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  color: var(--gray);
  transition: transform 0.3s, color 0.3s;
  flex-shrink: 0;
}
.proj-row:hover .proj-arrow {
  transform: rotate(45deg);
  color: var(--black);
}

/* ---------- Small grid cards ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.proj-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  text-decoration: none;
  color: white;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.proj-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.14);
}
.proj-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.proj-card:hover img { transform: scale(1.06); }
.proj-card-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.08) 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.3s ease;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 36px 40px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--gray);
  padding: 4px;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.modal-close:hover {
  color: var(--black);
  transform: rotate(90deg);
}

.modal-body { padding: 32px 40px 40px; }

.modal-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--gray);
  letter-spacing: 0.06em;
  margin: 0 6px 8px 0;
}
.modal-tags { margin-bottom: 28px; }

.modal-imgs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-img {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.modal-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Vibe Coding ---------- */
#vibe-coding {
  padding: var(--section-pad) var(--page-pad);
  border-top: 1px solid var(--border);
  background: var(--white);
}

.vc-content {
  max-width: 900px;
}

.vc-header {
  margin-bottom: 48px;
}

.vc-row-desc {
  font-size: 0.86rem;
  color: var(--gray);
  line-height: 1.75;
  margin-top: 10px;
  max-width: 720px;
}

.vc-meta-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
  margin-bottom: 40px;
}

.vc-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.vc-thought {
  margin-top: 40px;
}

.vc-thought-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.75vw, 1.6rem);
  color: var(--black);
  line-height: 1.4;
  max-width: 100%;
}

/* ---------- Contact ---------- */
#contact {
  padding: var(--section-pad) var(--page-pad) 64px;
  border-top: 1px solid var(--border);
}
.contact-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 80px;
}
.contact-right { padding-top: 8px; }


.c-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.c-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.c-btn.dark { background: var(--black); color: white; }
.c-btn.dark:hover {
  background: #333;
  transform: translateY(-2px);
}
.c-btn.light {
  border: 1.5px solid var(--border);
  color: var(--black);
}
.c-btn.light:hover {
  border-color: var(--black);
  transform: translateY(-2px);
}

.c-socials { display: flex; gap: 12px; }
.c-soc {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.c-soc:hover {
  border-color: var(--black);
  color: var(--black);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.f-nav { display: flex; gap: 24px; }
