/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  color: #000000;
  background: #FFFFFF;
  --bg-color: #ffffff;
  --text-color: #333333;
  /* Navigation variables */
  --nav-bg-color: rgba(255, 255, 255, 0.5);
  --nav-shadow-color-strong: rgba(255, 255, 255, 0.7);
  --nav-shadow-color: rgba(255, 255, 255, 0.3);
  
  /* Color palette */
  --color-white: #FFFFFF;
  --color-offwhite: #f1efef;
  --color-black: #000000;
  --color-dark-gray: #333333;
  --color-medium-gray: #757575;
  --color-light-gray: #aeafb8;
  --color-light-gray-alt: #a0a0a0;
  --color-subtle-gray: #81838d;
  --color-dark-gray-alt: #454545;
  --color-focus-blue: #0078d4;
  --color-orange: #d77c00;
  --color-pink: #ed1e79;
  --color-green: #60b360;
  --color-green-bright: rgb(70, 223, 70);
  
  /* Background colors */
  --bg-dark-gray: #222222;
  --bg-semi-black: rgba(51, 51, 51, 0.15);
  --bg-semi-black-hover: rgba(51, 51, 51, 0.25);
  --bg-semi-black-light: rgba(0, 0, 0, 0.07);
  --bg-semi-black-ultra-light: rgba(0, 0, 0, 0.05);
  --bg-semi-black-medium: rgba(0, 0, 0, 0.1);
  --bg-semi-black-dark: rgba(0, 0, 0, 0.3);
  --bg-semi-light-gray: rgba(210, 210, 210, 0.7);
  --bg-light-gray: rgba(240, 240, 240, 0.8);
  --bg-light-gray-soft: rgba(240, 240, 240, 0.5);
  --bg-semi-light-white: rgba(255, 255, 255, 0.7);
  --bg-medium-gray: #e2e2e2;
}

/* Dark theme variables */
:root.dark-theme {
  color: #FFFFFF;
  background: #222222;
  --bg-color: #1a1a1a;
  --text-color: #f0f0f0;
  /* Navigation variables */
  --nav-bg-color: rgba(30, 30, 30, 0.7);
  --nav-shadow-color-strong: rgba(34, 34, 34, 0.7);
  --nav-shadow-color: rgba(34, 34, 34, 0.5);
  
  /* Color palette */
  --color-white: #222222;
  --color-offwhite: #333333;
  --color-black: #FFFFFF;
  --color-dark-gray: #aeafb8; /* Was light-gray in light theme */
  --color-medium-gray: #81838d; /* Was subtle-gray in light theme */
  --color-light-gray: #606060; /* Was dark-gray in light theme */
  --color-light-gray-alt: #454545; /* Was dark-gray-alt in light theme */
  --color-subtle-gray: #757575; /* Was medium-gray in light theme */
  --color-dark-gray-alt: #a0a0a0; /* Was light-gray-alt in light theme */
  --color-focus-blue: #4a9eff;
  --color-orange: #ff9d33;
  --color-pink: #ff66b3;
  --color-green: #80d080;
  --color-green-bright: rgb(100, 255, 100);
  
  /* Background colors */
   --bg-dark-gray: #F1F1F1;
  --bg-semi-black: rgba(255, 255, 255, 0.1);
  --bg-semi-black-hover: rgba(255, 255, 255, 0.15);
  --bg-semi-black-light: rgba(255, 255, 255, 0.2);
  --bg-semi-black-ultra-light: rgba(255, 255, 255, 0.2);
  --bg-semi-black-medium: rgba(255, 255, 255, 0.08);
  --bg-semi-black-dark: rgba(34, 34, 34, 0.5);
  --bg-semi-light-gray: rgba(60, 60, 60, 0.7);
  --bg-light-gray: rgba(40, 40, 40, 0.8);
  --bg-light-gray-soft: rgba(40, 40, 40, 0.4);
  --bg-semi-light-white: rgba(30, 30, 30, 0.7);
  --bg-medium-gray: #353535;

    #contact::after {
        background-image: url('../img/me-studio-dark.jpg');
    }
}



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

