:root {
  --bg:
    radial-gradient(circle at 20% 20%, rgb(45 69 110 / 28%), transparent 32%),
    radial-gradient(circle at 80% 10%, rgb(149 92 255 / 18%), transparent 28%), #0e1320;
  --color-border: rgb(255 255 255 / 10%);
  --color-muted: #b7bfd6;
  --color-strong: #fff;
  --color-bg-secondary: #1f2937;
  --surface: #11182a;
  --surface-2: #0b1020;
  --surface-3: #1c2437;
  --text: #e9ecf5;
  --text-2: #e6e8ef;
  --muted: #9aa3b2;
  --accent: #7be0d6;
  --accent-2: #f6c54f;
  --accent-3: #5ab0ff;
  --divider: linear-gradient(90deg, transparent, rgb(255 255 255 / 25%), transparent);
  --shadow: 0 12px 40px rgb(0 0 0 / 35%);
  --shadow-soft: 0 6px 20px rgb(0 0 0 / 22%);
  --spacing-page: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
  --radius: 16px;
  --radius-sm: 10px;
  --gap-1: 8px;
  --gap-2: 12px;
  --gap-3: 16px;
  --gap-4: 20px;
  --gap-5: 28px;
  --gap-6: 40px;
  --pulse-duration: 6s;
  --space-4: 32px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Spectral, serif;
  line-height: 1.7;
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

.logo__image {
  position: absolute;
  top: -1.8%;
  left: 1.5%;
  width: 180px;
}

.logo__link {
  cursor: pointer;
}

.logo__link img:hover {
  filter: brightness(0.6);
}

/* NAVBAR ------------------- */

.navbar {
  position: relative;
  top: 0;
  width: 100%;
  background: transparent;
  z-index: 500;
  padding: var(--gap-2) 0;
}

.navbar__links {
  display: flex;
  justify-content: end;
  gap: var(--space-4);
  margin-right: 2rem;
  padding: 0;
  list-style: none;
}

/* Hamburger (desktop default: hidden) */
.navbar__toggle {
  display: none;
  border: 1px solid var(--color-border);
  background: var(--surface);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  place-items: center;
}

.navbar__toggle-line {
  width: 18px;
  height: 2px;
  background: var(--color-strong);
  display: block;
  margin: 2px 0;
  border-radius: 2px;
}

.navbar__link {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  font-family: Spectral, serif;
}

.navbar__link:hover {
  opacity: 0.8;
}

.navbar__links .navbar__link--active {
  border-bottom: 2px solid var(--accent-3);
  color: var(--muted);
  pointer-events: none;
}

#standout {
  background-color: var(--color-bg-secondary);
  padding: 3px 0.8rem 0;
  border-radius: 6px;
  color: var(--text);
  animation: pulse 2s infinite;
  transition: transform 0.25s ease;
}

#standout:hover {
  filter: brightness(0.8);
  transform: scale(1.05);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(90 176 255 / 70%);
  }

  70% {
    box-shadow: 0 0 0 10px rgb(90 176 255 / 0%);
  }

  100% {
    box-shadow: 0 0 0 0 rgb(90 176 255 / 0%);
  }
}

.page {
  width: min(1200px, 100% - 2.5rem);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) 0 64px;
}

.page__header {
  padding: clamp(12px, 2vw, 28px) 0 clamp(12px, 3vw, 36px);
}

.page__intro {
  background: linear-gradient(120deg, rgb(123 224 214 / 14%), rgb(246 197 79 / 10%));
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 36px);
  box-shadow: var(--shadow-soft);
}

.page__intro h1 {
  margin: 0 0 var(--gap-2);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: 0.4px;
  text-align: center;
}

.page__lede {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  width: 100%;
  text-align: center;
}

.section-title {
  margin-bottom: var(--gap-3);
}

.section-title__eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--muted);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  letter-spacing: 0.5px;
}

.section-title--glow h2 {
  position: relative;
  color: #f8fbff;
  text-shadow:
    0 0 18px rgb(123 224 214 / 95%),
    0 0 30px rgb(123 224 214 / 75%),
    0 0 32px rgb(123 224 214 / 58%);
  animation: glowBreathe 3.2s ease-in-out infinite;
}

