/* ===== GLOBAL RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #0f172a, #020617);
  color: #e5e7eb;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
}

.profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid rgba(56, 189, 248, 0.8);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.06);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #f1f5f9;
}

.tagline {
  color: #94a3b8;
  margin-bottom: 25px;
  max-width: 600px;
}

/* ===== BUTTONS ===== */
.cta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  text-decoration: none;
  background: #38bdf8;
  color: #020617;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.45);
  opacity: 0.95;
}

.btn.secondary {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 2px solid rgba(56, 189, 248, 0.5);
}

/* ===== SECTIONS ===== */
section {
  padding: 70px 20px;
  max-width: 1100px;
  margin: auto;
}

section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  color: #f1f5f9;
}

/* ===== CARD GRID ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

/* clickable wrapper */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ===== GLASS CARD ===== */
.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 14px 45px rgba(56, 189, 248, 0.28);
}

.card:active {
  transform: translateY(-6px) scale(0.985);
}

/* keyboard accessibility */
.card-link:focus-visible .card {
  outline: 2px solid #38bdf8;
  outline-offset: 4px;
}

/* ===== PROJECT CARD ===== */
.project-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 15px;
}

.project-card h3 {
  color: #f8fafc;
  margin-bottom: 6px;
}

.project-card p {
  color: #94a3b8;
  font-size: 0.95rem;
}

/* ===== SERVICES CARD ===== */
.service-card {
  text-align: center;
  min-height: 160px;
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

/* Prevent inner elements from blocking tilt */
.service-card * {
  pointer-events: none;
}

/* Premium hover glow */
.service-card:hover {
  box-shadow: 0 25px 70px rgba(56, 189, 248, 0.28);
}

/* ===== SERVICE IMAGE WRAPPER ===== */
.service-img {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  transform: translateZ(20px);
}

.service-img img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
  backface-visibility: hidden;
}

/* ===== PREMIUM GRADIENT OVERLAY ===== */
.service-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(2, 6, 23, 0.85),
    rgba(2, 6, 23, 0.45),
    rgba(2, 6, 23, 0.1),
    transparent
  );
}

/* ===== HOVER ZOOM ===== */
.service-card:hover .service-img img {
  transform: scale(1.1);
}

/* ===== SHIMMER EFFECT ===== */
.service-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 60%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-20deg);
}

.service-card:hover .service-img::before {
  animation: shimmer 0.85s ease forwards;
}

@keyframes shimmer {
  0% { left: -130%; }
  100% { left: 140%; }
}

/* ===== OVERLAY BUTTON ===== */
.service-overlay {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  opacity: 0;
  transform: translateY(12px) translateZ(40px);
  transition: all 0.35s cubic-bezier(.2,.8,.2,1);
}

.service-overlay span {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.6);
  padding: 6px 16px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  backdrop-filter: blur(6px);
}

/* Show overlay on hover */
.service-card:hover .service-overlay {
  opacity: 1;
  transform: translateY(0) translateZ(40px);
}

/* ===== TEXT STYLING ===== */
.service-card h3 {
  color: #38bdf8;
  margin-bottom: 10px;
  transform: translateZ(30px);
}

.service-card p {
  color: #94a3b8;
  font-size: 0.95rem;
  transform: translateZ(25px);
}

/* ===== CONTACT ===== */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  padding: 10px 14px;
  border-radius: 14px;
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s;
}

.contact-links a img {
  width: 20px;
  height: 20px;
}

.contact-links a:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
  color: #22d3ee;
}

/* ===== CONTACT ICON FIX ===== */
.contact-links a img {
  width: 20px;
  height: 20px;

  /* FORCE WHITE ICON */
  filter: brightness(0) invert(1);

  transition: 
    filter 0.25s ease,
    transform 0.25s ease,
    drop-shadow 0.25s ease;
}

/* ICON + TEXT GLOW ON HOVER */
.contact-links a:hover img {
  filter:
    brightness(0)
    invert(1)
    drop-shadow(0 0 6px rgba(56, 189, 248, 0.9))
    drop-shadow(0 0 14px rgba(56, 189, 248, 0.6));
  transform: scale(1.15);
}

/* ===== CONTACT TITLES ===== */
.contact-title {
  margin-top: 45px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.4px;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.contact-sub {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 25px;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 25px;
  color: #64748b;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.3rem;
  }

  .profile-img {
    width: 120px;
    height: 120px;
  }

  .cards {
    gap: 16px;
  }

  .contact-links a {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 900px) {
  .contact-links a {
    padding: 9px 12px;
    font-size: 0.95rem;
  }
}

/* ===== INTERACTIVE BACKGROUND ===== */
body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;

  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(56, 189, 248, 0.12),
    transparent 40%
  );

  transition: background 0.15s ease;
}
