:root {
  --bg: #f7f1aa;
  --panel: #8fb7d4;
  --panel-soft: #c8dbe8;
  --card: #f8f8f8;
  --accent: #e1c193;
  --accent-hover: #d6b17b;
  --text: #1a3248;
  --muted: #4c6170;
  --border: rgba(0, 0, 0, 0.12);
  --shadow: 0 10px 28px rgba(18, 49, 77, 0.12);
  --shadow-strong: 0 16px 38px rgba(18, 49, 77, 0.16);
  --radius-xl: 2rem;
  --radius-lg: 1.25rem;
  --radius-md: 1rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background-color: #f7f1aa;
  background-image: linear-gradient(180deg, #fff8dc 0%, #f7f1aa 65%, #f3ecad 100%);
  background-repeat: no-repeat;
  color: var(--text);
}

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

.page-shell {
  width: min(1650px, calc(100% - 3rem));
  margin: 1rem auto 2rem;
}

.Top-banner,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background-color: var(--panel);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-bottom: 5px solid rgba(255, 0, 0, 0.16);
  box-shadow: var(--shadow);
}

.logo img,
.footer-logo {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.65);
  background: #1f1a1d;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.logo img:hover,
.footer-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.site-name {
  flex: 1;
  text-align: center;
}

.site-name h1 {
  margin: 0;
  font-family: "Courier New", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: 0.03em;
}

.title-subtitle {
  font-size: clamp(1.5rem, 1.9vw, 2.4rem);
  color: var(--muted);
  margin-top: 0.4rem;
  letter-spacing: 0.02em;
}

.title-animate {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  width: 0ch;
  border-right: 2px solid #1a3248;
  animation:
    type-title 1.9s steps(var(--title-ch)) forwards,
    blink-caret 0.22s step-end 10,
    hide-caret 0s 2.35s forwards;
}

@keyframes type-title {
  from { width: 0ch; }
  to { width: calc(var(--title-ch) * 1ch); }
}

@keyframes blink-caret {
  0%, 100% { border-color: #1a3248; }
  50% { border-color: transparent; }
}

@keyframes hide-caret {
  to { border-right-color: transparent; }
}

.site-name p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.nav-links a {
  background-color: var(--accent);
  text-decoration: none;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border-bottom: 2px solid rgba(0,0,0,0.6);
  font-weight: 700;
  color: #1f68ae;
  text-shadow:
    -1px -1px 0 rgba(255,255,255,0.25),
     1px -1px 0 rgba(255,255,255,0.25),
    -1px  1px 0 rgba(255,255,255,0.25),
     1px  1px 0 rgba(255,255,255,0.25);
  transition: transform 0.18s ease, background-color 0.18s ease, border-top 0.18s ease, border-bottom 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  border-top: 4px solid rgba(255,255,255,0.82);
  border-bottom: 0;
}

main {
  margin: 1.4rem 0;
}

.hero,
.project-card,
.intro-banner {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.35rem;
  padding: 1.5rem;
}

.hero-copy h2,
.intro-banner h2 {
  margin-top: 0;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  line-height: 1.18;
}

.hero-copy p,
.intro-banner p,
.info-subtitle,
.project-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: large;
}
.intro-banner p {
  font-size: x-large;
}

.hero-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}

.badge,
.project-tag,
.meta-chip {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  font-weight: 700;
}

.badge {
  background: rgba(20, 122, 179, 0.08);
  color: #1f6fa5;
  border: 1px solid rgba(20, 122, 179, 0.18);
  padding: 0.6rem 0.9rem;
}

.button-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.95rem 1.2rem;
  border-radius: 1rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(18, 49, 77, 0.12);
}

.button-primary {
  background: #176896;
  color: #fff;
}

.info-column {
  background: linear-gradient(180deg, rgba(23,104,150,0.12), rgba(23,104,150,0.05));
  border-radius: 1.5rem;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.info-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 1rem;
  padding: 1.15rem;
}

