/* ===== Hero ===== */
.hero {
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 80%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--accent-light) 8%, transparent) 0%, transparent 50%),
    var(--primary);
  color: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 48rem;
  animation: fadeInUp 0.8s ease;
}

.hero-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-name {
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero-accent {
  width: min(16rem, 60%);
  height: 3px;
  margin: 0 auto 2rem;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent) 30%,
    var(--accent-light) 50%,
    var(--accent) 70%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 4s ease-in-out infinite;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Metrics ===== */
.metrics {
  width: 100%;
  background: var(--accent);
  padding: 0 1.5rem;
}

.metrics-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0.5rem;
  text-align: center;
}

.metric-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-on-accent);
  line-height: 1;
  text-wrap: balance;
  max-width: 10ch;
}

.metric-value small {
  font-size: 0.6em;
  font-weight: 600;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 25ch;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--text-on-accent) 70%, transparent);
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .metrics-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== About ===== */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 42rem;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-light), var(--accent));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--card-bg, var(--bg)), 0 0 16px var(--accent-glow);
  z-index: 1;
}

.timeline-item:first-child .timeline-dot {
  animation: pulseGlow 2.5s ease-in-out infinite;
}

.timeline-content {
  background: var(--card-bg, var(--surface));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.3s;
}

.timeline-content:hover {
  box-shadow: 0 8px 24px var(--shadow-lg);
  transform: translateY(-2px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.timeline-company {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.timeline-details {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

.timeline-details li::marker {
  color: var(--accent);
}

.timeline-detail {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* ===== Project cards ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg, var(--surface));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px var(--shadow-lg);
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
  .project-card.featured {
    grid-template-columns: 1fr;
  }
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.project-card.featured .project-image {
  aspect-ratio: auto;
  min-height: 200px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.08);
}

.project-link {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}

.project-link:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-body h3 {
  color: var(--text);
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Tech tags */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tech-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}

.project-card:hover .tech-tag {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.project-body h3 a {
  color: inherit;
}

.project-page-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ===== Certifications ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--card-bg, var(--surface));
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
}

.cert-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-lg);
}

.cert-year {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.8rem;
  min-width: 2.5rem;
  font-variant-numeric: tabular-nums;
}

/* ===== Stack overflow popover ===== */
#stack-overflow-link {
  position: relative;
}

#stack-overflow-link:hover::after {
  position: absolute;
  top: 100%;
  right: 0;
  content: url(https://stackoverflow.com/users/flair/4056222.png);
  z-index: 200;
}
