/* ═══════════════════════════════════════════════════════════════════════════
   LINK IN BIO: STYLE.CSS
   A premium, accessible design system implementation
   ═══════════════════════════════════════════════════════════════════════════ */

/* Import shared design tokens */
@import url('assets/css/tokens.css');

/* ═══════════════════════════════════════════
   LIGHT MODE (Clean Professional)
   ═══════════════════════════════════════════ */
[data-theme="light"] {
  /* Colors: Background */
  --color-bg-base: #F1F5F9;
  --color-bg-surface: #FFFFFF;
  --color-bg-elevated: #E2E8F0;
  --color-bg-glass: rgba(255, 255, 255, 0.9);

  /* Colors: Text */
  --color-text-primary: #0F172A;
  --color-text-secondary: #334155;
  --color-text-muted: #475569;

  /* Colors: Accent */
  --color-accent: #00F5D4;
  --color-accent-hover: #0F766E;
  --color-accent-glow: rgba(0, 200, 170, 0.4);

  /* Colors: Borders */
  --color-border: rgba(15, 23, 42, 0.12);
  --color-border-hover: rgba(0, 200, 170, 0.3);
  --color-focus-ring: #00F5D4;

  /* Glassmorphism */
  --glass-surface: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

/* Fallback for when JS/Canvas fails or loads late */
#ambient-canvas {
  background: linear-gradient(to bottom, var(--color-bg-base), var(--color-bg-elevated));
}


/* ═══════════════════════════════════════════
   2. RESET & BASE STYLES
   ═══════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-base);

  /* Deep Space Gradients */
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 245, 212, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 60%, rgba(123, 97, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 80% at 50% 100%, rgba(0, 245, 212, 0.04) 0%, transparent 40%);
  background-attachment: fixed;

  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Background Canvas */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

/* Noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
  opacity: 0.07;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}


/* ═══════════════════════════════════════════
   3. SKIP LINK (Accessibility)
   ═══════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent);
  color: var(--color-bg-base);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  z-index: 1000;
  transition: top var(--duration-normal) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 2px solid var(--color-text-primary);
  outline-offset: 2px;
}


/* ═══════════════════════════════════════════
   4. LAYOUT: CONTAINER
   ═══════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-8) var(--container-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  min-height: 100vh;
  min-height: 100dvh;
}


/* ═══════════════════════════════════════════
   5. PROFILE HEADER
   ═══════════════════════════════════════════ */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

/* Avatar */
/* Global Image Protection */
img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Premium Avatar (Gold Edition) */
.avatar-premium {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  display: block;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);

  /* Gold Border & Deep Shadow */
  border: 2px solid var(--accent-gold);
  box-shadow:
    0 0 0 8px rgba(255, 184, 0, 0.1),
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 100px var(--color-accent-glow);

  position: relative;
  z-index: 2;
}

/* Decoration Ring (Slow Spin) - Replaces the old conic gradient */
.avatar-wrapper::after {
  content: '';
  position: absolute;
  inset: -15px;
  border: 1px dashed rgba(255, 184, 0, 0.3);
  border-radius: 9999px;
  animation: spinSlow 30s linear infinite;
  pointer-events: none;
}

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

/* Remove old before pseudo-element */
.avatar-wrapper::before {
  display: none;
}

.avatar-wrapper:hover .avatar-premium {
  transform: scale(1.05);
  /* Simplified hover */
}

/* Identity */
.identity {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.name {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}

.tagline {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}



/* Typing cursor */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--color-accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1.06s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}


/* ═══════════════════════════════════════════
   6. BIO SECTION
   ═══════════════════════════════════════════ */
.bio-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.bio-text {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 32ch;
  line-height: var(--leading-normal);
}




/* ═══════════════════════════════════════════
   THEME TOGGLE & LOADER
   ═══════════════════════════════════════════ */
.theme-toggle {
  position: absolute;
  /* Relative to container or body if fixed */
  top: var(--space-4);
  right: var(--container-padding);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--color-text-primary);

  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  backdrop-filter: blur(var(--backdrop-blur));
  box-shadow: var(--shadow-md);
  z-index: 1000;

  transition: all 0.3s var(--ease-spring);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  background: var(--glass-highlight);
  color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Loader Overlay */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #fff;
  animation: loadProgress 1.5s ease-in-out forwards;
}