/* High contrast focus outline */
/* :focus {
  outline: 2px solid var(--color-focus-blue);
  outline-offset: 2px;
} */

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: Onest, Arial, sans-serif;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#section1 {
  height: auto; /* Allows the section to expand to fit content */
  padding: 20vh 0; /* Optional: adds spacing above and below the content */
}

#section2 {
  height: 175vh; /* Makes the work section taller for laptop */
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 {
  font-size: 3.5rem;
  font-weight: 300;
}

h2 {
  font-weight: 200;
  font-size: 3rem;
  line-height: 3.6rem;
  letter-spacing: -1px;
  margin-bottom: 10vh;
  text-align: left;
}

p {
  font-weight: 300;
  text-align: left;
  margin-bottom: 1rem;
  line-height: 1.6rem;
}

a {
  text-decoration: none;
  color: var(--color-dark-gray);
  transition: all 0.2s ease-in-out; /* Smooth animation */
}

a:hover {
  color: var(--color-medium-gray) !important;
}

a:visited {
  color: var(--color-dark-gray);
}

/* ========================================
   PRELOADER
   ======================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Ensure it stays above everything else */
  opacity: 1;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  visibility: visible;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Loader Logo Animation */
#loader-logo {
  animation: zoomEffect 3s infinite; /* Apply zoom effect */
}

@keyframes zoomEffect {
  0% {
    transform: scale(0.5); /* Slightly zoomed in */
    opacity: 1; /* Fully visible */
  }
  50% {
    transform: scale(0.4);
    opacity: 1; /* Fully visible */
  }
  70% {
    transform: scale(0.3); /* Normal size */
    opacity: 0; /* Fully visible */
  }
  100% {
    transform: scale(0.3); /* Normal size */
    opacity: 0; /* Fully visible */
  }
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */
/* Container for max width */
.container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Keeps space between items */
  /*max-width: 1440px;*/
  width: 100%;
  padding: 0 96px;
  margin: 0 auto; /* Center the container within the viewport */
}

.tweakpane-container {
  /*padding-top: 16px; /* Optional: Adjust alignment with nav */
  position: relative; /* Positions the pane within the container */
  margin-left: auto;
}

/* ========================================
   SIDE PANEL
   ======================================== */
/* Side Panel Styling */
#side-panel {
  position: fixed;
  top: 0;
  right: -315px; /* Initially hidden to the right */
  width: 315px;
  height: 100%;
  background-color: var(--bg-light-gray-soft); /* Light background for contrast */
  box-shadow: -2px 0 32px rgba(0, 0, 0, 0); /* Shadow for depth */
  transition: all 0.5s cubic-bezier(1, 0, 0.42, 0.77); /* Easing effect */
  z-index: 1000; /* Ensure it appears over other content */
  display: flex;
  flex-direction: column;
}

/* Toggle Button Styling */
#toggle-panel-button {
  position: fixed;
  right: 24px;
  /*left: -52px;; /* Docked to the panel */
  /*top: 8px;*/
  bottom: 24px;
  margin-top: 12px;
  width: 40px;
  height: 40px;
  background-color: var(--bg-semi-black);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 20px; /* Rounded edges for a tab look */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 1rem;
  opacity: 1;
  padding: 15px 12px;
  transition: all 0.5s cubic-bezier(1, 0, 0.42, 0.77);
}

#toggle-panel-button:hover {
  background-color: var(--bg-semi-black-hover);
}

#toggle-panel-button.hidden {
  /*left: -0px; /* Move out of view */
  opacity: 0; /* Optionally, fade it out */
  transition: all 0.3s ease;
}

