/* Home page visual direction */
.hero-shell {
  margin-top: 0.5rem;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1.4fr 1fr;
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, #1b2532 0%, #151d29 100%);
  border-color: #304155;
  box-shadow:
    0 10px 20px rgba(2, 8, 18, 0.26),
    inset 0 1px 0 rgba(232, 237, 243, 0.05);
}

.hero-shell::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -100px;
  bottom: -190px;
  background: radial-gradient(
    circle,
    rgba(47, 111, 104, 0.26) 0%,
    rgba(47, 111, 104, 0) 70%
  );
  pointer-events: none;
}

.hero-copy h1 {
  margin-bottom: 0.8rem;
}

.hero-copy .subtitle {
  max-width: 62ch;
}

.quick-meta {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.quick-meta li {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--accent-ring);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.9rem;
  color: var(--ink);
  background: rgba(18, 30, 42, 0.86);
}

.hero-panel {
  background: rgba(20, 31, 44, 0.9);
  border: 1px solid var(--accent-ring);
  border-radius: 14px;
  padding: 1.1rem;
  backdrop-filter: blur(4px);
  box-shadow:
    0 8px 16px rgba(2, 8, 18, 0.22),
    inset 0 1px 0 rgba(232, 237, 243, 0.05);
}

.hero-panel h2 {
  font-size: 1.2rem;
}

.hero-panel p {
  margin-bottom: 1rem;
}

.profile-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.7rem;
}

.profile-avatar {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent-ring);
  background:
    radial-gradient(circle at 30% 25%, rgba(240, 246, 252, 0.18), transparent 38%),
    linear-gradient(160deg, #27415a 0%, #1a2c3f 48%, #132231 100%);
  color: #f0f6fc;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow:
    0 10px 20px rgba(4, 12, 22, 0.34),
    inset 0 1px 0 rgba(232, 237, 243, 0.15);
}

.profile-card h2 {
  margin: 0;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
}

.story-grid .card {
  border-top: 4px solid var(--accent-ring);
  background: linear-gradient(180deg, #172232 0%, #141d2b 100%);
  border-color: #315064;
  box-shadow: inset 0 1px 0 rgba(232, 237, 243, 0.04);
}

.project-showcase .card {
  background: linear-gradient(180deg, #172232 0%, #141d2b 100%);
  border-color: #315064;
  box-shadow: inset 0 1px 0 rgba(232, 237, 243, 0.04);
}

.project-showcase > h2 {
  margin-bottom: 0.2rem;
}

.project-showcase .subtitle {
  margin-top: 0;
  margin-bottom: 1rem;
}

.project-showcase .card h2,
.story-grid .card h2 {
  font-size: 1.2rem;
  color: #f0f6fc;
}

.timeline {
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  position: relative;
  --rail-x: 1rem;
  --card-offset: 3.8rem;
  --group-shift: 1.875rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: var(--rail-x);
  width: 2px;
  background: rgba(49, 80, 100, 0.7);
  border-radius: 999px;
}

.timeline-item {
  position: relative;
  padding-left: var(--card-offset);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: var(--rail-x);
  top: 0.4rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid #101a26;
  box-shadow: 0 0 0 4px rgba(47, 111, 104, 0.16);
  transform: translateX(-50%);
}

.timeline-year {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.timeline-card {
  border: 1px solid #315064;
  border-top: 4px solid var(--accent-ring);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  background: linear-gradient(180deg, #172232 0%, #141d2b 100%);
  box-shadow:
    0 10px 18px rgba(6, 16, 26, 0.28),
    inset 0 1px 0 rgba(232, 237, 243, 0.04);
}

.timeline-group {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  margin-left: var(--group-shift);
  border-radius: 18px;
  border: 1px solid rgba(49, 80, 100, 0.55);
  background: linear-gradient(
    180deg,
    rgba(20, 30, 44, 0.92) 0%,
    rgba(17, 26, 39, 0.92) 100%
  );
  box-shadow: inset 0 1px 0 rgba(232, 237, 243, 0.04);
}

.timeline-group .timeline-item {
  padding-left: 0;
}

.timeline-group .timeline-item::before {
  left: calc(var(--rail-x) - var(--group-shift) - 1.1rem);
}

.timeline-group.single {
  gap: 0;
}

.timeline-card h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
  color: #f0f6fc;
}

.project-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--accent-strong);
}

.project-link:hover {
  text-decoration: underline;
}

.hero-shell .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(47, 111, 104, 0.18);
}

.hero-shell .btn.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

main > section {
  animation: riseIn 480ms ease both;
}

main > section:nth-child(2) {
  animation-delay: 90ms;
}

main > section:nth-child(3) {
  animation-delay: 170ms;
}

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

@media (max-width: 940px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 160px;
    height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  main > section {
    animation: none;
  }
}
