/* Shared card base */
.card {
  padding: 16px 20px;
  border: 1px solid var(--surface1);
  border-radius: 6px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
  .card:hover {
    border-color: var(--surface2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

/* Education */
.edu-entry {
  margin-bottom: 24px;
}

.edu-entry .degree {
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 4px;
}

.edu-entry .school {
  color: var(--yellow);
}

.edu-entry .year {
  color: var(--overlay1);
  font-size: 0.85rem;
}

.edu-entry .detail {
  color: var(--subtext0);
  font-size: 0.9rem;
  margin-top: 8px;
  padding-left: 16px;
  border-left: 2px solid var(--surface0);
  line-height: 1.6;
}

/* Experience - card style */
.history-entry {
  margin-bottom: 24px;
}

.history-entry:last-child {
  margin-bottom: 0;
}

.history-content .role {
  color: var(--green);
  font-weight: 600;
  font-size: 1.0rem;
}

.history-content .company {
  color: var(--peach);
}

.history-content .period {
  color: var(--overlay1);
  font-size: 0.85rem;
  margin-top: 2px;
}

.history-content .desc {
  color: var(--subtext0);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-top: 2px;
}

/* CTF scoreboard */
.ctf-board {
  border: 1px solid var(--surface1);
  border-radius: 6px;
  overflow: hidden;
}

.ctf-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--surface0);
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: background 0.2s ease;
}

@media (hover: hover) {
  .ctf-row:hover {
    background: color-mix(in srgb, var(--surface0) 50%, transparent);
  }
}

.ctf-row:last-child {
  border-bottom: none;
}

.ctf-row:nth-child(odd) {
  background: color-mix(in srgb, var(--surface0) 30%, transparent);
}

.ctf-platform {
  color: var(--blue);
  font-weight: 600;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ctf-rank {
  color: var(--yellow);
}

.ctf-badge {
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ctf-badge.gold { background: color-mix(in srgb, var(--yellow) 15%, transparent); color: var(--yellow); }
.ctf-badge.green { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.ctf-badge.blue { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.ctf-badge.peach { background: color-mix(in srgb, var(--peach) 15%, transparent); color: var(--peach); }

/* Certifications - clear style */
.cert-entry {
  margin-bottom: 16px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.cert-info {
  flex: 1;
  min-width: 0;
}

.cert-name {
  color: var(--blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.cert-full {
  color: var(--text);
  font-size: 0.9rem;
  margin-top: 2px;
}

.cert-desc {
  color: var(--subtext0);
  font-size: 0.82rem;
  margin-top: 4px;
}

.cert-issuer {
  color: var(--overlay1);
  font-size: 0.78rem;
  margin-top: 4px;
}

.cert-verified {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding-top: 2px;
}

.cert-verified .icon {
  color: var(--green);
  width: 14px;
  height: 14px;
}

/* Conferences */
.conf-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface0);
}
.conf-entry:last-child { border-bottom: none; }
.conf-name {
  color: var(--text);
  font-weight: 600;
}
.conf-detail {
  color: var(--subtext1);
  font-size: 0.88rem;
}

/* Testimonials - PR review style */
.review-comment {
  border: 1px solid var(--surface1);
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.review-header {
  background: var(--surface0);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}

.review-author {
  color: var(--blue);
  font-weight: 600;
}

.review-badge {
  color: var(--green);
  font-size: 0.75rem;
  padding: 2px 8px;
  border: 1px solid var(--green);
  border-radius: 12px;
}

.review-body {
  padding: 16px;
  color: var(--subtext1);
  font-size: 0.9rem;
  line-height: 1.8;
}

.review-role {
  color: var(--overlay1);
  font-size: 0.82rem;
  margin-top: 8px;
}

/* Contact */
.contact-row {
  display: flex;
  gap: 12px;
  margin: 6px 0;
  align-items: baseline;
}

.contact-label {
  color: var(--pink);
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-value a {
  color: var(--blue);
  position: relative;
}

.contact-value a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--lavender);
  transition: width 0.3s ease;
}

.contact-value a:hover {
  text-decoration: none;
}

.contact-value a:hover::after {
  width: 100%;
}

/* About Me */
.about-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.about-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.about-text {
  color: var(--subtext1);
  font-size: 0.9rem;
  line-height: 1.8;
}

.noscript-hero {
  padding: 24px 0;
}

.noscript-hero p {
  margin: 8px 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .section { opacity: 1; transform: none; }
  .section .stagger { opacity: 1; transform: none; }
  #hero-typing .line { opacity: 1; }
  .scroll-progress { transition: none; }
  html { scroll-behavior: auto; }
}

.hobby-detail {
  padding-left: 24px;
}