/* Bars within the toggle button */
#toggle-panel-button .bar {
  height: 1px;
  width: 100%;
  background-color: var(--color-dark-gray);
  transition: all 0.3s ease-in-out; /* Smooth animation */
}

/* Circles within the toggle button */
.cir {
  margin-top: -2px;
  display: block;
  height: 5px;
  width: 5px;
  background-color: var(--color-light-gray);
  border: 1px solid var(--color-dark-gray);
  border-radius: 50%;
  transition: opacity 0.3s ease-in-out;
}

.bar:nth-of-type(1) .cir {
  margin-left: 3px;
}

.bar:nth-of-type(2) .cir {
  margin-left: 8px !important;
}

/* Animation for transforming into "X" */
#toggle-panel-button.x {
  background-color: var(--color-black);
  /*left: -20px; /* Docked to the panel */
  right: 294px
}

.bar.x:nth-of-type(1) {
  transform: rotate(45deg);
  transform-origin: top left;
  width: 13.5px !important;
  margin-left: 4px;
  background-color: var(--color-white) !important;
}

.bar.x:nth-of-type(2) {
  transform: rotate(-45deg);
  transform-origin: bottom left;
  width: 13.5px !important;
  margin-left: 4px;
  background-color: var(--color-white) !important;
}

.bar.x:nth-of-type(1) .cir {
  opacity: 0;
}

.bar.x:nth-of-type(2) .cir {
  opacity: 0;
}

/* Open state */
#side-panel.open {
  right: 0; /* Slide in */
  /*box-shadow: 12px 0 32px rgba(0, 0, 0, 0.3) inset;*/
  background-color: var(--color-offwhite);
  overflow-y: auto;
}

#side-panel.hidden {
  right: -315px; /* Move out of view */
  opacity: 0; /* Optional: fade out for smooth transition */
  transition: right 0.4s ease, opacity 0.4s ease;
}

/* ========================================
   NAVIGATION
   ======================================== */
/* Set the logo container to center the SVG vertically */
.logo img {
  width: auto;
  height: 1.1em; /* Adjust to match the previous text size */
  vertical-align: middle; /* Aligns it with the baseline */
  transition: all 0.2s ease;
}

.logo img:hover {
  filter: brightness(200%);
  cursor: pointer;
  opacity: 1;
}

/* SIMPLE STICKY NAV */
/*nav {
  position: fixed;
  top: 0;
  width: calc(100% - 192px);
  margin: 0 96px;
  padding: 24px 0;
  z-index: 10;
  transition: border-bottom 0.3s ease-in-out;
}*/

/* LIQUID GLASS NAV OVERRIDES */
nav {
  position: fixed;
  top: 16px;
  left: 88px;
  right: 88px;
  height: 70px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-sizing: border-box;
  border-radius: 16px;
  border: 1px solid var(--bg-semi-black-light);
  z-index: 10;
  /*transition: all 0.3s ease-in-out;*/
}

nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: 16px;
  -webkit-box-shadow: inset 2px 2px 0px -2px var(--nav-shadow-color-strong), inset 0 0 10px 10px var(--nav-shadow-color), inset 0 0 3px 1px var(--nav-shadow-color-strong);
  box-shadow: inset 2px 2px 0px -2px var(--nav-shadow-color-strong), inset 0 0 10px 10px var(--nav-shadow-color), inset 0 0 3px 1px var(--nav-shadow-color-strong);
  background-color: var(--nav-bg-color); /* Increased background tint */
  transition: all 0.2s ease-in-out;
}

