/* ---------- Base ---------- */
:root {
  --ring: 0 0 0 3px rgba(59, 130, 246, 0.35);
}
.link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nav-link,
.mobile-link {
  color: inherit;
  opacity: 0.8;
}
.nav-link:hover,
.mobile-link:hover {
  opacity: 1;
}
.nav-link.active {
  opacity: 1;
  font-weight: 700;
}
:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.dark :focus-visible {
  outline-color: #93c5fd;
}

/* ---------- Layout / Sections ---------- */
.section {
  padding: 3rem 0;
}
@media (min-width: 640px) {
  .section {
    padding: 4rem 0;
  }
}
@media (min-width: 1024px) {
  .section {
    padding: 5rem 0;
  }
}
section {
  scroll-margin-top: 5rem;
}

.container {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 0.75rem;
}
@media (min-width: 420px) {
  .container {
    padding-inline: 1rem;
  }
}

.section-title {
  font-weight: 800;
  font-size: clamp(1.35rem, 1.05rem + 1.5vw, 2rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.section-text {
  color: rgb(82 82 91);
}
.dark .section-text {
  color: rgb(161 161 170);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  background: #2563eb;
  color: #fff;
  border: 1px solid #1d4ed8;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  background: #1d4ed8;
}
.btn-primary:focus {
  box-shadow: var(--ring);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(24, 24, 27, 0.15);
  color: inherit;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-ghost:hover {
  background: rgba(244, 244, 245, 0.7);
}
.btn-ghost:focus {
  box-shadow: var(--ring);
}
.dark .btn-ghost {
  border-color: rgba(255, 255, 255, 0.15);
}
.dark .btn-ghost:hover {
  background: rgba(39, 39, 42, 0.6);
}

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #09090b;
  padding: 0.625rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
  caret-color: #2563eb;
}
.input::placeholder {
  color: #9ca3af;
}
.input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: var(--ring);
}
textarea.input {
  min-height: 3rem;
}

/* Make date/time inputs consistent in dark mode */
.dark .input {
  background: #0b0b0f;
  border-color: #3f3f46;
  color: #e4e4e7;
}
.dark .input::placeholder {
  color: #9ca3af;
}

/* Small caret on selects */
select.input {
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(1.05em),
    calc(100% - 16px) calc(1.05em);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* ---------- Form layout helpers ---------- */
.field {
  display: grid;
  gap: 0.4rem;
}
.field > span {
  font-weight: 600;
  font-size: 0.95rem;
  color: #18181b;
}
.dark .field > span {
  color: #e4e4e7;
}

.form-grid {
  display: grid;
  gap: 1rem;
}
.form-grid.three {
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid.three {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid rgb(228 228 231 / 0.6);
  background: linear-gradient(180deg, rgb(250 250 250), rgb(255 255 255));
  padding: 1.25rem;
  border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
}
.dark .card {
  border-color: rgb(39 39 42 / 0.6);
  background: linear-gradient(180deg, rgb(24 24 27), rgb(9 9 11));
}

.item-title {
  font-weight: 700;
}
.item-meta {
  color: rgb(82 82 91);
}
.dark .item-meta {
  color: rgb(161 161 170);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid rgb(228 228 231 / 0.7);
  background: #fafafa;
  font-size: 0.85rem;
}
.dark .tag {
  border-color: rgb(39 39 42 / 0.7);
  background: #18181b;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 1rem;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 2px;
  background: linear-gradient(rgb(59 130 246), transparent);
  opacity: 0.6;
}
.timeline-dot {
  position: absolute;
  left: 0;
  transform: translate(-3px, 0.6rem);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: rgb(59 130 246);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}
.timeline-card {
  margin-left: 1rem;
  margin-bottom: 1rem;
}

/* ---------- Fancy floating glass card in hero ---------- */
.glassy-card {
  position: absolute;
  bottom: -14px;
  right: -14px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(24, 24, 27, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  width: min(100%, 22rem);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
@media (max-width: 640px) {
  .glassy-card {
    position: static;
    margin-top: 0.75rem;
  }
}

/* ---------- Contact cards ---------- */
.contact-card {
  display: block;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgb(228 228 231 / 0.6);
  background: linear-gradient(180deg, rgb(250 250 250), rgb(255 255 255));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card:hover {
  outline: var(--ring);
  transform: translateY(-2px);
}
.dark .contact-card {
  border-color: rgb(39 39 42 / 0.6);
  background: linear-gradient(180deg, rgb(24 24 27), rgb(9 9 11));
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .card,
  .contact-card,
  .btn-primary,
  .btn-ghost {
    transition: none;
  }
}
