/* === Variables === */
:root {
  --sky-top: #1a8fe0;
  --sky-mid: #4db8f0;
  --sky-low: #7eccf5;
  --sky-bottom: #b8e0fa;
  --text-primary: #1a2a3a;
  --text-secondary: #5a6a7a;
  --accent-blue: #4a9eda;
  --accent-hover: #2e86c8;
  --frame-bg: #fff;
  --frame-border: #c9b99a;
  --frame-shadow: rgba(0, 0, 0, 0.15);
  --font-title: 'Ubuntu', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
  --font-body: Georgia, 'Times New Roman', Times, serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* === Sky Background === */
.sky {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 35%, var(--sky-low) 70%, var(--sky-bottom) 100%);
  z-index: -1;
  overflow: hidden;
}

/* === Clouds === */
.cloud {
  position: absolute;
  pointer-events: none;
}

.cloud-1 {
  width: 300px;
  top: 6%;
  left: -300px;
  animation: drift-1 55s linear infinite;
}

.cloud-2 {
  width: 220px;
  top: 18%;
  left: -220px;
  animation: drift-2 70s linear infinite;
  animation-delay: -20s;
}

.cloud-3 {
  width: 380px;
  top: 35%;
  left: -380px;
  animation: drift-3 80s linear infinite;
  animation-delay: -40s;
}

.cloud-4 {
  width: 200px;
  top: 55%;
  left: -200px;
  animation: drift-4 65s linear infinite;
  animation-delay: -10s;
}

.cloud-5 {
  width: 260px;
  top: 72%;
  left: -260px;
  animation: drift-5 75s linear infinite;
  animation-delay: -35s;
}

@keyframes drift-1 {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 600px)); }
}

@keyframes drift-2 {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 440px)); }
}

@keyframes drift-3 {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 760px)); }
}

@keyframes drift-4 {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 400px)); }
}

@keyframes drift-5 {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 520px)); }
}

/* === Balloons === */
.balloon {
  position: absolute;
  pointer-events: none;
  object-fit: contain;
}

.balloon-1 {
  width: 220px;
  top: 2%;
  right: 10%;
  animation: float-1 24s ease-in-out infinite, sway-1 40s ease-in-out infinite;
}

.balloon-2 {
  width: 180px;
  top: 20%;
  left: 5%;
  animation: float-2 28s ease-in-out infinite, sway-2 45s ease-in-out infinite;
  animation-delay: -8s;
}

.balloon-3 {
  width: 250px;
  top: 40%;
  right: 20%;
  animation: float-3 30s ease-in-out infinite, sway-3 42s ease-in-out infinite;
  animation-delay: -15s;
}

@keyframes float-1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

@keyframes float-2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-25px); }
}

@keyframes float-3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes sway-1 {
  0%, 100% { margin-left: 0; }
  50% { margin-left: 35px; }
}

@keyframes sway-2 {
  0%, 100% { margin-left: 0; }
  50% { margin-left: -30px; }
}

@keyframes sway-3 {
  0%, 100% { margin-left: 0; }
  50% { margin-left: 25px; }
}

/* === Content Layout === */
.content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  min-height: calc(100vh - 60px);
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* === Left Panel — Info === */
.panel-info {
  flex: 1;
  max-width: 460px;
}

.name {
  font-family: var(--font-title);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.tagline {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
  font-style: italic;
}

.bio p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.link-item:hover {
  color: var(--accent-blue);
  transform: translateX(4px);
}

.link-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* === Right Panel — Portrait === */
.panel-portrait {
  flex-shrink: 0;
}

.frame {
  width: 300px;
  background: var(--frame-bg);
  border-radius: 12px;
  padding: 10px;
  box-shadow:
    0 4px 24px var(--frame-shadow),
    0 1px 4px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(201, 185, 154, 0.3);
}

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 2;
  border-radius: 6px;
  overflow: hidden;
  background: #f0ebe3;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(26, 42, 58, 0.25);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  padding: 0;
}

.carousel-dot.active {
  background: var(--text-primary);
  transform: scale(1.25);
}

.carousel-dot:hover {
  background: rgba(26, 42, 58, 0.5);
}

/* === Footer === */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  color: var(--accent-hover);
}

/* === Responsive — Tablet (<=900px) === */
@media (max-width: 900px) {
  .content {
    flex-direction: column-reverse;
    gap: 36px;
    padding: 32px 24px;
  }

  .panel-info {
    max-width: 100%;
  }

  .name {
    font-size: 3rem;
  }

  .frame {
    width: 260px;
    margin: 0 auto;
  }
}

/* === Responsive — Mobile (<=480px) === */
@media (max-width: 480px) {
  .content {
    padding: 24px 16px;
    gap: 28px;
  }

  .name {
    font-size: 2.4rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .bio p {
    font-size: 0.95rem;
  }

  .frame {
    width: 220px;
  }

  .link-item {
    font-size: 0.95rem;
  }

  .carousel-dot {
    width: 6px;
    height: 6px;
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  .cloud,
  .balloon {
    animation: none !important;
  }

  .carousel-slide {
    transition: opacity 0.1s ease;
  }
}
