/* ========== 1) Design Tokens ========== */
:root {
  --text-color: #333;
  --tip-color: #939292;
  --beian-color: #aaa;
  --shadow-color: #cccccc7a;
}

/* ========== 2) Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: max(100vh, 500px);
  height: 100%;
  font: 300 16px/1.6 "Space Grotesk", "Space Grotesk Fallback", "Kaiti SC", serif;
  color: var(--text-color);
  background: radial-gradient(1200px circle at 15% 10%, #ffe5c7 0%, transparent 45%),
    radial-gradient(900px circle at 85% 15%, #d6f1e1 0%, transparent 50%),
    radial-gradient(800px circle at 20% 85%, #f5d7ff 0%, transparent 55%),
    #f6f1ea;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

b {
  font-weight: 500;
  text-shadow: 0.1px 0.1px 0.2px #000;
}

.title {
  font-size: 26px;
}

.email {
  color: inherit;
}

/* ========== 3) Main Layout (Tabs) ========== */
.wrapper {
  width: min(700px, calc(100vw - 30px));
  height: min(80vh, 600px);
  max-height: min(860px, calc(100vh - 150px));
  margin: 0 auto;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px 3px var(--shadow-color);
  position: relative;
  overflow: hidden;
}

.content {
  height: 100%;
}

.tab-layout {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  height: 100%;
  overflow: auto;
  padding: 10px;
}

.left-tabs {
  position: sticky;
  top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tab-btn,
.tab-link {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
}

.tab-btn:hover,
.tab-link:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.25);
}

.tab-btn.is-active {
  background: #2e2e2e;
  color: #fff;
  border-color: #2e2e2e;
}

.tab-panels {
  min-height: 420px;
  padding: 10px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  letter-spacing: normal;
}

.intro .contact-info {
  margin-top: 10px;
}

/* ========== 4) Profile Content ========== */
.profile-section h2 {
  font-size: 22px;
}

.profile-quote {
  margin-top: 6px;
  margin-bottom: 14px;
  font-style: italic;
  opacity: 0.82;
}

.profile-section label {
  font-size: 16px;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.profile-section label small {
  color: var(--tip-color);
  font-size: 12px;
  font-weight: normal;
}

.profile-section ul ul {
  margin-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.profile-section ul ul li {
  margin-bottom: 3px;
}

.profile-section .extension {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 8px;
  padding-top: 8px;
  font-size: 0.88em;
  opacity: 0.9;
}

.profile-section .soft-skill {
  display: block;
  margin-bottom: 14px;
}

.section-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 12px 14px;
}

.section-card h3 {
  margin-bottom: 10px;
}

.section-card ul {
  margin-left: 20px;
}

.skills {
  margin-top: 10px;
}

.timeline {
  list-style: none;
}

.timeline > li {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 12px 14px;
  margin-bottom: 10px;
}

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

/* ========== 5) Dynamic Elements ========== */
#beian {
  position: fixed;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  z-index: 10;
}

#beian a {
  color: var(--beian-color);
  text-decoration: none;
  margin: 0 5px;
}

.blobs {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: blur(140px);
  opacity: 0.2;
  --cr-main-1: #2ac9de;
  --cr-main-2: #f087f4;
  --cr-1: color-mix(in srgb, var(--cr-main-1), var(--cr-main-2) 20%);
  --cr-2: color-mix(in srgb, var(--cr-main-1), var(--cr-main-2) 35%);
  --cr-3: color-mix(in srgb, var(--cr-main-1), var(--cr-main-2) 50%);
  --cr-4: color-mix(in srgb, var(--cr-main-1), var(--cr-main-2) 65%);
}

.blob {
  width: max(240px, 28vw);
  aspect-ratio: 1;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center;
}

.blob:nth-of-type(1) {
  background: var(--cr-main-1);
}

.blob:nth-of-type(2) {
  background: var(--cr-main-2);
}

.blob:nth-of-type(3) {
  background: var(--cr-1);
}

.blob:nth-of-type(4) {
  background: whitesmoke;
}

.blob:nth-of-type(5) {
  background: var(--cr-3);
}

.blob:nth-of-type(6) {
  background: var(--cr-4);
}

.blob:nth-of-type(7) {
  background: var(--cr-2);
}

@font-face {
  font-family: "solar-term";
  src: url("solar-term/solar-term.woff");
}

.solar-term {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  width: 60px;
  height: 100vh;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
  font-family: "solar-term";
}

.solar-term-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: scroll-up 260s linear infinite;
  font-size: 14px;
  letter-spacing: 6px;
  user-select: none;
}

.solar-term-content span {
  writing-mode: vertical-lr;
}

@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-100%);
  }
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* ========== 6) Responsive ========== */
@media screen and (max-width: 768px) {
  html,
  body {
    min-height: auto;
  }

  body {
    text-shadow: 0 0 0.1px currentColor;
    overflow: auto;
    padding: 14px 0 10px;
    height: auto;
  }

  body small {
    font-size: 15px;
  }

  .wrapper {
    height: auto;
    max-height: none;
    width: 100%;
    box-shadow: none;
    background-color: transparent;
  }

  .tab-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    scroll-behavior: smooth;
    padding-left: 15px;
    padding-right: 15px;
  }

  .left-tabs {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tab-btn,
  .tab-link {
    width: auto;
    flex: 1 1 calc(50% - 4px);
    text-align: center;
    padding: 8px;
  }

  .tab-panels {
    padding-right: 0;
    padding-left: 0;
    min-height: 0;
  }

  #beian {
    opacity: 0;
    white-space: nowrap;
  }
}

@media screen and (max-width: 650px) {
  .solar-term {
    top: inherit;
    bottom: 10px;
    left: 0;
    width: 100vw;
    height: 20px;
  }

  .solar-term-content {
    flex-direction: row;
    animation-name: scroll-left;
    white-space: nowrap;
  }

  .solar-term-content span {
    writing-mode: inherit;
  }
}
