/* -------------------------------
  KEYBOARD ACCESSIBILITY FOCUS
-------------------------------- */
a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
  border-radius: 8px;
}


/* -------------------------------
  GLOBAL STYLES
-------------------------------- */

:root{
  --font-color1: #6b5342;
  --font-color2: #ECE4DF;
  --font-color3: #6d173be6;
  --button-color: #6B8C6E;
  --button-effect-color: #d4ded5;
  --secondary-color: #7C5F6BE6;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #dcd9d6 ;
}

body::before {
  content: "";
  position: fixed;
  left: .5rem;
  bottom: .5rem;
  width: 500px;
  height: 500px;
  background: url("./imgs/Coding\ Witch\ Logo.svg") no-repeat center / contain;
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

hr{
  background-color: var(--font-color1);
  height: .25rem;
  width: 80%;
  border-radius: 15px;
  margin: 1.75rem auto;
}

/* -------------------------------
  HEADERS
-------------------------------- */
.site-title {
  font-family: "Gruppo", serif;
  text-align: center;
  font-size: clamp(2.25rem, 3vw, 5rem);
  margin-top: 20px;
  color: var(--font-color3);
  letter-spacing: 2px;
}

h3{
  text-align: center;
  color: var(--font-color1);
  font-family: 'Gruppo', sans-serif;
  font-size: clamp(2rem, 2.5vw, 4.5rem);
}

h4{
  text-align: center;
  color: var(--font-color1);
  font-family: 'Gruppo', sans-serif;
  font-size: clamp(1.5rem, 1.5vw, 3.5rem);
}

/* -------------------------------
  NAVIGATION BAR
-------------------------------- */
#navbar {
  padding: .25rem 0;
  border-radius: 8px;
  width: 80%;
  margin: 0 auto;
  margin-bottom: 1rem;
  background-color: var(--secondary-color);
}
#navbar ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px 0;
  margin: 0;
  gap: 2rem;
}

#navbar li a {
  text-decoration: none;
  color: var(--font-color2);
  font-weight: bolder;
  padding: 8px 12px;
  transition: all 0.3s ease;
}

#navbar li a:hover, #navbar li a:focus {
  background-color: var(--button-effect-color);
  color: black;
  border-radius: 6px;
  text-decoration: underline;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* -------------------------------
  INTRO SECTION (Image + Text)
-------------------------------- */
.intro {
  display: flex;
  gap: 30px;
  align-items: center;     
  padding: 20px 40px;
  max-width: 900px;
  margin: 0 auto;
  background-color: white;
  color: black;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex-wrap: nowrap;
  line-height: 1.5rem;
}

.intro img {
  flex: 0 0 220px;             /* fixed image column */
  width: 275px;
  height: auto;
  border-radius: 8px;
}

.about-text {
  flex: 1;                     /* text column fills remaining space */
}

.bold{
  font-weight: 600;
}

.social-links {
  margin-top: 2rem;
  display: flex;
  gap: 8px;                    /* spacing between icons */
}


.social-link-svg {
  width: 32px;
  height: 32px;
  display: inline-block;
  vertical-align: middle;
  transition: color .2s ease;
  color: #111; /* base color */
}

/* Fill-based icons (LinkedIn) */
.icon--fill { fill: currentColor; }

/* Stroke-based icons (GitHub outline) */
.icon--stroke {
  fill: none;
  stroke: currentColor;
}

/* Nice brand-y hovers (optional) */
.social-link[aria-label="LinkedIn"] 
.social-link-svg:hover { color: #0a66c2; }
.social-link[aria-label="GitHub"]   
.social-link-svg:hover { color: #680af5; }


/* -------------------------------
  PROJECT SECTION
-------------------------------- */
/* container for all projects */

.section-description {
  text-align: center;
  color: var(--font-color3);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}


.projects {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(375px, 1fr));
}


/* each project card */
.project-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.title{
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--font-color3);
}


