@import "https://fonts.googleapis.com/css?family=Kreon:300,700";

/* =================================
   Base page
   All colors are expected to come from /css/colors.css
   ================================= */

* { margin: 0; padding: 0; }

body {
  margin: 0;
  padding: 0;

  background: var(--background);
  color: var(--text);

  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: start;
}

.Main-Content { width: 100%; }

/* Keep page content above the fixed footer */
main, .container, #Main-Content {
  /* updated for taller 4-icon footer */
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0));
}

/* =================================
   HOME PAGE (friendly hero)
   Only affects /home.html content
   ================================= */

.home-hero {
  min-height: calc(100vh - 160px); /* leave room for taller bottom bar */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  padding: 3rem 1.25rem;
  gap: 1.2rem;
}

.home-hero-title {
  font-family: "Kreon", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;

  font-size: clamp(2.2rem, 6vw, 4.6rem);
  color: var(--text);
}

.home-hero-title .accent {
  color: var(--user2);
}

.home-hero-subtitle {
  font-family: "Kreon", serif;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.01em;

  font-size: clamp(1.05rem, 2.2vw, 1.6rem);
  color: color-mix(in srgb, var(--text) 80%, transparent);
}

/* A small “pill row” for github + email */
.home-hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.55rem 0.85rem;
  border-radius: 999px;

  background: var(--bg-glass);
  border: 1px solid var(--border-soft);

  color: color-mix(in srgb, var(--text) 88%, transparent);
  text-decoration: none;
  user-select: none;

  transition: transform 0.12s ease, background-color 0.12s ease;
}

.home-pill:hover {
  transform: translateY(-1px);
}

.home-pill i {
  font-size: 20px;
  color: var(--user2);
}

.home-pill.github,
.home-pill.email {
  cursor: pointer;
}

/* =================================
   Fixed container at the bottom
   ================================= */
.fixed-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(40px + env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  z-index: 999;

  /* Don’t block clicks outside its children */
  pointer-events: none;
}

/* Children render normally inside .fixed-bottom and remain clickable */
.fixed-bottom > .footer-bar-panel {
  position: static;
  width: 100%;
  pointer-events: auto;
}

/* =================================
   Footer bar panel (4 equal areas)
   ================================= */
.footer-bar-panel {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px) saturate(120%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.25);
  border-radius: 0.75vw;

  height: 84px;        /* taller bar */
  padding: 10px 12px;  /* breathing room above + below */

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}

/* Icon sizing: fixed px so they don’t balloon on tall screens */
.footer-bar-icon {
  flex: 1;
  display: block;

  /* default for other parts of the site; overridden for labeled footer below */
  margin: auto;

  width: 36px;
  height: 36px;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.15s ease;
}

/* =================================
   Footer labels (stable layout)
   Needs footer.html that wraps icons in .footer-item + .footer-label
   ================================= */

.footer-bar-with-labels {
  align-items: center;
}

.footer-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 6px;
  transition: transform 0.12s ease;
}

/* ✅ critical fix: cancel margin:auto so gap/label spacing actually works */
.footer-item .footer-bar-icon {
  margin: 0;
  display: block;
}

/* labels below icon */
.footer-label {
  height: 16px;
  line-height: 16px;
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;

  color: color-mix(in srgb, var(--text) 65%, transparent);
  user-select: none;
  pointer-events: none;
}

/* Hover behavior: lift whole item, gently scale icon */
.footer-item:hover {
  transform: translateY(-2px);
}

.footer-item:hover .footer-label {
  color: var(--user2);
}

.footer-item:hover .footer-bar-icon {
  transform: scale(1.06);
}

/* Disable the old direct hover scale to avoid fighting transforms */
.footer-bar-icon:hover { transform: none; }

/* =================================
   Optional contact/footer patterns
   (kept for future reuse)
   ================================= */
.contact-bar { margin: 0; z-index: 1; }

.contact-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  color: white;
  border-radius: 0.5rem;
}

.render {
  font-size: 4.5rem;
  font-family: math;
  letter-spacing: 0;
  color: var(--text);
  font-weight: 900;
}

.githubIcon {
  color: var(--text);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* The row that holds name — GitHub — email (legacy) */
.icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-width: 0;
}

