/* Poppins is loaded with <link> tags in index.html (no render-blocking @import) */

/*================VARIABLE CSS ==============*/

:root {
  --header-height: 3.5rem;

  /*================COLOURS==================*/
  --primary-color: #03b58c;
  /* Teal used for TEXT. Darkened in light theme so it passes contrast. */
  --accent-text: #03b58c;
  /* Text colour on top of a teal background (buttons, icons) */
  --on-primary: #06222a;
  --secondary-color: #fff;
  --background-color: #212d3c;
  --body-color: #384250;
  --nav-color: hsla(0, 0%, 10%, 0.3);
  --hue: 166;

  /*================FONT AND TYPOGRAPHY==================*/
  --body-font: "Poppins", sans-serif;
  --h1-font-size: 1.8rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: 0.95rem;
  --small-font-size: 0.875rem;

  /*================  FONT WEIGHT ==================*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*================  Z INDEX ==================*/
  --z-fixed: 100;
  --z-tooltip: 10;
}

/*================  RESPONSIVE TYPOHRAPHHY ==================*/
@media screen and (min-width: 1152px) {
  :root {
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

input,
textarea,
button,
body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--background-color);
  color: var(--secondary-color);
}

input,
textarea,
button {
  border: none;
}

/* Keyboard focus must always be visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip_link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: calc(var(--z-fixed) + 10);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--primary-color);
  color: var(--on-primary);
  font-weight: var(--font-medium);
  transform: translateY(-200%);
}

.skip_link:focus {
  transform: translateY(0);
}

h1,
h2,
h3,
h4 {
  color: var(--secondary-color);
  font-weight: var(--font-medium);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/*================  REUSABE CSS CLASSES ==================*/
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 2rem;
}

.section_title,
.section_subtitle {
  text-align: center;
  font-weight: var(--font-semi-bold);
}

.section_title {
  font-size: var(--h1-font-size);
  margin-bottom: 0.25rem;
}

.section_subtitle {
  color: var(--accent-text);
  font-size: var(--small-font-size);
  margin-bottom: 1.5rem;
}

.section_subtitle span {
  color: var(--secondary-color);
}

.main {
  overflow: hidden; /* Animations Scroll Reveal */
}

/*================  HEADER AND NAVIGATION MENU ==================*/
.header {
  background-color: var(--background-color);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  border-bottom: solid 1px #384250;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav_logo {
  color: var(--secondary-color);
  font-weight: var(--font-medium);
  font-size: var(--h3-font-size);
}

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

.nav_toggle,
.nav_close {
  display: flex;
  background: none;
  font-size: 1.5rem;
  color: var(--secondary-color);
  cursor: pointer;
}

/* Active Link */
.nav_link.active-link {
  color: var(--accent-text);
}

.scroll-header {
  background-color: rgba(33, 45, 60, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/*================ THEME TOGGLE ==================*/
.theme_toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background-color: #eef2f7;
  color: #1f2937;
  padding: 0.3rem 0.4rem 0.3rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: var(--font-semi-bold);
  font-size: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.12);
  transition: 0.3s ease;
  height: 2.8rem;
}

.theme_circle i {
  color: #111827;
}

.theme_circle {
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  place-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 50%;
  font-size: 1.1rem;
  transition: 0.3s ease;
}

body.light-theme .theme_toggle {
  background-color: #111827;
  color: #ffffff;
  padding: 0.3rem 0.8rem 0.3rem 0.4rem;
}

body.light-theme .theme_circle {
  order: -1;
}

/* Better light theme */
body.light-theme {
  --background-color: #eef3f8;
  --body-color: #ffffff;
  --secondary-color: #1f2937;
  --nav-color: rgba(255, 255, 255, 0.92);
  --accent-text: #04755b;
}

body.light-theme .header {
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #d9e2ec;
}