.project-button {
  margin: 0 auto;
  padding: 6px 12px;
  background-color: var(--button-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  box-shadow: 2px 4px 6px grey;
  transition: background-color 0.3s ease;
}

.project-button:hover, .project-button:focus {
  background-color: var(--button-effect-color);
  color: black;
  outline: none;
  transform: translateY(-5px);
}

.img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.img-wrapper > img:not(.mobile-img){
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  transition: opacity 0.5s ease-in;
}

.mobile-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease-in;
  object-fit: cover;
  border-radius: 8px;
}

.img-wrapper:hover .mobile-img,
.img-wrapper:focus-within .mobile-img, 
.img-wrapper:focus-visible .mobile-img {
  opacity: 1;
}

.img-wrapper:focus-visible{
  outline: 3px solid var(--button-color);
  outline-offset: 4px;
  border-radius: 8px;
}

.img-wrapper:hover img:not(.mobile-img) {
  opacity: 0;
}

.fig-cap, .video-caption {
  text-align: center;
  font-style: italic;
}

/* -------------------------------
  QUOTE SECTION
-------------------------------- */

#quote{
  color: var(--font-color2);
  text-align: center;
  font-family: "Gruppo", sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 2.5vw, 2rem);
  line-height: 1.5;
  margin: 5rem;
  background-color: var(--secondary-color);
  border-radius: 8px;
  padding: .15rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);

}

/* -------------------------------
  CASE STUDY SECTION
-------------------------------- */

.case-wrapper{
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.case{
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* -------------------------------
  FORM SECTION
-------------------------------- */
form {
  border-radius: 20px;
  padding: 20px;
  max-width: 600px;
  margin: 40px auto;
  background-color: white;
  box-shadow: 4px 8px 12px rgba(0, 0, 0, 0.1);
  text-align: center;

}

.form-wrap{
  display: flex;
  margin-bottom: 1rem;
  gap: .5rem;
}


form input,
form textarea {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
  width: 80%;
  max-width: 400px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  font-family: Arial, sans-serif;
}

#contact p{
  color: var(--font-color1);
  text-align: center;
  font-size: 1.5rem;
}

#contact button{
  background-color: var(--button-color);
  color: white;
  font-weight: bold;
  padding: 1rem;
  border-radius: 8px;
  border: none;
  box-shadow: 2px 4px 6px grey;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

#contact button:hover, #contact button:focus{
    transform: translateY(-5px);
    background-color:var(--button-effect-color);
    color: black;
    outline: none;
    cursor: pointer;
}

#form-success{
  border-radius: 20px;
  padding: 20px;
  max-width: 600px;
  margin: 40px auto;
  background-color: white;
  box-shadow: 4px 8px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}
/* -------------------------------
  FOOTER SECTION
-------------------------------- */
footer {
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9rem;
  color: var(--font-color3);
}

footer p{
  font-size: 1rem;
}

/* -------------------------------
  BACK TO TOP BUTTON
-------------------------------- */
.back-to-top{
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
  border-radius: 8px;
  padding: 8px;
  background-color: var(--secondary-color);
  color: var(--font-color2);
  letter-spacing: 2px;
  font-weight: bolder;
  text-decoration: none;
  box-shadow: 2px 2px 5px rgb(134, 133, 133);
}

.back-to-top:focus-visible, .back-to-top:hover { 
  background-color: var(--font-color3);
  color: white;
  border-radius: 6px;
  text-decoration: underline;
  box-shadow: 2px 2px 8px rgba(48, 48, 48, 0.3);
}

/* -------------------------------
  MEDIA
-------------------------------- */
@media (max-width: 600px) {
  .project-image img { height: 200px; }
  .badge { top: 8px; right: 8px; font-size: 0.8rem; padding: 3px 8px; }
  .intro { flex-direction: column; margin: 12px; padding: 16px;}
  .intro img {margin: 0 auto;}
  #navbar {width: 95%;}
  #quote {margin: 2rem 1rem;}
}

@media screen and (max-width:1200px) {
  .intro {margin: 12px;}
  #contact  {margin: 12px}
  form {margin: 12px auto;}
}