@keyframes loadProgress {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════
   7. LINK CARDS (SPOTLIGHT EFFECT)
   ═══════════════════════════════════════════ */
.links-section {
  width: 100%;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.link-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Left align for card feel */
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-4) var(--space-5);

  /* Glassmorphism Card Premium */
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  backdrop-filter: blur(var(--backdrop-blur));
  box-shadow: var(--glass-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  /* Top inner highlight */

  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-align: left;

  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Spotlight Gradient Overlay */
.link-button::before {
  content: '';
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  transform: translate(-50%, -50%);
  width: 0px;
  height: 0px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  transition: width 0.5s ease, height 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.link-button:hover::before {
  width: 400px;
  /* Expand spotlight on hover */
  height: 400px;
}

/* Content z-index fix */
.link-button>* {
  position: relative;
  z-index: 1;
}

/* Hover state */
.link-button:hover {
  transform: translateX(4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 0 20px var(--color-accent-glow);
}

/* Focus state */
.link-button:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* Active state */
.link-button:active {
  transform: scale(0.98);
}

/* Link icon */
.link-icon {
  flex-shrink: 0;
  font-size: 24px;
  color: var(--color-text-muted);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.link-button:hover .link-icon {
  color: #fff;
  transform: scale(1.15) rotate(-5deg);
  background: rgba(255, 255, 255, 0.1);
}

/* BRAND COLORS */
.link-button[data-brand="whatsapp"]:hover .link-icon {
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.2);
}

.link-button[data-brand="linkedin"]:hover .link-icon {
  background: rgba(10, 102, 194, 0.15);
  color: #0A66C2;
  box-shadow: 0 0 20px rgba(10, 102, 194, 0.2);
}

.link-button[data-brand="instagram"]:hover .link-icon {
  background: rgba(228, 64, 95, 0.15);
  color: #E4405F;
  box-shadow: 0 0 20px rgba(228, 64, 95, 0.2);
}

.link-button[data-brand="github"]:hover .link-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Brand: Google Calendar */
.link-button[data-brand="calendar"]:hover .link-icon {
  background: rgba(66, 133, 244, 0.15);
  color: #4285F4;
  box-shadow: 0 0 20px rgba(66, 133, 244, 0.2);
}

/* Brand: Blog (Book) */
.link-button[data-brand="book"]:hover .link-icon {
  background: rgba(255, 184, 0, 0.15);
  color: #FFB800;
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.2);
}

.link-button[data-brand="envelope"]:hover .link-icon {
  background: rgba(234, 67, 53, 0.15);
  color: #EA4335;
  box-shadow: 0 0 20px rgba(234, 67, 53, 0.2);
}

/* Link label */
.link-label {
  flex: 1;
}

/* Link arrow */
.link-arrow {
  flex-shrink: 0;
  opacity: 0.4;
  font-size: 20px;
  transform: translateX(0);
  transition: all 0.3s ease;
}

.link-button:hover .link-arrow {
  opacity: 1;
  transform: translateX(4px);
  color: var(--color-accent-glow);
}

/* Secondary links - more subtle */
.links-section--secondary {
  margin-top: calc(-1 * var(--space-3));
}

.link-button--secondary {
  justify-content: center;
  /* Center these */
  background: transparent;
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-secondary);
}

.link-button--secondary:hover {
  background: var(--glass-surface);
  color: var(--color-text-primary);
  border-color: var(--glass-border);
  transform: translateY(-2px);
}

/* Trust Badge (Glass) */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);

  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);

  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  transition: all 0.3s ease;
}

.trust-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: scale(1.05);
}



/* ═══════════════════════════════════════════
   7b. CATEGORY TABS
   ═══════════════════════════════════════════ */
.tabs-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  width: 100%;
}

