/* ===============================
   CSS Variables
=============================== */
:root {
  --primary-color: #352a29;
  --secondary-color: #fff;
  --pill-bg: rgb(255, 255, 255);
  --pill-border: #c2b7b7;
  --btn-transition: 0.45s cubic-bezier(.2,.9,.2,1);
  --btn-ease: 0.45s ease;
  --hero-padding-desktop: 16.25rem;
  --hero-padding-tablet: 6rem;
  --hero-padding-mobile: 2rem;
}

/* ===============================
   Fonts
=============================== */
@font-face { font-family:'Agrandir'; src:url('../fonts/Agrandir/Agrandir-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; }
@font-face { font-family:'Agrandir'; src:url('../fonts/Agrandir/Agrandir-GrandLight.woff2') format('woff2'); font-weight:300; font-style:normal; }
@font-face { font-family:'Agrandir'; src:url('../fonts/Agrandir/Agrandir-TextBold.woff2') format('woff2'); font-weight:700; font-style:normal; }
@font-face { font-family:'Agrandir'; src:url('../fonts/Agrandir/Agrandir-GrandHeavy.woff2') format('woff2'); font-weight:900; font-style:normal; }
@font-face { font-family:'Agrandir'; src:url('../fonts/Agrandir/Agrandir-ThinItalic.woff2') format('woff2'); font-weight:100; font-style:italic; }
@font-face { font-family:'Agrandir'; src:url('../fonts/Agrandir/Agrandir-WideBlackItalic.woff2') format('woff2'); font-weight:900; font-style:italic; }
@font-face { font-family:'Agrandir-Narrow'; src:url('../fonts/Agrandir/Agrandir-Narrow.woff2') format('woff2'); font-weight:400; font-style:normal; }
@font-face { font-family:'Agrandir-Tight'; src:url('../fonts/Agrandir/Agrandir-Tight.woff2') format('woff2'); font-weight:400; font-style:normal; }
@font-face { font-family:'Agrandir-WideLight'; src:url('../fonts/Agrandir/Agrandir-WideLight.woff2') format('woff2'); font-weight:300; font-style:normal; }

/* ===============================
   Material Symbols Rounded
=============================== */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variation-settings: 'FILL' 0, 'wght' 100, 'GRAD' 0, 'opsz' 24;
}

/* ===============================
   Global Styles
=============================== */
html { font-size:18px; scroll-behavior:smooth; }
body {
  margin:0; padding:0;
  font-family:'Agrandir',sans-serif;
  font-weight:400;
  font-style:normal;
  background-image:url('../images/background.png');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  background-attachment:fixed;
  color: var(--primary-color);
}
h1,h2,h3,h4,p { margin:0 0 1em 0; }
h1,h2,h3,h4 { font-family:'Agrandir',sans-serif; font-weight:900; }
a { color: var(--primary-color); text-decoration:none; display:inline-block; }

/* ===============================
   Sections
=============================== */

section {
  max-width: 1540px;          /* Limit the total width */
  margin-left: auto;          /* Center horizontally */
  margin-right: auto;         /* Center horizontally */
  box-sizing: border-box;     /* Make sure padding doesn’t exceed max-width */
  padding: 4rem 16rem;
}

@media (max-width: 1280px) {
  section {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 767px) {
  section {
    margin-bottom: 1rem;
    font-size: 1rem;
  }
}

/* ===============================
   Contact Badge
=============================== */
.contact-badge {
  position: fixed;
  top: 1.5rem; right: 3rem;
  width: 6.25rem; height: 6.25rem;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  line-height: 1.2;
  font-weight: 900; font-size: 1rem;
  border-radius: 100% 100% 0 100%;
  background: var(--primary-color); color: var(--secondary-color);
  transition: all 0.3s ease;
  z-index: 1001;
}

@media(max-width:1280px){
  .contact-badge { bottom: 1.5rem; top: auto; right: 1.5rem; width:5.625rem; height:5.625rem; font-size:0.95rem; }
}
@media(max-width:767px){ .contact-badge { width:5rem; height:5rem; font-size:0.9rem; } }

/* ===============================
   Header / Navigation
=============================== */
.site-header { display: none; }

/* Mobile / Tablet Header & Hamburger */
@media(max-width:1280px){
  .site-header {
    display:flex; justify-content: space-between; align-items: center;
    position: fixed; top:1.5rem; left:0; right:0; padding:0 1.5rem;
    z-index: 1002;
  }
  .site-logo img { height: 45px; }

  .site-nav .hamburger {
    display: flex;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Material Symbols Rounded';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--primary-color);
    border: none;
    background: #fff;
    position: relative;
    z-index: 1002;
  }

  /* Pseudo-element for menu/close icon */
  .site-nav .hamburger::before {
    content: "menu";
    font-family: 'Material Symbols Rounded';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
    font-size: 2.5rem;
    display: block;
    line-height: 1;
  }

  /* Nav open state */
  body.nav-open .site-nav .hamburger {
    background: var(--primary-color);
    color: var(--secondary-color);
  }
  body.nav-open .site-nav .hamburger::before {
    content: "close";
    font-family: 'Material Symbols Rounded';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
    font-size: 2.5rem;
    display: block;
    line-height: 1;
  }

  /* Mobile nav links */
  .site-nav .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--primary-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
  }

  body.nav-open .site-nav .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .site-nav .nav-links a {
    font-size: 2rem;
    color: #fff;
    text-align: center;
  }
}

/* ===============================
   Desktop Logo & Navigation
=============================== */
.site-logo-desktop {
  display: block;
  position: fixed;
  top: 1.5rem;
  left: 3rem;
  z-index: 1002;
}
.site-logo-desktop img { height: 60px; }
@media(max-width:1280px) { .site-logo-desktop { display: none; } }

.site-nav-desktop {
  display: flex;
  position: fixed;
  bottom: 1.5rem;
  right: 3rem;
  z-index: 1000;
}
.site-nav-desktop .nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
}
.site-nav-desktop .nav-links a {
  font-size: 1.1rem;
  color: var(--primary-color);
  line-height: 2rem;
}
@media(max-width:1280px) { .site-nav-desktop { display: none; } }

