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

:root {
  --blue-deep: #0a1628;
  --blue-mid: #1a3a5c;
  --blue-accent: #2d5f8a;
  --blue-light: #4a90c4;
  --white: #f0f0f0;
  --white-dim: #a0a0a0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body.expanded-active {
  overflow-y: auto;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--blue-deep);
  color: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

header, main, footer {
  position: relative;
  z-index: 1;
}

/* Header */
header {
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.identity h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.identity .subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--blue-light);
  font-style: italic;
}

/* More/Back toggle */
.more-toggle {
  color: var(--blue-light);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--blue-light);
  padding: 0.35rem 0.9rem;
  border-radius: 3px;
  transition: background 0.3s ease, color 0.3s ease;
}

.more-toggle:hover {
  background: var(--blue-light);
  color: var(--blue-deep);
}

/* Main */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.description {
  transition: opacity 0.3s ease;
}

.description p {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.description strong {
  color: var(--blue-light);
  font-weight: 600;
}

/* Extended description */
.description.expanded {
  max-width: 800px;
  overflow-y: auto;
  max-height: calc(100vh - 16rem);
}

.description.expanded p {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.description.expanded p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 2rem 2.5rem;
}

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

.social-links a {
  color: var(--white-dim);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-links a:hover {
  color: var(--white);
}

.social-links .icon {
  width: 1rem;
  height: 1rem;
  color: var(--blue-light);
  flex-shrink: 0;
}

/* Portrait */
.portrait {
  width: 160px;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 6px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(30%) contrast(1.1);
  transition: filter 0.5s ease;
}

.portrait img:hover {
  filter: grayscale(0%) contrast(1);
}

/* Responsive — Tablet */
@media (max-width: 1024px) {
  .description.expanded {
    max-width: 600px;
  }

  .description.expanded p {
    font-size: 1.05rem;
  }
}

/* Responsive — Mobile */
@media (max-width: 768px) {
  html, body {
    overflow-y: auto;
    height: auto;
  }

  body {
    min-height: 100vh;
  }

  header {
    padding: 1.5rem;
  }

  main {
    flex: none;
    padding: 2rem 1.5rem;
  }

  .description p {
    font-size: 1.8rem;
  }

  .description.expanded {
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
  }

  .description.expanded p {
    font-size: 1rem;
    line-height: 1.5;
  }

  footer {
    padding: 1.5rem;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .social-links {
    align-self: center;
    align-items: flex-start;
  }

  .social-links a {
    font-size: 0.85rem;
  }

  .portrait {
    width: 120px;
    height: 160px;
  }
}

/* Responsive — Small phones */
@media (max-width: 400px) {
  header {
    padding: 1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .description p {
    font-size: 1.4rem;
  }

  footer {
    padding: 1rem;
  }

  .portrait {
    width: 100px;
    height: 130px;
  }
}