nav::after {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  border-radius: 16px;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(6px);
  -webkit-filter: url(#nav-glass);
  filter: url(#nav-glass);
  overflow: hidden;
  isolation: isolate;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  max-width: none;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  height: 24px;
}

nav .logo a {
  text-decoration: none;
  color: var(--color-black);
}

nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  margin-left: auto;
}

nav ul li {
  margin-left: 48px;
}

nav ul li a {
  position: relative;
  color: var(--color-black);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

nav ul li a.active {
  font-weight: 600;
  color: var(--highlight-color, var(--color-black)); /* Optional: Add a highlight color */
}

/* ========================================
   LINKEDIN ICON
   ======================================== */

/* Style the link containing the icon */
nav ul li:last-child a {
  text-decoration: none; 
  transition: color 0.3s ease;
}

/* Style the SVG icon itself */
.linkedin-icon {
  width: 1.2em; 
  height: 1.2em;
  vertical-align: middle;
  fill: currentColor;
  transition: all 0.2s ease;
}

/* Add a hover effect to the icon link */
nav ul li:last-child a:hover {
  color: var(--highlight-color, #0077b5); /* Falls back to LinkedIn blue if variable isn't set */
}

nav ul li:last-child a:hover .linkedin-icon {
  filter: brightness(1.1);
}

/* ========================================
   HAMBURGER MENU
   ======================================== */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.hamburger-line {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-black);
  border-radius: 2px;
  transition: all 0.3s ease;
}


/* ROW UNDER NAV */
.content {
    width: 100%;
}

.hellorow {
    position: relative;
    top: 100px;
    color: var(--color-light-gray);
    font-weight: 300;
    letter-spacing: 1px;
    font-size: small;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.greeting {
    flex: 0 0 auto;
}

.location-time {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.location {
    margin-right: 5px;
}

.time-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-icon {
    font-size: 1.2em;
}

/* ========================================
   THEME TOGGLE
   ======================================== */

/* Theme Toggle Styles */
.theme-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
}

.theme-toggle .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-light-gray);
    transition: background-color 0.3s ease;
    border-radius: 22px;
}

.theme-toggle .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--color-white);
    transition: transform 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* When dark theme is active */
/*:root.dark-theme .theme-toggle .toggle-slider {
    background-color: var(--color-medium-gray);
}*/

:root.dark-theme .theme-toggle .toggle-slider:before {
    transform: translateX(18px);
}

/* Theme transition overlay */
.theme-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 9999;
    transition: background-color 0.4s ease;
}

.theme-transition-overlay.active {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Add transition to all elements for smooth theme change */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Exclude certain elements from transition for better performance */
canvas, .theme-transition-overlay, video, iframe, nav, .nav-menu {
    transition: none !important;
}


/* ========================================
   HERO SECTION
   ======================================== */
#hero {
  background-color: var(--color-white);
  color: var(--color-white);
  /*margin-top: -80px; /* Adjust based on your nav height */
}