@keyframes glowBreathe {
  0%,
  100% {
    text-shadow:
      0 0 18px rgb(123 224 214 / 95%),
      0 0 30px rgb(123 224 214 / 75%),
      0 0 42px rgb(123 224 214 / 58%);
  }

  50% {
    text-shadow:
      0 0 36px rgb(123 224 214 / 95%),
      0 0 60px rgb(123 224 214 / 55%),
      0 0 84px rgb(123 224 214 / 45%);
  }
}

.featured {
  background: var(--surface-2);
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: var(--radius);
  padding: clamp(18px, 2.6vw, 28px);
  box-shadow: var(--shadow-soft);
}

.featured__grid {
  display: grid;
  gap: var(--gap-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid rgb(255 255 255 / 8%);
  padding: var(--gap-3);
  display: grid;
  gap: var(--gap-2);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  min-height: 200px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(123 224 214 / 5%), rgb(246 197 79 / 6%));
  pointer-events: none;
}

.feature-card:hover,
.feature-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgb(123 224 214 / 28%);
}

.feature-card__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.feature-card__eyebrow {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.feature-card__title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: 0.5px;
}

.feature-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  letter-spacing: 0.25px;
}

.feature-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  letter-spacing: 0.25px;
}

.feature-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgb(123 224 214 / 16%);
  color: #e6fffa;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  width: fit-content;
  border: 1px solid rgb(123 224 214 / 35%);
}

.feature-card__newest {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-card__action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(120deg, #7be0d6, #f6c54f);
  color: #0b1020;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgb(0 0 0 / 28%);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.feature-card__action:hover,
.feature-card__action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgb(0 0 0 / 32%);
}

.divider-block {
  display: grid;
  gap: 8px;
  align-items: center;
  margin: var(--gap-6) 0 var(--gap-4);
}

.divider-block__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.9rem;
}

.divider-block__label::before,
.divider-block__label::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--divider);
}

.divider {
  border: none;
  height: 3px;
  background: var(--divider);
  margin: 0;
  border-radius: 999px;
}

.projects {
  display: grid;
  gap: var(--gap-5);
}

.project-section {
  background: var(--surface-2);
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: var(--radius);
  padding: var(--gap-4);
  box-shadow: var(--shadow-soft);
}

.projects-list {
  display: grid;
  gap: var(--gap-3);
}

.project-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 1.6fr;
  gap: var(--gap-3);
  background: var(--surface);
  border: 1px solid rgb(255 255 255 / 6%);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.project-row:nth-child(even) .project-thumb {
  order: 2;
}

.project-thumb {
  position: relative;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 100%;
  aspect-ratio: 16 / 10;
}

.project-body {
  padding: var(--gap-3);
  display: grid;
  gap: var(--gap-2);
  align-content: center;
}

.project-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  letter-spacing: 0.5px;
}

.project-desc {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  letter-spacing: 0.25px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.25rem 0;
  list-style: none;
}

.project-tags__item {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.25px;
  box-shadow: var(--shadow-soft);
}

.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-empty {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgb(255 255 255 / 6%);
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(120deg, #7be0d6, #f6c54f);
  color: #0b1020;
  box-shadow: 0 10px 24px rgb(0 0 0 / 32%);
  border-color: rgb(255 255 255 / 0%);
  font-size: 0.9rem;
  letter-spacing: 0.25px;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgb(255 255 255 / 14%);
  font-size: 1rem;
  letter-spacing: 0.25px;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: rgb(123 224 214 / 40%);
}

/* Footer */
.footer {
  padding: calc(var(--spacing-page) * 0.8) 0 var(--spacing-page);
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 1rem;
}

.footer__copy {
  margin: 0;
  color: var(--color-muted);
  user-select: none;
}

.footer__links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.footer__link {
  color: var(--color-strong);
  font-weight: 600;
  font-size: 3rem;
  transition: all 0.4s ease;
}

.footer__link:hover {
  filter: drop-shadow(0 0 14px rgb(255 255 255 / 80%));
  transform: translateY(-2px);
}

.footer__link:active {
  filter: drop-shadow(0 0 10px rgb(255 255 255 / 80%));
  transform: translateY(0);
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal.is-closing {
  transition: opacity 500ms ease;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgb(5 8 15 / 70%);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  background: var(--surface-3);
  border-radius: var(--radius);
  border: 1px solid rgb(255 255 255 / 12%);
  width: min(960px, 96vw);
  max-height: 90vh;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  scrollbar-gutter: unset;

  /* FIREFOX SCROLLBAR */
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 35%) transparent;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 15%);
  background: var(--surface-2);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.modal__frame-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 55vh;
  background: #050911;
}

