/* ==========================================================================
   Font Face Declarations (Safiro)
   ========================================================================== */

@font-face {
  font-family: 'Safiro';
  src: url('fonts/safiro-medium-webfont.woff2') format('woff2'),
       url('fonts/safiro-medium-webfont.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Safiro';
  src: url('fonts/safiro-semibold-webfont.woff2') format('woff2'),
       url('fonts/safiro-semibold-webfont.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  --color-background: #a4a4a4;
  --color-card: #ffffff;
  --color-button: #ededed;
  --color-text: #111827;
  --color-text-secondary: #4b5563;
  --font-family: 'Safiro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --card-max-width: 480px;
  --card-padding: 0 2.5rem 3rem;
  --border-radius: 16px;
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
}

/* ==========================================================================
   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;
}

body {
  font-family: var(--font-family);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-card);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: none;
  padding: 0 1.5rem 2rem;
  background-color: var(--color-card);
  text-align: center;
}

/* Desktop: Show gray background, card with rounded corners */
@media (min-width: 480px) {
  body {
    background-color: var(--color-background);
  }

  .container {
    padding: 2rem;
    align-items: center;
  }

  .card {
    max-width: var(--card-max-width);
    padding: var(--card-padding);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  }
}

/* ==========================================================================
   Profile Picture with Gradient
   ========================================================================== */

.profile-header {
  position: relative;
  margin: 0 -1.5rem 1.5rem;
  overflow: hidden;
}

@media (min-width: 480px) {
  .profile-header {
    margin: 0 -2.5rem 1.5rem;
  }
}

.profile-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0) 0%, var(--color-card) 85%);
  pointer-events: none;
  z-index: 2;
}

.profile-picture {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
  border: none;
  box-shadow: none;
  display: block;
  z-index: 1;
}

@media (min-width: 480px) {
  .profile-header {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */

.name {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: -1.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 3;
}

.tagline {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.6;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* Desktop: Larger fonts */
@media (min-width: 480px) {
  .name {
    font-size: 2.25rem;
  }

  .tagline {
    font-size: 1.0625rem;
  }
}

/* ==========================================================================
   Social Links
   ========================================================================== */

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.social-links a {
  color: var(--color-text);
  opacity: 0.8;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.social-links a:hover {
  opacity: 1;
  transform: scale(1.15);
}

.social-links a:active {
  transform: scale(1.05);
}

.social-links svg {
  width: 24px;
  height: 24px;
}

/* Desktop: Larger icons */
@media (min-width: 480px) {
  .social-links svg {
    width: 28px;
    height: 28px;
  }
}

/* ==========================================================================
   CTA Buttons
   ========================================================================== */

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.cta-button {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-button);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgb(0 0 0 / 0.15);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px -2px rgb(0 0 0 / 0.1);
}

.cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.cta-button span {
  flex: 1;
  text-align: left;
}

/* Desktop: Larger buttons */
@media (min-width: 480px) {
  .cta-button {
    padding: 0.875rem 1.25rem;
    font-size: 1.0625rem;
    gap: 1rem;
  }

  .cta-icon {
    width: 56px;
    height: 56px;
  }
}

/* ==========================================================================
   Focus Styles (Accessibility)
   ========================================================================== */

.social-links a:focus-visible,
.cta-button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

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