.tab-button {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  /* Prevent layout shift */
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
  color: var(--color-text-primary);
  background: var(--glass-surface);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  backdrop-filter: blur(var(--backdrop-blur));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   8. SOCIAL ICONS
   ═══════════════════════════════════════════ */
.social-section {
  margin-top: var(--space-6);
  /* More breathing room at bottom */
  margin-bottom: var(--space-4);
}

.social-list {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  /* Bigger touch target */
  height: 60px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
  /* Subtle bg always visible */
  border: 1px solid transparent;
  transition:
    color var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out),
    background-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.social-link:hover {
  color: var(--color-text-primary);
  background: var(--glass-surface);
  border-color: var(--glass-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 15px var(--color-accent-glow);
  transform: translateY(-4px) scale(1.1);
}

.social-link:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.social-link:active {
  transform: translateY(0) scale(0.95);
  transition-duration: var(--duration-fast);
}

.social-icon {
  font-size: 28px;
  /* Bigger icons */
  width: auto;
  height: auto;
}

/* Social Brand Colors */
.social-link[data-brand="linkedin"]:hover {
  background: rgba(10, 102, 194, 0.15);
  color: #0A66C2;
  box-shadow: 0 0 25px rgba(10, 102, 194, 0.4);
  border-color: rgba(10, 102, 194, 0.3);
}

.social-link[data-brand="instagram"]:hover {
  background: rgba(228, 64, 95, 0.15);
  color: #E4405F;
  box-shadow: 0 0 25px rgba(228, 64, 95, 0.4);
  border-color: rgba(228, 64, 95, 0.3);
}

.social-link[data-brand="github"]:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

.social-link[data-brand="whatsapp"]:hover {
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  box-shadow: 0 0 25px rgba(37, 211, 102, 0.4);
  border-color: rgba(37, 211, 102, 0.3);
}


/* ═══════════════════════════════════════════
   9. FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
  margin-top: auto;
  padding: var(--space-6) var(--container-padding);
  text-align: center;
}

.footer-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}


/* ═══════════════════════════════════════════
   10. CONTENT REVEAL ANIMATIONS
   ═══════════════════════════════════════════ */
/* Initial hidden state for animation */
.profile-header,
.bio-section,
.links-section,
.social-section {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp var(--duration-slow) var(--ease-out) forwards;
}

/* Staggered delays */
.profile-header {
  animation-delay: 0ms;
}

.bio-section {
  animation-delay: 100ms;
}

.links-section:nth-of-type(1) {
  animation-delay: 200ms;
}

.links-section:nth-of-type(2) {
  animation-delay: 300ms;
}

.social-section {
  animation-delay: 400ms;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

/* ═══════════════════════════════════════════
   11. CONTACT FORM
   ═══════════════════════════════════════════ */
.contact-section {
  width: 100%;
  padding: 0;
  /* Removing padding from container to let header take full width */
  display: flex;
  flex-direction: column;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  backdrop-filter: blur(var(--backdrop-blur));
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.contact-header {
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.3s ease;
}

.contact-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  /* Reduced slightly for cleaner look */
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin: 0;
  /* Remove bottom margin */
}

.toggle-icon {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  transition: transform 0.3s ease;
}

.contact-section.expanded .toggle-icon {
  transform: rotate(180deg);
}

.contact-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
}

.contact-section.expanded .contact-content {
  max-height: 800px;
  /* Arbitrary large height */
  opacity: 1;
  padding: 0 var(--space-6) var(--space-6);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-2);
  /* Add spacing from header */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.form-input {
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.submit-btn {
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: var(--color-bg-base);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  margin-top: var(--space-2);
}

.submit-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-accent-glow);
}


/* ═══════════════════════════════════════════
   12. EMAIL WIDGET
   ═══════════════════════════════════════════ */
/* Ensure content is visible when expanded */
.email-widget.expanded .contact-content {
  overflow: visible;
}

.email-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-weight: var(--weight-medium);
  transition: all 0.3s ease;
  text-align: center;
}

.option-btn.primary {
  background: var(--color-accent);
  color: var(--color-bg-base);
}

.option-btn.primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-accent-glow);
}

.option-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  border: 1px solid var(--glass-border);
}

.option-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-text-secondary);
  transform: translateY(-2px);
}

/* Helper for toggling visibility */
.hidden {
  display: none !important;
}