.content {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* ========================================
   INTRO SECTION
   ======================================== */
.hello {
  font-size: 4.5rem;
  margin-bottom: 7px;
  /*margin-left: -20px;*/
  font-weight: 700;
  /*background-color: rgba(240, 240, 240, 0.8);*/
  /*box-shadow: 16px 0 0 rgba(240, 240, 240, 0.8), -16px 0 0 rgba(240, 240, 240, 0.8);*/
  /*box-decoration-break: clone;*/
  width: fit-content;
  line-height: 6.5rem;
}

/*.hello::after {
  display: inline-block;
  content: '';
  background-image: url("../img/certificate-solid.svg");
  width: 52px;
  height: 52px;
  background-repeat: no-repeat;
  margin-left: 12px;
  fill: #333333;
}*/

.intro {
  color: var(--color-dark-gray);
  max-width: 75vw;
  text-align: left;
  line-height: 3.5rem;
  letter-spacing: -2px;
  /*margin-top: -20vh;*/
  min-height: 300px;
}

.intro h1 {
  display: inline;
  font-weight: 300;
  font-size: max(4vmax, 3.5rem);
  line-height: 4vmax;
  /*font-size: 4rem;*/
  padding: 0px 0em;
  /*background-color: rgba(240, 240, 240, 0.8);/*
  /*box-shadow: 16px 0 0 rgba(240, 240, 240, 0.8), -16px 0 0 rgba(240, 240, 240, 0.8);/*
  /*box-decoration-break: clone;*/
}

@keyframes gradientSlide {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 50% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

#animated-text {
  /*display: inline-block;*/
  font-weight: 700;
  background: linear-gradient(90deg, var(--color-orange), var(--color-pink)); /* Adjust colors */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
}

.arr {
  width: 80px;
  height: 20px;
  margin: -32px 0 32px;
  background-image: url(../img/arr.svg);
  background-repeat: no-repeat;
}

.description-block {
  display: flex;
  align-items: flex-start; /* Aligns icon and text to the top */
  gap: 3.5rem; /* Space between icon and text */
  margin-bottom: 15vh; /* Adds space between each description block */
}

.blck-l {
  margin-left: 35vw;
}

.blck-r {
  margin-right: 35vw;
}

.about-icon {
  width: 96px;
  height: 96px;
  background-repeat: no-repeat;
  background-size: cover; /* Ensures the SVG covers the container */
  flex-shrink: 0; /* Prevents icon from shrinking if text grows */
  background: var(--bg-semi-black-ultra-light);
  backdrop-filter: blur(6px);
  border-radius: 50%;
}

.pro {
  background-image: url("../img/process-1.svg");
}

.now {
  background-image: url("../img/process-2.svg");
}

.fou {
  background-image: url("../img/process-3.svg");
}

.text {
  font-size: 0.9rem;
  line-height: 1.5rem;
  display: flex;
  flex-direction: column; /* Stacks paragraphs vertically */
}

.sect-underscore {
  display: block;
  width: 50px;
  height: 1px;
  background-color: var(--color-light-gray-alt);
  margin: -50px 0 50px 0;
}

.footer-link {
  text-align: left;
  margin-top: 2em;
  background: var(--bg-semi-light-white);
  padding: 0.8em 2.2em;
  border: 1px solid var(--color-light-gray);
  border-radius: 2em;
  width: fit-content;
  transition: all 0.3s ease-in-out;
}

.footer-link:hover {
  cursor: pointer;
  background: var(--bg-light-gray);
}

/* ========================================
   CTA BUTTON
   ======================================== */
.cta-link {
  text-decoration: none; /* Remove underline from the link */
}

.cta-button {
  position: fixed;
  bottom: 15vh; /* Position from bottom within the section */
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-dark-gray);
  color: var(--color-white);
  padding: 12px 24px;
  font-size: 16px;
  border: 4px solid var(--color-white);
  border-radius: 32px;
  box-shadow: 0px 3px 5px 0px rgba(0,0,0,0);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  z-index: 10;
  opacity: 1;
}

.cta-button:hover {
  background-color: var(--color-black);
  margin-top: -10px;
  box-shadow: 0px 10px 24px 0px var(--bg-semi-black-dark);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
#contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /*background-color: #f9f9f9; */
  position: relative;
}

#contact .content {
  flex: 1;
  z-index: 1;
  margin-left: 50%;
  max-width: 50%;
}

#contact::after {
  content: "";
  position: absolute;
  top: 15%;
  left: 96px;
  width: 35%;
  min-width: 300px;
  height: 75%;
  background-image: url('../img/me-studio-white.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 24px;
  /* box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 15px 25px -3px rgb(255 0 50 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.2); */
  z-index: 0
}

.subhead {
  color: var(--color-subtle-gray);
  text-align: left;
  font-size: 0.9rem;
  margin-bottom: 1em;
}

.subhead:before {
  content: ''; /* Ensures the pseudo-element renders */
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-green);
  border-radius: 50%; /* Circular shape */
  margin-right: 14px;
  margin-bottom: 3px;
  vertical-align: middle; /* Align dot vertically with text */
}

