:root {
  --page-bg: #181818;
  --surface: #f5f2e9;
  --surface-2: #ebe7dc;
  --card: #fffdf7;
  --ink: #171717;
  --muted: #68665e;
  --line: rgba(23, 23, 23, 0.13);

  /* Shared navigation colour */
  --nav: #f8e38f;
  --nav-hover: #ead06d;
  --nav-ink: #171717;

  --tag-bg: #252525;
  --tag-ink: #f8f5ed;
  --accent: #7c57d1;
  --white: #fffdf7;
}

/* ---------- Base ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  background-color: var(--page-bg);
  background-image: radial-gradient(rgba(248, 227, 143, 0.25),
      transparent 0.5px);
  background-size: 20px 20px;
  /* Botany background
  background-image: url("https://photo-cdn2.icons8.com/NV65eaRoFcPapdYGsAhqPnYXQZDV3NE8EpBqyNegGfQ/rs:fit:1608:1072/czM6Ly9pY29uczgu/bW9vc2UtcHJvZC5l/eHRlcm5hbC9hMmE0/Mi9kNjQ3N2NmZDIy/NDk0NTMwOTZlYWY3/NzQ5YzIzMGY4Yy5q/cGc.jpg");
  background-attachment: fixed;
  */
}

html::-webkit-scrollbar {
  display: none;
}

body {
  width: min(1280px, calc(100% - 48px));
  min-height: calc(100vh - 48px);
  margin: 24px auto 48px;
  padding: 0;

  background: var(--surface);
  color: var(--ink);
  font-family: Satoshi, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

a {
  color: inherit;
}

::selection {
  background: var(--nav);
  color: var(--ink);
}

/* ---------- Top navigation ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 72px;
  padding: 0 10px;

  background: var(--nav);
  color: var(--nav-ink);
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 22px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.topnav.scrolled {
  border-radius: 0;
}

.topnav>a,
.topnav-right a {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;

  color: var(--nav-ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;

  border-radius: 12px;
  transition: background 180ms ease, transform 180ms ease;
}

.topnav>a {
  font-size: 1.05rem;
  font-weight: 600;
}

.topnav>a:hover,
.topnav-right a:hover {
  background: var(--nav-hover);
  transform: translateY(-1px);
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav-centered {
  display: none;
}

.topnav {
  min-height: 70px;
  padding: 0 clamp(16px, 4vw, 52px);
  background: var(--nav);
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: none;
}

.topnav > a,
.topnav-right a {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.topnav > a {
  padding-left: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.topnav > a:hover,
.topnav-right a:hover {
  background: var(--nav-hover);
  transform: none;
}

.topnav .home-link:hover {
  background: var(--nav-hover);
}
.topnav .home-link {
  padding-left: 15px;
}

/* ---------- Header ---------- */

header {
  background: var(--surface);
  color: var(--ink);
}

.header {
  position: relative;
  display: flex;
  align-items: center;

  min-height: 440px;
  padding: clamp(56px, 7vw, 96px) clamp(28px, 7vw, 92px);

  overflow: hidden;
}

/* Hexagon, top right */
.header::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -70px;
  top: -110px;
  background: var(--nav);
  opacity: 0.42;
  pointer-events: none;
  clip-path: polygon(50% 0%,
      100% 25%,
      100% 75%,
      50% 100%,
      0% 75%,
      0% 25%);
}

.header::after {
  content: "";
  position: absolute;
  width: 370px;
  height: 370px;
  left: -170px;
  bottom: -210px;
  background: var(--nav);
  opacity: 0.42;
  pointer-events: none;
  clip-path: polygon(50% 0%,
      100% 25%,
      100% 75%,
      50% 100%,
      0% 75%,
      0% 25%);
}

.header-flex {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 1100px;
  margin: 0 auto;

  display: block;
}

.header-text {
  width: auto;
  margin: 0;
}

.name {
  margin: 0;
  max-width: 900px;

  font-family: Satoshi, "Cabinet Grotesk", sans-serif;
  font-size: clamp(4rem, 9vw, 8.5rem);
  line-height: 0.84;
  letter-spacing: -0.065em;
  font-weight: 750;
}