.centerTextLeft,
.centerTextRight {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.centerTextLeft {
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  color: var(--text);
  user-select: none;
}

.centerTextRight {
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  color: var(--text);
  user-select: none;
  cursor: pointer;
}

@media (max-width: 600px) {
  .icon-row { gap: 0.9rem; }
}

/* Reusable global toast added to <body> — compact */
#copy-toast {
  position: fixed;
  z-index: 99999;
  visibility: hidden;
  opacity: 0;

  left: 0;
  top: 0;
  transform: translate(-50%, -100%);

  font-size: 0.85rem;
  padding: 3px 7px;
  border-radius: 4px;
  max-width: 50vw;

  background-color: #555;
  color: #fff;
  text-align: center;
  pointer-events: none;

  transition: opacity 160ms ease, visibility 0s linear 160ms;
}

#copy-toast::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

#copy-toast.show {
  visibility: visible;
  opacity: 1;
  transition: opacity 160ms ease;
}

.popup-label { display: inline-block; }

/* =================================
   Small-screen refinements
   ================================= */
@media (max-width: 600px) {
  .footer-bar-panel {
    height: calc(78px + env(safe-area-inset-bottom, 0));
    padding: 8px 10px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-radius: 2vw;
    grid-template-columns: repeat(5, 1fr);
  }

  /* Keep content above footer on mobile too */
  main, .container, #Main-Content {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0));
  }

  .footer-bar-icon {
    width: 40px;
    height: 40px;
  }

  .home-hero {
    padding: 2.2rem 1.1rem;
    gap: 1rem;
  }

  .footer-label {
    font-size: 0.68rem;
    height: 15px;
    line-height: 15px;
  }
}

/* =================================
   Skills page
   ================================= */

.skills-page {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 1rem 1.25rem;
  text-align: center;
}

.skills-content {
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skills-title {
  font-family: "Kreon", serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: color-mix(in srgb, var(--text) 92%, transparent);
}

.skills-grid {
  width: min(980px, 92vw);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px; /* row gap, col gap */
}

.skill-chip {
  background: color-mix(in srgb, var(--bg-glass) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--border-soft) 70%, transparent);
  color: color-mix(in srgb, var(--text) 92%, transparent);

  padding: 4px 8px;
  border-radius: 10px;

  font-family: "Kreon", serif;
  font-weight: 700;
  font-size: 1rem;

  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  transform: translateY(0);
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
  user-select: none;
}

.skill-chip:hover {
  transform: translateY(-4px);
  background: color-mix(in srgb, var(--bg-glass) 92%, transparent);
  border-color: color-mix(in srgb, var(--user2) 65%, var(--border-soft));
}

/* =================================
   Skills dividers
   ================================= */

.skills-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 26px 0 18px;
}

.skills-grid .skills-divider:first-child {
  margin-top: 10px;
}

.skills-divider::before,
.skills-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--text) 26%, transparent);
}

.skills-divider span {
  font-family: "Kreon", serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 78%, transparent);
  white-space: nowrap;
}



/* =================================
   Contact page
   ================================= */

.contact-page {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.25rem;
  text-align: center;
}

.contact-content {
  width: min(900px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  font-family: "Kreon", serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: color-mix(in srgb, var(--text) 92%, transparent);
  margin-top: 1rem;
  margin-bottom: 0.6rem;
}

.contact-subtitle {
  font-family: "Kreon", serif;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: color-mix(in srgb, var(--text) 78%, transparent);
  margin-bottom: 1.8rem;
}

.contact-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  background: color-mix(in srgb, var(--bg-glass) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--border-soft) 70%, transparent);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);

  border-radius: 12px;
  padding: 18px 18px;

  text-decoration: none;
  color: color-mix(in srgb, var(--text) 92%, transparent);

  transform: translateY(0);
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease;
  user-select: none;
}

.contact-card:hover {
  transform: translateY(-4px);
  background: color-mix(in srgb, var(--bg-glass) 92%, transparent);
  border-color: color-mix(in srgb, var(--user2) 65%, var(--border-soft));
}

.contact-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-card-top i {
  font-size: 22px;
  color: var(--user2);
}

.contact-card-title {
  font-family: "Kreon", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.contact-card-value {
  font-family: "Kreon", serif;
  font-weight: 700;
  font-size: 1.1rem;
  word-break: break-word;
}

.contact-card-hint {
  margin-top: 8px;
  font-family: "Kreon", serif;
  font-weight: 300;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--text) 70%, transparent);
}

.contact-card-clickable {
  cursor: pointer;
}

@media (max-width: 700px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }
}
