/* ============================================
   Nick Patrocky — Personal Site
   Pixel-perfect clone of Framer template
   ============================================ */

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

/* Base */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #161616;
  color: #f2f2f2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

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

/* ============================================
   Page Layout
   ============================================ */
.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 40px 40px 0;
}

/* ============================================
   Card
   ============================================ */
.card {
  width: 100%;
  max-width: 640px;
  border-radius: 16px;
  overflow: hidden;
}

.banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: #1c1c1c;
}

.banner-content {
  display: contents;
}

/* ============================================
   Cover Image
   ============================================ */
.cover {
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* ============================================
   Share / QR Button
   ============================================ */
.share-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  background: #fff;
  color: #000;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.share-btn:hover {
  opacity: 0.9;
}

/* ============================================
   Avatar
   ============================================ */
.avatar-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  margin-top: -60px;
  position: relative;
  z-index: 1;
  background: #1c1c1c;
  box-shadow: 0 0 0 8px #1c1c1c;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

/* ============================================
   Name + Verified
   ============================================ */
.name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  width: 100%;
}

.name {
  font-size: 24px;
  font-weight: 700;
  color: #f2f2f2;
  letter-spacing: -0.24px;
  line-height: 1.1;
}

.verified-badge {
  color: #2196F3;
  flex-shrink: 0;
}

/* ============================================
   Username
   ============================================ */
.username {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin-top: 4px;
  width: 100%;
}

/* ============================================
   Social Icons
   ============================================ */
.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 8px;
}

.social-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   Bio
   ============================================ */
.bio {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  line-height: 24px;
  text-align: center;
  margin-top: 24px;
  padding: 0 40px;
}

/* ============================================
   Sections Container
   ============================================ */
.sections-container {
  width: 100%;
  background: #1c1c1c;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

/* ============================================
   Card Sections
   ============================================ */
.card-section {
  padding: 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #1c1c1c;
}

/* No border between sections — matches original */

/* ============================================
   Company Link
   ============================================ */
.company-link {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
}

.company-link:hover {
  opacity: 0.8;
}

.company-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.company-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.external-link-icon {
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.company-name {
  font-size: 16px;
  font-weight: 500;
  color: #f2f2f2;
  line-height: 1.4;
}

.company-role {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-header {
  display: flex;
  align-items: center;
}

.section-title {
  font-size: 20px;
  font-weight: 500;
  color: #f2f2f2;
  line-height: 1.4;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 20px 24px;
}

.contact-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-icon {
  color: rgba(255, 255, 255, 0.6);
}

.contact-label {
  font-size: 16px;
  font-weight: 500;
  color: #f2f2f2;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #171717;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.contact-btn:hover {
  opacity: 0.9;
}

/* ============================================
   Footer
   ============================================ */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 40px 16px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
  width: 100%;
  max-width: 640px;
}

.footer-text {
  color: rgba(255, 255, 255, 0.4);
}

.footer-link {
  color: #f2f2f2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.footer-link-primary {
  color: #f2f2f2;
  font-weight: 500;
}

.footer-dot {
  color: #f2f2f2;
  font-size: 8px;
}

/* ============================================
   QR Modal
   ============================================ */
.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.qr-modal.active {
  opacity: 1;
  pointer-events: all;
}

.qr-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.qr-content {
  position: relative;
  background: #1c1c1c;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.qr-modal.active .qr-content {
  transform: scale(1);
}

.qr-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  line-height: 1;
}

.qr-close-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.qr-title {
  font-size: 18px;
  font-weight: 600;
  color: #f2f2f2;
  margin-bottom: 24px;
}

.qr-code {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.qr-url {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   Responsive: Tablet (≤ 809px)
   ============================================ */
@media (max-width: 809px) {
  .page-wrapper {
    padding: 16px 16px 0;
  }

  .card-section {
    padding: 20px 24px;
  }

  .bio {
    padding: 0 24px;
  }
}

/* ============================================
   Responsive: Mobile (≤ 430px)
   ============================================ */
@media (max-width: 430px) {
  .page-wrapper {
    padding: 16px 16px 0;
  }

  .card-section {
    padding: 20px 24px;
  }

  .bio {
    padding: 0 20px;
  }

  .contact-card {
    padding: 16px 20px;
  }

  .contact-btn {
    padding: 8px 18px;
    font-size: 14px;
  }

  footer {
    padding: 32px 16px;
    font-size: 13px;
  }

  .legal-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 12px;
  }

  .legal-content {
    padding: 32px 24px;
  }
}

/* ============================================
   Legal Pages (Terms & Privacy)
   ============================================ */
.legal-page .card {
  overflow: visible;
}

.legal-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 40px;
  background: #1c1c1c;
  border-radius: 16px 16px 0 0;
}

.legal-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #f2f2f2;
  letter-spacing: -0.24px;
  line-height: 1.1;
}

