/* Global Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Cinzel', serif;
  --font-signature: 'Alex Brush', cursive;

  /* Brand Colors & Gradients for Squircle Icons */
  --linkedin-grad: linear-gradient(135deg, #0077b5 0%, #0a66c2 100%);
  --linkedin-glow: rgba(10, 102, 194, 0.6);

  --youtube-grad: linear-gradient(135deg, #ff4b4b 0%, #cc181e 100%);
  --youtube-glow: rgba(204, 24, 30, 0.6);

  --x-grad: linear-gradient(135deg, #2f3542 0%, #0f1419 100%);
  --x-glow: rgba(255, 255, 255, 0.25);

  --github-grad: linear-gradient(135deg, #4b5563 0%, #111827 100%);
  --github-glow: rgba(255, 255, 255, 0.2);

  --instagram-grad: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 50%, #6228d7 100%);
  --instagram-glow: rgba(238, 42, 123, 0.6);

  --website-glow: rgba(37, 99, 235, 0.55);
  --blog-glow: rgba(245, 158, 11, 0.55);
  --email-glow: rgba(234, 67, 53, 0.55);

  --share-grad: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  --share-glow: rgba(124, 58, 237, 0.6);
}

body {
  font-family: var(--font-sans);
  background: #0b0813;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* --- Animated Bokeh Background --- */
.bokeh-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  mix-blend-mode: screen;
}

.bokeh-1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #5b21b6 0%, transparent 70%);
  top: 15%;
  left: 10%;
  animation: float-slow 22s infinite alternate ease-in-out;
}

.bokeh-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #0284c7 0%, transparent 75%);
  bottom: 10%;
  right: 15%;
  animation: float-slow 28s infinite alternate-reverse ease-in-out;
}

.bokeh-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #be185d 0%, transparent 70%);
  top: 50%;
  left: 55%;
  animation: float-slower 32s infinite alternate ease-in-out;
}

.bokeh-4 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #b45309 0%, transparent 70%);
  top: -5%;
  right: 5%;
  animation: float-slow 25s infinite alternate ease-in-out;
}

@keyframes float-slow {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, -50px) scale(1.15);
  }

  100% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

@keyframes float-slower {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-50px, 40px) scale(1.1);
  }

  100% {
    transform: translate(30px, -30px) scale(0.95);
  }
}

/* --- Sparkles Background --- */
.sparkles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.4rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: pulse-twinkle 4s infinite ease-in-out;
}

.sparkle-1 {
  top: 25%;
  right: 20%;
  animation-delay: 0s;
}

.sparkle-2 {
  bottom: 20%;
  left: 18%;
  animation-delay: 1.5s;
}

.sparkle-3 {
  bottom: 45%;
  right: 12%;
  animation-delay: 3s;
  font-size: 1.8rem;
  /* Main sparkle from the image */
  opacity: 0.65;
}

@keyframes pulse-twinkle {

  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.2;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* --- Card Architecture --- */
.card-wrapper {
  z-index: 10;
  padding: 20px;
  width: 100%;
  max-width: 540px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-card {
  width: 100%;
  background: rgba(18, 18, 28, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 48px;
  /* Smooth iOS rounded widget look */
  padding: 42px 32px 36px 32px;
  backdrop-filter: blur(35px) saturate(170%);
  -webkit-backdrop-filter: blur(35px) saturate(170%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 2px 0 rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
}

/* Glass shine gradient overlay */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Interactive shine effect that tracks hover */
.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.05) 0%,
      transparent 80%);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.glass-card:hover .card-shine {
  opacity: 1;
}

/* --- App Icon Grid --- */
.icons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 20px;
  justify-items: center;
  position: relative;
  z-index: 5;
}

/* Auto-center last item if solitary in the 3-column grid (e.g., 7th item) */
.icons-grid > .grid-item:last-child:nth-child(3n - 2),
#shareProfileBtn {
  grid-column: 2;
}

/* Grid Item Anchor Styling */
.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  width: 100%;
  max-width: 120px;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* iOS squircle App Icon Shape */
.icon-container {
  width: 72px;
  height: 72px;
  border-radius: 22%;
  /* Perfect iOS app squircle mimic */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;

  /* Liquid Glass Base */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.01) 75%, rgba(255, 255, 255, 0) 100%);
  border: 1.8px solid rgba(255, 255, 255, 0.55);
  /* Brighter, thicker edge */
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);

  /* Inner bevel 3D highlights & high reflectivity glow */
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.28),
    inset 0 4px 8px rgba(255, 255, 255, 0.75),
    /* Super bright top glare edge */
    inset 0 -3px 6px rgba(0, 0, 0, 0.16),
    /* Deeper bottom shading */
    inset 0 0 14px rgba(255, 255, 255, 0.22);
  /* Enhanced internal glow */

  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
}