/* Animations for direct form */
.email-direct-form {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

/* Larger screens */
@media (min-width: 480px) {
  .name {
    font-size: var(--text-4xl);
  }

  .avatar {
    width: 112px;
    height: 112px;
  }

  .container {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }
}


/* Short viewport adjustment */
@media (max-height: 700px) {
  .container {
    padding-top: var(--space-5);
    padding-bottom: var(--space-5);
    gap: var(--space-4);
  }

  .avatar-premium {
    width: 80px;
    height: 80px;
  }

  .name {
    font-size: var(--text-2xl);
  }
}

/* ═══════════════════════════════════════════
   MOBILE REFINEMENT (User Request)
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  .container {
    padding-top: var(--space-6);
    padding-bottom: var(--space-8);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
    gap: var(--space-5);
  }

  .name {
    font-size: 1.75rem;
    /* Better scale for mobile */
  }

  .tagline {
    font-size: var(--text-base);
  }

  .avatar-premium {
    width: 84px;
    height: 84px;
  }

  /* Link Buttons Compact */
  .link-list {
    gap: var(--space-3);
  }

  .link-button {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    min-height: 56px;
    /* Touch target size */
  }

  /* Safe Area for Home Bar */
  .site-footer {
    padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
  }

  /* Disable hover effects that stick on mobile */
  .link-button:hover,
  .social-link:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
  }

  /* Touch Feedback: Active State (Press) */
  .link-button:active,
  .social-link:active {
    transform: scale(0.98);
    background: var(--glass-highlight);
    border-color: var(--color-accent);
    transition-duration: 0.1s;
  }
}


/* ═══════════════════════════════════════════
   12. REDUCED MOTION
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .profile-header,
  .bio-section,
  .links-section,
  .social-section {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .cursor {
    animation: none;
    opacity: 1;
  }

  .link-button:hover,
  .social-link:hover {
    transform: none;
  }
}


/* ═══════════════════════════════════════════
   13. HIGH CONTRAST MODE
   ═══════════════════════════════════════════ */
@media (prefers-contrast: high) {
  :root {
    --color-border: hsla(0, 0%, 100%, 0.5);
    --color-text-secondary: hsl(0, 0%, 85%);
    --color-text-muted: hsl(0, 0%, 70%);
  }

  .link-button {
    border-width: 2px;
  }
}


/* ═══════════════════════════════════════════
   14. PRINT STYLES
   ═══════════════════════════════════════════ */
@media print {
  body {
    background: white;
    color: black;
  }

  .link-button {
    border: 1px solid black;
    page-break-inside: avoid;
  }

  .social-section {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   15. 404 PAGE STYLES
   ═══════════════════════════════════════════ */
/* Container specifically for error page to center content */
.error-container {
  justify-content: center;
  gap: var(--space-6);
  min-height: 100vh;
  padding: var(--space-4);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Error Content Wrapper */
.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  z-index: 10;
  max-width: 600px;
}

/* Glitch wrapper for the 404 text */
.glitch-wrapper {
  position: relative;
  margin-bottom: var(--space-4);
}

.error-code {
  font-family: var(--font-display);
  font-size: 10rem;
  font-weight: 900;
  line-height: 1;
  color: var(--color-text-primary);
  position: relative;
  z-index: 1;
}

/* Glitch Effect Layers */
.error-code::before,
.error-code::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-base);
  /* Match background to hide main text parts */
}

.error-code::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip-path: inset(44% 0 61% 0);
  animation: glitch-anim-1 4s infinite linear alternate-reverse;
}

.error-code::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9;
  clip-path: inset(50% 0 30% 0);
  animation: glitch-anim-2 4s infinite linear alternate-reverse;
}

/* Keyframes for Glitch Animation */
@keyframes glitch-anim-1 {
  0% {
    clip-path: inset(80% 0 2% 0);
    transform: translate(-2px, 1px);
  }

  20% {
    clip-path: inset(20% 0 60% 0);
    transform: translate(2px, -1px);
  }

  40% {
    clip-path: inset(40% 0 40% 0);
    transform: translate(-1px, 2px);
  }

  60% {
    clip-path: inset(60% 0 20% 0);
    transform: translate(1px, -2px);
  }

  80% {
    clip-path: inset(10% 0 80% 0);
    transform: translate(-1px, 1px);
  }

  100% {
    clip-path: inset(0% 0 100% 0);
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip-path: inset(10% 0 80% 0);
    transform: translate(2px, -1px);
  }

  20% {
    clip-path: inset(80% 0 10% 0);
    transform: translate(-2px, 1px);
  }

  40% {
    clip-path: inset(30% 0 50% 0);
    transform: translate(1px, -2px);
  }

  60% {
    clip-path: inset(50% 0 30% 0);
    transform: translate(-1px, 2px);
  }

  80% {
    clip-path: inset(20% 0 60% 0);
    transform: translate(2px, 1px);
  }

  100% {
    clip-path: inset(90% 0 5% 0);
    transform: translate(-2px, -1px);
  }
}

