/* Box Model Hack */
* {
  box-sizing: border-box;
  /* Improve touch performance on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection for content */
p, h1, h2, h3, h4, h5, h6, span, li {
  -webkit-user-select: text;
  -khtml-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Clear fix hack */
.clearfix:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

.clear {
  clear: both;
}

html {
  font-size: 62.5%;
}

html,
body {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Accounts for fixed header */
  /* Improve mobile scrolling performance */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

body {
  background-color: #04060f;
  font-family: "Satoshi 400";
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.5;
  color: rgb(208, 212, 212);
  /* Clip horizontal overflow without creating a scroll container.
     overflow-x: clip (unlike hidden) does not break position:fixed or
     vertical touch-scroll — setting it on body alone (not html) is safe. */
  overflow-x: clip;
  /* Improve text rendering on mobile */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

header,
main,
main ~ section,
footer {
  padding: 2rem;
}

h1,
.declaration {
  margin: 0;
  font-family: "GeneralSans 700";
  font-size: 3.5rem;
}

h2 {
  margin: 0;
  font-size: 2.8rem;
  font-family: "Satoshi 700";
}

h3 {
  font-family: "Satoshi 900";
  font-size: 2rem;
}

h4 {
  margin: 0;
  margin-left: 2rem;
  font-family: "Satoshi 700";
  font-size: 2.5rem;
}

.separator {
  margin-bottom: 1rem;
}

.logo {
  background: linear-gradient(
    90deg,
    rgba(24, 185, 207, 0.9) 0%,
    #6688ff 50%,
    rgba(24, 185, 207, 0.9) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "GeneralSans 700";
  font-weight: 700;
}



img {
  height: auto;
}

a {
  text-decoration: none;
}

a > img {
  width: 3rem;
}

a > img:hover {
  transform: scale(1.05);
  transition: all 0.4s ease-in-out;
}

header {
  position: sticky;
  top: 0;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid #04060f;
  background-color: #04060f;
  z-index: 100;
}

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

nav h1 {
  font-size: 2rem;
  margin: 0;
}

nav img {
  width: 55px;
  z-index: 2;
}

.nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 85vw;
  max-width: 400px;

  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;

  background: #131313;
  /* hidden: slide out AND mark invisible so no overflow contribution */
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.5s ease-in-out, visibility 0s linear 0.5s;

  z-index: 2;
}

.nav-menu.is-active {
  transform: translateX(0);
  visibility: visible;
  /* visibility becomes visible immediately; transform slides in over 0.5s */
  transition: transform 0.5s ease-in-out, visibility 0s linear 0s;
  box-shadow: -0.5rem 0 5rem 0 rgba(0, 0, 0, 0.6);
}

/* Enhanced mobile navigation link styling */
.nav-link {
  padding: 1rem 2rem;
  width: 100%;
  text-align: center;
}

.nav-link a {
  display: block;
  font-size: 1.8rem;
  padding: 1rem;
  min-height: 44px;
  line-height: 1.3;
  color: rgb(208, 212, 212);
  transition: all 0.3s ease;
}

/* Improved hamburger menu for mobile */
.hamburger {
  height: 4.4rem;
  width: 4.4rem;
  padding: 1rem;
  appearance: none;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
  z-index: 3;
  border-radius: 0.5rem;
  /* Add touch feedback */
  -webkit-tap-highlight-color: rgba(24, 185, 207, 0.2);
}

.hamburger:active {
  background: rgba(24, 185, 207, 0.1);
}

.hamburger.is-active {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: #131313;
  border-radius: 0.5rem;
}

.menu-bar {
  position: relative;
  width: 100%;
  height: 0.3rem;
}

.menu-bar,
.menu-bar::before,
.menu-bar::after {
  height: 0.3rem;
  border-radius: 0.5rem;
  background: rgba(24, 185, 207, 0.9);
  transition: all 0.5s ease-in-out;
}

.menu-bar::before {
  position: absolute;
  content: "";
  top: -1.2rem;
  right: 0;
  width: 70%;
  transition: all 0.5s ease-in-out;
}

.menu-bar::after {
  position: absolute;
  content: "";
  bottom: -1.2rem;
  right: 0;
  width: 70%;
  transition: all 0.5s ease-in-out;
}

.menu-bar.is-active {
  background: transparent;
}

.menu-bar.is-active::before {
  width: 100%;
  transform: rotate(45deg) translateX(1.5rem);
}

.menu-bar.is-active::after {
  width: 100%;
  transform: rotate(-45deg) translateX(1.5rem);
}

.nav-link a:hover {
  color: rgba(24, 185, 207, 0.9);
}

.resume-link-item:hover {
  transform: scale(1.08);
  background: transparent;
  transition: transform 0.4s ease-in-out;
}

.resume-link-item a {
  display: block;
  padding: 1.2rem 2.5rem;
  cursor: pointer;
  min-height: 44px;
}

.resume-link-item a {
  color: rgb(204, 213, 243);
}

.nav-social-links {
  padding: 3rem 0;
  width: 80%;
  display: flex;
  justify-content: space-evenly;
}

.social-links img {
  width: 4rem;
  height: 4rem;
  min-height: 44px;
  min-width: 44px;
}

.social-links img:hover {
  transform: scale(1.03);
  transition: transform 0.4s ease-in-out;
}

/************************
/* MAIN SECTION STYLING 
************************/
main {
  min-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
}

.name-highlight {
  background: linear-gradient(
    90deg,
    rgba(24, 185, 207, 0.9) 0%,
    #6688ff 50%,
    rgba(24, 185, 207, 0.9) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "GeneralSans 700";
  font-weight: 700;
}

.declaration {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.4;
  color: rgb(208, 212, 212);
}

.cta-box {
  margin-top: 4rem;
}

.cta,
.cta1 {
  font-family: "Satoshi 700";
}

.cta {
  display: inline-block;
  width: auto;
  min-width: 13rem;
  margin: 0.8rem 1rem 0.8rem 0;
  padding: 1.3rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(
    99.41deg,
    #002cc7 -39.51%,
    rgba(24, 185, 207, 0.9) 116.85%
  );

  text-align: center;
  text-decoration: none;
  color: rgb(208, 212, 212);
  /* Improve touch targets */
  min-height: 44px;
  font-size: 1.6rem;
}

.cta1 {
  text-transform: uppercase;
  font-weight: 500;
}

.cta:hover {
  transform: scale(1.05);
  transition: transform 0.4s ease-in-out;
}

.cta2,
.resume-link-item {
  position: relative;
  border-radius: 1rem;
  border-image-slice: 1;
  border-image-source: linear-gradient(
    180deg,
    rgba(24, 185, 207, 0.9) 0%,
    #3b53a8 100%
  );
  background: rgb(34, 40, 49);
}

.cta2::after,
.resume-link-item::after {
  position: absolute;
  content: "";
  top: -1.8px;
  bottom: -1.8px;
  left: -1.8px;
  right: -1.8px;
  background: linear-gradient(180deg, rgba(24, 185, 207, 0.9) 0%, #3b53a8 100%);
  z-index: -1;
  border-radius: 1.5rem;
}

.main-social-links {
  display: none;
}

/* ABOUT SECTION STYLING */
#about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem 10rem;
  text-align: justify;
}

.separator {
  position: relative;
  align-self: flex-start;
}

.separator::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: 0;
  width: 5rem;
  height: 0.5rem;
  border-radius: 3.5rem;
  background-color: rgb(31, 165, 218);
}

.about-text {
  padding-top: 1.5rem;
  line-height: 1.7;
  font-size: 1.6rem;
}

.about-text span {
  font-family: "Satoshi 700";
  color: rgb(29, 228, 255);
}

.about-text + ul {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 1rem;
}

.tool {
  width: 45%;
  margin-right: 1rem;
}

.img-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5rem;
  padding: 0.3rem;
  border-radius: 1.8rem;
  height: max-content;
  background: linear-gradient(
    99.41deg,
    #002cc7 -39.51%,
    rgba(24, 185, 207, 0.9) 116.85%
  );
}

.img-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(34, 40, 49, 0.35);
}

.profile-img {
  width: 25rem;
  max-width: 90vw;
  border-radius: 1.5rem;
  object-fit: fill;
}

/* SKILLS SECTION STYLING */
.skill {
  width: 100px;
  height: 20px;
  display: inline-block;
  text-align: center;
  line-height: 20px;
}

#skills {
  display: flex;
  flex-direction: column;
  padding: 3rem 2rem 10rem;
}

/* FEATURED PROJECTS SECTION STYLING */
/* Custom Properties for Projects */
:root {
  --primary-color: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #1d4ed8;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --bg-glass: rgba(30, 30, 46, 0.3);
  --bg-glass-light: rgba(255, 255, 255, 0.05);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --border-glass: rgba(255, 255, 255, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --transition-normal: 0.3s ease-in-out;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Container */
.container {
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: clamp(3rem, 4vw, 4.8rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.8rem;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 auto;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-xl);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* Projects Section */
.projects {
  padding: var(--space-3xl) 0;
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.project-card {
  background: var(--bg-glass);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.project-image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.project-image {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay-content {
  display: flex;
  gap: var(--space-sm);
}

.overlay-btn {
  width: 5rem;
  height: 5rem;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.overlay-btn:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

.overlay-btn svg {
  width: 2rem;
  height: 2rem;
}

.project-content {
  padding: var(--space-xl);
}

.project-category {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.4rem var(--space-sm);
  border-radius: 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.project-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.tech-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.4rem var(--space-sm);
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: var(--space-md);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-normal);
}

.project-link:hover {
  color: var(--primary-light);
}

.project-link svg {
  width: 1.6rem;
  height: 1.6rem;
}

.projects-cta {
  text-align: center;
}

/* Animation classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .project-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
  }
  
  .project-card.active .project-overlay {
    opacity: 1;
  }
}

/* CONTACT SECTION STYLING */
#contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem 10rem;
  text-align: center;
}

#contact > div {
  padding-bottom: 4rem;
}

#contact span {
  font-family: "Satoshi 500";
  font-size: 1.6rem;
  background: -webkit-linear-gradient(
    90.98deg,
    rgba(24, 185, 207, 0.9) -2.14%,
    #6688ff 103.54%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* h4 {
  margin: 1rem;
  font-family: "Satoshi 900";
  font-size: 3rem;
} */

h4 + p {
  padding: 1rem 0 2rem;
}

#contact > aside {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

/* FOOTER STYLING */
footer {
  width: 100%;
  padding: 1.2rem;
  border-top: 0.1rem solid rgb(38, 50, 67);

  font-size: 1.3rem;
  text-align: center;
  color: rgb(208, 212, 212);
}

footer span {
  background: -webkit-linear-gradient(
    90.98deg,
    rgba(24, 185, 207, 0.9) -2.14%,
    #6688ff 103.54%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-form {
  padding: 4.5rem 2.75rem;
  max-width: 35rem;
  background: rgba(38, 50, 67, 1);
  box-shadow: 0 1rem 2rem 0 rgba(27, 27, 27, 0.1);
  /* center the elements of form */

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/******************************************
/* SKILLS SECTION STYLING */
object[data*="img/c.svg"],
object[data*="img/cpp.svg"],
object[data*="img/tensorflow.svg"],
object[data*="img/pytorch.svg"],
object[data*="img/numpy.svg"],
object[data*="img/pandas.svg"],
object[data*="img/opencv.svg"] {
  width: 50px;
  height: 50px;
  display: inline-block;
  filter: invert(1);
}

.programming-languages .skill object[data*="img/c.svg"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  text-align: center;
  position: relative;
  top: -5px;
}

object[data*="img/c.svg"]:hover,
object[data*="img/cpp.svg"]:hover,
object[data*="img/tensorflow.svg"]:hover,
object[data*="img/pytorch.svg"]:hover,
object[data*="img/numpy.svg"]:hover,
object[data*="img/pandas.svg"]:hover,
object[data*="img/opencv.svg"]:hover {
  filter: invert(1) brightness(1.5);
}

object {
  width: 50px;
  height: 50px;
  display: inline-block;
}

/* TYPING ANIMATION */
.typing::after {
  content: "|";
  animation: blink 1s infinite;
  margin-left: 2px;
}

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

/* TEXT ALIGNMENT UTILITIES */
.text-justify {
  text-align: justify;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* MODERN ANIMATIONS AND INTERACTIONS */

/* Page fade-in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover effects for project cards */
.project {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Smooth hover effects for buttons */
.cta {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.cta:hover::before {
  left: 100%;
}

/* Social icons hover effects */
.social {
  transition: all 0.3s ease;
}

.social:hover {
  transform: translateY(-3px) scale(1.1);
}



/* Skills icons animation */
.skill {
  transition: transform 0.3s ease;
}

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

/* Navigation link hover effects */
.nav-link a {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: rgba(24, 185, 207, 0.9);
  transition: width 0.3s ease;
}

.nav-link a:hover::after {
  width: 100%;
}

/* Loading animation for page sections */
.section-animation {
  animation: fadeInUp 0.8s ease-out;
}

/* Gradient animation for text highlights */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.logo,
.name-highlight,
#contact span,
footer span {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

/******************************************
/* ADDITIONAL STYLES
/* MEDIA QUERIES
/*******************************************/

/* Mobile First Optimizations */
@media screen and (max-width: 480px) {
  body {
    font-size: 1.4rem;
  }
  
  header {
    padding: 1rem 1.5rem;
  }
  
  nav h1 {
    font-size: 1.8rem;
  }
  
  h1, .declaration {
    font-size: 2.8rem;
  }
  
  .declaration {
    font-size: 2rem;
    line-height: 1.5;
  }
  
  main {
    padding: 2rem 1.5rem;
  }
  
  .cta {
    width: 100%;
    max-width: 200px;
    margin: 0.5rem 0;
    padding: 1.2rem 1.5rem;
    font-size: 1.5rem;
  }
  
  .cta-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .about-text {
    font-size: 1.5rem;
    line-height: 1.6;
  }
  
  .about-text + ul {
    padding: 1.5rem 0.5rem;
    gap: 0.8rem;
  }
  
  .tool {
    width: 48%;
  }
  

  
  .nav-menu {
    width: 90vw;
    gap: 2.5rem;
  }
  
  .hamburger {
    height: 4rem;
    width: 4rem;
  }
  
  .social-links img {
    width: 3.5rem;
    height: 3.5rem;
  }
}

@media screen and (min-width: 481px) and (max-width: 719px) {
}

@media screen and (min-width: 720px) {
  body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.55rem;
  }

  header {
    width: 100%;
    padding: 0.75rem 3rem;
  }
  
  nav h1 {
    font-size: 2.2rem;
  }

  .nav-social-links {
    display: none;
  }

  main {
    min-height: 90vh;
    width: 90vw;
    justify-content: space-between;
    padding: 4rem 3rem;
  }

  main section {
    width: 47rem;
  }

  h1,
  .declaration {
    font-size: 3.5rem;
  }

  .cta,
  .cta1,
  .cta2 {
    width: fit-content;
    padding: 1.3rem 2.5rem;
    margin: 0.5rem 1.8rem 0.5rem 0;
  }

  .main-social-links,
  .contact-social-links {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
  }

  #about {
    flex-flow: row wrap;
    justify-content: space-between;
    padding: 4rem 3rem 10rem;
  }

  .separator {
    width: 100%;
  }

  #about .separator + div {
    width: 55vw;
  }



  #contact {
    margin: 3rem 0;
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
    padding: 4rem 3rem 10rem;
  }

  #contact div {
    width: 55vw;
    padding: 2.5rem;
  }
}

@media screen and (min-width: 1024px) {
  body > * {
    width: 85vw;
  }

  header {
    width: 100%;
    padding: 1rem 3.5rem;
  }

  main section {
    width: 52rem;
  }

  h1 {
    font-size: 5.5rem;
  }

  h2 {
    font-size: 3.2rem;
  }

  .declaration {
    font-size: 3.2rem;
  }

  #about .separator + div {
    width: 48vw;
  }



  .img-box {
    position: relative;
    right: 0;
    top: -7.5rem;
  }

  #contact div {
    width: 40vw;
    padding-right: 3rem;
  }
}

@media screen and (min-width: 1280px) {
  body > * {
    width: 70vw;
  }

  header {
    width: 100%;
    padding: 1rem 5.5rem;
  }

  nav {
    justify-content: space-between;
  }
  
  nav h1 {
    font-size: 2.4rem;
  }

  .nav-menu {
    justify-content: flex-end;
  }

  nav > a {
    display: block;
  }

  .nav-menu {
    position: static;
    width: 30%;
    height: auto;
    justify-self: flex-end;
    flex-direction: row;
    gap: 5.5rem;
    background: none;
    /* reset all mobile hide states */
    transform: none;
    visibility: visible;
    transition: none;
  }

  .hamburger {
    display: none;
  }

  main > section {
    width: 60rem;
  }

  main .cta2 {
    display: none;
  }

  .declaration + p {
    width: 75%;
  }

  #about .separator + div {
    width: 55%;
  }

  #contact div {
    width: 43rem;
  }
}

@media screen and (min-width: 1440px) {
  body {
    font-size: 1.6rem;
  }

  body > * {
    width: 103rem;
  }

  header,
  footer {
    width: 100%;
  }

  main > section {
    width: 65rem;
  }

  h1,
  .declaration {
    font-size: 4rem;
  }



  .cta2 {
    width: fit-content;
  }
}

/* 2026 visual refresh */
:root {
  --surface-1: rgba(16, 18, 31, 0.85);
  --surface-2: rgba(26, 30, 48, 0.75);
  --line-soft: rgba(132, 150, 189, 0.25);
  --text-main: #e8edf8;
  --text-muted: #a6b4d3;
  --brand-a: #32d2f5;
  --brand-b: #6c7dff;
}

body {
  color: var(--text-main);
  background:
    radial-gradient(90rem 40rem at 10% -10%, rgba(50, 210, 245, 0.14), transparent 60%),
    radial-gradient(80rem 40rem at 90% 0%, rgba(108, 125, 255, 0.14), transparent 55%),
    #04060f;
}

header {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(6, 9, 19, 0.75);
  backdrop-filter: blur(14px);
}

.nav-menu {
  background: linear-gradient(180deg, rgba(14, 18, 32, 0.98), rgba(9, 13, 24, 0.98));
}

main,
main ~ section {
  position: relative;
}

main::before {
  content: "";
  position: absolute;
  inset: 8% 0 auto;
  height: 32rem;
  background: linear-gradient(135deg, rgba(50, 210, 245, 0.15), rgba(108, 125, 255, 0.06));
  filter: blur(65px);
  pointer-events: none;
}

.hero-content .salutation {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(50, 210, 245, 0.45);
  border-radius: 999px;
  background: rgba(50, 210, 245, 0.1);
  color: #b7f1ff;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.hero-stats {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 1.1rem;
  background: linear-gradient(160deg, var(--surface-1), var(--surface-2));
}

.stat-card strong {
  font-family: "GeneralSans 700";
  font-size: 1.7rem;
  color: #f2f7ff;
}

.stat-card span {
  color: var(--text-muted);
  font-size: 1.3rem;
}

.cta {
  box-shadow: 0 8px 24px rgba(0, 44, 199, 0.22);
}

#about,
#skills,
#contact {
  border: 1px solid var(--line-soft);
  border-radius: 2rem;
  margin-top: 2.4rem;
  background: linear-gradient(165deg, rgba(12, 16, 30, 0.84), rgba(8, 11, 20, 0.9));
}

.projects {
  border: 1px solid var(--line-soft);
  border-radius: 2rem;
  margin-top: 2.4rem;
  background:
    linear-gradient(160deg, rgba(11, 14, 27, 0.9), rgba(8, 10, 18, 0.95));
}

.project-card {
  border: 1px solid rgba(131, 153, 199, 0.2);
}

.project-category,
.tech-tag {
  background: linear-gradient(120deg, var(--brand-b), #3ba6ff);
}

footer {
  border-top: 1px solid var(--line-soft);
  background: rgba(6, 9, 19, 0.7);
}

@media screen and (min-width: 1280px) {
  .nav-menu {
    width: auto;
    gap: 3rem;
  }
}

@media screen and (max-width: 720px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }

  #about,
  #skills,
  #contact,
  .projects {
    border-radius: 1.4rem;
  }
}

/* Research and writing sections */
.research-section,
.writing-section,
.organization-section {
  display: flex;
  flex-direction: column;
  padding: 3rem 2rem 5rem;
  border: 1px solid var(--line-soft);
  border-radius: 2rem;
  margin-top: 2.4rem;
  background: linear-gradient(165deg, rgba(12, 16, 30, 0.84), rgba(8, 11, 20, 0.9));
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.55rem;
  margin: 1.8rem 0 2.2rem;
}

.research-grid,
.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(27rem, 1fr));
  gap: 1.4rem;
}

