* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --aws-orange: #ff9900;
  --aws-orange-dark: #ec7211;
  --aws-squid-ink: #232f3e;
  --aws-squid-ink-light: #2a3f54;
  --aws-squid-ink-dark: #1a242f;
  --aws-light-orange: #ffb84d;
  --aws-cloud: #ffffff;
  --aws-teal: #00a1c9;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(145deg, var(--aws-squid-ink-dark) 0%, var(--aws-squid-ink) 50%, var(--aws-squid-ink-light) 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

/* Background Pattern */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 153, 0, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 153, 0, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(0, 161, 201, 0.04) 0%, transparent 50%);
  z-index: 0;
}

/* Grid Pattern */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 153, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 153, 0, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

/* SVG Clouds */
.cloud {
  position: fixed;
  opacity: 0.08;
  z-index: 1;
  fill: white;
}

.cloud-1 {
  width: 200px;
  top: 8%;
  left: 3%;
  animation: floatCloud1 20s ease-in-out infinite;
}

.cloud-2 {
  width: 150px;
  top: 12%;
  right: 5%;
  animation: floatCloud2 25s ease-in-out infinite;
  animation-delay: -5s;
}

.cloud-3 {
  width: 180px;
  bottom: 15%;
  left: 8%;
  animation: floatCloud3 22s ease-in-out infinite;
  animation-delay: -10s;
}

.cloud-4 {
  width: 120px;
  bottom: 25%;
  right: 10%;
  animation: floatCloud1 18s ease-in-out infinite;
  animation-delay: -8s;
}

.cloud-5 {
  width: 100px;
  top: 40%;
  left: 2%;
  animation: floatCloud2 24s ease-in-out infinite;
  animation-delay: -3s;
  opacity: 0.05;
}

.cloud-6 {
  width: 90px;
  top: 60%;
  right: 3%;
  animation: floatCloud3 20s ease-in-out infinite;
  animation-delay: -12s;
  opacity: 0.05;
}

@keyframes floatCloud1 {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(20px) translateY(-10px);
  }
  50% {
    transform: translateX(35px) translateY(5px);
  }
  75% {
    transform: translateX(15px) translateY(-5px);
  }
}

@keyframes floatCloud2 {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  33% {
    transform: translateX(-25px) translateY(10px);
  }
  66% {
    transform: translateX(-40px) translateY(-8px);
  }
}

@keyframes floatCloud3 {
  0%,
  100% {
    transform: translateX(0) translateY(0) scale(1);
  }
  50% {
    transform: translateX(30px) translateY(-15px) scale(1.05);
  }
}

/* Glowing Orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: orbFloat 12s ease-in-out infinite;
  z-index: 0;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--aws-orange);
  top: -100px;
  right: -50px;
  animation-delay: 0s;
}

.orb-2 {
  width: 250px;
  height: 250px;
  background: var(--aws-teal);
  bottom: -80px;
  left: -80px;
  animation-delay: -6s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.5;
  }
}

/* Card Container */
.card-container {
  position: relative;
  z-index: 10;
  padding: 20px;
}

.card {
  width: 400px;
  background: var(--aws-cloud);
  border-radius: 24px;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 30px 60px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 8px 12px rgba(0, 0, 0, 0.15),
    0 25px 50px rgba(0, 0, 0, 0.35),
    0 40px 80px rgba(0, 0, 0, 0.25),
    0 0 60px rgba(255, 153, 0, 0.15);
}

/* AWS-style Header */
.card-header {
  background: linear-gradient(135deg, var(--aws-orange) 0%, var(--aws-orange-dark) 100%);
  padding: 35px 40px 60px;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  animation: shimmer 4s ease-in-out infinite;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
}

@keyframes shimmer {
  0%,
  100% {
    transform: rotate(0deg) translateX(0);
    opacity: 0.8;
  }
  50% {
    transform: rotate(5deg) translateX(10px);
    opacity: 1;
  }
}

/* Profile Section */
.profile {
  text-align: center;
  margin-top: -45px;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

.avatar-container {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
}

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 8px 25px rgba(35, 47, 62, 0.3);
  position: relative;
  z-index: 2;
  overflow: hidden; /* 追加：はみ出し部分を隠す */
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像を枠に合わせて切り抜き */
  display: block;
}

.avatar-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--aws-orange),
      var(--aws-light-orange),
      var(--aws-orange));
  animation: spin 8s linear infinite;
  z-index: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.name {
  font-size: 26px;
  font-weight: 700;
  color: var(--aws-squid-ink);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.title {
  font-size: 14px;
  color: #5f6b7a;
  font-weight: 500;
  margin-bottom: 15px;
  line-height: 1.5;
}

/* Links Section */
.links {
  padding: 0 25px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #f8f9fa;
  border: 1px solid #eaecef;
  border-radius: 14px;
  text-decoration: none;
  color: var(--aws-squid-ink);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--aws-orange);
  transform: scaleY(0);
  transition: transform 0.3s;
}

.link:hover::before {
  transform: scaleY(1);
}

.link:hover {
  background: white;
  border-color: var(--aws-orange);
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.15);
}

.link-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: all 0.3s;
}

.link:hover .link-icon {
  transform: scale(1.1) rotate(-5deg);
}

.link-x .link-icon {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
  color: white;
}

.link-qiita .link-icon {
  background: linear-gradient(135deg, #55c500 0%, #4db000 100%);
}

.link-qiita .link-icon img {
  border-radius: 4px;
}

.link-speakerdeck .link-icon {
  background: linear-gradient(135deg, #009287 0%, #007a70 100%);
  color: white;
}

.link-github .link-icon {
  background: linear-gradient(135deg, #333 0%, #24292e 100%);
  color: white;
}

.link-text {
  flex: 1;
  min-width: 0;
}

.link-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--aws-squid-ink);
  margin-bottom: 2px;
}

.link-handle {
  font-size: 12px;
  color: #8c9aa8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer */
.card-footer {
  padding: 20px 25px 25px;
  border-top: 1px solid #f0f2f4;
  text-align: center;
}

.connect-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8c9aa8;
  margin-bottom: 12px;
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  border: none;
}

.action-btn-primary {
  background: linear-gradient(135deg, var(--aws-orange) 0%, var(--aws-orange-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.action-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

.action-btn-secondary {
  background: white;
  color: var(--aws-squid-ink);
  border: 1px solid #e0e4e8;
}

.action-btn-secondary:hover {
  border-color: var(--aws-orange);
  color: var(--aws-orange);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: white;
  color: var(--aws-squid-ink);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 153, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--aws-orange) 0%, var(--aws-orange-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating Particles */
.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--aws-orange);
  border-radius: 50%;
  opacity: 0;
  animation: particleRise 15s infinite;
  z-index: 1;
}

@keyframes particleRise {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(1);
  }
}

/* Ripple Animation */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Mobile Responsiveness */
@media (max-width: 440px) {
  .card {
    width: 100%;
    border-radius: 20px;
  }

  .card-header {
    padding: 30px 25px 55px;
  }

  .profile {
    padding: 0 25px;
  }

  .name {
    font-size: 22px;
  }

  .links {
    padding: 0 20px 25px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }

  .cloud {
    display: none;
  }
}
