/* ============================================
   Mahmoud Matter — Links Page
   Minimal Enterprise Design System
   ============================================ */

/* CSS Variables */
:root {
  --bg-primary: #FAFAF9;
  --bg-card: #FFFFFF;
  --text-primary: #1C1917;
  --text-secondary: #78716C;
  --text-muted: #A8A29E;
  --accent: #1E3A5F;
  --accent-hover: #2A4A73;
  --border: #E7E5E4;
  --border-hover: #1E3A5F;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* ============================================
   Profile Header
   ============================================ */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  width: 100%;
}

.avatar-wrapper {
  position: relative;
  width: 176px;
  height: 176px;
  border-radius: var(--radius-full);
  padding: 4px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: var(--shadow-md);
}

.avatar-clip {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 3px solid #FFFFFF;
  background-color: #FFFFFF;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  transform: scale(2.4);
  transform-origin: 46% 20%;
}

.name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 0.5rem;
}

.title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
}

/* ============================================
   Social Links
   ============================================ */
.social-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.social-link:active {
  transform: translateY(0);
}

/* ============================================
   Primary Links
   ============================================ */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.link-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background-color: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.link-button:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.link-button:hover::before {
  transform: scaleY(1);
}

.link-button:active {
  transform: translateY(0);
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  color: var(--accent);
  flex-shrink: 0;
}

.link-text {
  flex: 1;
  text-align: left;
}

.link-arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.link-button:hover .link-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

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

.footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 1rem;
  }
  
  .container {
    gap: 1.25rem;
  }
  
  .name {
    font-size: 1.375rem;
  }
  
  .link-button {
    padding: 0.875rem 1rem;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 520px;
  }
  
  .name {
    font-size: 1.625rem;
  }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  body {
    background: white;
  }
  
  .link-button {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