.info-card {
  border: 1px solid var(--line-soft);
  border-radius: 1.2rem;
  background: linear-gradient(150deg, var(--surface-1), rgba(14, 18, 33, 0.9));
  padding: 1.6rem;
}

.info-card h3 {
  margin: 0.8rem 0 0.9rem;
  font-size: 1.9rem;
  color: #edf4ff;
}

.info-card p {
  margin: 0;
  color: var(--text-muted);
}

.info-card .meta {
  margin-top: 0.9rem;
  font-size: 1.35rem;
}

.info-card .meta a {
  color: #9be9ff;
  text-decoration: underline;
}

.card-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #fff;
}

.card-tag.published {
  background: linear-gradient(120deg, #0ea579, #1bc4a1);
}

.card-tag.upcoming {
  background: linear-gradient(120deg, #a56a0e, #d8922a);
}

.card-tag.source-medium {
  background: linear-gradient(120deg, #2f3548, #4a5572);
}

.card-tag.source-linkedin {
  background: linear-gradient(120deg, #0d69c7, #2095ff);
}

.card-tag.source-ieee {
  background: linear-gradient(120deg, #00629b, #1184cc);
}

.article-link {
  margin-top: 1.2rem;
  display: inline-block;
  color: #b7e7ff;
  font-family: "Satoshi 700";
}

.article-link:hover {
  color: #e1f6ff;
}

.organization-card {
  border: 1px solid var(--line-soft);
  border-radius: 1.2rem;
  background: linear-gradient(150deg, var(--surface-1), rgba(14, 18, 33, 0.9));
  overflow: hidden;
  max-width: 1024px;
  margin: 0 auto;
}

.organization-banner {
  width: auto;
  max-width: 100%;
  height: 80px;
  display: block;
  object-fit: contain;
}

/* Exact style inspired by original hub block */
.org-affil-box {
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  border-top: 2px solid #22d3ee;
}

.org-affil-logos {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.org-ies-logo-wrap {
  padding: 0.5rem 0;
  filter: drop-shadow(0 0 12px rgba(0, 98, 155, 0.4));
}

.org-affil-content {
  flex: 1;
}

.org-affil-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #22d3ee;
  font-family: "Satoshi 700";
  margin-bottom: 0.8rem;
}

.org-affil-text {
  color: var(--text-muted);
  font-size: 1.45rem;
  line-height: 1.7;
  margin: 0;
}

.org-affil-text strong {
  color: var(--text-main);
}

.org-affil-text em {
  color: #f4c15f;
  font-style: normal;
  font-weight: 600;
}

.org-affil-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.org-pill {
  font-size: 1.15rem;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  background: rgba(0, 98, 155, 0.15);
  border: 1px solid rgba(0, 98, 155, 0.35);
  color: #c4d3ec;
}

.org-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

.org-hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 0.9rem;
  font-family: "Satoshi 700";
  font-size: 1.35rem;
  color: #b7f1ff;
  border: 1px solid rgba(50, 210, 245, 0.45);
  background: rgba(50, 210, 245, 0.08);
  text-decoration: none;
  min-height: 44px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.org-hub-link:hover {
  color: #e1faff;
  border-color: rgba(50, 210, 245, 0.75);
  background: rgba(50, 210, 245, 0.14);
}

.org-affil-content .article-link {
  margin-top: 1rem;
  display: inline-block;
}

/* ── Mobile: sections must fill full viewport width ─────────────────── */
@media screen and (max-width: 719px) {
  /* Every direct child of body fills the viewport */
  body > header,
  body > main,
  body > section,
  body > footer {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .research-section,
  .writing-section,
  .organization-section {
    border-radius: 1.2rem;
    padding: 2rem 1.4rem 3.5rem;
    margin-top: 1.2rem;
  }

  /* Grids: always single-column on mobile */
  .research-grid,
  .writing-grid {
    grid-template-columns: 1fr;
  }

  /* Info cards fill container */
  .info-card {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  /* Hero stats: 1 column on very small screens */
  .hero-stats {
    grid-template-columns: 1fr;
  }

  /* Org banner stacks below 720px */
  .org-affil-box {
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.4rem;
  }

  .organization-banner {
    width: 100%;
    height: auto;
  }

  /* Article/hub link buttons fill row */
  .org-hub-links {
    flex-direction: column;
  }

  .org-hub-link {
    width: 100%;
    text-align: center;
  }
}

/* ── Tablet gap fix: 720–1023px ─────────────────────────────────────── */
/* body becomes flex at 720px but body > * only gets width at 1024px.  */
/* Without explicit width, flex children shrink to content size.       */
@media screen and (min-width: 720px) and (max-width: 1023px) {
  main,
  main ~ section {
    width: 90vw;
    box-sizing: border-box;
  }
}