/* ===============================
   Hero Section
=============================== */
#hero {
  position: relative; padding:8rem var(--hero-padding-desktop) 6rem var(--hero-padding-desktop);
}
#hero h1, .hero-subheading { position: relative; z-index:2; }
#hero h1 { font-size:4.5rem; line-height:1.1; }
.hero-subheading { font-size:1.6rem; margin-bottom:2rem; }
.floating-shapes .heading-shape { position:absolute; object-fit:contain; }
.shape1 { top:20%; left:10%; width:150px; height:150px; z-index:4; }
.shape2 { top:15%; right:14%; width:150px; height:150px; z-index:0; }
.shape3 { bottom:12%; right:30%; transform:translateX(-50%); width:180px; height:180px; z-index:0; }

@media(max-width:1280px){
  #hero { padding:8rem 8rem 0rem 8rem; }
  #hero h1 { font-size:3.2rem; }
  .hero-subheading { font-size:1.4rem; }
  .shape1 { top:60%; left:auto; right:15%; }
  .shape2 { top:30%; left:auto; right:18%; width:120px; height:120px; }
  .shape3 { bottom:-18%; left:auto; right:30%; width:120px; height:120px; transform: none; }
}

@media(max-width:1024px){
  #hero { padding:10rem 8rem 0rem 10rem; }
  .shape1 { top:50%; left:auto; right:5%; }
  .shape2 { top:30%; left:auto; right:12%; }
  .shape3 { bottom:-5%; left:auto; right:20%; }
}

@media(max-width:767px){
  #hero { padding:7rem 1.5rem 0rem 1.5rem; }
  #hero h1 { font-size:2.8rem; }
  .hero-subheading { font-size:1.2rem; }
  .shape1 { display: none; }
  .shape2 { display: none; }
  .shape3 { display: none; }
}

/* ===============================
   About Section
=============================== */

#about {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  padding: 6rem var(--hero-padding-desktop);
  align-items: start;
}

#about h2 {
  grid-column: 1 / 2;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

/* Make the first paragraph drive the row height */
.first-paragraph {
  grid-column: 2 / 3;
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Image container */
.image-box {
  grid-column: 3 / 4;
  display: flex;
  align-items: flex-start; /* keep image top-aligned */
  justify-content: center;
}

/* Image scales to paragraph height */
.about-img {
  height: 250px;
  object-fit: contain;
  display: block;
}

.second-paragraph {
  grid-column: 1 / 3;
  font-size: 1.25rem;
  line-height: 1.6;
}

.third-paragraph {
  grid-column: 2 / 4;
  font-size: 1.25rem;
  line-height: 1.6;
}

@media(max-width:1280px){
  #about {
    display: grid;
    grid-template-columns: 1fr 2fr; /* image left, text right */
    grid-template-rows: repeat(4, auto); /* heading + 3 paragraphs */
    gap: 1rem;
    padding: 4rem 8rem;
    align-items: stretch; /* make rows fill height naturally */
    column-gap: 2rem; /* <— this creates space between image and text */
  }

  #about h2 { grid-column: 2 / 3; grid-row: 1 / 2; margin-bottom: 1rem; }
  .first-paragraph { grid-column: 2 / 3; grid-row: 2 / 3; }
  .second-paragraph { grid-column: 2 / 3; grid-row: 3 / 4; }
  .third-paragraph { grid-column: 2 / 3; grid-row: 4 / 5; }

  .image-box {
    grid-column: 1 / 2;
    grid-row: 1 / 5;  /* spans all rows */
    display: flex;
    justify-content: center; /* horizontal center */
    align-items: center;     /* vertical center */
    height: 100%;            /* take full grid height */
    }

  .about-img {
    max-height: 80%;  /* limit image size */
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }
}

