/* =============================================================================
   FONTS
   ============================================================================= */

@font-face {
  font-family: "Tianzheng";
  src: url("../tianzheng_font.min.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

/* =============================================================================
   BASE & TYPOGRAPHY
   ============================================================================= */

body,
h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: "Inter", sans-serif !important;
}

body {
  background-color: #fbfbfb;
  color: #2d3748;
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

/* Navbar */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Intro / Hero Section */
.block-intro {
  background-image: url("/img/bg-g-l.svg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  overflow: hidden;
  min-height: max(700px, calc(100vh - 56px));
}

/* Avatar */
.avatar {
  width: 250px !important;
  height: 250px !important;
  background-image: url("/img/avatars/figure.png");
}

/* Section Headings */
.SectionTitle {
  margin-bottom: 50px !important;
}

.SectionTitle h2 {
  margin-bottom: 0 !important;
}

h2.text-center::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, #4285f4, #9b72cb);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Footer */
.page-footer {
  padding: 10px !important;
}

.page-footer p {
  color: #2d3748;
  font-size: 10px;
}

/* =============================================================================
   COMPONENTS
   ============================================================================= */

/* --- Cards (Skills / Contact) --- */
.portfolio-info-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
}

/* --- Education / Experience Items --- */
.item {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #f0f0f0;
  border-left: 5px solid #4285f4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.item .period {
  white-space: nowrap;
}

/* Details accordion */
.details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.3s cubic-bezier(0, 1, 0, 1),
    opacity 0.15s ease-out;
}

.details.show {
  max-height: 800px;
  opacity: 1;
  transition:
    max-height 0.4s ease-in-out,
    opacity 0.2s ease-in-out;
}

/* Experience item header — flex row with toggle left, title right */
h3.item-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 8px;
  user-select: none;
}

.item-title {
  flex: 1;
}

/* Toggle button — circle pill that holds the chevron */
.item-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #9b72cb);
  box-shadow: 0 2px 6px rgba(66, 133, 244, 0.35);
  transition: box-shadow 0.2s ease;
}

h3.item-header:hover .item-toggle {
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.5);
}

/* Gradient chevron icon — white to contrast against the pill */
.item-toggle .arrow {
  color: white;
  font-size: 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(-90deg); /* collapsed = pointing right */
}

/* When open, rotate to point down */
h3.item-header.open .item-toggle .arrow {
  transform: rotate(0deg);
}

/* --- Contact List --- */
.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.5rem;
}

.contact-list i {
  width: 1.5em;
  text-align: center;
  margin-right: 0.5rem;
}

/* --- Intro Text --- */
.intro-text {
  font-weight: bold;
  font-size: 2rem !important;
  font-family: "Tianzheng", "Inter", sans-serif;
}

/* --- LinkedIn Icon --- */
.linkedin-icon {
  width: 48px;
  height: 48px;
  padding: 10px 0;
  vertical-align: bottom;
}

.linkedin-hidden {
  opacity: 0;
  pointer-events: none;
}

#linkedin-link {
  transition: opacity 0.3s ease;
}

/* =============================================================================
   ANIMATIONS & EFFECTS
   ============================================================================= */

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

@keyframes blink-caret {
  from,
  to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Gradient text highlight (static) */
.highlight {
  font-weight: bold;
  background: linear-gradient(
    74deg,
    #4285f4 0%,
    #9b72cb 9%,
    #d96570 20%,
    #d96570 24%,
    #9b72cb 35%,
    #4285f4 44%,
    #9b72cb 50%,
    #d96570 56%,
    #d96570 75%,
    #9b72cb 87%,
    #4285f4 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
  animation: gradient-shift 3s ease infinite;
}

/* Typewriter animated text */
.typewriter-text {
  font-weight: 600;
  background: linear-gradient(
    74deg,
    #4285f4 0%,
    #9b72cb 30%,
    #d96570 60%,
    #9b72cb 80%,
    #4285f4 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gradient-shift 3s ease infinite;
}

/* Typewriter blinking cursor */
.typewriter-cursor {
  font-weight: 400;
  font-family: "Inter", sans-serif;
  color: #4285f4;
  animation: blink-caret 0.75s step-end infinite;
  margin-left: 2px;
}
