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

html, body {
  height: 100%;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* Commented-out Radial Gradient Animation for easy swap */
/*
.radial-gradient-bg {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 0;
  opacity: 0.065;
  pointer-events: none;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.25) 15%,
    transparent 30%
  );
  background-size: 80vw 80vw;
  animation: gradientFlow 120s linear infinite;
}

@keyframes gradientFlow {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}
*/

/* Uncomment below to use hexagonal background instead */
/*
.hexagonal-bg {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 0;
  opacity: 0.06;
  pointer-events: none;
  background: 
    linear-gradient(60deg, rgba(0,0,0,0.1) 5%, transparent 5%, transparent 95%, rgba(0,0,0,0.1) 95%),
    linear-gradient(-60deg, rgba(0,0,0,0.1) 5%, transparent 5%, transparent 95%, rgba(0,0,0,0.1) 95%),
    linear-gradient(rgba(0,0,0,0.1) 5%, transparent 5%, transparent 95%, rgba(0,0,0,0.1) 95%);
  background-size: 120px 208px;
  animation: hexPan 120s linear infinite;
}

@keyframes hexPan {
  0% { background-position: 0 0; }
  100% { background-position: 120px 208px; }
}
*/

/* Main Content */
.centered-layout {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Name and Info Block */
.name-block {
  text-align: center;
  margin: 2rem auto 4rem;
}

.name-block h1 {
  font-size: 3.2rem;
  margin-bottom: 0.5rem;
}

.name-block h2 {
  font-size: 1.6rem;
  font-weight: 400;
  color: #000;
  margin-bottom: 0.2rem;
}

.name-block h2:nth-of-type(3) {
  margin-bottom: 2.5rem;
}

/* Triangle CTA Layout */
.triangle-cta-container {
  --btn-scale: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto;
}

/* Top row with single resume button */
.triangle-cta-top {
  margin-bottom: calc(1.4rem - (160px * var(--btn-scale) * 0.08));
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Resume button visual offset */
.triangle-cta-top .cta-btn img {
  transform: translateX(-18%);
}

/* Bottom row with QR and LinkedIn buttons */
/* Gap tightened by 20% (from 6rem to 4.8rem) */
.triangle-cta-bottom {
  display: flex;
  justify-content: center;
  gap: calc(4.8rem * var(--btn-scale));
  position: relative;
  z-index: 1;
}

/* Button styling */
.cta-btn {
  display: inline-block;
  transition: transform 0.2s ease, filter 0.2s ease;
  position: relative;
  border: none;
  background: none;
  padding: 0;
}

.cta-btn:hover,
.cta-btn:focus {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.cta-btn img {
  width: calc(160px * var(--btn-scale));
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Centered Email Block */
.email-center {
  position: absolute;
  left: 50%;
  top: 64%; /* lowered about one line height, visually weighted toward bottom row */
  transform: translate(-50%, -50%);
  z-index: 3;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.4em 1.2em;
  border-radius: 2em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  user-select: text;
  white-space: nowrap;
}

.email-center:hover,
.email-center:focus-within {
  background: #222;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  text-decoration: underline;
}

.email-center a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.email-center a:hover,
.email-center a:focus {
  color: #43b9d3;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .name-block h1 {
    font-size: 2rem;
  }
  .name-block h2 {
    font-size: 1.25rem;
  }
  .email {
    font-size: 0.85rem;
  }
  .triangle-cta-container {
    --btn-scale: 0.85;
  }
  .triangle-cta-top {
    margin-bottom: calc(
      (1.4rem * 0.85) - (160px * var(--btn-scale) * 0.08)
    );
  }
  .triangle-cta-bottom {
    gap: calc(3.84rem * var(--btn-scale)); /* 80% of 4.8rem */
  }
  .email-center {
    top: 66%;
    font-size: 1rem;
    padding: 0.3em 1em;
  }
}

@media (max-width: 480px) {
  .name-block {
    margin: 1rem auto 2.5rem;
  }
  .triangle-cta-container {
    --btn-scale: 0.75;
  }
  .triangle-cta-top {
    margin-bottom: calc(
      (1.4rem * 0.75) - (160px * var(--btn-scale) * 0.08)
    );
  }
  /* Keep bottom buttons side by side on mobile, reduce gap */
  .triangle-cta-bottom {
    flex-direction: row; /* preserve horizontal base */
    justify-content: center;
    gap: 1.5rem; /* smaller gap for mobile */
  }
  /* Move email below bottom buttons */
  .email-center {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 1.5rem auto 0 auto;
    z-index: 1;
    display: block;
    text-align: center;
    font-size: 0.95rem;
    padding: 0.25em 0.9em;
  }
}