.info-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
}

.info-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.info-subtitle {
  margin: 0.3rem 0 0;
}

.logo-placeholder,
.project-image-placeholder {
  background: linear-gradient(135deg, #e7eef4, #d8e4ee);
  border: 1px dashed rgba(26, 50, 72, 0.35);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
}

.logo-stack {
  position: relative;
  width: 150px;
  height: 88px;
  flex-shrink: 0;
}

/* background box */
.logo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  background: #c9d7e2;
  border: 1px dashed rgba(26, 50, 72, 0.35);
}

/* actual logo on top */
.info-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 80%;   /* 🔑 use width instead of fixed size */
  max-height: 60%;  /* prevent it from being too tall */
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.logo-wide {
  max-width: 90%;
  max-height: 60%;
}

.logo-square {
  max-width: 70%;
  max-height: 70%;
}

.logo-placeholder {
  background: linear-gradient(135deg, #d7e4ef, #c3d4e2);
}

.info-logo {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.project-image-stack {
  position: relative;
  width: 100%;
  height: 450px; /* or adjust */
}

/* background */
.project-image-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  background: linear-gradient(135deg, #d7e4ef, #c3d4e2);
  border: 1px dashed rgba(26, 50, 72, 0.35);
}

/* image on top */
.project-image {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 90%;
  max-height: 85%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.project-wide {
  max-width: 95%;
  max-height: 70%;
}

.project-tall {
  max-width: 70%;
  max-height: 95%;
}

.intro-banner {
  padding: 1.4rem;
  margin-bottom: 1rem;
}

.projects-grid-custom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-half {
  min-height: 100%;
}

.project-table-card {
  grid-column: 1 / -1;
}

.project-tag {
  padding: 0.45rem 0.75rem;
  background: rgba(239, 198, 138, 0.45);
  font-size: 0.88rem;
}

.project-card h3 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.45rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.meta-chip {
  padding: 0.42rem 0.72rem;
  background: rgba(20, 122, 179, 0.08);
  color: #0f628f;
  font-size: 0.84rem;
}

.project-image-placeholder {
  width: 100%;
  min-height: 190px;
  border-radius: 1rem;
  font-weight: 700;
}

.project-image-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  height: 320px;
  padding: 0.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #d7e4ef, #c3d4e2);
  border: 1px dashed rgba(26, 50, 72, 0.35);
}

.project-image-half {
  background: #fff;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-image-half {
  position: relative;  /* 🔑 THIS FIXES LABEL POSITION */
}

.project-image-half img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

.project-image-half:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

.image-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 0.75rem;
  background: rgba(0,0,0,0.65);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.phrase-table-wrap {
  overflow-x: auto;
}

.phrase-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
}

.phrase-table th,
.phrase-table td {
  padding: 0.8rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.08);
  text-align: left;
}

.phrase-table thead th {
  background: #dcebf5;
  color: var(--text);
  font-size: 0.9rem;
}

.phrase-table tbody td:nth-child(odd) {
  font-family: "Courier New", monospace;
  font-weight: 700;
  color: #1a5d90;
}

.footer {
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
  
}

.footer {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: large;
}

.contact-links {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  flex-wrap: wrap;
}

.icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1f68ae;
  color: #fff;
  font-size: 0.95rem;
}


.icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.footer-logo-link {
  margin-left: auto;
}

@media (max-width: 980px) {
  .hero,
  .projects-grid-custom {
    grid-template-columns: 1fr;
  }

  .project-table-card {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .Top-banner,
  .footer {
    flex-direction: column;
    text-align: center;
  }

  .footer-logo-link {
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 1rem, 1000px);
  }

  .logo-circle,
  .footer-logo {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }

  .nav-links a {
    width: 100%;
  }

  .info-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .logo-placeholder {
    width: 72px;
    height: 72px;
  }

  .phrase-table {
    font-size: 0.88rem;
  }
}