body.light-theme .scroll-header {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.light-theme .home_overlay {
  background: linear-gradient(
    180deg,
    rgba(238, 243, 248, 0.78),
    rgba(238, 243, 248, 0.88)
  );
}

body.light-theme .whatido,
body.light-theme .about,
body.light-theme .skills {
  background-color: #ffffff;
}

body.light-theme .portfolio,
body.light-theme .experience,
body.light-theme .connect,
body.light-theme .footer {
  background-color: #eef3f8;
}

body.light-theme .whatido_card,
body.light-theme .skills_card {
  background-color: #f5f8fc;
}

body.light-theme .portfolio_card,
body.light-theme .contact_input {
  background-color: #ffffff;
}

body.light-theme .contact_input {
  border-color: #cdd6e2;
}

body.light-theme .contact_input:hover {
  border-color: var(--accent-text);
}

body.light-theme .skills_chip {
  background-color: #ffffff;
  border-color: #d7dee8;
}

body.light-theme .footer {
  border-top-color: #d9e2ec;
}

/*================  Navigation for mobile devices ==================*/
@media screen and (max-width: 1023px) {
  .nav_menu {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: var(--nav-color);
    width: min(82%, 360px);
    height: 100vh;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    /* Off-screen links must not be reachable with the keyboard.
       Visibility flips after the slide-out finishes when closing. */
    visibility: hidden;
    transition:
      right 0.4s ease,
      visibility 0s linear 0.4s;
  }

  .nav_menu {
    background: rgba(15, 23, 42, 0.96);
  }

  body.light-theme .nav_menu {
    background: rgba(255, 255, 255, 0.97);
  }

  .nav_menu .nav_list {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 2rem;
  }

  .nav_link {
    font-size: 1.3rem;
  }

  .theme_toggle {
    margin-top: 1rem;
  }

  /*=== Shows menu on the right on mobile ===*/
  .nav_menu.show-menu {
    right: 0;
    visibility: visible;
    transition:
      right 0.4s ease,
      visibility 0s;
  }
}

.nav_list {
  display: flex;
  align-items: center;
  column-gap: 2.5rem;
}

.nav_link {
  color: var(--secondary-color);
  white-space: nowrap;
  font-weight: var(--font-medium);
  transition: color 0.4s;
}

.nav_link:hover {
  color: var(--primary-color);
}

.nav_close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/*================  HOME ==================*/
.home {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: var(--header-height);
}

.home_video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home_overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.home_inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.home_data {
  max-width: 920px;
  margin: 0 auto;
}

/* Hero hierarchy: name > role line > supporting sentence */
.home_kicker {
  font-size: clamp(2.6rem, 7.5vw, 4.5rem);
  font-weight: var(--font-semi-bold);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

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

.home_disciplines {
  font-size: clamp(1.15rem, 2.4vw, 1.625rem);
  font-weight: var(--font-medium);
  line-height: 1.4;
  margin: 0 auto 1rem;
  max-width: 56rem;
  color: var(--secondary-color);
}

.home_disciplines span {
  white-space: nowrap;
}

.home_description {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 auto 1.9rem;
  max-width: 34rem;
  color: var(--secondary-color);
  opacity: 0.8;
}

.video_toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  padding: 0.6rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.video_toggle:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/*================  BUTTON ==================*/

.home_cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  background-color: var(--primary-color);
  padding: 1rem 1.75rem;
  border: 1px solid var(--primary-color);
  border-radius: 0.5rem;
  color: var(--on-primary);
  font-weight: var(--font-semi-bold);
  transition: all 0.4s ease-in-out;
  cursor: pointer;
}

.button:hover {
  background-color: transparent;
  color: var(--secondary-color);
}

.button--outline {
  background-color: transparent;
  color: var(--secondary-color);
}

.button--outline:hover {
  background-color: var(--primary-color);
  color: var(--on-primary);
}

/* Hero "Contact Me": a soft dark backing and brighter border so the outline
   stays readable over the moving video (same size and spacing). */
.home .button--outline {
  background-color: rgba(8, 14, 22, 0.55);
  border-color: rgba(255, 255, 255, 0.75);
}

.home .button--outline:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

body.light-theme .home .button--outline {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: var(--accent-text);
}

body.light-theme .home .button--outline:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/*================  ABOUT==================*/
.about {
  background-color: var(--body-color);
}

.about_title {
  padding-bottom: 1rem;
  color: var(--accent-text);
}

.about_subtitle {
  margin-bottom: 0.75rem;
  color: var(--accent-text);
}

.about_education {
  display: grid;
  gap: 0.6rem;
  line-height: 1.6;
}

/*================  WHAT I DO ==================*/
.whatido {
  background-color: var(--body-color);
}

.whatido_container {
  padding-block: 1rem;
}

.whatido_card {
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  background-color: var(--background-color);
  border: 2px solid transparent;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.whatido_card:hover {
  border-color: var(--primary-color);
  transform: translateY(-6px);
}

.whatido_icon {
  display: block;
  font-size: 2.75rem;
  color: var(--accent-text);
  margin-bottom: 0.75rem;
}

.whatido_title {
  font-size: var(--h2-font-size);
  margin-bottom: 0.75rem;
  color: var(--accent-text);
}

.whatido_text {
  line-height: 1.7;
  font-size: var(--small-font-size);
}

/*================  EXPERIENCE (TIMELINE) ==================*/
.timeline {
  position: relative;
  display: grid;
  gap: 2.5rem;
  max-width: 880px;
  padding-block: 1rem;
  list-style: none;
}

/* Vertical line */
.timeline::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  bottom: 1.25rem;
  left: calc(1rem + 5px);
  width: 2px;
  background-color: var(--primary-color);
  opacity: 0.45;
}

.timeline_item {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding-left: 2rem;
}

/* Dot on the line */
.timeline_item::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--background-color);
}

