/* Theme tokens */
:root {
  --bg: #14141b;
  --panel: #1e1e28;
  --panel2: #262634;
  --text: #f7f4ee;
  --muted: #c7c2b6;
  --accent: #f5a927;
  --border: #14141d;
  --shadow: 0 14px 28px rgba(8, 8, 12, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Nunito", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
      circle at top left,
      rgba(245, 169, 39, 0.28),
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.08),
      transparent 45%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.06),
      transparent 50%
    );
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20, 20, 27, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
}

.brand-name {
  position: relative;
  padding-bottom: 4px;
  text-shadow: 0 0 12px rgba(245, 169, 39, 0.25);
}

.brand-name::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(245, 169, 39, 0.5);
}

.topbar-nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.topbar-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.topbar-nav a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  padding: 48px 0 36px;
}

.hero-inner {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: 100%;
  max-width: 880px;
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border-radius: 24px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 169, 39, 0.08);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 10% 0%,
    rgba(245, 169, 39, 0.1),
    transparent 50%
  );
  pointer-events: none;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #1a1a24;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(7, 7, 10, 0.55);
}

.hero-text h1 {
  font-family: "Fredoka", sans-serif;
  font-size: 2.4rem;
  margin: 6px 0 10px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
}

.tagline {
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  border: none;
  background: var(--accent);
  color: #1b1200;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(245, 169, 39, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(245, 169, 39, 0.5);
}

.btn:active {
  animation: press-bounce 0.18s ease-out;
}

.btn-ghost {
  background: #22212a;
  color: var(--text);
  border: 2px solid rgba(245, 169, 39, 0.35);
  box-shadow: 0 0 0 1px rgba(245, 169, 39, 0.08);
}

.btn-ghost:hover {
  box-shadow: 0 12px 22px rgba(5, 5, 8, 0.5),
    0 0 18px rgba(245, 169, 39, 0.25);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 0 0 14px rgba(245, 169, 39, 0.35);
}

.underline {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 999px;
}

.links,
.about,
.projects {
  padding: 36px 0;
}

.links-grid {
  display: grid;
  gap: 18px;
}

.link-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border: 2px solid var(--border);
  box-shadow: 0 10px 18px rgba(6, 6, 10, 0.4),
    0 0 0 1px rgba(245, 169, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 16px 30px rgba(5, 5, 8, 0.6),
    0 0 22px rgba(245, 169, 39, 0.35);
}

.link-card:active {
  animation: press-bounce 0.18s ease-out;
}

.logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #1d1d24;
  border: 2px solid #101014;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.logo-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  animation: shimmer 1.3s infinite;
}

.logo-wrap img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: brightness(0) saturate(100%) invert(78%) sepia(42%)
    saturate(1163%) hue-rotate(347deg) brightness(102%) contrast(104%);
}

.logo-wrap.loaded img {
  opacity: 1;
}

.logo-fallback {
  width: 24px;
  height: 24px;
  display: none;
  color: var(--accent);
}

.logo-wrap.failed .logo-fallback {
  display: block;
}

.logo-wrap.failed .logo-skeleton,
.logo-wrap.loaded .logo-skeleton {
  display: none;
}

.link-text h3 {
  margin: 0;
  font-size: 1.1rem;
}

.link-text p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.external-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.about-card,
.project-card {
  background: linear-gradient(145deg, var(--panel), var(--panel2));
  border-radius: 20px;
  border: 2px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(245, 169, 39, 0.08);
}

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

.project-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.project-card h3 {
  margin: 0;
  font-family: "Fredoka", sans-serif;
}

.project-card {
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-meta {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.project-label {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(245, 169, 39, 0.12);
  border: 1px solid rgba(245, 169, 39, 0.45);
  box-shadow: inset 0 0 0 1px rgba(245, 169, 39, 0.12);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(5, 5, 8, 0.6),
    0 0 22px rgba(245, 169, 39, 0.35);
}

.site-footer {
  padding: 30px 0 40px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #22212a;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  border: 2px solid #121219;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

::selection {
  background: rgba(245, 169, 39, 0.3);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(245, 169, 39, 0.25);
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes press-bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1);
  }
}

@media (min-width: 720px) {
  .links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-nav {
    display: none;
  }

  .hero-card {
    padding: 22px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

}
