:root {
  color-scheme: light;
  --ink: #293424;
  --muted: #63705a;
  --blue: #879f45;
  --blue-dark: #62782f;
  --blue-line: #a6b783;
  --blue-soft: #eef3db;
  --coral: #d6a745;
  --panel: #fffef8;
  --panel-border: #aab98e;
  --shadow: 0 12px 30px rgba(66, 85, 48, 0.1);
  --radius: 18px;
  font-family:
    "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #edf1d9;
}

body {
  display: flex;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background-color: #edf1d9;
  background-image: url("assets/anime-sky.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  display: flex;
  width: min(1640px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  flex-direction: column;
  border-right: 1px solid var(--blue-line);
  border-left: 1px solid var(--blue-line);
  box-shadow: 0 0 52px rgba(67, 84, 50, 0.12);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  background: #fffef8;
}

.site-header {
  flex: 0 0 auto;
  min-height: 70px;
  justify-content: space-between;
  padding: 0 clamp(22px, 3.5vw, 48px);
  border-bottom: 1px solid #d3dcc2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-spark {
  position: relative;
  width: 22px;
  height: 22px;
}

.brand-spark::before,
.brand-spark::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 2px;
  height: 22px;
  content: "";
  background: var(--coral);
  border-radius: 99px;
  transform: translate(-50%, -50%);
}

.brand-spark::after {
  width: 22px;
  height: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 56px);
  font-size: 1rem;
  font-weight: 650;
}

.site-nav a {
  position: relative;
  padding: 24px 0 20px;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 15px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--blue-dark);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.dashboard {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.92fr);
  grid-template-areas:
    "intro interests"
    "project tools"
    "project elsewhere";
  grid-template-rows:
    minmax(190px, 270px)
    minmax(242px, 360px)
    minmax(128px, 180px);
  align-content: center;
  gap: 18px;
  width: min(1440px, calc(100% - 48px));
  min-height: 0;
  margin: 0 auto;
  padding: clamp(20px, 2.5vw, 27px) 0;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: panel-in 480ms both cubic-bezier(0.2, 0.75, 0.25, 1);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.panel:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(66, 85, 48, 0.13);
}

.intro-panel {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: clamp(28px, 3vw, 40px);
}

.intro-panel::after,
.interests-panel::after,
.tools-panel::after {
  position: absolute;
  right: -10px;
  bottom: -18px;
  width: 130px;
  height: 90px;
  content: "";
  background-image: radial-gradient(circle, #b7c985 1.3px, transparent 1.6px);
  background-size: 8px 8px;
  opacity: 0.36;
  transform: rotate(-12deg);
}

.intro-panel h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.55rem, 4.1vw, 3.7rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro-panel p {
  max-width: 690px;
  margin: 18px 0 0;
  color: #3d4837;
  font-size: clamp(1rem, 1.5vw, 1.26rem);
  line-height: 1.55;
}

.accent-rule {
  width: 72px;
  height: 3px;
  margin-top: 18px;
  background: var(--coral);
  border-radius: 99px;
}

.manga-strokes {
  position: absolute;
  top: 22px;
  left: 28px;
  width: 55px;
  height: 16px;
  background: repeating-linear-gradient(
    128deg,
    transparent 0 7px,
    var(--coral) 7px 9px
  );
}

.corner-spark {
  position: absolute;
  top: 26px;
  right: 34px;
  color: var(--blue);
  font-size: 1.8rem;
  animation: spark-float 4s ease-in-out infinite;
}

.interests-panel {
  grid-area: interests;
  min-height: 0;
  padding: 22px 28px;
  animation-delay: 55ms;
}

.panel-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.panel-heading > svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heading-spark {
  color: var(--coral);
  font-size: 1.8rem;
  line-height: 1;
}

.interest-list,
.tool-list,
.exploring-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.interest-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.interest-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #3a4634;
  font-size: 1rem;
}

