/* --------------------------------------- */
/* ----- Basic Setup ----- */
/* --------------------------------------- */

/* Using Google Fonts instead of local fonts */
/* Inter for body text and Poppins for headings */

* {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

:root {
    --font-size-small: 1.8rem;
    --font-size-normal: 2.2rem;
    --font-size-medium: 2.8rem;
    --font-size-medium-1: 3.6rem;
    --font-size-large: 5.5rem;
    --font-size-huge: 7.5rem;
    --font-stack: 'Inter', sans-serif;

    --line-height-normal: 1.7;
    --line-height-small: 1.2;

    /* Original Color Palette */
    --black: #000;
    --pink: #00205B;
    --white: #f0e9f2;
    --white-1: #e5e5e6da;

    /* Gradients using original colors */
    --gradient-primary: linear-gradient(135deg, #00205B 0%, #003366 100%);
    --gradient-secondary: linear-gradient(135deg, #00205B 0%, #004080 100%);
    --gradient-dark: linear-gradient(135deg, #000 0%, #1a1a1a 100%);

    --container-max-width: 1180px;
    --container-normal-width: 800px;
    --container-medium-width: 700px; 
    --container-small-width: 500px;

    --gutter-huge: 12rem;
    --gutter-medium: 6rem;
    --gutter-normal: 3rem;
    --gutter-small-1: 2.5rem;
    --gutter-small: 2rem;

    --border-light: 1px solid rgba(255, 255, 255, 0.1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
    font-size: 62.5%; /* (16/10)*100 = 62.5% => 1rem = 10px */
    box-sizing: border-box;
    scroll-behavior: smooth;
}

@media(max-width: 1000px) {
    html {
        font-size: 52%;
    }
}

body {
    font-size: var(--font-size-small);
    font-family: var(--font-stack);
    font-weight: 400;
    color: var(--white-1);
    line-height: var(--line-height-normal);
    background: var(--black);
    overflow-x: hidden;
    min-height: 100vh;
}

.row {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

@media(max-width: 1340px) {
    .row {
        max-width: 1100px;
    }
}

@media(max-width: 1240px) {
    .row {
        padding: 0 var(--gutter-medium);
    }
}

@media(max-width: 600px) {
    .row {
        padding: 0 var(--gutter-normal);
    }
}

@media(max-width: 600px) {
    .row {
        padding: 0 var(--gutter-small);
    }
}

section {
    padding: var(--gutter-huge) 0;
    border-bottom: var(--border-light);
}



img {
    object-fit: contain;
    max-width: 100%;
}

/* --------------------------------------- */
/* ----- Headlines and Paragraphs ----- */
/* --------------------------------------- */

h1,
h2,
h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: var(--line-height-small);
    color: var(--white);
}

.heading-primary {
    line-height: 1;
    font-size: var(--font-size-huge);
    font-weight: 700;
    color: var(--white);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

@media(max-width: 900px) {
    .heading-primary {
        font-size: 6.5rem;
    }
}

h2 {
    font-size: var(--font-size-large);
    margin-bottom: var(--gutter-medium);
}

h2::after {
    content: '';
    display: block;
    height: 2px;
    width: 10rem;
    background: var(--pink);
    margin: var(--gutter-small) 0;
}

h3 {
    font-size: var(--font-size-medium-1);
    margin-bottom: var(--gutter-small);
}

@media(max-width: 500px) {
    .heading-primary {
        font-size: var(--font-size-large);
    }

    h2 {
        font-size: var(--font-size-medium-1);
    }

    h3 {
        font-size: var(--font-size-medium);
    }
}

p {
    margin: var(--gutter-small-1) 0;
}

@media(max-width: 900px) {
    p { 
        max-width: var(--container-small-width);
    }
}

/* --------------------------------------- */
/* ----- Buttons and Links ----- */
/* --------------------------------------- */

a {
    color: var(--white);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    transition: all .2s;
    outline: 2px solid transparent;
}

::-moz-focus-inner {
    border: 0;
}

button:focus,
a:focus {
    outline: 2px solid var(--pink);
}

body:not(.user-is-tabbing) button:focus,
body:not(.user-is-tabbing) a:focus {
    outline: none;
}

.link:hover {
    color: var(--pink);
}

.btn {
    position: relative;
    display: inline-block;
    padding: 1.2rem 4.5rem;
    text-decoration: none;
    color: inherit;
    border: 2px solid var(--pink);
    font-weight: 600;
    font-size: 1.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 15px rgba(0, 32, 91, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn:focus {
    outline: none;
}

.btn::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.btn:hover::after,
.btn:focus::after {
    right: 0;
    background: var(--pink);
}

.btn--pink {
    background: var(--pink);
    transition: all 0.2s;
}

.btn--pink::after {
    display: none;
}

.btn--pink:hover,
.btn--pink:focus {
    background: transparent;
}

.btn--small {
    padding: 0.8rem 2rem;
    font-size: 1.6rem;
}

.link__text {
    position: relative;
    display: inline-block;
    padding: .6rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--pink);
}

.link__text::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.link__text:focus {
    outline: none;
}

.link__text:hover::after,
.link__text:focus:after {
    right: 0;
    background: var(--pink);
}

.link__text span {
    padding-left: 1rem;
    font-family: sans-serif;
}

/* ----- Back to Top ----- */

.back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5.5rem;
    width: 5.5rem;
    background-color: var(--pink);
    border-radius: 50%;
    z-index: 10;
    visibility: hidden;
    transition: all .4s;
}

.back-to-top__image {
    height: 70%;
}

@media(max-width: 900px) {
    .back-to-top {
        right: 2rem;
    }
}

@media(max-width: 500px) {
    .back-to-top {
        right: 1rem;
    }
}

/* --------------------------------------- */
/* ----- Navigation ----- */
/* --------------------------------------- */

.nav {
    display: flex;
    justify-content: flex-end;
    padding: var(--gutter-normal) 0;
}

.nav__items {
    display: flex;
    list-style: none;
}

.nav__item:not(:last-child) {
    margin-right: var(--gutter-medium);
}

@media(max-width: 500px) {
    .nav {
        justify-content: center;
    }
}

@media(max-width: 400px) {
    .nav__item:not(:last-child) {
        margin-right: var(--gutter-normal);
    }
}

@media(max-width: 300px) {
    .nav {
        font-size: var(--font-size-small);
    }
}

.nav__link {
    position: relative;
    display: inline-block;
    padding: 1rem 0;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 100%;
    display: inline-block;
    height: 1rem;
    background: var(--white);
    transition: all 0.25s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.nav__link:hover {
    color: var(--pink);
}

.nav__link:hover::after {
    right: 0;
    height: 2px;
    background: var(--pink);
}

/* --------------------------------------- */
/* ----- Header ----- */
/* --------------------------------------- */

.header {
    background: linear-gradient(rgba(0,0,0, .1), rgba(0,0,0, .4)), 
        url('images/header.jpeg');
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-size: var(--font-size-normal);
}

.header__text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.header__text p {
    margin: 1.5rem 0 3.5rem;
    max-width: var(--container-medium-width);
    font-family: 'Inter', sans-serif;
    font-size: var(--font-size-medium);
    font-weight: 500;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
}

@media(max-width: 500px) {
    .header {
        text-align: center;
    }

    .header__text p {
        transform: scale(.8);
    }
}

/* Header content layout with image */
.header__content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1600px;
    /*flex-direction: row-reverse;*/
}

.header__image-container {
    flex-shrink: 0;
}

.header__profile-image {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.header__profile-image:hover {
    transform: scale(1.05);
}

.header__text-content {
    flex: 1;
    background: rgba(0, 0, 0, 0.05);
    padding: 3rem;
    border-radius: 15px;
    backdrop-filter: blur(0.51px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive design for header */
@media(max-width: 768px) {
    .header__content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .header__profile-image {
        width: 200px;
        height: 200px;
    }
}

@media(max-width: 500px) {
    .header__profile-image {
        width: 160px;
        height: 160px;
    }
}

/* Header Social Media Icons */
.header__social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: flex-start;
}

.header__social-link {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.header__social-link:hover {
    transform: translateY(-3px);
    opacity: 1;
}

.header__social-image {
    width: 2.4rem;
    height: 2.4rem;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.header__social-link:hover .header__social-image {
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

/* Responsive design for header social icons */
@media(max-width: 768px) {
    .header__social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
}

@media(max-width: 500px) {
    .header__social-links {
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .header__social-image {
        width: 2rem;
        height: 2rem;
    }
}

/* --------------------------------------- */
/* ----- Projects ----- */
/* --------------------------------------- */

.projects__box {
    display: flex;
    align-items: center;
}

.projects__box:hover {
    transform: translateY(-2px);
}

@media(max-width: 900px) {
    .projects__box {
        align-items: initial;
        flex-direction: column-reverse;
    }
}

.projects__box:not(:last-child) {
    margin-bottom: 7.5rem;
}




.projects__links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.projects__text {
    flex: 0 0 30%;
}

.projects__list {
    /* list-style-type: square; */
    list-style-position: inside;
    margin-bottom: var(--gutter-normal);
}

.projects__code {
    display: block;
    height: 3rem;
    margin-left: var(--gutter-normal);
    transition: all .3s;
}

.projects__code:hover {
    transform: scale(1.2);
}

.projects__image-box {
    margin-bottom: var(--gutter-normal);
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.projects__image {
    width: 100%;
    max-width: 500px;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.projects__image:hover {
    transform: scale(1.02);
}
.projects__button-container {
  text-align: center;
  margin: 1rem 0 1rem 0;  /* top right bottom left */
}


@media(min-width: 901px) {
    .projects__image-box {
        flex: 1;
        margin: 0 0 0 10rem;
    }
}

@media(max-width: 900px) {
    .projects__code {
        height: 4rem;
    }
}


/* --------------------------------------- */
/* ----- Experience ----- */
/* --------------------------------------- */

.experience__content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.experience__item {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.experience__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 32, 91, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--pink);
}

.experience__header h3 {
    color: var(--white);
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 10px rgba(88, 122, 185, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #1199c2, #1199c2, #1199c2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.2) contrast(1.1);
}

.experience__date {
    background: var(--pink);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 1.4rem;
    font-weight: 500;
}

.experience__company {
    font-size: 2rem;
    color: #1199c1;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 0 8px rgba(78, 205, 196, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    filter: brightness(1.1);
}

.experience__description {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--white-1);
}

.experience__skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.experience__skills li {
    background: rgba(0, 32, 91, 0.3);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 1.4rem;
    border: 1px solid rgba(0, 32, 91, 0.5);
}

@media(max-width: 768px) {
    .experience__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .experience__header h3 {
        font-size: 2.4rem;
    }
    
    .experience__company {
        font-size: 1.8rem;
    }
    
    .experience__skills {
        gap: 0.8rem;
    }
    
    .experience__skills li {
        font-size: 1.3rem;
        padding: 0.4rem 1.2rem;
    }
}

/* Featured Experience Styling */
.experience__item--featured {
    border: 2px solid var(--pink);
    background: linear-gradient(135deg, rgba(0, 32, 91, 0.05) 0%, rgba(0, 51, 102, 0.05) 100%);
    position: relative;
}

.experience__item--featured::before {
    content: "🌟";
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 2rem;
    background: var(--black);
    padding: 0 10px;
}

.experience__highlight {
    margin: 1rem 0;
    text-align: center;
}

.experience__highlight-text {
    background: linear-gradient(135deg, var(--pink) 0%, #003366 100%);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Experience Content Layout */
.experience__content-wrapper {
    display: flex;
    gap: var(--gutter-medium);
    align-items: flex-start;
    margin: var(--gutter-small) 0;
}

.experience__text-content {
    flex: 2;
    min-width: 0;
}

.experience__slideshow {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    text-align: center;
    position: sticky;
    top: 20px;
}

.slideshow-container {
    position: relative;
    margin: auto;
    max-width: 350px;
}

.slide {
    display: none;
    animation-name: fade;
    animation-duration: 1.5s;
}

.slide.active {
    display: block;
}

.slideshow-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    border: 2px solid rgba(0, 32, 91, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slideshow-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--pink);
}

.slideshow-caption {
    font-size: 1.4rem;
    color: var(--white-1);
    text-align: center;
    font-style: italic;
    margin-top: 0.5rem;
}

.slideshow-dots {
    text-align: center;
    margin-top: 1rem;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: rgba(0, 32, 91, 0.3);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.dot.active,
.dot:hover {
    background-color: var(--pink);
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

@media(max-width: 768px) {
    .experience__content-wrapper {
        flex-direction: column;
        gap: var(--gutter-small);
    }
    
    .experience__text-content {
        flex: none;
        width: 100%;
    }
    
    .experience__slideshow {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        position: static;
    }
    
    .slideshow-container {
        max-width: 250px;
    }
}

/* --------------------------------------- */
/* ----- Clients ----- */
/* --------------------------------------- */
.client__logos-wrapper {
    width: 100%;
    overflow: hidden;
    padding: var(--gutter-normal) 0;
}

.client__logos {
    display: flex;
    gap: 4rem;
    animation: scroll-logos 25s linear infinite;
    width: max-content;
    align-items: center;
}

.client__logo {
    height: 8rem;
    max-width: 20rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.client__logo:hover {
    transform: scale(1.1);
}

@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* --------------------------------------- */
/* ----- About ----- */
/* --------------------------------------- */

.about__content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4rem;
  margin-top: 3rem;
}

.about__text {
  flex: 2;
  min-width: 0;
}

.about__text p {
  font-size: 1.8rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  color: var(--white-1);
}

.about__photo-container {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.about__photo {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  object-fit: cover;
}

.about__photo:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}


/* Responsive design for About section */
@media(max-width: 900px) {
    .about__content {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
        text-align: center;
    }
    
    .about__text {
        flex: 1;
        min-width: 0;
    }
    
    .about__text p {
        font-size: 1.7rem;
    }
    
    .about__photo-container {
        flex: 1;
        min-width: 0;
    }
    
    .about__photo {
        max-width: 240px;
    }
}

@media(max-width: 600px) {
    .about__content {
        gap: 2rem;
    }
    
    .about__text p {
        font-size: 1.6rem;
    }
    
    .about__photo {
        max-width: 200px;
    }
}

/* --------------------------------------- */
/* ----- Contact ----- */
/* --------------------------------------- */

.contact__info {
    max-width: var(--container-medium-width);
}

/* --------------------------------------- */
/* ----- Footer ----- */
/* --------------------------------------- */

.footer {
    text-align: center;
    padding: var(--gutter-medium) 0 var(--gutter-normal);
}

.footer__social-links {
    display: flex;
    justify-content: center;
    padding: var(--gutter-normal) 0;
    list-style: none;
}

.footer__social-link-item:not(:last-of-type) {
    margin-right: var(--gutter-small);
}

.footer__social-image {
    height: 4rem;
}

.footer__github-buttons {
    display: flex;
    justify-content: center;
}

.footer__github-buttons iframe {
    height: 2.5rem;
    width: 84px;
    transform: translateY(3px);
}

@media(max-width: 500px) {
    .footer {
        padding: var(--gutter-medium) 0;
    } 
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4rem;
  padding-top: 2rem;
}

.project-card {
  background-color: #111;
  border: 1px solid var(--pink);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 2.4rem;
  margin: 1rem 0 0.5rem;
}

.project-card p {
  font-size: 1.8rem;
  color: var(--white-1);
}

.project-card ul {
  list-style-type: square;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.project-card .btn {
  margin-right: 1rem;
  margin-top: 1rem;
}

.project-card .work__links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
/* === Home Projects: turn into a responsive grid === */
.projects__boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
}

/* Each project becomes a vertical card */
.projects__box {
  display: flex;
  flex-direction: column-reverse; /* keep your text first in DOM, image on top visually */
  align-items: stretch;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.projects__box:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* remove big stacked spacing from the old list layout */
.projects__box:not(:last-child) {
  margin-bottom: 0;
}

/* tighten inner pieces for a card look */
.projects__text {
  flex: none;
  padding-top: 1rem;
}
.projects__image-box {
  flex: none;
  margin: 0 0 1.2rem 0;
  justify-content: center;
}

/* consistent thumbnail look */
.projects__image {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  max-height: none;
}

/* links row inside each card */
.projects__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* list spacing inside card */
.projects__list {
  margin-bottom: 1.2rem;
}

/* the "View All Projects →" button centered under the grid */
.projects__button-container {
  grid-column: 1 / -1; /* full-width row */
  text-align: center;
  margin: 0.5rem 0 0 0;
}

/* === Emphasize the "View All Projects" button === */
.projects__button-container .btn {
  font-size: 2rem;
  font-weight: 700;
  padding: 1.6rem 4.8rem;
  border-radius: 50px;
  background: var(--gradient-primary);
  border: none;
  box-shadow: 0 6px 18px rgba(0, 32, 91, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.projects__button-container .btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 28px rgba(0, 32, 91, 0.6);
}

/* Make sure it's centered */
.projects__button-container {
  text-align: center;
  margin-top: 3rem;
}

/* --- Home projects: force image first + uniform thumbnail height --- */
.projects__boxes .projects__box {
  display: flex !important;
  flex-direction: column !important;   /* stack vertically */
  margin: 0 !important;
}

.projects__boxes .projects__image-box { 
  order: 0;                            /* image always first */
  margin: 0 0 1.2rem 0 !important;     /* small gap under image */
}

.projects__boxes .projects__text { 
  order: 1;
  margin-top: 0 !important;
}

/* Make every thumbnail exactly the same height */
.projects__boxes .projects__image {
  display: block;
  width: 100%;
  height: 200px;                       /* <-- adjust if you want taller/shorter */
  object-fit: cover;                    /* crop to fill the box */
  border-radius: 10px;
  max-height: none !important;
  aspect-ratio: auto !important;        /* ignore any previous aspect-ratio */
}

/* Kill legacy desktop offset that pushed images down */
@media (min-width: 901px) {
  .projects__boxes .projects__image-box { margin: 0 !important; }
}

.projects__text p {
  min-height: 60px; /* ensures rows line up */
}
h2 {
  font-size: clamp(2.4rem, 3vw, 3.6rem);
  text-align: center;
  margin-bottom: 4rem;
}
h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  margin: 1rem auto 0;
  background: var(--pink);
}
.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.heading-primary {
  font-size: clamp(3rem, 6vw, 7.5rem);
}
p {
  font-size: clamp(1.6rem, 1.8vw, 1.8rem);
}
.footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 1.4rem;
  color: rgba(255,255,255,0.6);
}
#projects {
  padding-top: var(--gutter-medium);  /* instead of 12rem */
}
section {
  padding: var(--gutter-medium) 0; /* ~6rem instead of 12rem */
}
/* === Fix buttons on projects.html cards === */
.project-card .work__links {
  display: flex;
  align-items: center;      /* vertical align */
  gap: 0.8rem;              /* even spacing */
  margin-top: 1.2rem;       /* consistent top space */
}

.project-card .work__links .btn {
  display: inline-flex;     /* fix baseline shifts */
  align-items: center;
  justify-content: center;
  height: 40px;             /* same height for all */
  padding: 0 18px;          /* same horizontal padding */
  line-height: 1;           /* no text offset */
  border-radius: 999px;     /* consistent pill */
  margin: 0;                /* override older margins */
}

/* Remove old per-button margins in project cards */
.project-card .btn {
  margin: 0 !important;     /* overrides rules earlier in index.css */
}

/* Projects page grid fix */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  grid-auto-rows: auto;           /* let rows size to content */
  align-items: start;             /* align cards to the top */
}

/* Ensure cards shrink-wrap to content */
.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-grid {
  column-count: 3;      /* auto-fit 2 or 3 based on screen */
  column-gap: 2rem;
}

.project-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 2rem;
}
/* --- Masonry layout for projects.html --- */
.project-grid {
  column-count: 3;          /* desktop */
  column-gap: 2rem;
}

@media (max-width: 1100px) {
  .project-grid { column-count: 2; }   /* tablet */
}
@media (max-width: 640px) {
  .project-grid { column-count: 1; }   /* mobile */
}

/* Cards must be inline-block and avoid breaking across columns */
.project-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 2rem;
  break-inside: avoid;
}

/* Keep thumbnails tidy in masonry */
.project-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* ===== Resources section ===== */
.resources {
  /* keeps section spacing consistent with your site */
  padding: var(--gutter-huge) 0;
  border-bottom: var(--border-light);
}

.resource-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.resource-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.resource-card__header h3 {
  margin: 0;
}

/* Responsive PDF iframe using aspect-ratio */
.pdf-embed {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #111;            /* fallback while loading */
  border: 1px solid rgba(255,255,255,0.08);
  /* 16:9 default height; tweak if you want taller */
  aspect-ratio: 16 / 9;
}

.pdf-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Description text spacing */
.resource-card__desc {
  margin-top: 1rem;
  color: var(--white-2);
}

/* If you want taller PDF on large screens */
@media (min-width: 900px) {
  .pdf-embed { aspect-ratio: 3 / 2; }  /* slightly taller */
}

/* === Notes-site header tweaks (put at the END of this file) === */

/* 1) Use your header.png and make the header a banner (not full-screen) */
.header {
  /* replace old image */
  background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.55)), url('header.png') center / cover no-repeat;
  height: clamp(240px, 42vh, 420px);  /* nice banner height */
}

/* mobile browsers hate fixed backgrounds */
@media (max-width: 1024px) {
  .header { background-attachment: scroll; }
}

/* 2) Make the text-box sit nicely on the banner */
.header__text-box {
  position: relative;
  top: auto;
  transform: none;
  padding: 1.5rem 0 0;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.header__text-box h1 { margin-bottom: .6rem; }
.header__text-box p { margin-top: .6rem; }

/* quick links under the title */
.header__text-box ul {
  display: inline-flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: .6rem 0 0;
}
.header__text-box ul a {
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
}

/* 3) Smooth anchor jump stops *below* the banner (nice UX) */
#ece241, #mat291 {
  scroll-margin-top: 140px;  /* adjust if you change header height */
}

/* 4) Note cards – a touch more breathing room */
.note-card { 
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 2rem;
}
.note-card h3 { margin: 0 0 .8rem; }

/* 5) PDF embeds – responsive & tidy (reuses your .pdf-embed pattern) */
.note-card iframe {
  width: 100%;
  height: min(66vh, 560px);
  border: 0;
  border-radius: 10px;
}

/* 6) Buttons – match your primary style & align perfectly */
.btn.btn--primary.btn--small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  line-height: 1;
}

.disclaimer {
  background-color: rgba(255,255,255,0.04);;
  border-top: 1px solid rgba(255,255,255,0.04);;
  padding: 1rem 0;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #fff;
}

.disclaimer p {
  margin: 0;
  line-height: 1.4;
}

.nav {
  display: flex;
  justify-content: space-between; /* brand left, links right */
  align-items: center;            /* vertical centering */
}

.nav__brand {
  margin-right: auto;             /* pushes links to the right */
  font-weight: 700;
  letter-spacing: .2px;
}

.nav__brand a {
  text-decoration: none;
  color: inherit;
}
