:root {
  --navbar-height: 76px;
  --bg-color: #f7f7f7;
  --text-color: #444;
  --card-radius: 15px;
  --card-gap: 16px;
  --card-shadow: rgba(0,0,0,0.25);
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #eceded;
  min-height: 100vh;
  color: white;
  cursor: none;
  overflow-x: hidden;
  padding-top: calc(var(--navbar-height) + 20px);
}

h1 {
  display: flex; justify-content: center; align-items: center;
  margin: 2% 0 -7%;
}

.navbar {
  display: flex; justify-content: center; align-items: center;
  gap: 30px;
  padding: 10px 30px;
  width: 30%;
  border-radius: 150px;
  background: rgba(127, 127, 127, 0.31);
  border: 1px solid rgba(142, 142, 142, 0.25);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 2px 6px var(--card-shadow);
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  flex-wrap: nowrap;
}

.navbar a {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  background-color: #e0e0e0c4;
  font-weight: 640;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #757575;
  transition: color 0.4s ease, padding 0.3s ease;
  z-index: 0; /* keep this link below the pseudo-element layer */
}

.navbar a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(221, 221, 221, 0.4), rgba(192, 192, 192, 0.4));
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: -1; /* 👈 puts the gradient behind the text */
}

.navbar a:hover::before {
  opacity: 1;
}

.navbar a:hover {
  padding: 10px 10%;
}


.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s, background 0.2s;
  backdrop-filter: blur(3px);
  z-index: 4000;
}

.cursor.hover, .cursor.hovered {
  width: 20px; height: 20px;
  border-color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.1);
}

.cursor.click, .cursor.clicked {
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(255,255,255,0.2);
}

.copy-email {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  background: #f7f7f7;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  display: inline-block;
}

.copy-email:hover {
  background: #eaeaea;
  color: #000;
}

.copy-message {
  display: none;
  font-size: 0.85rem;
  color: #4caf50;
  margin-top: 6px;
  font-weight: 500;
}

.page-overlay {
  position: fixed;
  inset: 0;
  background: #2c2c2c;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-overlay.active {
  opacity: 1;
  visibility: visible;
}

.page-overlay .loader {
  width: 50px; height: 50px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.container {
  width: 94%;
  max-width: 50%;
  padding: 40px 30px;
  margin: 5% auto 20%;
  border-radius: 24px;
  background: var(--bg-color);
  color: var(--text-color);
  box-shadow: 0 2px 6px var(--card-shadow);
  border: 1px solid rgba(255,255,255,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 8px 14px var(--card-shadow);
}

.proj {
  margin-top: 8%;
}

.column {
  flex: 20%;
  padding: 10px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 0 10px;
  box-sizing: border-box;
}

.card {
  flex: 1 1 calc(33.333% - 16px);
  max-width: 320px;
  min-width: 280px;
  box-sizing: border-box;
  background: var(--bg-color);
  border-radius: var(--card-radius);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--card-gap);
  text-align: left;
  color: var(--text-color);
  position: relative;
}

.card:hover {
  box-shadow: 0 4px 12px var(--card-shadow);
  transform: translateY(-4px);
}

.card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
}

.section_title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.card::before,
.card::after {
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card::after {
  content: "Click to visit link";
  bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(-18px);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.card::before {
  content: "";
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0,0,0,0.75);
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-30%);
}

.logo {
  text-align: center;
  margin-top: 4%;
}

.logo img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 2px solid rgba(0,0,0,0.12);
}

.content p {
  color: var(--text-color);
  margin-top: 10%;
  text-align: justify;
  line-height: 1.7;
}

a {
  text-decoration: none;
}

/* EMAIL MODAL */
.email-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  animation: fadeIn 0.3s ease forwards;
}

.email-modal.active {
  display: flex;
}

.email-content {
  background: #fff;
  border-radius: 16px;
  padding: 28px 30px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  color: var(--text-color);
  box-shadow: 0 6px 24px var(--card-shadow);
  animation: slideUp 0.4s ease forwards;
}

.email-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-gateway,
#closeModal {
  background: #f7f7f7;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.9rem;
}

.email-gateway:hover {
  background: rgb(233,226,255);
  border-color: rgb(210,190,255);
  transform: translateY(-2px);
}

#closeModal {
  background: #ececec;
}

#closeModal:hover {
  background: #ddd;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(25px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */

@media (min-width: 1025px) {
  :root {
    --navbar-height: 76px;
    font-size: 18px;
  }
  body {
    padding-top: calc(var(--navbar-height) + 20px);
  }
  .navbar {
    width: 34%;
    padding: 10px 40px;
  }

  .container{margin-top: 14%;}
  .navbar a {
    font-size: 16px;
    padding: 10px 18px;
    width: auto;
  }
  .row {
    margin-top: 3%;
  }
  .card {
    flex: 1 1 280px;
    max-width: 320px;
    min-width: 280px;
  }
  .section_title {
    font-size: 20px;
  }
}

@media (max-width: 1024px) {
  .navbar {
    padding: 2%;
    top: 5%;
    min-width: 50%;
  }

  .container{margin-top: 24%;}

  .proj{
    margin-top: 20%;
  }
  .card {
    flex-basis: calc(50% - 16px);
    max-width: none;
    min-width: 0;
  }
  .row {
    padding: 0 5px;
  }
  .card img {
    width: 80px;
    height: 80px;
  }
  .section_title {
    font-size: 18px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  :root {
    --navbar-height: 56px;
  }
  body {
    padding-top: calc(var(--navbar-height) + 10px);
  }
  .navbar {
    flex-wrap: wrap;
    width: 90%;
    top: 5%;
  }
  .navbar a {
    font-size: 12px;
    padding: 6px 10px;
  }  

  .card {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  .card img {
    width: 90px;
    height: 90px;
    margin-right: 16px;
  }
}

@media (max-width: 600px) {
  :root {
    --navbar-height: 140px;
    font-size: 14px;
  }
  body {
    padding-top: calc(var(--navbar-height) + 10px);
    cursor: auto;
  }
  .cursor {
    display: none;
  }

  .navbar {
    padding: 3%;
    width: 90%;
    top: 5%;
  }
  .navbar a {
    justify-content: center;
    padding: 10px 8px;
    font-size: 12px;
    width: 25%;
  }

  .container {
    margin-top: 24%;
    max-width: 100%;
    text-align: center;
  }
  .card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px;
    flex-basis: 100%;
    max-width: 50%;
    min-width: auto;
  }
  .card img {
    width: 70%;
    height: auto;
    margin-bottom: 10px;
  }
  .section_title {
    font-size: 16px;
  }
  .proj {
    margin-top: -10%;
  }
  .logo {
    text-align: center;
    margin-top: 4%;
  }

  .logo img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 2px solid rgba(0,0,0,0.12);
  }

  object,
  iframe {
    width: 94%;
    height: 60vh;
    border-radius: 12px;
    margin: 15px auto 25px;
  }
}

@media (min-width: 1440px) {
  :root {
    font-size: 24px;
  }
  .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* center cards */
    gap: 24px;
    padding: 0 10px; /* optional padding */
  }
  .container{margin-top: 8%;}
  .navbar{
    top: 5%;
    max-width: 30%;
  }

  .navbar a{
    font-size: 20px;
  }
  .card {
    flex: 0 1 calc((100% / 3) - 16px); /* 3 cards per row with gap accounted */
    max-width: none; /* allow cards to shrink/grow freely */
    min-width: 0;
  }
}