.timeline_dates {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  color: var(--accent-text);
}

.timeline_role {
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  line-height: 1.3;
}

.timeline_org {
  margin-top: 0.15rem;
  margin-bottom: 0.75rem;
  font-weight: var(--font-medium);
  opacity: 0.85;
}

.timeline_list {
  display: grid;
  gap: 0.6rem;
  list-style: square;
  padding-left: 1.1rem;
  line-height: 1.65;
  font-size: var(--small-font-size);
}

.timeline_list li::marker {
  color: var(--accent-text);
}

/* Amazon: smaller and quieter than the two creative roles */
.timeline_item--compact::before {
  width: 8px;
  height: 8px;
  top: 0.5rem;
  left: 2px;
  opacity: 0.7;
}

.timeline_item--compact .timeline_role {
  font-size: var(--normal-font-size);
}

.timeline_org_inline {
  font-weight: var(--font-regular);
  opacity: 0.85;
}

.timeline_summary {
  margin-top: 0.35rem;
  font-size: var(--small-font-size);
  line-height: 1.6;
  opacity: 0.9;
}

.about_container {
  row-gap: 2.5rem;
}

.about_data {
  text-align: center;
}

.about_description {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.about_image {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 450px;
  justify-self: center;
  border-radius: 2rem;
  padding: 0.75rem;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.04);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.about_img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
}

.about_image:hover {
  border-color: var(--primary-color);
  transform: translateY(-8px);
}

/*================  SKILLS ==================*/
.skills {
  background-color: var(--body-color);
}

.skills_content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-block: 1rem;
}

.skills_card {
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: var(--background-color);
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.skills_card:hover {
  border-color: var(--primary-color);
}

.skills_title {
  margin-bottom: 1rem;
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--accent-text);
}

.skills_chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills_chip {
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background-color: var(--body-color);
  font-size: var(--small-font-size);
  line-height: 1.4;
}

/*================  PORTFOLIO ==================*/

