/* Adhering to the original design system from the homepage */
:root {
  --bg-primary: #131313;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #212121;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-tertiary: #888888;
  --grid-line: rgba(255, 255, 255, 0.08);
  --accent-color: #ffffff;
  --accent-highlight: #3b82f6; /* Subtle blue for particular highlights if needed, though mostly monochrome */
  --link-hover-bg: rgba(255, 255, 255, 0.05);

  /* Theme-aware accents (overridden in light mode) */
  --shine-color: rgba(255, 255, 255, 0.08);
  --shadow-color: rgba(255, 255, 255, 0.2);
  --highlight-bg: rgba(255, 255, 255, 0.03);
  --highlight-border: rgba(255, 255, 255, 0.2);
  --accent-contrast-muted: rgba(0, 0, 0, 0.6);
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #ececec;
  --text-primary: #131313;
  --text-secondary: #2c2c2c;
  --text-tertiary: #6b6b6b;
  --grid-line: rgba(0, 0, 0, 0.1);
  --accent-color: #131313;
  --accent-highlight: #3b82f6;
  --link-hover-bg: rgba(0, 0, 0, 0.05);

  --shine-color: rgba(0, 0, 0, 0.04);
  --shadow-color: rgba(0, 0, 0, 0.15);
  --highlight-bg: rgba(0, 0, 0, 0.03);
  --highlight-border: rgba(0, 0, 0, 0.15);
  --accent-contrast-muted: rgba(255, 255, 255, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Show the icon for the mode you can switch TO */
.theme-toggle .icon-moon {
  display: none;
}
.theme-toggle .icon-sun {
  display: block;
}
[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}
[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:focus {
  outline: none;
}
:focus-visible {
  outline: none;
}

body {
  font-family: "Archivo", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Page-wide Grid Lines */
.page-grid {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
  z-index: 1;
}

.page-grid-line {
  border-left: 1px solid var(--grid-line);
}
.page-grid-line:first-child {
  border-left: none;
}
.page-grid-line:last-child {
  border-right: 1px solid var(--grid-line);
}

/* Container */
.container {
  max-width: 600px; /* Slightly wider mobile default */
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  position: relative;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Profile Section */
.profile-section {
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
  background: var(--bg-primary);
  border: 1px solid var(--grid-line);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.profile-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    var(--shine-color),
    transparent
  );
  transform: skewX(-25deg);
  animation: shineBlock 5s infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes shineBlock {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

.avatar-container {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  position: relative;
  padding: 3px;
  background: transparent;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.profile-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.profile-bio {
  color: var(--text-tertiary);
  font-size: 0.95rem;
  max-width: 90%;
  margin: 0 auto;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Kit Sections */
.kit-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--grid-line);
  padding: 2.5rem 2rem;
}

.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  padding: 1.5rem 1rem;
  text-align: center;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
}

.highlight-card {
  background: var(--highlight-bg);
}

.stat-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Links Section */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-card:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  transform: translateY(-4px);
  border-color: var(--accent-color);
}

.link-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.link-icon {
  width: 28px;
  height: 28px;
}

.platform-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.link-text {
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.platform-stat {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.link-card:hover .platform-stat {
  color: var(--accent-contrast-muted);
}

/* Services section */
.services-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--highlight-border);
  background: var(--highlight-bg);
}

.service-icon {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--grid-line);
}

.service-info h4 {
  font-size: 1rem;
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent-color);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.service-info p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* Contact CTA — inherits the standard .kit-section card; just centered */
.contact-section {
  text-align: center;
  align-items: center;
}
.primary-btn {
  display: inline-block;
  background: var(--accent-color);
  color: var(--bg-primary);
  padding: 1rem 2rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
}

/* Email + copy button row */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
}

.copy-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--grid-line);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

/* Toggle between copy and check icons via the .copied state */
.copy-btn .copy-icon-done {
  display: none;
}

.copy-btn.copied,
.copy-btn.copied:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

.copy-btn.copied .copy-icon-default {
  display: none;
}

.copy-btn.copied .copy-icon-done {
  display: block;
}

.copy-btn.copied::after {
  content: "Copied!";
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: var(--bg-primary);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  animation: tooltip-pop 0.15s ease;
}

.copy-btn.copied::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--accent-color);
  pointer-events: none;
  animation: tooltip-pop 0.15s ease;
}

@keyframes tooltip-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.back-link svg {
  width: 16px;
  height: 16px;
}
.back-link:hover {
  color: var(--accent-color);
}

