/* ===== Font Faces ===== */
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('fonts/thmanyahsans-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Serif Display';
  src: url('fonts/thmanyahserifdisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #111115;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-card-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0f2;
  --text-secondary: #8b8b96;
  --text-muted: #55555e;
  --accent: #c8a96e;
  --accent-glow: rgba(200, 169, 110, 0.15);
  --accent-dim: rgba(200, 169, 110, 0.08);
  --glow-profile: rgba(200, 169, 110, 0.2);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Thmanyah Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Background Ambient Effect ===== */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 600px 600px at 30% 20%, rgba(200, 169, 110, 0.04), transparent),
    radial-gradient(ellipse 500px 500px at 70% 80%, rgba(120, 100, 180, 0.03), transparent);
  pointer-events: none;
  z-index: 0;
  animation: ambientDrift 20s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(30px, -20px) rotate(2deg); }
}

/* ===== Container ===== */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ===== Language Toggle ===== */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-family: 'Thmanyah Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

.lang-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  color: var(--text-primary);
}

.lang-toggle:active {
  transform: scale(0.96);
}

.lang-toggle .globe-icon {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

/* ===== Profile Section ===== */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.profile-image-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.profile-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(200, 169, 110, 0.3), transparent);
  opacity: 0.6;
  animation: profileGlow 4s ease-in-out infinite alternate;
}

@keyframes profileGlow {
  0% { opacity: 0.4; filter: blur(8px); }
  100% { opacity: 0.7; filter: blur(12px); }
}

.profile-image {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.profile-name {
  font-family: 'Thmanyah Serif Display', 'Thmanyah Sans', serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-align: center;
}

.profile-bio {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  max-width: 280px;
}

/* ===== Links Section ===== */
.links-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.link-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:active {
  transform: translateY(0) scale(0.98);
}

.link-card-icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.link-card-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--text-secondary);
  transition: fill var(--transition);
}

.link-card:hover .link-card-icon svg {
  fill: var(--accent);
}

.link-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.link-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.link-card-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.link-card-arrow {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.3;
  transition: var(--transition);
}

.link-card:hover .link-card-arrow {
  opacity: 0.7;
  transform: translateX(3px);
}

[dir="rtl"] .link-card:hover .link-card-arrow {
  transform: translateX(-3px) scaleX(-1);
}

[dir="rtl"] .link-card-arrow {
  transform: scaleX(-1);
}

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  text-align: center;
}

.footer p {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ===== Fade-in Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.links-section .link-card {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 0.5s ease forwards;
}

.links-section .link-card:nth-child(1) { animation-delay: 0.35s; }
.links-section .link-card:nth-child(2) { animation-delay: 0.45s; }
.links-section .link-card:nth-child(3) { animation-delay: 0.55s; }
.links-section .link-card:nth-child(4) { animation-delay: 0.65s; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .container {
    padding: 40px 20px 56px;
  }
  .profile-name {
    font-size: 22px;
  }
  .link-card {
    padding: 14px 16px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 800px;
    padding: 80px 40px;
  }

  .profile-section {
    margin-bottom: 60px;
  }

  .profile-name {
    font-size: 32px;
  }

  /* Grid Layout for Links */
  .links-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Make large section titles span full width */
  .section-container {
    grid-column: span 2;
  }

  .section-title {
    margin-bottom: 20px;
  }

  /* Privacy section width adjustment */
  .privacy-section {
    grid-column: span 2;
  }

  /* Handle sections with single items to prevent them from stretching too much */
  .links-section:has(> a:only-child) {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

/* ===== Featured Support Card ===== */
.link-card.featured {
  border: 1px solid rgba(200, 169, 110, 0.3);
  position: relative;
  overflow: hidden;
}

.link-card.featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(110deg, transparent 40%, rgba(200, 169, 110, 0.2) 50%, transparent 60%);
  animation: shine 3s linear infinite;
  pointer-events: none;
}

.link-card.featured .link-card-icon {
  background: var(--accent-dim);
  animation: pulse 2s infinite;
}

.link-card.featured .link-card-icon svg {
  fill: var(--accent);
}

.link-card.featured:hover {
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow), 0 0 50px rgba(200, 169, 110, 0.1);
  transform: translateY(-4px) scale(1.02);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 15px var(--accent-glow); }
  100% { transform: scale(1); }
}

@keyframes shine {
  to {
    left: 100%;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 900px;
  }
}


/* ===== Sections ===== */
.section-title {
  font-family: 'Thmanyah Serif Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  opacity: 0.8;
  width: 100%;
  padding-right: 4px;
}

[dir="ltr"] .section-title {
  padding-right: 0;
  padding-left: 4px;
}