/* ============================================
   Andrej Klimčík — Portfolio
   ============================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-translucent: rgba(255, 255, 255, 0.55);

  --text: #000000;
  --text-body: #5f6368;
  --text-muted: #5e5e5e;
  --text-card-title: #535353;
  --text-tag: #7e7b7b;
  --text-link: #8e8c8c;

  --brand-underline: #244fc9;
  --brand-grad-from: #317ce6;
  --brand-grad-to: #544abe;

  --gradient-brand: linear-gradient(
    to left,
    var(--brand-grad-from),
    var(--brand-grad-to)
  );
  --gradient-muted: linear-gradient(
    to left,
    rgba(187, 187, 187, 0.97),
    rgba(163, 162, 162, 0.97)
  );

  --shadow-btn: 1px 4px 10px rgba(0, 0, 0, 0.15);
  --shadow-card: 0px 2px 10px rgba(0, 0, 0, 0.09);
  --shadow-photo: 1px 4px 16px rgba(0, 0, 0, 0.15);

  --radius-pill: 26px;
  --radius-card: 26px;

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;

  /* Fluid paddings */
  --gutter: clamp(24px, 5vw, 120px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--gutter);
  height: 72px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
  transition: background 0.35s ease, backdrop-filter 0.35s ease,
    -webkit-backdrop-filter 0.35s ease, border-color 0.35s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.logo {
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 24px);
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: flex-start;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
  padding: 8px 0;
  text-align: center;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-body);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--brand-underline);
  font-weight: 600;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 57px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  color: #ffffff;
  font-weight: 500;
  font-size: 20px;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 1px 6px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
}

.btn--muted {
  background: var(--gradient-muted);
}

.btn-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 60px var(--gutter);
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1488px;
  width: 100%;
  margin: 0 auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.gradient-word {
  background: linear-gradient(90deg, #a452ed, #5230ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-description {
  font-size: clamp(16px, 1.6vw, 21px);
  color: var(--text-body);
  line-height: 1.64;
  max-width: 560px;
}

.hero-cta {
  align-self: flex-start;
  min-width: 189px;
}

.hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.profile-photo {
  position: relative;
  width: clamp(260px, 38vw, 620px);
  aspect-ratio: 1;
  background: url("assets/Profile_new.png") center / contain no-repeat;
  filter: drop-shadow(1px 4px 16px rgba(0, 0, 0, 0.15));
}

.badge {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0 20px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 16px;
  color: #ffffff;
  background: var(--gradient-muted);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-btn);
  white-space: nowrap;
}

/* ---------- Section titles ---------- */
.section-head {
  text-align: center;
  padding: 40px var(--gutter) 20px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-muted);
}

/* ---------- Featured Projects Carousel ---------- */
.carousel {
  position: relative;
  margin-bottom: 40px;
}