.portfolio_container {
  row-gap: 2rem;
  justify-content: center;
  padding-block: 1rem;
}

.portfolio_filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.filter_btn {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--secondary-color);
  padding: 0.7rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.filter_btn:hover,
.filter_btn.active {
  background-color: var(--primary-color);
  color: var(--on-primary);
}

.portfolio_card.hide {
  display: none;
}

/* Project text is always visible (no hover-only content), so keyboard
   and touch users get the same information as mouse users. */
.portfolio_card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background-color: var(--body-color);
  border: 2px solid transparent;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.portfolio_card:hover,
.portfolio_card:focus-within {
  border-color: var(--primary-color);
  transform: translateY(-4px);
}

.portfolio_img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
}

.portfolio_body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem 1.5rem;
}

.portfolio_tag {
  font-size: 0.75rem;
  font-weight: var(--font-semi-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.portfolio_title {
  font-size: var(--h2-font-size);
  line-height: 1.3;
}

.portfolio_summary {
  font-size: var(--small-font-size);
  line-height: 1.6;
}

.portfolio_role {
  font-size: var(--small-font-size);
  line-height: 1.6;
  opacity: 0.9;
}

.portfolio_role strong {
  font-weight: var(--font-semi-bold);
}

.portfolio_tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portfolio_tools li {
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(127, 127, 127, 0.4);
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.portfolio_button {
  display: inline-flex;
  align-items: center;
  column-gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  color: var(--accent-text);
}

.portfolio_button:hover {
  text-decoration: underline;
}

.portfolio_button i {
  font-size: 1.25rem;
}

.portfolio_more {
  margin-top: 1rem;
  text-align: center;
  font-size: var(--small-font-size);
}

.portfolio_more a {
  color: var(--accent-text);
  text-decoration: underline;
}

/*================  Contact ==================*/
.connect {
  background-color: var(--background-color);
}

.connect_container {
  padding-top: 1rem;
}

.connect_links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2rem;
}

.connect_link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: var(--secondary-color);
  font-weight: var(--font-medium);
  overflow-wrap: anywhere;
}

.connect_link i {
  font-size: 1.4rem;
  color: var(--accent-text);
}

.connect_link:hover {
  color: var(--accent-text);
}

.contact_form,
.contact_group {
  display: grid;
  row-gap: 1rem;
}

.contact_form {
  position: relative;
}

.contact_field {
  display: grid;
  row-gap: 0.4rem;
}

.contact_label {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
}

.contact_input {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 0.5rem;
  background-color: var(--background-color);
  color: var(--secondary-color);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contact_input:hover {
  border-color: rgba(3, 181, 140, 0.55);
}

/* One clear indicator (border + soft glow) instead of border plus outline */
.contact_input:focus-visible {
  outline: none;
  border-color: var(--accent-text);
  box-shadow: 0 0 0 3px rgba(3, 181, 140, 0.25);
}

.contact_form textarea {
  height: 11rem;
  resize: vertical;
  margin-bottom: 1rem;
}

.contact_button {
  justify-self: center;
  cursor: pointer;
}

.contact_message {
  min-height: 1.5em;
  text-align: center;
  color: var(--accent-text);
  font-weight: var(--font-medium);
}

.contact_message.error {
  color: #ff6b6b;
}

body.light-theme .contact_message.error {
  color: #b42318;
}

/*================  FOOTER ==================*/
.footer {
  padding-block: 3.5rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer_container {
  row-gap: 2rem;
  text-align: center;
}

.footer_social {
  display: flex;
  justify-content: center;
  column-gap: 1.25rem;
}

.footer_social-link {
  display: flex;
  background-color: var(--primary-color);
  padding: 0.5rem;
  color: var(--on-primary);
  font-size: 1.5rem;
  border-radius: 20rem;
  transition: transform 0.4s;
}

.footer_social-link:hover {
  transform: translateY(-0.25rem);
}

.footer_copyright {
  font-size: 0.8rem;
  margin-top: 1.2rem;
}

#scrollTopBtn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background-color: var(--primary-color);
  color: var(--on-primary);
  padding: 0.6rem;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 1000;
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

#scrollTopBtn:hover {
  transform: translateY(-4px);
}

/*================  BREAKPOINTS ==================*/

/* Small phones and up */
@media screen and (min-width: 480px) {
  .about_container,
  .portfolio_container,
  .connect_container,
  .whatido_container {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
  }

  .home_data {
    padding: 0 25px;
  }

  .section_subtitle {
    padding: 0 20px;
  }
}

/* Tablets */
@media screen and (min-width: 768px) {
  .about_container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .about_data,
  .about_data :is(.section_subtitle, .section_title) {
    text-align: initial;
  }

  .about_data {
    order: 1;
  }

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

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

  /* Split row: dates on the left, content on the right, line between.
     Container padding is 1.5rem; dates column 10rem; gap 2.5rem. */
  .timeline_item {
    grid-template-columns: 10rem 1fr;
    column-gap: 2.5rem;
    padding-left: 0;
  }

  .timeline::before {
    left: calc(1.5rem + 10rem + 1.25rem - 1px);
  }

  .timeline_item::before {
    left: calc(10rem + 1.25rem - 6px);
  }

  .timeline_item--compact::before {
    left: calc(10rem + 1.25rem - 4px);
  }

  .timeline_dates {
    padding-top: 0.15rem;
    text-align: right;
  }
}

/* Phones and small tablets (navigation drawer sizes are handled above) */
@media screen and (max-width: 767px) {
  .container {
    padding-inline: 1rem;
  }

  .nav {
    height: 4.5rem;
  }

  .home {
    min-height: calc(100vh - 4.5rem);
    padding-inline: 1rem;
  }

  .home_data {
    max-width: 100%;
    padding: 0 1rem;
  }

  .home_description {
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 22rem;
    margin-inline: auto;
  }

  .portfolio_filters {
    gap: 0.75rem;
    padding-inline: 1rem;
  }

  .filter_btn {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  #scrollTopBtn {
    right: 1rem;
    bottom: 1rem;
  }

  .video_toggle {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .button {
    padding: 0.85rem 1.32rem;
    font-size: 0.95rem;
  }

  .section_subtitle {
    padding: 0 20px;
  }
}

/* Large devices */
@media screen and (min-width: 1024px) {
  .section {
    padding-block: 7rem 2rem;
  }

  .section_subtitle {
    font-size: var(--normal-font-size);
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }

  .nav_logo {
    font-size: var(--h2-font-size);
  }

  .nav_close,
  .nav_toggle {
    display: none;
  }

  .nav_menu .nav_list {
    flex-direction: row;
    align-items: center;
    column-gap: 2rem;
  }

  .nav_menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: auto;
  }

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

@media screen and (min-width: 1200px) {
  .home_description {
    margin-block: 1.5rem 2.5rem;
  }

  .about_container {
    grid-template-columns: 550px 450px;
    column-gap: 4rem;
    padding-bottom: 3rem;
  }

  .about_description {
    margin-bottom: 1.7rem;
  }

  .portfolio_container {
    row-gap: 3rem;
    padding-block: 2.5rem 4rem;
  }

  .portfolio_button {
    font-size: var(--normal-font-size);
  }

  .connect_container {
    grid-template-columns: 680px;
    padding-block: 2.5rem 2rem;
  }

  .contact_form {
    row-gap: 1.5rem;
  }

  .contact_group {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
  }

  .contact_input {
    padding: 1.25rem 1.5rem;
  }

  .contact_form textarea {
    height: 14rem;
  }

  .footer {
    padding-block: 1.5rem 1.5rem;
  }

  .footer_container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  }

  .footer_social {
    margin: 0;
    justify-self: flex-start;
  }

  .footer_copyright {
    margin: 0;
    justify-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