/* Force glitch class for mouseover */
.force-glitch::before,
.force-glitch::after {
  animation-duration: 0.5s;
}

.force-glitch {
  transform: skewX(var(--skew-x, 0deg));
  transition: transform 0.1s ease-out;
}


/* Error Title */
.error-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

/* Error Message */
.error-message {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 40ch;
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

/* Home Button Specifics */
.error-home-btn {
  width: auto;
  display: inline-flex;
  margin: 0 auto;
  min-width: 250px;
  justify-content: space-between;
}

/* Responsive adjustments for 404 */
@media (max-width: 768px) {
  .error-code {
    font-size: 6rem;
  }

  .error-title {
    font-size: var(--text-xl);
  }

  .error-message {
    font-size: var(--text-base);
  }
}


/* ═══════════════════════════════════════════
   16. PORTED AVATAR STYLES (FROM RESUME)
   ═══════════════════════════════════════════ */

/* Avatar Section Container */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  position: relative;
}

/* Updated Wrapper Position */
.avatar-wrapper {
  position: relative;
  /* Ensure no overflow clipping for decorations */
  overflow: visible;
}

/* Premium Avatar - Ported Size & Style */
.avatar-premium {
  width: 280px;
  height: 380px;
  border-radius: 9999px;
  /* Oval shape */
  display: block;
  object-fit: cover;
  object-position: center 15%;

  /* Gold Border & Deep Shadow */
  border: 2px solid var(--accent-gold);
  box-shadow:
    0 0 0 8px rgba(255, 184, 0, 0.1),
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 100px var(--color-accent-glow);

  position: relative;
  z-index: 2;
  transition: transform 0.5s var(--ease-out);
}

.avatar-premium:hover {
  transform: scale(1.02);
}

/* Ring Decoration */
.avatar-ring {
  position: absolute;
  inset: -20px;
  border: 1px dashed var(--accent-cyan);
  border-radius: 9999px;
  opacity: 0.3;
  animation: spinSlow 30s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Dots Decoration */
.avatar-dots {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 60px;
  height: 60px;
  background-image: radial-gradient(var(--accent-gold) 2px, transparent 2px);
  background-size: 10px 10px;
  opacity: 0.5;
  z-index: 0;
}

/* Verified Badge */
.verified-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: pulse-badge 2s ease-in-out infinite;
}

.verified-badge svg {
  width: 32px;
  height: 32px;
  fill: var(--accent-cyan);
  /* Theme consistency */
}

@keyframes pulse-badge {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* Status Badge */
.status-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-primary);

  /* Glassmorphism */
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  backdrop-filter: blur(var(--backdrop-blur));
  border-radius: var(--radius-full);

  /* Animation */
  opacity: 0;
  animation: slideUp 1s var(--ease-out) 1s forwards;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00FF88;
  border-radius: 50%;
  box-shadow: 0 0 10px #00FF88;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.5);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
  }
}

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

  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Responsive Adjustments for Mobile */
@media (max-width: 480px) {
  .avatar-premium {
    width: 200px;
    height: 280px;
  }

  .avatar-dots {
    display: none;
    /* Hide dots on small screens if too cluttered */
  }
}


/* ═══════════════════════════════════════════
   17. NAME BADGE OVERRIDE
   ═══════════════════════════════════════════ */
.name {
  /* Dynamic Container Style Override */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-6);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--backdrop-blur));
  backdrop-filter: blur(var(--backdrop-blur));
  border-radius: var(--radius-full);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s var(--ease-spring);
}

.name:hover {
  background: var(--glass-highlight);
  border-color: var(--color-accent);
  box-shadow: 0 0 20px var(--color-accent-glow);
  transform: translateY(-2px);
}