@media(max-width:1024px){
  #about{ grid-template-columns:1fr; }
  .image-box{ display:none; }
}

@media (max-width: 767px) {
  #about {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
    padding: 1rem 1.5rem;
    align-items: center;
  }

  .image-box {
    display: flex !important; /* force it to show */
    order: -1;                 /* move above heading */
    width: 100%;
    max-width: 300px;          /* optional max size */
    margin-bottom: 1.5rem;
    justify-content: center;
    align-items: center;
  }

  .about-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }

  #about h2,
  .first-paragraph,
  .second-paragraph,
  .third-paragraph {
    width: 100%;
  }
}

/* ===============================
   Portfolio Section
=============================== */

#portfolio h2 {
  margin-bottom: 2rem; /* space between title and paragraph */
  font-size: 2.5rem;
}

#portfolio p {
  margin-bottom: 6rem; /* space between paragraph and project grid */
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Projects Grid */
.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5rem;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* Hover effects for project image */
.project-card:hover .project-img {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: scale(1.03);
}

.project-img {
  width: 50%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-content {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.project-content h2 {
  font-weight: 900;
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.4rem;
  margin-bottom: 0.8rem;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.7rem 0.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Agrandir', sans-serif;
  color: var(--primary-color);
  background-color: var(--pill-bg);
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Case study button hover */
.case-study-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: 'Agrandir', sans-serif;
  font-weight: 500;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--primary-color);
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: all var(--btn-transition);
}

.case-study-btn .arrow-left {
  display: inline-block;
  width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-4px);
  margin-right: 0;
  transition: all var(--btn-transition);
}

.case-study-btn {
  display: inline-block;
  white-space: nowrap;
}

.case-study-btn .arrow-right {
  display: inline-block;
  transition: transform var(--btn-transition);
}

.project-card:hover .case-study-btn .arrow-left {
  width: 1.1em;
  opacity: 1;
  transform: translateX(0);
  margin-right: 0.4rem;
}

.project-card:hover .case-study-btn .arrow-right {
  transform: translateX(0.4rem);
}

@media(max-width:1280px){
  #portfolio {
  padding: 8rem;
}
}

@media(max-width:1024px){
  #portfolio {
  padding: 8rem 10rem 1rem 10rem;
}
}

@media(max-width:767px){
  #portfolio {
  padding: 0rem 1.5rem 2rem 1.5rem;
}
#portfolio p {
  margin-bottom: 3rem;
}
}

/* ===============================
   Projects Responsive
=============================== */

@media (max-width: 1024px) {
  .projects {
    gap: 2rem;
  }
  .project-card {
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
  }
  .project-img,
  .project-content {
    width: 100%;
  }
  .project-content {
    gap: 1rem;
  }
   .project-content h2 {
    font-size: 1.3rem;
  }
}

/* ===============================
   Contact
=============================== */

#contact {
  margin-top: 3rem;
}

#contact h2 a{ font-size: clamp(2rem, 4vw, 2.9rem); display:inline-block; max-width:100%; word-break:break-word; white-space:normal; text-align:left; color: var(--primary-color); }

@media(max-width:1280px){ 
  #contact {
    margin: 0rem 6rem 2rem 6rem;
  }
  #contact h2 a{ font-size: clamp(1.8rem, 5vw, 2.2rem);
  }
}

@media(max-width:1024px){ 
  #contact {
    margin: 0rem 9rem 3rem 9rem;
  }
}

@media(max-width:767px){ 
  #contact {
    margin: 0rem 0rem 0rem 0rem;
  }
}

/* ===============================
  Footer
=============================== */

footer {
  max-width: 1540px;               /* cap the width same as sections */
  margin: 0 auto;                  /* center on the page */
  padding: 4rem 16rem;              /* desktop side-padding like sections */
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4rem;
  font-size: 1.1rem;
  line-height: 1.4;
  box-sizing: border-box;          /* padding stays inside max-width */
}