/* Footer */
.footer {
  width: 100%;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--grid-line);
  position: relative;
  z-index: 10;
  margin-top: auto;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  opacity: 0.6;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.made-with {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.heart-icon {
  width: 14px;
  height: 14px;
  fill: #ff3e3e; /* Vibrant red */
  animation: heartBeat 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
  display: inline-block;
  position: relative;
  top: -1px; /* Move heart a bit to top */
}

@keyframes heartBeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.3);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(1);
  }
}

/* Animations */
.fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}
.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}
.delay-5 {
  animation-delay: 0.5s;
}
.delay-6 {
  animation-delay: 0.6s;
}

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

/* Responsive */
/* PC Optimization & Grid Layout */
@media (min-width: 1024px) {
  .container {
    max-width: 1100px;
    padding: 5rem 2rem;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2.5rem;
    align-items: start;
  }

  .profile-section {
    padding: 4rem 2rem;
  }

  /* Every block spans the full width, stacking in one vertical flow */
  .profile-section,
  .container > section,
  .website-link-wrapper {
    grid-column: span 12;
  }

  .links-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .section-title {
    text-align: center;
    font-size: 1.4rem;
  }

  .collab-grid {
    gap: 1.25rem; /* Slightly more gap on PC */
  }

}

@media (max-width: 560px) {
  .container {
    padding: 2.5rem 1rem 4rem;
    gap: 2rem;
  }
  .profile-section,
  .kit-section {
    padding: 2rem 1.5rem;
  }
  .profile-name {
    font-size: 2.2rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .stat-card {
    padding: 1.5rem;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  /* Keep the email + copy button on one row on small screens */
  .contact-actions .primary-btn {
    padding: 0.9rem 1.1rem;
    font-size: 0.85rem;
  }
  .contact-actions .primary-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Brand Collaborations Section */
.collab-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.collab-card {
  background: var(--bg-secondary);
  border: 1px solid var(--grid-line);
  padding: 2rem 1.5rem;
  flex: 1 1 180px;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  gap: 1.25rem;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease;
}

.collab-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-color);
}

.company-logo-large {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.company-logo-large.needs-white-bg {
  background-color: #ffffff;
  border-radius: 50%;
  width: 64px;
  height: 64px;
}

.company-logo-large.needs-white-bg.logo-padded .company-logo {
  padding: 12px;
}

[data-theme="light"] .company-logo-large.needs-dark-bg {
  background-color: #1a1a1a;
  border-radius: 50%;
}

.company-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.company-logo-large.logo-padded .company-logo {
  padding: 20px;
}

.fallback-icon {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
}

.company-name-large {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-top: auto;
}

.multiple-collabs-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: transparent;
  border-left: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  border-radius: 0;
  padding: 0.2rem 0.5rem;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0.7;
}

.collab-links-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.collab-link-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--grid-line);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  width: 100%;
}

.collab-link-btn:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
  border-color: var(--accent-color);
}

.collab-link-btn.highlight {
  background: var(--highlight-bg);
}

.collab-link-btn.highlight:hover {
  background: var(--accent-color);
  color: var(--bg-primary);
}

.collab-link-btn .link-icon {
  width: 16px;
  height: 16px;
}

/* About Creator Section */
.about-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border: 1px solid var(--grid-line);
  text-align: left;
}

.creator-photo-container {
  width: 340px;
  height: 460px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--grid-line);
  background: var(--bg-primary);
}

.creator-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  width: 100%;
}

.about-info .section-title {
  text-align: center;
}

.location-tag {
  color: var(--accent-color);
  font-weight: normal;
  margin: 0;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
}

.about-description {
  line-height: 1.6;
  max-width: 100%;
  margin: 0;
}

@media (max-width: 768px) {
  .about-card {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    text-align: center;
  }

  .creator-photo-container {
    width: 100%;
    max-width: 340px;
    height: 460px;
  }

  .about-info {
    align-items: center;
    text-align: center;
  }

  .about-info .creator-tag {
    text-align: center;
  }

  .location-tag {
    justify-content: center;
  }
}

/* About card — PC large layout (must come after base styles to win cascade) */
@media (min-width: 1024px) {
  .about-card {
    gap: 3.5rem;
    padding: 3.5rem;
    align-items: stretch;
  }

  .creator-photo-container {
    width: 460px;
    height: 640px;
  }

  .about-info {
    justify-content: center;
    gap: 1.25rem;
    align-items: flex-start;
    text-align: left;
  }

  .about-info .section-title {
    font-size: 2.8rem;
    text-align: left;
  }

  .about-description {
    font-size: 1.1rem;
    line-height: 1.9;
  }

  .location-tag {
    justify-content: flex-start;
  }
}