.subhead:after {
  content: ''; /* Ensures the pseudo-element renders */
  display: inline-block; /* Allows width and height to take effect */
  width: 16px; /* Initial size of the pulse background */
  height: 16px;
  margin-top: 9px;
  background-color: var(--color-green-bright);
  opacity: 0.5; /* Semi-transparent background */
  border-radius: 50%; /* Circular shape */
  position: absolute;
  left: 2px;
  transform: translate(-6px, -50%); /* Center the pulse behind the dot */
  z-index: 1; /* Ensures it's behind the dot */
  animation: pulse 2.5s infinite; /* Apply the pulse animation */
}

.subr {
  text-align: left;
  font-size: 1.5em;
  margin-bottom: 24px;
  max-width: 550px;
  font-weight: 200;
}

.cta-email {
  font-size: clamp(16px, 3.5vw, 50px);
  font-weight: 600;
  letter-spacing: -1px;
}

/* Keyframes for the smooth oscillating pulse */
@keyframes pulse {
  0%, 100% {
    transform: translate(-6px, -50%) scale(1); /* Start and end at normal size */
    opacity: 0.2;
  }
  50% {
    transform: translate(-6px, -50%) scale(1.8); /* Max size at mid-point */
    opacity: 0.05;
  }
}

.console-underscore {
  display: inline-block;
  width: 3px;
  background-color: var(--color-dark-gray);
  vertical-align: top;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
/* MAX HEIGHT */
@media (max-height: 650px) {
  .intro {
    line-height: 3.4rem !important;
    margin-top: 35vh;
  }

  .intro h1 {
    font-size: 3rem !important; /* Adjust font size for shallow viewports */
  }
}

@media (max-height: 460px) {
  .intro {
    line-height: 2.8rem !important;
  }

  .intro h1 {
    font-size: 2.4rem !important; /* Adjust font size for shallow viewports */
  }

  h2 {
    font-size: 2.2rem;
    line-height: 2.8rem;
    margin-bottom: 5vh;
  }

  .logo img {
    height: 1.2rem;
  }

  nav {
    padding: 16px;
  }
}

/* Large displays */
@media only screen and (min-width: 1640px) {
  .blck-l {
    margin-left: 50vw;
  }

  .blck-r {
    margin-right: 50vw;
  }
}

/* Small Laptop */
@media (max-width: 1100px) {
  .container {
    padding: 0 48px;
  }

  nav {
    left: 44px;
    right: 44px;
  }

  #contact::after {
    left: 48px;
  }
}

/* TABLET */
@media (max-width: 768px) {
  
  .intro h1 {
    font-size: 3.4rem;
  }

  .intro {
    line-height: 3.8rem;
  }

  h2 {
    font-size: 2.4rem;
    line-height: 2.8rem;
    margin-bottom: 5vh;
  }

  .container {
    padding: 0 24px;
  }

  nav {
    left: 24px;
    right: 24px;
  }

  nav .container {
    padding: 0;
  }

  p {
    font-size: 1rem;
  }

  #section1 {
    padding: 0;
  }

  #section1 .container {
    padding: 25% 48px 0 48px;
  }

  #section2 .container {
    padding: 0 48px 0 48px;
  }

  #contact .container {
    padding: 0 48px 0 48px;
  }

  #contact {
    padding: 0;
  }

  #contact > .h2 {
    font-size: 1.8rem;
  }

  #contact::after {
    width: 60%;
    height: 35%;
    box-shadow: inset 0px 54px 36px -36px rgba(0,0,0,0.1);
    background-position-x: left;
    border: none;
  }

  #contact .content {
    max-width: 100%;
    margin-left: 0;
  }

  .cta-email {
    font-size: 5.5vw;
  }

  /* grid gap */
  .grid {
    gap: 0.3rem !important;
  }

  .column img {
    border-radius: 4px !important;
  }

  .column {
    gap: 0.3rem !important;
  }

  .description-block {
    gap: 1.5rem;
    margin-bottom: 5vh;
  }

  .about-icon {
    width: 56px;
    height: 56px;
    background-size: cover;
  }

  .blck-l {
    margin-left: 0%;
  }

  .blck-r {
    margin-right: 0%;
  }

  .contact-stuff {
    position: relative;
    margin-top: 320px;
  }

  .contact-stuff h2 {
    margin-left: 20px;
  }

  .subhead:before {
    margin-left: 0px;
  }

  .subhead:after {
    margin-left: 0px;
  }
}