footer .footer-left h3{ margin:0; font-size:1.5rem; }
footer .footer-right{ display:flex; flex-direction:column; align-items:flex-start; gap:0.75rem; }
footer .footer-right p{ margin:0; width:100%; font-size:1.1rem; line-height:1.4; }
footer .footer-right p:last-child{ margin-top:1rem; }
footer a{
  display:inline-flex; align-items:center; gap:0; font-family:'Agrandir',sans-serif;
  font-weight:500; font-style:italic; font-size:1.1rem; color:var(--primary-color);
  text-decoration:none; position:relative; cursor:pointer;
  transition: all var(--btn-transition);
}
footer a .arrow-left{ display:inline-block; width:0; overflow:hidden; opacity:0; transform:translateX(-4px); margin-right:0; transition: all var(--btn-transition);}
footer a .arrow-right{ display:inline-block; transition: transform var(--btn-transition); }
footer a:hover{ transform:skewX(-10deg); }
footer a:hover .arrow-left{ width:1.1em; opacity:1; transform:translateX(0); margin-right:0.4rem; }
footer a:hover .arrow-right{ transform:translateX(0.4rem); }

/* Footer Responsive */
@media(max-width:1280px){ footer{ padding:2rem 8rem; } }
@media(max-width:1024px){ footer{ padding:2rem 11rem; } }
@media(max-width:767px){ footer{ flex-direction:column; gap:1.5rem; padding:2rem 1.5rem; } footer a{ font-size:1rem; } }

/* ===============================
   Tools Section / Marquee
=============================== */

#tools {
  text-align: center;
  margin-bottom: 1rem;
}

#tools h2 {
  font-size: 2rem;
  margin-bottom: 60px;
}

/* full-width marquee container */
.marquee-wrapper {
  position: relative;
  width: 100vw;               /* full viewport width */
  height: 140px;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
  display: flex;
  align-items: center;

  /* Fade on sides */
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
}

/* track that moves */
.marquee {
  display: flex;
  align-items: center;
  user-select: none;
  cursor: grab;
  will-change: transform;

  max-width: 1706px;     /* stop stretching beyond this width */
  width: 100%;           /* responsive on smaller screens */
  margin: 0 auto;        /* center inside wrapper */
}

/* each tool */
.tool {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  position: relative;    /* needed for label */
  transition: transform 0.2s ease;
  margin-right: 80px;
}

.tool img {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

/* hover label */
.tool-label {
  font-size: 0.8rem;
  color: black;
  opacity: 0;
  position: absolute;
  top: 100%;            /* below image */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

/* hover effect */
.tool:hover {
  transform: scale(1.1);        /* image slightly bigger */
}

.tool:hover img {
  transform: scale(1.1);        /* scale image on hover */
}

.tool:hover .tool-label {
  opacity: 1;                   /* show label */
}

/* Show all labels on screens <= 1280px */
@media (max-width: 1280px) {
  #tools {
    margin-bottom: 0rem;
  }
  .tool-label {
    opacity: 1 !important;
  }
}

@media (max-width: 767px) {
  #tools h2 {
    text-align: left;
    margin-bottom: 2rem;
  }

  #tools {
    padding: 3rem 1.5rem 6rem 1.5rem;
  }
}

/* ===============================
   Case Study Hero Image
=============================== */

.case-hero-img {
  width: 100%;        /* fill container width */
  height: 400px;      /* fixed height you want to crop to */
  object-fit: cover;   /* crop image to fit container without stretching */
  object-position: center; /* optional: centre the crop */
  display: block;
  margin-bottom: 60px;
}

/* ===============================
   Back Button
=============================== */

.back-btn {
  margin-bottom: 28px;
}

/* Hover effect */
.back-btn:hover {
  transform: skewX(10deg); /* example, same as your case-study-btn */
  transition: all var(--btn-transition);
}

/* ----------------------------
   Case Study Page
---------------------------- */

/* Layout */
.case-study__intro {
  display: flex;
  gap: 3rem;
  align-items: stretch;
}

.case-study__overview {
  flex: 2;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
}

.case-study__meta-box {
  flex: 2;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
}

.case-study__title {
  margin-bottom: 1.5rem;
}

.case-study__summary {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Role & Tools */
.case-study__meta-box h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.case-study__role ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.case-study__role ul li {
  margin-bottom: 0.5rem;
}

.case-study__problem,
.case-study__goals,
.case-study__process,
.case-study__outcome {
  margin: 0 auto;
  padding: 4rem 0rem; /* adjust as needed */
}

.case-study__tools {
  display: flex;
  flex-direction: row; /* stack tools vertically */
  align-items: flex-start; /* align all tools to the left of the container */
  gap: 1rem; /* spacing between tools */
}

.cs-tool {
  display: flex;
  flex-direction: column;
  align-items: center; /* center image + label inside each tool */
  position: relative;
  margin-top: 0.4rem;
}

.cs-tool img {
  width: 48px;
  height: 48px;
  margin-bottom: 0.6rem;
}

.cs-tool .cs-tool-label {
  font-size: 0.8rem;
}