.legal-header .home-link {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.legal-header .home-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

.legal-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  width: 100%;
}

.legal-content {
  padding: 40px 40px;
  background: #1c1c1c;
  border-radius: 0 0 16px 16px;
}

.legal-content .content-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-content p {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  line-height: 24px;
}

.legal-content p.section-heading {
  margin-top: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
}

.legal-content p:first-child.section-heading {
  margin-top: 0;
}

/* ============================================
   404 Page
   ============================================ */
.not-found-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.not-found-page h1 {
  font-size: 24px;
  font-weight: 700;
  color: #f2f2f2;
  letter-spacing: -0.24px;
  margin-bottom: 12px;
}

.not-found-page .not-found-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 24px;
  margin-bottom: 32px;
  max-width: 400px;
}

.not-found-page .home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #171717;
  font-size: 16px;
  font-weight: 500;
  padding: 16px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.not-found-page .home-btn:hover {
  opacity: 0.9;
}

/* ============================================
   Light Mode (auto-detect)
   ============================================ */
@media (prefers-color-scheme: light) {
  body {
    background-color: #e8e8e8;
    color: #171717;
  }

  /* Card backgrounds */
  .banner,
  .sections-container,
  .card-section {
    background: #fff;
  }

  /* Avatar ring */
  .avatar-wrapper {
    background: #fff;
    box-shadow: 0 0 0 8px #fff;
  }

  /* Name */
  .name {
    color: #171717;
  }

  /* Username */
  .username {
    color: rgba(0, 0, 0, 0.4);
  }

  /* Social icons */
  .social-link {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.05);
  }

  .social-link:hover {
    color: rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.08);
  }

  /* Bio */
  .bio {
    color: rgba(0, 0, 0, 0.4);
  }

  /* Company link */
  .company-link {
    background: rgba(0, 0, 0, 0.04);
  }

  .company-name {
    color: #171717;
  }

  .company-role {
    color: rgba(0, 0, 0, 0.4);
  }

  .external-link-icon {
    color: rgba(0, 0, 0, 0.4);
  }

  /* Contact section */
  .section-title {
    color: #171717;
  }

  .contact-card {
    background: rgba(0, 0, 0, 0.04);
  }

  .chat-icon {
    color: rgba(0, 0, 0, 0.6);
  }

  .contact-label {
    color: #171717;
  }

  .contact-btn {
    background: #171717;
    color: #fff;
  }

  /* Footer */
  footer {
    color: rgba(0, 0, 0, 0.4);
  }

  .footer-text {
    color: rgba(0, 0, 0, 0.4);
  }

  .footer-link,
  .footer-link-primary {
    color: #171717;
  }

  .footer-link:hover {
    color: rgba(0, 0, 0, 0.6);
  }

  .footer-dot {
    color: rgba(0, 0, 0, 0.3);
  }

  /* QR Modal */
  .qr-overlay {
    background: rgba(0, 0, 0, 0.5);
  }

  .qr-content {
    background: #fff;
  }

  .qr-close-btn {
    color: rgba(0, 0, 0, 0.4);
  }

  .qr-close-btn:hover {
    color: rgba(0, 0, 0, 0.8);
  }

  .qr-title {
    color: #171717;
  }

  .qr-url {
    color: rgba(0, 0, 0, 0.4);
  }

  /* Share button — keep dark on light */
  .share-btn {
    background: #171717;
  }

  .share-btn svg {
    color: #fff;
  }

  /* Legal pages */
  .legal-header {
    background: #fff;
  }

  .legal-header h1 {
    color: #171717;
  }

  .legal-header .home-link {
    color: rgba(0, 0, 0, 0.4);
  }

  .legal-header .home-link:hover {
    color: rgba(0, 0, 0, 0.7);
  }

  .legal-separator {
    background: rgba(0, 0, 0, 0.08);
  }

  .legal-content {
    background: #fff;
  }

  .legal-content p {
    color: rgba(0, 0, 0, 0.4);
  }

  .legal-content p.section-heading {
    color: rgba(0, 0, 0, 0.4);
  }

  /* 404 page */
  .not-found-page h1 {
    color: #171717;
  }

  .not-found-page .not-found-desc {
    color: rgba(0, 0, 0, 0.4);
  }

  .not-found-page .home-btn {
    background: #171717;
    color: #fff;
  }
}
