:root {
  --ink: #102a43;
  --muted: #5b6b7f;
  --blue: #2563eb;
  --blue-dark: #123b7a;
  --sky: #38bdf8;
  --aqua: #e8fbff;
  --paper: #ffffff;
  --soft: #f4f8fc;
  --border: rgba(16, 42, 67, 0.12);
  --shadow: 0 24px 60px rgba(16, 42, 67, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef7ff 0%, #f8fbff 46%, #ffffff 100%);
}

a {
  color: inherit;
}

.hero {
  min-height: 640px;
  color: #ffffff;
  background:
    radial-gradient(circle at 72% 22%, rgba(125, 211, 252, 0.45), transparent 30%),
    radial-gradient(circle at 10% 88%, rgba(59, 130, 246, 0.35), transparent 32%),
    linear-gradient(135deg, #0f2742 0%, #1d4f91 48%, #2f7df6 100%);
  overflow: hidden;
}

.nav,
.hero-grid,
.app-shell,
.details-section,
footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.brand {
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tech-stack {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 72px;
  align-items: center;
  padding: 72px 0 96px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 800;
}

.eyebrow {
  color: #bae6fd;
}

.section-label {
  color: var(--blue);
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.hero-text {
  margin: 24px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.16rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-link,
.secondary-link,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.primary-link,
.primary-button {
  background: #ffffff;
  color: var(--blue-dark);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.secondary-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(1px);
}

.hero-visual img {
  position: relative;
  width: min(100%, 520px);
  filter: drop-shadow(0 34px 45px rgba(0, 0, 0, 0.28));
}

main {
  margin-top: -74px;
}

.app-shell {
  display: grid;
  grid-template-columns: 410px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.panel,
.skill-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel {
  padding: 30px;
}

.panel h2,
.details-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  letter-spacing: -0.035em;
}

.muted,
.helper-text {
  color: var(--muted);
  line-height: 1.65;
}

.weather-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.weather-form label {
  font-weight: 800;
}

.weather-form input[type="text"],
.weather-form input[type="password"] {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0 16px;
  color: var(--ink);
  background: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.weather-form input:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.helper-text {
  margin: -4px 0 6px;
  font-size: 0.88rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.primary-button {
  width: 100%;
  min-height: 54px;
  background: var(--blue);
  color: #ffffff;
}

.primary-button:hover,
.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.result-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-badge.idle {
  background: #e2e8f0;
  color: #334155;
}

.status-badge.loading {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.loaded {
  background: #dcfce7;
  color: #166534;
}

.status-badge.error {
  background: #fee2e2;
  color: #991b1b;
}

.weather-summary {
  min-height: 138px;
  margin-top: 24px;
  padding: 24px;
  border-radius: 24px;
  color: #0b3954;
  background:
    linear-gradient(135deg, rgba(232, 251, 255, 0.95), rgba(239, 246, 255, 0.95)),
    radial-gradient(circle at 88% 16%, rgba(56, 189, 248, 0.30), transparent 28%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-size: 1.08rem;
  line-height: 1.7;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.metric-card {
  min-height: 112px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.metric-card strong {
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  letter-spacing: -0.04em;
}

.details-section {
  padding: 56px 0 24px;
}

.details-copy {
  max-width: 760px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.skill-card {
  padding: 24px;
  box-shadow: 0 16px 36px rgba(16, 42, 67, 0.08);
}

.skill-card h3 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

footer {
  padding: 28px 0 44px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .app-shell,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 36px;
    padding-top: 48px;
  }

  .hero-visual img {
    max-width: 390px;
  }

  main {
    margin-top: -48px;
  }
}

@media (max-width: 720px) {
  .nav,
  .hero-grid,
  .app-shell,
  .details-section,
  footer {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 13vw, 3.5rem);
  }

  .panel {
    padding: 22px;
    border-radius: 24px;
  }

  .result-header {
    flex-direction: column;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .hero-actions,
  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
