/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colors */
  --color-primary: #0000;
  --color-secondary: #111;
  --color-tertiary: #1a1a1a;
  --color-white: #fff;
  --color-text: #f5f5f5;
  --color-text-muted: #8a8a8a;
  --color-gold: #646464;
  --color-accent: #144d63;
  --color-border: #333;

  /* Shadows */
  --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 15px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.3);

  /* Typography */
  --font-display: "Iceland", system-ui, sans-serif;
  --font-body: "Montserrat", sans-serif;

  /* Transitions */
  --transition-quick: 0.3s ease;
  --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius: 6px;
  --radius-lg: 16px;

  /* Layout */
  --container-width: 90%;
  --container-max-width: 1400px;
  --container-padding: clamp(15px, 4vw, 30px);
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
  overflow-x: hidden;
}

body {
  font: 400 1rem/1.8 var(--font-body);
  color: var(--color-text);
  background: var(--color-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: url('data:image/webp;base64,UklGRiQBAABXRUJQVlA4IBgBAwQdASdABsApCYpDYolEoEhJAJSsAASgIA9A+gQ4NflSOu/d7e7k7s9gQAP7d8fL8'), auto;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
  width: min(var(--container-width), var(--container-max-width));
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.content-box {
  background: var(--color-secondary);
  padding: 60px 50px;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.section-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 80px 0;
  position: relative;
}

.section-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--color-gold);
  border-radius: 50%;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  background: var(--color-gold);
  color: var(--color-white);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: all var(--transition-smooth);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left var(--transition-smooth);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn--primary {
  background: #c87941;
  color: var(--color-white);
  border-color: #c87941;
  padding: 14px 32px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn--primary:hover {
  background: #d89055;
  border-color: #d89055;
  color: var(--color-white);
}

.btn--secondary {
  background: transparent;
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn--secondary:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.btn--alert {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn--alert:hover {
  background: #329ec8;
  border-color: #329ec8;
}

/* ===== LINK-IN-BIO SPECIFIC STYLES ===== */
body {
  background: linear-gradient(135deg, #000000 0%, #1a1d23 50%, #000000 100%);
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(200, 121, 65, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(44, 95, 111, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Main Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Profile Section */
.profile {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out;
}

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

.profile-image {
  width: 150px;
  height: 150px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.profile-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #c87941;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover img {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.profile-name {
  font: 800 clamp(2rem, 5vw, 3rem)/1.1 var(--font-display);
  letter-spacing: -0.03em;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
}

.profile-bio {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
  line-height: 1.6;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-secondary);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: all var(--transition-quick);
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #c87941, #d89055);
  transition: all var(--transition-smooth);
  transform: translate(-50%, -50%);
}

.social-icon:hover::before {
  width: 100%;
  height: 100%;
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #c87941;
}

.social-icon:hover svg {
  color: white;
  position: relative;
  z-index: 1;
}

.social-icon svg {
  transition: color 0.3s ease;
}

/* Links Container */
.links-container {
  flex: 1;
  margin-bottom: 2rem;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Link Items */
.link-item {
  background: rgba(26, 29, 35, 0.95);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.1rem;
  font-family: var(--font-body);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out backwards;
}

.link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(200, 121, 65, 0.1), rgba(216, 144, 85, 0.1));
  transition: left var(--transition-smooth);
  z-index: 0;
}

.link-item:hover::before {
  left: 0;
}

.link-item:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: #c87941;
}

.link-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.link-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.link-text {
  position: relative;
  z-index: 1;
}

.link-description {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-top: 0.25rem;
  display: block;
}

.link-arrow {
  position: relative;
  z-index: 1;
  transition: transform var(--transition-smooth);
  color: var(--color-text-muted);
}

.link-item:hover .link-arrow {
  transform: translateX(5px);
  color: #c87941;
}

/* Special Link Styles */
.link-item.primary {
  background: linear-gradient(135deg, #c87941, #d89055);
  border: 2px solid #c87941;
  color: var(--color-white);
  font-weight: 700;
}

.link-item.primary .link-arrow {
  color: var(--color-white);
}

.link-item.secondary {
  background: linear-gradient(135deg, rgba(200, 121, 65, 0.1), rgba(216, 144, 85, 0.1));
  border-color: rgba(200, 121, 65, 0.3);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

.footer a {
  color: #c87941;
  text-decoration: none;
  transition: color var(--transition-quick);
}

.footer a:hover {
  color: #d89055;
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top: 3px solid #c87941;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced hover effects */
.link-item:nth-child(1) { animation-delay: 0.1s; }
.link-item:nth-child(2) { animation-delay: 0.2s; }
.link-item:nth-child(3) { animation-delay: 0.3s; }
.link-item:nth-child(4) { animation-delay: 0.4s; }
.link-item:nth-child(5) { animation-delay: 0.5s; }
.link-item:nth-child(6) { animation-delay: 0.6s; }
.link-item:nth-child(7) { animation-delay: 0.7s; }
.link-item:nth-child(8) { animation-delay: 0.8s; }
.link-item:nth-child(9) { animation-delay: 0.9s; }
.link-item:nth-child(10) { animation-delay: 1.0s; }

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem 1rem;
  }
  
  .profile-name {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .link-item {
    padding: 1rem 1.2rem;
    font-size: 1rem;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem 0.75rem;
  }
  
  .profile-name {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }
  
  .profile-bio {
    font-size: 1rem;
  }
  
  .link-item {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }
}

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

/* Focus Styles */
.link-item:focus,
.social-icon:focus {
  outline: 2px solid #c87941;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .social-icons,
  .footer {
    display: none;
  }
  
  .link-item {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Iceland&display=swap');