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

body {
  font-family: Roboto, Arial, sans-serif;
}

/* ── Toolbar ── */

.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background-color: #fff;
  color: #001337;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.brand {
  font-size: 1.1rem;
  font-weight: 500;
}

.spacer {
  flex: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  color: #fff;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.nav-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ── Page ── */

.page-content {
  padding-top: 64px;
}

/* ── Hero ── */

.hero {
  min-height: 100vh;
  position: relative;
  background-image: url('portfolio/public/flowers.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scattered {
  position: absolute;
  inset: 0;
}

.scattered .img-hover {
  position: absolute;
  width: 220px;
  height: 160px;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.scattered img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scatter-1 {
  top: 12%;
  left: 6%;
  transform: rotate(-6deg);
}

.scatter-2 {
  top: 18%;
  right: 8%;
  transform: rotate(5deg);
}

.scatter-3 {
  bottom: 12%;
  left: 12%;
  transform: rotate(-3deg);
}

.scatter-3:hover {
  z-index: 2;
}

.scatter-4 {
  bottom: 13%;
  right: 12%;
  transform: rotate(3deg);
}

/* ── Card ── */

.card {
  position: relative;
  z-index: 1;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 48px 64px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.card h4 {
  font-weight: 400;
  color: #555;
}

/* ── Panels ── */

.panel p {
  font-size: 2.5rem;
  font-weight: 500;
  max-width: 720px;
  text-align: center;
  line-height: 1.3;
  margin: 0;
}

.panel-1 {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Problem Solver ── */

.split-bg {
  position: absolute;
  inset: 0;
}

.split-left,
.split-right {
  position: absolute;
  inset: 0;
}

.split-left {
  background-color: #001337;
  clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%);
}

.split-right {
  background-color: #ffffff;
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%);
}

.logo {
  position: absolute;
  top: 50%;
  width: 300px;
  z-index: 1;
  border-radius: 8px;
}

.logo img {
  width: 100%;
  display: block;
}

.logo.img-hover {
  position: absolute;
  overflow: visible;
}

.logo .img-caption {
  inset: -50px -50px;
  border-radius: 8px;
  pointer-events: none;
}

.logo-left {
  left: 20%;
  transform: translate(-50%, -50%);
}

.logo-right {
  left: 80%;
  transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
  .split-left {
    clip-path: polygon(0 0, 100% 0, 100% 55%, 0 45%);
  }

  .split-right {
    clip-path: polygon(0 45%, 100% 55%, 100% 100%, 0 100%);
  }

  .logo {
    width: 200px;
    left: 50%;
  }

  .logo-left {
    top: 25%;
    transform: translate(-50%, -50%);
  }

  .logo-right {
    top: 75%;
    transform: translate(-50%, -50%);
  }
}

/* ── Builder collage ── */

.collage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  gap: 4px;
  overflow: hidden;
}

.collage-left {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 4px;
  overflow: hidden;
}

.collage-left .img-hover {
  flex: 1;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 960px) {
  .collage-left .img-hover:nth-child(1) {
    display: none;
  }
}

.collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collage-right {
  width: 48%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.collage-right .img-hover {
  height: 50%;
}

/* ── Learning grid ── */

.grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}

.grid-cell-1 {
  background-color: #001337;
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-cell-2 {
  background-color: #004d40;
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-cell-3 {
  background-color: #1a237e;
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-cell-4 {
  background-color: #37474f;
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-tile {
  position: relative;
}

.tile-icon {
  width: auto;
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.tile-desc {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tile-desc p {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .tile-desc p {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .tile-desc p {
    font-size: 0.65rem;
  }
}

.grid-tile:hover .tile-icon { opacity: 0; }
.grid-tile:hover .tile-desc { opacity: 1; }

/* ── Hover overlay (shared) ── */

.img-hover {
  position: relative;
  overflow: hidden;
}

.img-caption {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.img-caption p {
  margin: 0;
  font-size: inherit;
  min-width: 0;
  overflow-wrap: break-word;
}

.img-hover:hover .img-caption {
  opacity: 1;
}

.img-caption a {
  background: rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  color: #fff;
  text-decoration: underline;
}

.img-caption a:hover {
  background: rgba(255, 255, 255, 0.35);
}