.modal__frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
  overflow: hidden;
}

.modal__content {
  padding: var(--gap-4) var(--gap-3) var(--gap-3);
  display: grid;
  gap: 10px;
}

.modal__content--top {
  padding: var(--gap-4) var(--gap-3) var(--gap-3);
}

.modal__title {
  margin: 0 0 4px;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
}

.modal__description {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* MODAL LOADER */
.modal__loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(5 9 17 / 75%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 2;
}

.modal__loader.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal__loading-text {
  font-family: 'Special Elite', monospace;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: 0.2em;
  color: var(--accent);
  text-shadow: 0 0 12px rgb(123 224 214 / 45%);
  user-select: none;
  white-space: nowrap;
}

.modal__loading-text span {
  opacity: 0;
  animation: loadingFade 0.6s forwards;
}

/* SCROLLBAR STYLES ------------------
WEBKIT (CHROME, EDGE, SAFARI) */
.modal__dialog::-webkit-scrollbar {
  width: 10px;
}

.modal__dialog::-webkit-scrollbar-track {
  background: transparent;
}

.modal__dialog::-webkit-scrollbar-thumb {
  background-color: rgb(255 255 255 / 25%);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.modal__dialog::-webkit-scrollbar-thumb:hover {
  background-color: rgb(255 255 255 / 40%);
}

@keyframes loadingFade {
  100% {
    opacity: 1;
  }
}

/* RESPONSIVE ------------------------------------------------------------- */

@media (width <= 1440px) {
  .page {
    margin-top: 2.5rem;
  }
}

@media (width <= 1024px) {
  .logo img {
    top: -1.1%;
    left: 2.2%;
  }

  .featured__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width <= 950px) {
  .page {
    margin-top: 2.8rem;
  }
}

@media (width <= 920px) {
  .project-row {
    grid-template-columns: 1fr;
  }

  .project-row:nth-child(even) .project-thumb {
    order: initial;
  }

  .project-body {
    padding: var(--gap-3);
  }
}

@media (width <= 768px) {
  .logo img {
    top: -1.8%;
    left: 3%;
  }
}

@media (width <= 712px) {
  .navbar__links {
    gap: var(--gap-3);
    margin-right: 1.5rem;
  }

  .footer__link {
    font-size: 2.2rem;
  }
}

@media (width <= 640px) {
  .page {
    width: min(100%, 100% - 1.5rem);
  }

  .feature-card__action {
    width: 100%;
  }

  .project-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
  }

  /* Mobile: hamburger layout */
  .navbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--gap-2) var(--spacing-page);
  }

  .navbar__toggle {
    margin-top: 0.8rem;
    display: grid;
  }

  /* Dropdown menu */
  .navbar__links {
    display: none;
    position: absolute;
    top: 100%;
    right: var(--spacing-page);
    left: var(--spacing-page);
    margin: 10px 0 0;
    padding: 12px;
    border-radius: var(--radius);
    background: rgb(11 16 32 / 92%);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 10px;
    z-index: 600;
  }

  .navbar__links.is-open {
    display: flex;
  }

  .navbar__link {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .navbar__link:hover {
    background: rgb(255 255 255 / 6%);
  }
}

@media (width <= 540px) {
  .page {
    margin-top: 1rem;
  }

  .logo img {
    width: 150px;
  }

  .featured__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
  }

  .footer__links {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
  }
}