.interest-list svg {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.interest-list li:nth-child(2) svg {
  fill: var(--blue);
  stroke: none;
}

.project-panel {
  grid-area: project;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 20px 24px 24px;
  animation-delay: 100ms;
}

.project-panel::after,
.elsewhere-panel::after {
  position: absolute;
  right: -22px;
  bottom: -26px;
  width: 110px;
  height: 78px;
  content: "";
  background-image: radial-gradient(circle, #b1c37e 1.2px, transparent 1.5px);
  background-size: 7px 7px;
  opacity: 0.33;
  transform: rotate(-10deg);
}

.project-heading {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--blue);
}

.project-heading > svg {
  stroke: var(--blue);
}

.project-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1.55fr) minmax(190px, 0.65fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: center;
  min-height: 0;
  padding-top: 16px;
}

.project-media {
  display: block;
  overflow: hidden;
  border: 1px solid #c5cfb2;
  border-radius: 12px;
  background: #f5f7ed;
  box-shadow: 0 10px 24px rgba(70, 87, 51, 0.1);
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.568 / 1;
  object-fit: cover;
}

.project-copy {
  position: relative;
  z-index: 1;
}

.project-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  letter-spacing: -0.045em;
}

.project-copy p {
  margin: 0;
  color: #4a5743;
  font-size: 1rem;
  line-height: 1.55;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--blue-dark);
  border-radius: 10px;
  color: #fff;
  background: var(--blue-dark);
  box-shadow: 0 7px 16px rgba(98, 120, 47, 0.18);
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  background: #4e6025;
  transform: translateY(-1px);
}

.button svg,
.external-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-link {
  color: var(--blue-dark);
  font-weight: 700;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
}

.tools-panel {
  grid-area: tools;
  min-height: 0;
  padding: 22px 26px;
  animation-delay: 150ms;
}

.tool-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(52px, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.tool-list li {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  color: #42503b;
  font-size: 0.78rem;
  text-align: center;
}

.tool-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1.5px solid var(--blue);
  border-radius: 10px;
  color: var(--blue-dark);
  background: #f4f7e8;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tool-list li:nth-child(even) .tool-mark {
  border-color: #b6bd84;
  color: #7c7a42;
  background: #f8f6e8;
}

.exploring-block {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d9dfcd;
}

.exploring-block h3 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 650;
}

.exploring-block h3 span {
  margin-right: 5px;
  color: var(--blue);
}

.exploring-block ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  font-size: 0.83rem;
}

.exploring-block li {
  padding: 0 12px;
  border-right: 1px solid #d3dcc5;
}

.exploring-block li:first-child {
  padding-left: 0;
}

.exploring-block li:last-child {
  border-right: 0;
}

.elsewhere-panel {
  grid-area: elsewhere;
  min-height: 0;
  padding: 18px 26px;
  animation-delay: 200ms;
}

.github-link {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  color: var(--ink);
  text-decoration: none;
}

.github-link:hover small,
.github-link:focus-visible small {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.github-link span {
  display: grid;
  gap: 2px;
}

.github-link strong {
  font-size: 1rem;
}

.github-link small {
  overflow: hidden;
  color: var(--blue-dark);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-mark {
  width: 38px;
  height: 38px;
  fill: var(--ink);
}

.external-icon {
  color: var(--blue);
}

.site-footer {
  flex: 0 0 auto;
  min-height: 54px;
  gap: 12px;
  padding: 0 clamp(22px, 3.5vw, 48px);
  border-top: 1px solid #d3dcc2;
  font-size: 0.9rem;
  font-weight: 650;
}

.footer-spark {
  color: var(--coral);
  font-size: 1.55rem;
}

.site-footer svg {
  width: 62px;
  height: 24px;
  margin-left: auto;
  fill: none;
  stroke: #7b8971;
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spark-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(8deg);
  }
}

@media (max-width: 1080px) {
  .dashboard {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    width: min(940px, calc(100% - 36px));
  }

  .project-layout {
    grid-template-columns: 1fr;
  }

  .project-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 24px;
    align-items: center;
  }

  .project-copy h3,
  .project-copy p {
    grid-column: 1;
  }

  .project-actions {
    grid-column: 2;
    grid-row: 1 / 3;
    align-items: flex-start;
    flex-direction: column;
    margin-top: 0;
  }
}

