/* ------------------------------
   Main colours used on the site
------------------------------ */

:root {
  --background-color: #070b11;
  --second-background: #0d131d;
  --card-background: #111925;
  --text-color: #f5f7fa;
  --second-text-color: #9ba8b8;
  --accent-color: #73e3d4;
  --border-color: #26303d;
}

/* ------------------------------
   General styles
------------------------------ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

.container {
  width: 90%;
  max-width: 1160px;
  margin: auto;
}

/* ------------------------------
   Navigation
------------------------------ */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
}

.navbar {
  height: 75px;
}

.nav-container {
  width: 90%;
  max-width: 1160px;
  height: 75px;
  margin: auto;

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

.logo {
  font-size: 22px;
  font-weight: 800;
}

.logo span {
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: #d6dde6;
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.contact-link {
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 14px;
}

/* ------------------------------
   Hero
------------------------------ */

.hero-section {
  min-height: 700px;
  padding: 120px 0 80px 0;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  gap: 45px;
}

.small-title,
.section-number {
  color: var(--accent-color);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero-text h1 {
  font-size: 72px;
  line-height: 1;
  letter-spacing: -4px;
}

.hero-text h1 span {
  color: var(--accent-color);
}

.hero-description {
  max-width: 600px;
  margin-top: 28px;
  color: var(--second-text-color);
  font-size: 17px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-top: 34px;
}

.main-button,
.second-button {
  display: inline-block;
  padding: 13px 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
}

.main-button {
  background-color: var(--accent-color);
  color: #07100f;
}

.second-button {
  border: 1px solid var(--border-color);
  background-color: #0d131d;
}

.main-button:hover,
.second-button:hover {
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 24px;
  margin-top: 28px;
}

.social-links a {
  color: var(--second-text-color);
  font-size: 14px;
}

.social-links a:hover {
  color: var(--accent-color);
}

.code-card {
  background-color: #0c121c;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.code-header {
  height: 44px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 15px;
}

.code-header p {
  color: #7f8b98;
  font-size: 12px;
  margin-left: auto;
  margin-right: auto;
}

.dots {
  display: flex;
  gap: 7px;
}

.dots span {
  width: 9px;
  height: 9px;
  background-color: #44505f;
  border-radius: 50%;
}

.code-card pre {
  padding: 24px;
  color: #ced6df;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}

.purple {
  color: #c99bff;
}

.blue {
  color: #8cc8ff;
}

.green {
  color: #91e5bd;
}

/* ------------------------------
   General sections
------------------------------ */

.normal-section {
  padding: 100px 0;
}

.dark-section {
  background-color: var(--second-background);
  border-top: 1px solid #18202b;
  border-bottom: 1px solid #18202b;
}

.two-column-section {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 60px;
}

.normal-section h2 {
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -2px;
}

.about-text {
  color: var(--second-text-color);
  font-size: 16px;
}

.about-text > p {
  margin-bottom: 18px;
}

/* ------------------------------
   Section headings
------------------------------ */

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 45px;
}

.section-heading p {
  width: 40%;
  color: var(--second-text-color);
}

/* ------------------------------
   Skills
------------------------------ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.skill-card {
  min-height: 210px;
  padding: 30px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background-color: #101720;
  transition: transform 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
}

.card-number {
  color: #687585;
  font-size: 12px;
}

.skill-card h3 {
  margin-top: 45px;
  margin-bottom: 10px;
  font-size: 22px;
}

.skill-card p {
  color: var(--second-text-color);
}

/* ------------------------------
   Projects
------------------------------ */

.project-card {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background-color: var(--card-background);
  overflow: hidden;
}

.featured-project {
  display: grid;
  grid-template-columns: 55% 45%;
  margin-bottom: 22px;
}

.project-picture,
.terminal-picture {
  min-height: 310px;
  background-color: #0c1119;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* ------------------------------
   Student Grade Project Graphic
------------------------------ */

.grade-program {
  width: 82%;
  max-width: 520px;
  background-color: #0a0f16;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.grade-window-header {
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-color);
}

.grade-window-header p {
  margin-left: 12px;
  color: #8997a5;
  font-size: 11px;
}

.grade-window-dots {
  display: flex;
  gap: 6px;
}

.grade-window-dots span {
  width: 8px;
  height: 8px;
  background-color: #647180;
  border-radius: 50%;
}

.grade-program-content {
  display: grid;
  grid-template-columns: 46% 54%;
  padding: 16px;
}

.grade-menu {
  padding-right: 16px;
  border-right: 1px solid var(--border-color);
  font-family: monospace;
}

.grade-menu h4 {
  color: var(--accent-color);
  font-size: 11px;
  margin-bottom: 14px;
}

.grade-menu p {
  color: #ced6df;
  font-size: 10px;
  margin-bottom: 6px;
}

.grade-menu p span {
  color: var(--accent-color);
}

.grade-result {
  padding-left: 16px;
  font-family: monospace;
  color: #ced6df;
  font-size: 10px;
}

.grade-selected {
  color: #778493;
  margin-bottom: 12px;
}

.grade-accent {
  color: var(--accent-color);
}

.student-result-card {
  margin-top: 12px;
  padding: 12px;
  background-color: #101720;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.student-result-card h4 {
  color: var(--text-color);
  margin-bottom: 7px;
  font-size: 11px;
}

.student-course {
  color: #778493;
  margin-bottom: 10px;
}

.student-grade {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.final-grade {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.final-grade span:last-child {
  color: var(--accent-color);
  font-weight: bold;
}

.grade-info {
  margin-top: 10px;
  color: #778493;
  font-size: 9px;
}

.project-information {
  padding: 30px;
}
.logistics-program {
  width: 88%;
  max-width: 560px;

  background-color: #0a0f16;

  border: 1px solid var(--border-color);
  border-radius: 12px;

  overflow: hidden;

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.logistics-window-header {
  height: 42px;

  display: flex;
  align-items: center;

  padding: 0 14px;

  border-bottom: 1px solid var(--border-color);
}

.logistics-window-header p {
  margin-left: 12px;

  color: #8997a5;

  font-size: 11px;
}

.logistics-window-dots {
  display: flex;
  gap: 6px;
}

.logistics-window-dots span {
  width: 8px;
  height: 8px;

  background-color: #647180;

  border-radius: 50%;
}

.logistics-program-content {
  display: grid;

  grid-template-columns: 43% 57%;

  padding: 16px;
}

.logistics-menu {
  padding-right: 16px;

  border-right: 1px solid var(--border-color);

  font-family: monospace;
}

.logistics-menu h4 {
  color: var(--accent-color);

  font-size: 11px;

  margin-bottom: 14px;
}

.logistics-menu p {
  color: #ced6df;

  font-size: 10px;

  margin-bottom: 7px;
}

.logistics-menu p span {
  color: var(--accent-color);
}

.logistics-menu .unfinished-option {
  color: #667382;
}

.logistics-result {
  display: flex;
  justify-content: center;

  font-family: monospace;
}

.logistics-result-content {
  width: 88%;
}

.logistics-selected {
  color: #778493;

  font-size: 10px;

  margin-bottom: 14px;
}

.logistics-package-id {
  color: #ced6df;

  font-size: 10px;

  margin-bottom: 14px;
}

.logistics-package-id span {
  color: var(--accent-color);
}

.logistics-package-card {
  width: 100%;

  padding: 14px;

  background-color: #101720;

  border: 1px solid var(--border-color);
  border-radius: 9px;
}

.package-heading {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-bottom: 16px;
}

.package-heading h4 {
  color: var(--text-color);

  font-size: 11px;
}

.package-status {
  padding: 3px 8px;

  border: 1px solid #49617a;
  border-radius: 20px;

  color: var(--accent-color);

  font-size: 9px;
}

.package-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 12px;

  color: #ced6df;

  font-size: 10px;

  margin-bottom: 8px;
}

.package-detail span:first-child {
  color: #8997a5;
}

.logistics-accent {
  color: var(--accent-color);
}

.package-divider {
  height: 1px;

  background-color: var(--border-color);

  margin: 13px 0;
}

.logistics-info {
  color: #778493;

  font-size: 9px;

  margin-top: 12px;
}

.featured-project .project-information {
  padding: 45px;
}

.project-label {
  display: flex;
  justify-content: space-between;
  color: #778493;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-information h3 {
  margin-top: 20px;
  margin-bottom: 12px;
  font-size: 24px;
}

.project-information p {
  color: var(--second-text-color);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tags span {
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 5px 9px;
  color: #b8c3ce;
  font-size: 11px;
}

.project-links {
  display: flex;
  gap: 22px;
  margin-top: 25px;
}

.project-links a {
  font-size: 13px;
}

.project-links a:hover {
  color: var(--accent-color);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.terminal {
  width: 78%;
  padding: 20px;
  background-color: #06090d;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  font-family: monospace;
  color: #8997a5;
}

.terminal p {
  margin-bottom: 8px;
}

.terminal span,
.terminal-success {
  color: var(--accent-color);
}
.weird-house-picture {
  min-height: 310px;

  background-color: #0c1119;

  display: flex;
  justify-content: center;
  align-items: center;
}

.weird-house-window {
  width: 88%;

  background-color: #080d13;

  border: 1px solid var(--border-color);
  border-radius: 10px;

  overflow: hidden;

  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.weird-house-header {
  height: 38px;

  display: flex;
  align-items: center;

  padding: 0 12px;

  border-bottom: 1px solid var(--border-color);
}

.weird-house-header p {
  margin-left: 10px;

  color: #8997a5;

  font-size: 10px;
}

.weird-house-dots {
  display: flex;

  gap: 5px;
}

.weird-house-dots span {
  width: 7px;
  height: 7px;

  background-color: #647180;

  border-radius: 50%;
}

.weird-house-content {
  display: grid;

  grid-template-columns: 62% 38%;

  padding: 14px;

  font-family: monospace;
}

.weird-house-console {
  padding-right: 12px;

  border-right: 1px solid var(--border-color);

  color: #ced6df;

  font-size: 8px;
}

.weird-house-console p {
  margin-bottom: 5px;
}

.weird-house-title {
  color: var(--accent-color);

  font-weight: bold;

  margin-bottom: 10px !important;
}

.room-name {
  color: var(--text-color);

  font-weight: bold;
}

.object-text span {
  color: var(--accent-color);
}

.command {
  color: var(--accent-color);

  margin-top: 8px;
}

.inventory-item {
  color: #ffffff;

  padding-left: 8px;
}

.weird-house-map {
  position: relative;

  min-height: 210px;

  margin-left: 12px;
}

.map-room {
  position: absolute;

  padding: 5px 7px;

  background-color: #111925;

  border: 1px solid var(--border-color);
  border-radius: 5px;

  color: #aab6c4;

  font-size: 7px;

  text-align: center;
}

.hallway-room {
  top: 78px;
  left: 56px;

  color: var(--accent-color);
}

.kitchen-room {
  top: 10px;
  left: 57px;
}

.foyer-room {
  top: 145px;
  left: 61px;
}

.bedroom-room {
  top: 76px;
  left: 0;
}

.living-room {
  top: 145px;
  left: 127px;
}

.map-line {
  position: absolute;

  background-color: #465361;
}

.vertical-line-one {
  width: 1px;
  height: 32px;

  top: 44px;
  left: 79px;
}

.vertical-line-two {
  width: 1px;
  height: 31px;

  top: 112px;
  left: 79px;
}

.horizontal-line {
  width: 11px;
  height: 1px;

  top: 94px;
  left: 45px;
}

.living-line {
  width: 29px;
  height: 1px;

  top: 157px;
  left: 98px;
}

.education-dot {
  color: var(--accent-color);
}

.education-card {
  padding: 38px;
  background-color: #101720;
  border: 1px solid var(--border-color);
  border-radius: 18px;
}

.education-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.education-top > div:first-child {
  max-width: 78%;
}

.education-date {
  color: var(--accent-color);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.education-top h3 {
  font-size: 25px;
  margin-bottom: 8px;
}

.school {
  color: var(--second-text-color);
}

.education-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: #b8c3ce;
  font-size: 11px;
  white-space: nowrap;
}

.education-status-icon {
  color: var(--accent-color);
  font-size: 12px;
}

.education-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 30px 0;
}

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

.coursework-title h4 {
  font-size: 16px;
}

.coursework-icon {
  color: var(--accent-color);
  font-size: 18px;
}

.course-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-grid span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  background-color: #0d131d;
  font-size: 12px;
  line-height: 1;
}

.course-grid span::before {
  content: "•";
  color: var(--accent-color);
  margin-right: 8px;
  font-size: 13px;
}

/* ------------------------------
   Experience
------------------------------ */

.experience-row {
  display: grid;
  grid-template-columns: 200px auto;
  gap: 45px;
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
}

.experience-row:last-child {
  border-bottom: 1px solid var(--border-color);
}

.experience-date {
  color: #778493;
  font-size: 13px;
}

.experience-row h3 {
  font-size: 20px;
}

.experience-row p {
  max-width: 700px;
  color: var(--second-text-color);
}

.company {
  color: var(--accent-color) !important;
  margin-top: 4px;
  margin-bottom: 12px;
}

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

.contact-section {
  padding: 130px 0;
  text-align: center;
}

.contact-section h2 {
  max-width: 850px;
  margin: auto;
  font-size: 64px;
  line-height: 1.1;
  letter-spacing: -3px;
}

.contact-section > .container > p:not(.section-number) {
  max-width: 560px;
  margin: 24px auto 30px auto;
  color: var(--second-text-color);
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 32px;
}

.contact-socials a {
  color: var(--second-text-color);
  font-size: 14px;
}

.contact-socials a:hover {
  color: var(--accent-color);
}

/* ------------------------------
   Footer
------------------------------ */

footer {
  border-top: 1px solid var(--border-color);
}

.footer-container {
  width: 90%;
  max-width: 1160px;
  min-height: 75px;
  margin: auto;

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

  color: #6f7b88;
  font-size: 12px;
}

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

@media screen and (max-width: 850px) {
  .nav-container {
    height: auto;
    padding: 18px 0;
    flex-direction: column;
    gap: 12px;
  }

  .navbar {
    height: auto;
  }

  .nav-links {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-section {
    padding-top: 90px;
  }

  .hero-grid {
    grid-template-columns: 100%;
  }

  .hero-text h1 {
    font-size: 55px;
  }

  .two-column-section {
    grid-template-columns: 100%;
  }

  .featured-project {
    grid-template-columns: 100%;
  }

  .education-top {
    flex-direction: column;
  }

  .education-top > div:first-child {
    max-width: 100%;
  }

  .education-status {
    white-space: normal;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    width: 100%;
    margin-top: 15px;
  }

  .normal-section h2 {
    font-size: 42px;
  }

  .contact-section h2 {
    font-size: 48px;
  }
}

@media screen and (max-width: 600px) {
  .hero-text h1 {
    font-size: 43px;
    letter-spacing: -2px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .skills-grid,
  .project-grid {
    grid-template-columns: 100%;
  }

  .experience-row {
    grid-template-columns: 100%;
    gap: 10px;
  }

  .contact-section h2 {
    font-size: 40px;
  }

  .footer-container {
    padding: 20px 0;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
}

/* ------------------------------
   Motion
------------------------------ */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* shows the content from the top down, one line at a time */
@keyframes reveal-lines {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* hero: the text eases in when the page loads, then the code appears line by line */
.hero-text > * {
  animation: rise-in 0.6s ease backwards;
}

.hero-text > :nth-child(2) { animation-delay: 0.1s; }
.hero-text > :nth-child(3) { animation-delay: 0.2s; }
.hero-text > :nth-child(4) { animation-delay: 0.3s; }
.hero-text > :nth-child(5) { animation-delay: 0.4s; }

.code-card {
  animation: rise-in 0.6s ease 0.3s backwards;
}

.code-card pre {
  animation: reveal-lines 1.6s cubic-bezier(0.4, 0, 0.2, 1) 1s backwards;
}

/* blinking cursor at the end of the terminal */
.terminal-success::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 6px;
  vertical-align: text-bottom;
  background-color: var(--accent-color);
  animation: blink 1s steps(1) infinite;
}

/* hover effects */
.nav-links a:not(.contact-link) {
  position: relative;
}

.nav-links a:not(.contact-link)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:not(.contact-link):hover::after {
  transform: scaleX(1);
}

.main-button,
.second-button {
  transition: transform 0.2s ease;
}

.project-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
}

/* scroll animations, only in browsers that support them (the page works without) */
@supports (animation-timeline: view()) {
  .section-heading,
  .skill-card,
  .project-card,
  .education-card,
  .experience-row {
    animation: rise-in linear;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  /* the game windows print their lines as their card scrolls up the screen */
  .project-grid .project-card {
    view-timeline: --card block;
  }

  .weird-house-console,
  .terminal {
    animation: reveal-lines linear;
    animation-timeline: --card;
    animation-range: entry 35% entry 80%;
  }

  .weird-house-console {
    animation-timing-function: steps(14);
  }

  .terminal {
    animation-timing-function: steps(5);
  }
}

/* turn all of it off for people who ask their device for less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
