/* ========== BASE STYLES ========== */
body {
  display: grid;
  place-items: center;
  font-family: Arial, Helvetica, sans-serif;
}

/* ensure 100vh calculations are consistent */
html, body { height: 100%; }

/* ========== TYPOGRAPHY ========== */
#root {
  width: 100%;
  /* make hero exactly viewport height so following content is off-screen */
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 36px);
  overflow: hidden; /* never reveal below-the-fold content */
}

#name {
  /* fluid scale: clamps keep the look across sizes */
  font-size: clamp(48px, 8vw, 128px);
  margin-top: clamp(30vh, 20vh, 30vh);
  margin-bottom: 20px;
  text-align: center;
}

#name span {
  color: white;
  -webkit-text-stroke-width: 2px;
  -webkit-text-stroke-color: black;
}

#introduction {
  width: min(86vw, 1000px);
  font-size: clamp(16px, 2.2vw, 24px);
  text-align: center;
  line-height: clamp(1.3rem, 2.4vw, 2.5rem);
  padding-bottom: clamp(80px, 12vw, 160px);
  margin: 0 auto;
}

#project-container h2 {
  font-size: clamp(28px, 5.5vw, 68px);
  padding-bottom: clamp(24px, 4vw, 50px);
  text-align: center;
}

.image-title {
  font-size: clamp(14px, 1.6vw, 24px);
  margin-top: 10px;
  text-align: center;
}

.text-overlay {
  font-size: clamp(20px, 4vw, 48px);
  font-weight: bold;
  color: black;
  text-align: center;
}

#contactMe, #skills {
  font-size: clamp(18px, 2.2vw, 30px);
}

#skills{
  padding-bottom: 20px;
}

#arrow-container p {
  font-size: clamp(12px, 1.6vw, 18px);
  padding-bottom: 12px;
  /* force single line */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== LAYOUT ========== */
#project-container {
  width: min(92vw, 1200px);
}

#project-container ul {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 36px);
  align-items: start;
}

#project-container li {
  width: 100%;
  position: relative;
}

.image-container {
  position: relative;
  width: 100%;
  /* use aspect-ratio to keep consistent tile shapes */
  aspect-ratio: 14 / 9;
  border: 2px black solid;
  overflow: hidden;
}

.text-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(255,255,255,0.6);
}

#arrow-container {
  display: grid;
  place-items: center;
  width: min(240px, 20vw);
  margin: 0 auto;
}

#arrow-container img {
  padding-bottom: clamp(40px, 12vw, 140px);
}

#footer-wrapper {
  width: min(92vw, 1200px);
  margin: 0 auto;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: clamp(40px, 6vw, 80px) 0;
  gap: 20px;
}
footer > div {
  display: grid;
  place-items: center;
  flex: 1 1 0;
}

#links {
  display: flex;
  margin-top: 30px;
  padding-left: 18px;
  gap: 15px;
  height: 50px;
  align-items: center;
}

#skills-container {
  width: min(500px, 40%);
  flex: 1;
  min-width: 0;
}

/* ========== IMAGE EFFECTS ========== */
.image2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* enhanced hover: dim image slightly and show a dark overlay with title + blurb + CTA */
.image-container { --overlay-bg: rgba(0,0,0,0.95); }
.image-container .text-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(var(--overlay-bg), var(--overlay-bg));
  opacity: 0;
  transition: opacity 220ms ease;
}

.image-container .hover-content { color: #fff; text-align: center; transform: translateY(6px); transition: transform 220ms ease; padding: 12px; }
.image-container .hover-content h3 { margin: 0; font-size: clamp(16px, 2.5vw, 22px); font-weight: 800; }
.image-container .hover-content .hover-blurb { margin: 6px 0 0 0; font-size: clamp(12px, 1.8vw, 14px); opacity: 0.95; }
.image-container .hover-content .hover-cta { display: inline-block; margin-top: 10px; padding: 8px 12px; border: 1px solid #fff; border-radius: 6px; font-weight:700; background: transparent; }

.image-container:hover .text-overlay { opacity: 1; }
.image-container:hover .hover-content { transform: none; }
.image-container:hover .image2 { opacity: 0.3; transform: scale(1.03); transition: opacity 220ms ease, transform 260ms ease; }

/* ========== SOCIAL ICONS ========== */
.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.social-icon {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
}

.social-icon img {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease;
  object-fit: contain;
  will-change: opacity;
}

.social-icon .color-version {
  opacity: 0;
}

.social-icon:hover .black-version {
  opacity: 0;
}

.social-icon:hover .color-version {
  opacity: 1;
}

/* Specific icon adjustments */
#instagram .black-version,
#instagram .color-version { width: 40px; }
#linkedin .black-version { width: 32px; }
#github .black-version { width: 32px; }

/* make icons scale on small screens */
.social-icon { width: clamp(28px, 5vw, 48px); height: clamp(28px, 5vw, 48px); }
.social-icon img { width: 100%; height: 100%; }

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (max-width: 900px) {
  #project-container ul { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 24px; align-items: center; }
  #skills-container { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .image2, .social-icon, .social-icon img { transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .image-container .image2 { transform: none !important; }
  .image-container .text-overlay { transition: none !important; }
}

/* ========== UTILITIES ========== */
.css-transitions-only-after-page-load * {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}