:root {
  --bg: #f4f7fb;
  --bg-deep: #e8eff8;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --line: #d6e0ec;
  --text: #0f1f33;
  --muted: #52657a;
  --primary: #1f7ae0;
  --primary-strong: #135cb0;
  --accent: #ef7d32;
  --mint: #1da58f;
  --shadow: 0 18px 55px rgba(10, 40, 74, 0.12);
  --radius-lg: 1.4rem;
  --radius-md: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(31, 122, 224, 0.2), transparent 35%),
    radial-gradient(circle at 88% 14%, rgba(239, 125, 50, 0.18), transparent 33%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  font-family: "Sora", "Noto Sans SC", sans-serif;
  line-height: 1.65;
  padding: 0 1.1rem;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(#0f1f33 0.45px, transparent 0.45px);
  background-size: 9px 9px;
  z-index: -3;
}

.orb {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(8px);
  z-index: -2;
  animation: float 14s ease-in-out infinite;
}

.orb-a {
  background: rgba(31, 122, 224, 0.18);
  top: -7rem;
  right: -6rem;
}

.orb-b {
  background: rgba(239, 125, 50, 0.2);
  bottom: -8rem;
  left: -7rem;
  animation-delay: 2.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: var(--primary-strong);
}

.site-header {
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.3rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  padding: 0.42rem 0.8rem;
  font: inherit;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.nav-links a:hover {
  background: rgba(31, 122, 224, 0.12);
}

main {
  max-width: 74rem;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.hero-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.hero-grid {
  margin-top: 0.4rem;
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.eyebrow {
  margin-bottom: 0.55rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-main {
  grid-column: span 8;
  min-height: 18rem;
  background:
    linear-gradient(135deg, rgba(31, 122, 224, 0.08), rgba(29, 165, 143, 0.06)),
    var(--surface);
}

.hero-main h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 0.8rem;
}

.hero-main p {
  color: var(--muted);
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 122, 224, 0.28);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid var(--line);
}

.chip-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-row li {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.32rem 0.72rem;
  font-size: 0.8rem;
}

.hero-status {
  grid-column: span 4;
  min-height: 18rem;
}

.hero-status h2 {
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}

.status-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 0.7rem;
  background: rgba(255, 255, 255, 0.82);
}

.status-item:last-child {
  margin-bottom: 0;
}

.status-item span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.status-item strong {
  font-size: 0.95rem;
}

.hero-poem {
  grid-column: span 12;
  background:
    linear-gradient(120deg, rgba(239, 125, 50, 0.1), rgba(31, 122, 224, 0.08)),
    var(--surface);
}

.hero-poem h2 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.poem-text {
  font-family: "Noto Serif SC", serif;
  font-size: 1.16rem;
  margin-bottom: 0.35rem;
  min-height: 3.8rem;
  transition: opacity 220ms ease;
}

.poem-source {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  transition: opacity 220ms ease;
}

.poem-text.is-switching,
.poem-source.is-switching {
  opacity: 0.2;
}

.module-grid {
  margin-top: 1rem;
}

.module h2 {
  margin-bottom: 0.55rem;
  font-size: 1.15rem;
}

.module p {
  color: var(--muted);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.card-head a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.poetry {
  grid-column: span 6;
}

.apps {
  grid-column: span 6;
}

.photo {
  grid-column: span 6;
}

.writing {
  grid-column: span 6;
}

.career {
  grid-column: span 6;
}

.resume {
  grid-column: span 6;
}

.contact {
  grid-column: span 12;
}

.plain-list,
.article-list,
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  border-bottom: 1px dashed var(--line);
  padding: 0.5rem 0;
}

.plain-list li:last-child {
  border-bottom: 0;
}

.poetry .card-head span {
  font-size: 0.84rem;
  color: var(--muted);
}

.module {
  height: 22rem;
  display: flex;
  flex-direction: column;
}

.poetry-library {
  margin-top: 0.25rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1;
  overflow: auto;
  padding-right: 0.15rem;
}

.poem-cover {
  position: relative;
  border: 1px solid rgba(57, 92, 128, 0.2);
  border-radius: 1rem;
  min-height: 9.2rem;
  padding: 0.85rem;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  color: #1d3750;
  box-shadow: 0 10px 22px rgba(24, 44, 70, 0.12);
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.poem-cover:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(24, 44, 70, 0.16);
}

.poem-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.42), transparent 42%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0,
      rgba(255, 255, 255, 0.18) 2px,
      transparent 2px,
      transparent 10px
    );
  mix-blend-mode: normal;
  opacity: 0.48;
  pointer-events: none;
}

.poem-cover-inner {
  position: relative;
  z-index: 1;
}