.header p {
  max-width: 650px;
  margin: 28px 0 0;

  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.55;
}

/* ---------- Main ---------- */

main {
  width: 100%;
  margin: 0;
  padding: 0;
}

.projects {
  width: 100%;
}

.projnav {
  z-index: 90;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin: 0;

  background: var(--nav);
}

.projnav a {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 70px;
  padding: 34px 20px;

  color: rgba(23, 23, 23, 0.55);
  background: var(--nav);

  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(0.82rem, 2.7vw, 4rem);
  font-weight: 750;

  border-top: 1px solid rgba(23, 23, 23, 0.12);
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
  border-right: 1px solid rgba(23, 23, 23, 0.10);
  transition: color 180ms ease, background 180ms ease;
}

.projnav a:last-child {
  border-right: 0;
}

.projnav a:hover {
  color: var(--ink);
  background: var(--nav-hover);
}

.projnav a.active {
  color: var(--ink);
  background: var(--surface);
  border: none;
  box-shadow: 0 -8px 12px 1px rgba(23, 23, 23, 0.14);
  z-index: 2;
}

.projnav a:not(.active) {
  box-shadow: inset 0 -10px 12px rgba(23, 23, 23, 0.1);
  z-index: 1;
}

/* ---------- Project tabs ---------- */

.tab {
  display: none;
  z-index: 98;
}

