:root {
  --bg: rgb(255, 255, 255);
  --text: rgb(0, 0, 0);
  --accent: rgb(0, 0, 128);
  --opposite_accent: rgb(70, 122, 218);
  --light_accent: rgb(70, 122, 218);
  --dark_accent: rgb(0, 0, 128);
  --link_clicked: #551a8b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: rgb(30, 30, 30);
    --text: rgb(255, 255, 255);
    --accent: rgb(70, 122, 218);
    --opposite_accent: rgb(0, 0, 128);
    --link_clicked: #9362ff;
  }
}

* {
  box-sizing: border-box
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.yt-lite {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
}

.yt-lite::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  backdrop-filter: blur(6px);
}

/* triangle */
.yt-lite::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  /* optical centering fix */

  width: 0;
  height: 0;
  border-left: 24px solid white;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;

  pointer-events: none;
  z-index: 3;
}

.yt-lite:hover::after {
  background: rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%) scale(1.05);
  transition: 0.15s ease;
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;
}

.site {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

a:link {
  color: var(--accent);
  /* A deeper, high-contrast blue */
  text-decoration: underline;
  /* Keeps the link recognizable */
}

a:visited {
  color: var(--link_clicked);
  /* A distinct color for links already clicked */
}

a:hover,
a:focus {
  color: var(--opposite_accent);
  /* Darkens when a user hovers or tabs over it */
  text-decoration: none;
  /* Provides visual feedback */
}


/* Container that sits behind everything */
.hexagon-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  /* Pushes it behind your project cards */
  background-color: var(--bg);
  /* Your base background color */
  overflow: hidden;
}

/* Individual hexagon styling */
.hex {
  position: absolute;
  /* Width and height are now handled dynamically by JS */
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  transform: translate(-50%, -50%);
  /* Centers the random coordinate point */
  /* Opacity removed so they stay 100% solid and opaque */
}

.frosted-background {
  position: fixed;
  top: 0;
  height: 100vh;
  z-index: -1;
  pointer-events: none;

  /* Perfect alignment fix */
  width: 100%;
  max-width: 1200px;
  left: 50%;
  transform: translateX(-50%);

  /* Center color (Frosted) */
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(6px);
}

.logo {
  text-align: center;
}

.logo img {
  width: 100%;
  /* allows shrinking on small screens */
  height: auto;
  /* keeps aspect ratio */
  max-height: 128px;
  /* never exceed 256px tall */
  max-width: 128px;
  /* optional: prevents it from getting too wide */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 17.5px rgba(0, 0, 0, 0.4);
}

@keyframes fadeUp {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.name {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;

  opacity: 0;
  animation: fadeUp 1s ease forwards;

  text-align: center;
}

.profile-links {
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.1s;
}

.profile-links a,
.profile-links span.email {
  display: inline;
  /* ensure span stays inline */
  margin: 0;
  padding: 0;
}

.profile-meta {
  text-align: center;

  max-width: 900px;
  margin: auto;
  flex: 1 1 auto;
}

.about {
  margin-top: 10px;
  margin-bottom: 10px;
  color: var(--text);

  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.2s;
}

.skills {
  margin: 0 auto;
  font-weight: 300;

  width: fit-content;
  text-align: center;

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 6px;
  background-color: rgb(255, 255, 255);

  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.4s;
}

.skill-icon {
  width: 2em;
  height: auto;
  vertical-align: text-bottom;
}

.notice-title {
  margin: 8px 0 14px;
  font-size: 28px;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-align: center;

  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.2s;
}

.skills-title {
  margin: 8px 0 14px;
  font-size: 28px;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-align: center;

  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 0.3s;
}

/* Section titles */
.section-title {
  margin: 8px 0 14px;
  font-size: 28px;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-align: center;
}

.work-links {
  margin: 0;
  text-align: center;

  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
}

.work-links a {
  display: inline;
  /* ensure span stays inline */
  margin: 0;
  padding: 0;

  text-decoration: none;
  /* Removes the underline from spaces */
  display: inline-block;
  /* Allows margins to work correctly */
  margin-right: 8px;
  /* Safely adds space between badges */
}

.work-title {
  margin-bottom: 0.3em;
  text-align: center;
  text-decoration: underline;
}

.work-github,
.work-itch,
.work-about,
.work-skills,
.work-images {
  margin: 1.2rem;
}

.work-images summary {
  list-style-position: inside;
}

.work-images details {
  margin-top: 1rem;
}

.work-images summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.work-images summary::-webkit-details-marker {
  display: none;
}

.work-images summary::before {
  content: " ▶";
  font-size: 1em;
}

.work-images details[open] summary::before {
  content: " ▼";
}


#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
}

.emphasis {
  font-weight: 600;
  color: var(--accent);
  /* or your palette */
}

.video-wrapper {
  display: flex;
  justify-content: center;
}

.PMMA,
.Ghouls-And-Gold,
.httyd-game,
.gourmet-heaven,
.Game_1942,
.laames {
  background: var(--bg);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  margin-bottom: 40px;
  border-radius: 20px;
  border: 2px solid var(--accent);
  padding: 20px;
}

.PMMA {
  background: #e8e4e3;
  color: #000;
}

.httyd-game {
  background: #a69e79;
  color: #000;
}

.Ghouls-And-Gold {
  background: #000;
  color: #fff;

  .emphasis {
    color: var(--light_accent)
  }
}

.gourmet-heaven {
  background: #ffe3cb;
  color: #000;
}

.Game_1942 {
  background: #c1d4ef;
  color: #000;
}

.laames {
  background: #a5abc9;
  color: #000;
}


.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 0.3rem;
}

.image-grid img {
  max-width: 100%;
  height: auto;
}