.poem-cover.theme-a {
  background: linear-gradient(148deg, #e7f2ff, #dcedff, #f7fbff);
}

.poem-cover.theme-b {
  background: linear-gradient(148deg, #e7f8f4, #d9f1e9, #f6fcfa);
}

.poem-cover.theme-c {
  background: linear-gradient(148deg, #f3ebff, #ebdfff, #fcf8ff);
}

.poem-cover.theme-d {
  background: linear-gradient(148deg, #fff2e6, #ffe8d4, #fffaf5);
}

.poem-cover-title {
  margin: 0 0 0.42rem;
  font-size: 1.02rem;
  line-height: 1.3;
}

.poem-cover-meta {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

.poem-cover-preview {
  margin: 0.58rem 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #324e6b;
  opacity: 0.92;
}

.poem-cover-tag {
  margin-top: 0.62rem;
  display: inline-flex;
  border: 1px solid rgba(52, 88, 123, 0.2);
  border-radius: 999px;
  padding: 0.11rem 0.5rem;
  font-size: 0.72rem;
  color: #355678;
  background: rgba(255, 255, 255, 0.72);
}

.article-list,
.timeline,
.plain-list,
.contact-grid,
.project-grid {
  flex: 1;
  overflow: auto;
  padding-right: 0.15rem;
}

.project-grid {
  margin-top: 0.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.8rem;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.82);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.project-title {
  margin: 0;
  font-size: 0.98rem;
}

.project-title a {
  text-decoration: none;
}

.project-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.project-meta span {
  text-align: center;
  font-size: 0.73rem;
  border: 1px solid rgba(31, 122, 224, 0.25);
  border-radius: 999px;
  padding: 0.13rem 0.45rem;
  background: rgba(255, 255, 255, 0.95);
}

.project-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-link {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.poem-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
}

.poem-modal.open {
  display: block;
}

.poem-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 18, 34, 0.58);
  backdrop-filter: blur(2px);
}

.poem-modal-card {
  position: relative;
  width: min(46rem, calc(100% - 2rem));
  max-height: calc(100vh - 4rem);
  margin: 2rem auto;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(7, 22, 40, 0.35);
  padding: 1rem;
  overflow: auto;
}

.poem-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.poem-modal-title {
  margin: 0;
  font-size: 1.12rem;
}

.poem-modal-close {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.66rem;
  font: inherit;
  cursor: pointer;
}

.poem-modal-meta {
  margin: 0.5rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.poem-modal-body {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Noto Serif SC", serif;
  font-size: 0.95rem;
  line-height: 1.9;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .site-header,
body.modal-open main,
body.modal-open .site-footer {
  filter: blur(6px) saturate(0.86);
}

.photo-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 5.4rem 5.4rem;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.tile {
  border-radius: 0.85rem;
  border: 1px solid var(--line);
}

.tile-1 {
  grid-column: span 2;
  background: linear-gradient(135deg, #8ec5fc, #e0c3fc);
}

.tile-2 {
  background: linear-gradient(135deg, #f6d365, #fda085);
}

.tile-3 {
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
}

.tile-4 {
  grid-column: span 2;
  background: linear-gradient(135deg, #fccb90, #d57eeb);
}

.article-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.72rem;
  background: rgba(255, 255, 255, 0.82);
  margin-bottom: 0.55rem;
}

.article-list li:last-child {
  margin-bottom: 0;
}

.article-list span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.timeline li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.7rem;
}

.timeline li:last-child {
  margin-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
}

.timeline span {
  display: block;
  font-size: 0.79rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline p {
  margin: 0.16rem 0 0;
}

.tip {
  margin-top: 0.6rem;
  margin-bottom: 0;
  font-size: 0.84rem;
}

.contact-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.contact-grid a,
.contact-grid span {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  padding: 0.64rem 0.74rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.contact-grid a:hover {
  border-color: rgba(31, 122, 224, 0.5);
}

.site-footer {
  max-width: 74rem;
  margin: 1rem auto 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-header,
main,
.site-footer {
  transition: filter 220ms ease;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 540ms ease, transform 540ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .hero-main,
  .hero-status,
  .hero-poem,
  .poetry,
  .apps,
  .photo,
  .writing,
  .career,
  .resume,
  .contact {
    grid-column: span 12;
  }

  .poetry-library,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .module {
    height: auto;
    min-height: 19rem;
  }

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

@media (max-width: 840px) {
  body {
    padding: 0 0.85rem;
  }

  .site-header {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  nav {
    position: relative;
  }

  .nav-links {
    position: absolute;
    right: 0;
    top: 2.6rem;
    width: 12rem;
    border-radius: 0.9rem;
    padding: 0.6rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .nav-links a {
    border-radius: 0.66rem;
  }

  .hero-main h1 {
    font-size: clamp(1.75rem, 8.2vw, 2.4rem);
  }

  .poem-modal-card {
    margin: 1rem auto;
    max-height: calc(100vh - 2rem);
  }
}