/* Glass bubble reflection glare (top hemisphere highlight) */
.icon-container::before {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  right: 1.5px;
  height: 46%;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.72) 0%,
      rgba(255, 255, 255, 0.35) 30%,
      rgba(255, 255, 255, 0.08) 65%,
      transparent 100%);
  border-radius: 14px 14px 4px 4px;
  pointer-events: none;
  z-index: 4;
}

/* Soft glossy highlight reflection (bottom corner glare) */
.icon-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 75% 75%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 60%);
  pointer-events: none;
  z-index: 3;
}

/* SVGs styling inside Squircle Icons */
.icon-svg {
  width: 36px;
  height: 36px;
  z-index: 3;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.25)) brightness(1.3) contrast(1.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Grid Item Labels */
.item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 10px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.item-desc {
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.1px;
}

/* --- Brand Specific Styling & Gradients --- */
/* Containers are clear liquid glass by default. Custom colors are inside SVG paths. */

/* --- Hover Effects --- */
.grid-item:hover .icon-container {
  transform: translateY(-6px) scale(1.05);
}

.grid-item:hover .icon-svg {
  transform: scale(1.08);
}

#link-linkedin:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--linkedin-glow),
    0 0 12px var(--linkedin-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

#link-youtube:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--youtube-glow),
    0 0 12px var(--youtube-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

#link-x:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--x-glow),
    0 0 10px rgba(255, 255, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

#link-github:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--github-glow),
    0 0 10px rgba(255, 255, 255, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

#link-instagram:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--instagram-glow),
    0 0 12px var(--instagram-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

#link-website:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--website-glow),
    0 0 12px var(--website-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

#link-blog:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--blog-glow),
    0 0 12px var(--blog-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

#link-email:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--email-glow),
    0 0 12px var(--email-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

#shareProfileBtn:hover .icon-container {
  box-shadow:
    0 15px 30px -5px var(--share-glow),
    0 0 12px var(--share-glow),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Tap feedback for touch devices */
.grid-item:active .icon-container {
  transform: translateY(-2px) scale(0.95) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* --- Footer Area --- */
.card-footer {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
}

.fasil-name {
  font-family: var(--font-serif);
  font-weight: 450;
  font-size: 2.1rem;
  letter-spacing: 4px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  text-align: center;
}

.fasil-tag {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 6px;
  text-align: center;
}

/* Stylized Signature in bottom-right corner of the card */
.signature {
  position: absolute;
  bottom: -15px;
  right: 0px;
  font-family: var(--font-signature);
  font-size: 1.45rem;
  color: rgba(255, 255, 255, 0.28);
  transform: rotate(-8deg);
  pointer-events: none;
  letter-spacing: 1px;
}

/* --- Toast Notification System --- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 255, 255, 0.9);
  color: #0b0813;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Responsiveness & Adaptability --- */
@media (max-width: 480px) {
  .glass-card {
    padding: 36px 20px 30px 20px;
    border-radius: 40px;
  }

  .icons-grid {
    gap: 22px 14px;
  }

  .icon-container {
    width: 64px;
    height: 64px;
  }

  .icon-svg {
    width: 32px;
    height: 32px;
  }

  .item-name {
    font-size: 0.8rem;
    margin-top: 8px;
  }

  .item-desc {
    font-size: 0.6rem;
  }

  .fasil-name {
    font-size: 1.8rem;
    letter-spacing: 3px;
  }

  .fasil-tag {
    font-size: 0.65rem;
  }

  .signature {
    font-size: 1.25rem;
    bottom: -12px;
    right: -4px;
  }
}

@media (max-width: 360px) {
  .icons-grid {
    gap: 16px 8px;
  }

  .icon-container {
    width: 58px;
    height: 58px;
  }

  .icon-svg {
    width: 28px;
    height: 28px;
  }
}

/* Premium smooth 3D tilt adjustments for larger screens */
@media (min-width: 768px) {
  .glass-card {
    transform-style: preserve-3d;
    perspective: 1000px;
  }

  .icons-grid,
  .card-footer {
    transform: translateZ(25px);
  }
}