/* iPad Portrait */
@media only screen
  and (min-device-width: 768px)
  and (max-device-width: 1024px)
  and (orientation: portrait)
  and (-webkit-min-device-pixel-ratio: 1) {
  .container {
    padding: 0 48px;
  }

  .intro {
    max-width: 100vw;
  }

  #section2 {
    height: 100vh;
  }

  .blck-l {
    margin-left: 25vw;
  }

  .blck-r {
    margin-right: 25vw;
  }
}

@media only screen
  and (min-device-width: 834px)
  and (max-device-width: 834px)
  and (orientation: portrait)
  and (-webkit-min-device-pixel-ratio: 2) {
  nav {
    width: calc(100% - 96px);
    margin: 0 48px;
  }

  .container {
    padding: 0 48px;
  }

  .intro {
    max-width: 100vw;
  }

  #section2 {
    height: 100vh;
  }

  .blck-l {
    margin-left: 15vw;
  }

  .blck-r {
    margin-right: 15vw;
  }

  #contact::after {
    top:55%;
    width: 100%;
    height: 45%;
    box-shadow: inset 0px 54px 36px -36px rgba(0,0,0,0.1);
    background-position-x: left;
    background-image: url('../img/me-office.jpg');
    border: none;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .intro h1 {
    font-size: 2.5rem;
  }

  /*#heroCanvas {
    display: none;
  }*/

  h2 {
    font-size: 1.8rem;
    line-height: 2.4rem;
    margin-bottom: 5vh;
  }

  .intro {
    line-height: 2.4rem !important;
    max-width: 100vw;
    height: 300px;
  }

  .container {
    padding: 0 24px 0 24px;
  }

  #toggle-panel-button {
    /*display: none;*/
    bottom: 24px;
    position: fixed;
  }

  nav {
    left: 16px;
    right: 16px;
    padding: 0 16px;
  }
  
  /* Show hamburger menu */
  .hamburger {
    display: flex;
  }
  
  /* Hide navigation menu by default */
  .nav-menu {
    position: fixed;
    top: 80px;
    left: 12px;
    right: 12px;
    background-color: var(--nav-bg-color);
    backdrop-filter: blur(6px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important; 
    z-index: 100;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  /* Show navigation menu when active */
  .nav-menu.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Ensure mobile navigation is visible on mobile devices */
@media (max-width: 768px) {
    .nav-menu {
        display: flex !important;
    }
}
  
  /* Reset margin for mobile menu items */
  .nav-menu li {
    margin: 0;
    margin-bottom: 1.5rem;
  }
  
  .nav-menu li:last-child {
    margin-bottom: 0;
  }
  
  /* Animate hamburger to X when active */
  .hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  nav .container {
    padding: 0;
  }

  /*nav ul li {
    margin-left: 28px;
  }

  nav ul li a {
    font-size: 1rem;
  }*/

  nav .logo {
    font-size: 1.2rem;
  }

  .location {
    display: none;
  }

  #section1 .container {
    padding: 35% 24px 0 24px;
  }

  #section2 .container {
    padding: 0 24px 0 24px;
  }

  #section2 {
    height: 100vh;
  }

  #contact .container {
    padding: 0 24px;
  }

  #contact::after {
    left: 24px;
    min-width: 0;
    width: calc(100% - 48px);
  }
}

/* XXS */
@media (max-width: 350px) {
  nav ul {
    flex-direction: column;
  }

  nav ul li {
    padding: 6px 0;
    text-align: end;
  }
}