.carousel-track {
  display: flex;
  gap: clamp(15px, 2vw, 30px);
  padding: 15px var(--gutter) 24px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.project-card {
  flex: 0 0 auto;
  width: clamp(280px, 35vw, 489px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #eeebeb, #e8e8ed);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  color: inherit;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0px 10px 24px rgba(0, 0, 0, 0.25);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 1470 / 908;
  background-color: #e8e8ed;
  background-size: cover;
  background-position: center top;
}

.project-card-image[data-img="1"] {
  background-image: url("assets/project-1.svg");
}
.project-card-image[data-img="2"] {
  background-image: url("assets/project-2.svg");
}

.project-card-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px 25px 25px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: #d9d9d9;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-tag);
  align-self: flex-start;
}

.project-title {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  color: var(--text-card-title);
}

.project-description {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
  color: var(--text-body);
}

.project-link {
  font-weight: 500;
  font-size: 16px;
  color: var(--text-link);
  text-align: center;
  margin-top: auto;
  padding-top: 16px;
}

.project-card:hover .project-link {
  color: var(--brand-underline);
}

/* Carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-underline);
  z-index: 5;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.carousel-arrow:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 2px 6px 14px rgba(0, 0, 0, 0.2);
}

.carousel-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel-arrow--prev {
  left: calc(var(--gutter) / 2 - 24px);
}

.carousel-arrow--next {
  right: calc(var(--gutter) / 2 - 24px);
}

.carousel-arrow svg {
  width: 22px;
  height: 22px;
}

/* ---------- Contact section ---------- */
.contact {
  padding: 60px var(--gutter);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
  max-width: 1488px;
  margin: 0 auto;
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

.contact-bio p {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-body);
  line-height: 1.64;
}

.contact-connect-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.contact-connect-label {
  font-size: clamp(18px, 1.8vw, 25px);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.contact-connect-line {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
}

/* Desktop: horizontal row */
.contact-list {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.contact-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}

.contact-item + .contact-item {
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  padding-left: 24px;
  margin-left: 24px;
}

.contact-item-trigger {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.contact-item-icon {
  width: 28px;
  height: 28px;
  color: var(--brand-underline);
  margin-bottom: 8px;
}

.contact-item:first-child .contact-item-icon {
  margin-left: -3px;
}

.contact-item-icon svg {
  width: 100%;
  height: 100%;
}

.contact-item-label {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 600;
  color: var(--text);
}

.contact-value {
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 500;
  color: var(--text-body);
  word-break: break-word;
}

/* Arrow hidden on desktop */
.contact-item-arrow {
  display: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-photo {
  justify-self: center;
  position: sticky;
  top: calc(72px + 40px);
}

.contact-photo .profile-photo {
  background-image: url("assets/Profile_profi.png");
  border-radius: var(--radius-card);
  filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.09));
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 30px var(--gutter);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Generic content pages ---------- */
.page {
  padding: 60px var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-intro {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--text-body);
  max-width: 720px;
  margin-bottom: 48px;
  line-height: 1.64;
}

/* ---------- Works page ---------- */
.works-page {
  padding: 40px 0 60px;
}

.section-head--large .page-title {
  margin-bottom: 8px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 24px;
  padding: 15px var(--gutter);
  max-width: 1728px;
  margin: 0 auto;
}

.works-grid .project-card {
  width: 100%;
  min-width: 0;
}

/* Works cards should be full-width of their grid cell; override carousel fixed width */
.works-grid .project-card-image {
  aspect-ratio: 1470 / 908;
}

/* ---------- CV page ---------- */
.cv-page {
  padding: 40px 0 60px;
}

.cv-block {
  padding: 20px var(--gutter) 10px;
  margin-bottom: 30px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.cv-section-title {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.cv-list {
  display: flex;
  flex-direction: column;
}

.cv-item {
  padding: 24px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cv-item:last-child {
  border-bottom: none;
}

.cv-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

/* Matches .project-title */
.cv-role {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  color: var(--text-card-title);
  line-height: 1.3;
}

.cv-date {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Matches .project-tag */
.cv-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: #d9d9d9;
  color: var(--text-tag);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 12px;
}

/* Matches .project-description */
.cv-desc {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.6;
  color: var(--text-body);
}

/* Two-column Skills + Contact */
.cv-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Centered Skills section */
.cv-skills-block {
  display: flex;
  justify-content: center;
}

.cv-skills-block .cv-card {
  width: 100%;
  max-width: 640px;
}

.cv-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-card);
  padding: 28px;
}

.cv-card-title {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

/* Skill progress bars */
.cv-skills {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cv-skill {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-skill-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-card-title);
}

.cv-skill-bar {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.cv-skill-bar span {
  display: block;
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 4px;
}

/* Contact list */
.cv-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cv-contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-body);
}

.cv-contact-list a:hover {
  color: var(--brand-underline);
}

.cv-contact-icon {
  width: 20px;
  height: 20px;
  color: var(--brand-underline);
  flex-shrink: 0;
}

/* Hobbies — matches hero-description size/tone */
.cv-hobbies {
  text-align: center;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.64;
  color: var(--text-body);
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* Tablet ( <= 1083px ) — stack layout, photo on top, contact items stay horizontal */
@media (max-width: 1083px) {
  .hero {
    min-height: unset;
    padding: 48px var(--gutter) 64px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }

  .hero-content {
    order: 2;
    align-items: center;
    gap: 32px;
  }

  .hero-media {
    order: 1;
    min-height: unset;
  }

  .hero-description {
    text-align: center;
  }

  .hero-cta {
    align-self: center;
  }

  .hero-scroll-arrow {
    display: none !important;
  }

  /* Stack contact: photo on top, content below, items stay horizontal */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-photo {
    order: -1;
    justify-self: center;
    position: static;
  }

  .carousel-arrow {
    display: none;
  }

  /* Works page — 2 columns */
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 20px;
  }

  /* CV — stack skills + contact */
  .cv-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Mobile ( <= 640px ) */
@media (max-width: 640px) {
  .site-header {
    height: 80px;
    padding: 16px var(--gutter);
  }

  /* Collapse the nav wrapper so the empty <nav> stops taking flex space
     and the hamburger sits flush right next to the logo. */
  .nav {
    display: contents;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    padding: 8px 0;
    min-width: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    text-align: left;
    padding: 14px var(--gutter);
    width: 100%;
    font-size: 18px;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 32px var(--gutter) 48px;
  }

  .contact-connect-line {
    display: none;
  }

  /* Contact — vertical list with icon boxes + arrows */
  .contact-list {
    flex-direction: column;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .contact-item {
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
  }

  .contact-item + .contact-item {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }

  .contact-item-trigger {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
  }

  .contact-item-trigger .contact-item-label {
    flex: 1;
  }

  .contact-item-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .contact-item-icon svg {
    width: 22px;
    height: 22px;
  }

  .contact-value {
    padding-left: calc(44px + 16px);
  }

  .contact-item-arrow {
    display: block;
    color: var(--text-muted);
  }

  .project-card {
    width: min(85vw, 333px);
  }

  /* Works page — single column */
  .works-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* In a single-column works grid, cards should still be card-sized */
  .works-grid .project-card {
    width: 100%;
    max-width: none;
  }

  /* CV — tighter on mobile, stack date under role */
  .cv-item-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .cv-card {
    padding: 22px;
  }
}

/* ============================================
   Project Pop-Up Modal
   ============================================ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 90;                /* under .site-header (100) so the navbar stays usable */
  background: var(--bg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.project-modal[hidden] {
  display: none;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
  height: 100vh;
  padding-top: 72px;          /* clear the sticky navbar */
}

/* ----- Left pane: project info, scrolls independently ----- */
.project-modal-info {
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 60px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 40px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.project-modal-info::-webkit-scrollbar { display: none; }

.project-modal-close {
  align-self: flex-start;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin: -8px 0 -16px -8px;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-modal-close:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: rotate(90deg);
}

.project-modal-close svg {
  display: block;
  width: 26px;
  height: 26px;
}

.project-modal-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-modal-year {
  font-style: italic;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-modal-category-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-modal-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: #d9d9d9;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-tag);
  line-height: 1.25;
}

.project-modal-title {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.project-modal-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-modal-heading {
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-modal-body {
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 400;
  color: var(--text);
  line-height: 1.64;
  margin: 0;
}

/* ----- Right pane: long mockup image, scrolls independently ----- */
.project-modal-image-pane {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 60px var(--gutter) 60px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.project-modal-image-pane::-webkit-scrollbar { display: none; }

.project-modal-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* Body scroll lock while modal is open */
body.modal-open {
  overflow: hidden;
}

/* Project cards become pointer-cursor triggers */
.project-card[data-project-modal] {
  cursor: pointer;
}

/* ----- Tablet: keep split but tighter ----- */
@media (max-width: 1100px) {
  .project-modal-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  }
  .project-modal-info { gap: 32px; padding: 48px var(--gutter); }
  .project-modal-image-pane { padding: 48px var(--gutter) 48px 24px; }
}

/* ----- Mobile: stack vertically, no internal scroll ----- */
@media (max-width: 768px) {
  /* Let the modal itself scroll on mobile — children expand naturally */
  .project-modal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .project-modal-grid {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .project-modal-info,
  .project-modal-image-pane {
    overflow: visible;
    height: auto;
  }

  .project-modal-info {
    padding: 32px var(--gutter) 16px;
    gap: 28px;
  }

  .project-modal-image-pane {
    padding: 16px var(--gutter) 60px;
  }

  .project-modal-title {
    font-size: clamp(28px, 7vw, 36px);
  }
}

/* ---------- Hero scroll arrow ---------- */
.hero-scroll-arrow {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-btn);
  color: var(--brand-underline);
  transition: box-shadow 0.15s ease;
  animation: heroArrowBounce 2s ease-in-out 1.2s infinite both;
}

.hero-scroll-arrow:hover {
  box-shadow: 2px 6px 14px rgba(0, 0, 0, 0.2);
  animation: none;
  transform: translateX(-50%) translateY(2px);
}

.hero-scroll-arrow svg {
  width: 22px;
  height: 22px;
}

@keyframes heroArrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ---------- Hero load animation ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title       { animation: fadeUp 0.7s ease both; }
.hero-description { animation: fadeUp 0.7s 0.15s ease both; }
.hero-cta         { animation: fadeUp 0.7s 0.28s ease both; }
.hero-media       { animation: fadeUp 0.8s 0.1s ease both; }

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