.tab.vis {
  display: flex;
  flex-direction: column;
  z-index: 98;

  width: min(1080px, calc(100% - 64px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.proj {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;

  width: 100%;
  margin: 24px 0;
  padding: clamp(22px, 3vw, 34px);

  border-radius: 20px;

}

/* Keep the original alternating image/text arrangement. */
.proj.right {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}

.proj img {
  display: block;

  width: 100%;
  max-height: 360px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: bottom left;

  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.proj.right img {
  grid-column: 2;
}

.proj img.center {
  object-position: center;
}

.proj img.bottom-center {
  object-position: bottom center;
}

/*.proj img:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 36px rgba(23, 23, 23, 0.09);
}*/

.proj.right .info {
  grid-column: 1;
  grid-row: 1;
}

.info {
  width: 100%;
  min-width: 0;
}

.proj.right .info {
  text-align: left;
}

.proj .title {
  margin: 0;
  padding: 0;

  font-family: Satoshi, "Cabinet Grotesk", sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 720;
}

.proj hr {
  width: 100%;
  height: 1px;

  margin: 18px 0 14px;
  padding: 0;

  border: 0;
  background: var(--line);
}

.proj .languages {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;

  width: 100%;
  margin: 0 0 18px;
}

.proj.right .languages {
  justify-content: flex-start;
}

.proj .language {
  margin: 0;
  padding: 6px 10px;

  color: var(--tag-ink);
  background: var(--tag-bg);

  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 650;
}

.proj .desc {
  margin: 0;
  padding: 0;

  color: var(--muted);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.65;
}

.proj .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;

  width: 100%;
  margin: 24px 0 0;
  padding: 0;
}

.proj.right .links {
  justify-content: flex-start;
}

.proj .link {
  display: flex;
  align-items: center;

  margin: 0;
  padding: 8px 12px;

  background: var(--nav);
  border-radius: 10px;

  font-size: 0.78rem;
  line-height: 1;
  font-weight: 700;

  transition: background 160ms ease, transform 160ms ease;
}

.proj .link:hover {
  background: var(--nav-hover);
  transform: translateY(-1px);
}

.proj .link a {
  color: var(--ink);
  text-decoration: none;
  text-align: center;
}

.proj .link i {
  margin-right: 3px;
}

.proj .link svg {
  fill: var(--ink);
}

.proj .link svg.itchio {
  width: 18px;
  height: 18px;
  margin: 0 3px -4px -2px;
}

.proj .link svg.website {
  width: 15px;
  height: 15px;
  margin: 0 3px -3px -2px;
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 90px);

  margin: 0;
  padding: clamp(48px, 7vw, 86px);

  color: var(--white);
  background: #202020;
  border-radius: 22px;
}

.contact-column {
  width: 100%;
  max-width: 560px;
}

.contact-column h1 {
  margin: 0 0 30px;

  font-family: Satoshi, "Cabinet Grotesk", sans-serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
  font-weight: 700;
}

.contact-column .contact-info {
  display: flex;
  align-items: center;

  margin: 0 0 16px;
  padding: 0;
}

.contact-column .contact-info i {
  width: 34px;
  margin-right: 12px;
  flex: 0 0 34px;
}

.contact-column .contact-info p {
  margin: 0;
  padding: 0;
  font-size: 0.98rem;
}

.contact-column .contact-info a {
  color: var(--white);
  text-decoration: none;
}

.contact-column .contact-info a:hover {
  text-decoration: underline;
}

.form {
  width: 100%;
  max-width: 600px;
}

.form input,
.form textarea {
  display: block;

  width: 100%;
  margin: 0 0 9px;
  padding: 13px 14px;

  color: var(--ink);
  background: var(--white);

  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;

  font-family: Satoshi, sans-serif;
  font-size: 0.95rem;
}

.form textarea {
  resize: vertical;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--nav);
}

.form input::placeholder,
.form textarea::placeholder {
  color: #85827a;
}

.form input[type="submit"] {
  margin-top: 4px;
  color: var(--ink);
  background: var(--nav);

  border: 0;
  cursor: pointer;
  font-weight: 550;

  transition: background 160ms ease, transform 160ms ease;
}

.form input[type="submit"]:hover {
  background: var(--nav-hover);
  transform: translateY(-1px);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  body {
    width: min(100% - 24px, 1280px);
    margin: 12px auto 24px;
    border-radius: 16px;
  }

  .topnav {
    min-height: 64px;
  }

  .topnav>a,
  .topnav-right a {
    min-height: 48px;
    padding: 0 12px;
  }

  .projnav {
    top: 64px;
  }

  .header {
    min-height: auto;
    padding: 64px 34px 72px;
  }

  .header::before {
    width: 370px;
    height: 370px;
  }

  .header::after {
    width: 320px;
    height: 320px;
  }

  .header-flex {
    display: block;
  }

  .name {
    font-size: clamp(3.5rem, 9vw, 6rem);
  }

  .tab.vis {
    width: min(100% - 36px, 1080px);
    padding-bottom: 54px;
  }

  .proj {
    gap: 28px;
  }
}

@media (max-width: 700px) {
  body {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .topnav {
    min-height: 60px;
  }

  .topnav>a,
  .topnav-right a {
    padding: 0 9px;
    font-size: 0.82rem;
  }

  .topnav>a {
    font-size: 0.9rem;
  }

  .topnav-right {
    gap: 0;
  }

  .header::before {
    width: 320px;
    height: 320px;
  }

  .header::after {
    width: 270px;
    height: 270px;
  }

  .header-flex {
    display: block;
  }

  .projnav {
    top: 60px;
  }

  .projnav a {
    min-height: 58px;
    padding: 10px 4px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .header {
    padding: 52px 24px 58px;
  }

  .header-flex {
    display: block;
  }

  .name {
    font-size: clamp(3.6rem, 17vw, 6rem);
  }

  .header p {
    margin-top: 20px;
    font-size: 1rem;
  }

  .tab.vis {
    width: calc(100% - 28px);
    padding: 18px 0 40px;
  }

  .proj,
  .proj.right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;

    margin: 10px 0;
    padding: 18px;
  }

  .proj.right .info,
  .proj.right img {
    order: initial;
  }

  .proj img,
  .proj.right img {
    width: 100%;
    max-height: none;
  }

  .proj .title {
    font-size: 2rem;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 52px 24px;
  }
}

@media (max-width: 420px) {

  .topnav>a,
  .topnav-right a {
    padding: 0 7px;
  }

  .header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header::before {
    width: 220px;
    height: 220px;
  }

  .header::after {
    width: 179px;
    height: 170px;
  }

  .projnav a {
    font-size: 0.66rem;
  }

  .proj.right img {
    order: -1;
  }

  .tab.vis {
    width: calc(100% - 20px);
  }
}