@media (min-width: 921px) and (max-height: 760px) {
  .site-header {
    min-height: 58px;
  }

  .site-nav a {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .site-nav a::after {
    bottom: 10px;
  }

  .dashboard {
    grid-template-rows:
      154px
      minmax(220px, 1fr)
      102px;
    gap: 12px;
    width: min(1440px, calc(100% - 32px));
    padding: 12px 0;
  }

  .intro-panel {
    padding: 18px 28px;
  }

  .intro-panel h1 {
    font-size: clamp(2.2rem, 3.6vw, 3rem);
  }

  .intro-panel p {
    margin-top: 10px;
    font-size: clamp(0.92rem, 1.25vw, 1.05rem);
    line-height: 1.4;
  }

  .accent-rule {
    margin-top: 8px;
  }

  .manga-strokes {
    top: 13px;
    left: 24px;
  }

  .corner-spark {
    top: 14px;
    right: 25px;
  }

  .interests-panel,
  .tools-panel {
    padding: 15px 21px;
  }

  .interest-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 18px;
    margin-top: 10px;
  }

  .interest-list li {
    gap: 11px;
    font-size: 0.88rem;
  }

  .interest-list svg {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }

  .project-panel {
    padding: 14px 18px 16px;
  }

  .project-heading {
    padding-bottom: 9px;
  }

  .project-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(175px, 0.65fr);
    gap: 20px;
    padding-top: 10px;
  }

  .project-media img {
    height: clamp(168px, 28vh, 205px);
    aspect-ratio: auto;
  }

  .project-copy {
    display: block;
  }

  .project-copy h3 {
    margin-bottom: 8px;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
  }

  .project-copy p {
    font-size: 0.86rem;
    line-height: 1.4;
  }

  .project-actions {
    gap: 16px;
    margin-top: 12px;
  }

  .button {
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.88rem;
  }

  .tool-list {
    margin-top: 10px;
  }

  .tool-list li {
    gap: 5px;
    font-size: 0.7rem;
  }

  .tool-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 0.75rem;
  }

  .exploring-block {
    margin-top: 10px;
    padding-top: 8px;
  }

  .exploring-block h3 {
    margin-bottom: 7px;
    font-size: 0.82rem;
  }

  .exploring-block ul {
    font-size: 0.72rem;
  }

  .elsewhere-panel {
    padding: 13px 21px;
  }

  .github-link {
    margin-top: 7px;
  }

  .github-mark {
    width: 31px;
    height: 31px;
  }

  .site-footer {
    min-height: 44px;
  }
}

@media (max-width: 920px) {
  body {
    background-attachment: scroll;
    background-position: center bottom;
  }

  .page-shell {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    border-right: 0;
    border-left: 0;
  }

  .site-header {
    min-height: 64px;
    padding: 0 20px;
  }

  .brand {
    gap: 11px;
    font-size: 1.15rem;
  }

  .brand-spark {
    width: 18px;
    height: 18px;
  }

  .brand-spark::before {
    height: 18px;
  }

  .brand-spark::after {
    width: 18px;
  }

  .site-nav {
    gap: 20px;
    font-size: 0.9rem;
  }

  .dashboard {
    flex: 0 0 auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "interests"
      "tools"
      "project"
      "elsewhere";
    grid-template-rows: auto;
    align-content: normal;
    width: min(620px, calc(100% - 28px));
    padding: 22px 0 30px;
  }

  .panel:hover {
    transform: none;
  }

  .intro-panel,
  .interests-panel,
  .tools-panel,
  .project-panel,
  .elsewhere-panel {
    min-height: auto;
    padding: 24px;
  }

  .intro-panel {
    padding-top: 54px;
  }

  .intro-panel h1 {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }

  .project-layout,
  .project-copy {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-copy {
    gap: 0;
  }

  .project-copy h3,
  .project-copy p,
  .project-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .project-actions {
    align-items: center;
    flex-direction: row;
    margin-top: 20px;
  }

  .site-footer {
    min-height: 52px;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    padding-inline: 2px;
  }

  .dashboard {
    gap: 14px;
  }

  .intro-panel p {
    font-size: 1rem;
  }

  .tool-list {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    gap: 16px 8px;
  }

  .exploring-block ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }

  .exploring-block li,
  .exploring-block li:first-child {
    padding: 0;
    border: 0;
  }

  .project-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .text-link {
    align-self: flex-start;
  }

  .github-link small {
    max-width: 185px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  .panel,
  .page-shell {
    border-width: 2px;
  }

  .panel {
    box-shadow: none;
  }
}
