/* ======================
   #GLOBAL-VARIABLES
   ====================== */
:root {
  --background-light: #ffffff;
  --text-light: #333333;
  --link-light: #007bff;
  --header-bg-light: hsla(0, 0%, 100%, 0.902);
  --border-light: #dee2e6;
  --blue-accent-light: rgba(64, 158, 255, 0.1);

  --background-dark: #1a1a1a;
  --text-dark: #e0e0e0;
  --link-dark: #64b5f6;
  --header-bg-dark: #2c2c2cdd;
  --border-dark: #444444;
  --blue-accent-dark: rgba(100, 181, 246, 0.1);

  --background-color: var(--background-light);
  --text-color: var(--text-light);
  --link-color: var(--link-light);
  --header-bg-color: var(--header-bg-light);
  --card-bg-color: var(--background-light);
  --border-color: var(--border-light);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: var(--background-dark);
    --text-color: var(--text-dark);
    --link-color: var(--link-dark);
    --header-bg-color: var(--header-bg-dark);
    --card-bg-color: var(--header-bg-dark);
    --border-color: var(--border-dark);
    --blue-accent: var(--blue-accent-dark);
  }
}

html {
  scroll-behavior: smooth;
  /* Enable smooth scrolling */
  scroll-padding-top: 70px;
  /* Offset for sticky nav height */
  height: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-feature-settings: "liga" 1, "calt" 1;
  /* fix for Chrome */
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

@supports (font-variation-settings: normal) {
  body {
    font-family: InterVariable, sans-serif;
  }
}

/* ======================
   #BASE-STYLES
   ====================== */
/* Reset & Root Variables */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================
   #TYPOGRAPHY
   ====================== */
main {
  max-width: 960px;
  /* Center content with auto side margins, remove left margin */
  margin: 2rem auto;
  padding: 0 1rem;
  /* Keep horizontal padding */
  flex-grow: 1;
}

h1,
h2 {
  color: var(--text-color);
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

/* Media Queries for Responsiveness */
@media (max-width: 767px) {
  /* Keep nav visible, maybe adjust padding/gap */
  nav {
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    padding: 0.5rem;
    font-size: 0.9rem;
    /* Smaller font on mobile nav */
  }

  main {
    /* Adjust main margin for mobile */
    margin: 1rem;
    padding: 0;
    /* Remove padding if margin handles spacing */
  }

  /* Optional: Adjust profile photo size or other elements for mobile */
  .profile-photo {
    max-width: 150px;
  }
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* ======================
   #LAYOUT
   ====================== */

.top-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.top-section p {
  margin-bottom: 2rem;
}

.lighter {
  opacity: 0.48;
}

.section-divider {
  height: 1px;
  background-color: var(--border-color);
  border: none;
  margin: 2rem auto;

  max-width: 960px;
}

.collapsible-section {
  padding: 0;
  margin-bottom: 1rem;
  border-radius: 0px;
}

.link {
  text-decoration: none !important;
  color: var(--text-color);
}

.link-section {
  padding: 0;
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-radius: 0px;
}

.collapsible-section > summary {
  list-style: none;
  cursor: pointer;

  position: relative;
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 1rem;
  margin-top: -8px;
  position: sticky;
  top: 0px;
  background: var(--background-color);
  z-index: 100;
  padding: 1rem 0rem;
  width: 100%;
}

/*
.collapsible-section > summary::before {
    content: ""; 
    display: block;
    position: absolute;
    width: calc(100% + 8rem);
    height: 100%;
    background: var(--background-color);
    z-index: 99;
    left: -4rem

}
*/
summary h1 {
  position: relative;
  display: inline-block;
  z-index: 100;
}

summary svg {
  z-index: 100;
}

summary h1::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--text-color);
  transition: width 0.3s ease;
}

summary:hover h1::after {
  width: 100%;
}

summary::-webkit-details-marker {
  display: none;
}

.collapsible-section .collapse-icon {
  transition: transform 0.2s ease;
  color: var(--text-color);
}

.collapsible-section[open] .collapse-icon {
  transform: rotate(180deg);
}

/* ======================
   #COMPONENTS
   ====================== */
/* Collapsible Sections */
.section-divider {
  display: none;
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.about-container > div {
  flex: 1;
  min-width: 300px;
}

.radial-bg {
  z-index: -1;
  height: 100%;
  width: 100%;
  position: absolute;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, transparent 60%);
}

.waving-hand {
  position: absolute;
  z-index: 2;
  width: 100px;
  height: auto;
  right: -40px;
  bottom: 26px;
  transform: scaleX(-1) rotate(-20deg);

  filter: grayscale(1) contrast(120%) brightness(120%);

}

.profile-photo-wrapper {
  overflow: visible;
  position: relative;
  float: right;
  margin-left: 5rem;
  margin-top: 2.2rem;
  margin-bottom: 8rem;
}

.profile-photo {
  z-index: 6;

  width: 200px;
  height: auto;
  object-fit: cover;
  object-position: center;

  filter: grayscale(1) contrast(120%) brightness(140%);
  /*

    border: 5px solid var(--text-color);
  border-radius: 50%;

  shape-outside: circle();
  box-shadow: rgba(128, 128, 128, 0.5) -5px 5px, rgba(128, 128, 128, 0.4) -10px 10px, rgba(128, 128, 128, 0.3) -15px 15px, rgba(128, 128, 128, 0.2) -20px 20px, rgba(128, 128, 128, 0.1) -25px 25px;
  */
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .profile-photo {
    content: url("profile-dark.webp");

  }

  .radial-bg {
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 60%
    );
  }
}

@media (max-width: 1000px) {
  .about-2 {
    max-width: 500px;
  }

  .profile-photo-wrapper {
    margin-right: 3rem;
    margin-left: 2rem;
  }
}

@media (max-width: 767px) {
  .profile-photo-wrapper {
    margin-right: 1rem;
    margin-left: 2rem;
    margin-bottom: 0rem;
    margin-top: 1.5rem;
  }

  .waving-hand {
    width: 50px;
    right: -10px;
    bottom: 26px;
  }

  .profile-photo {
    width: 7rem;
    height: auto;
  }

  .about-container > div {
    min-width: 100%;
  }
}

/* Resume Grid Layout */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-top: 1rem;
}

.resume-grid em {
  color: var(--text-color);
  opacity: 0.48;
}

.resume-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#experience {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

#experience ul,
#education ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

#experience li,
#education li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

#experience li:last-child,
#education li:last-child {
  margin-bottom: 0;

  border-bottom: 1px solid var(--border-color);
}

.resume-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#skills ul,
#tech ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

#skills li,
#tech li {
  padding: 0.3rem 0;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.5;
  opacity: 0.8;
}

#skills li::before,
#tech li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--link-color);
  font-weight: bold;
}

#skills h2,
#tech h2 {
  margin-bottom: 0.5rem;
}

.cv-download {
  padding: 1.5rem;
  border-radius: 5px;
  background: var(--header-bg-color);
  border: 1px solid var(--border-color);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--link-color);
  color: white;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.download-btn:hover {
  background: var(--text-color);
  text-decoration: none;
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .resume-grid {
    grid-template-columns: 1fr;
  }
}

/* Portfolio Grid */
.portfolio-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  /* optional spacing between columns */
}

@media (max-width: 767px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

.portfolio-item {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.portfolio-item-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-item-content p {
  opacity: 0.68;
}

.portfolio-item-links {
  display: flex;
  flex-direction: column;
}

.portfolio-item-content > div >img,

.portfolio-item-content > img,
.carousel img {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-bottom: 2rem;
}

.portfolio-item:hover {
}

.carousel {
  position: relative;
  overflow: hidden;
  margin: 0 -4rem;
  max-width: calc(100vw + 2rem);
  padding-bottom: 16px;
  margin-bottom: -16px;
}

.carousel-inner {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-item {
  padding: 0 4rem !important;
  width: 100%;
  flex-shrink: 0;
  height: auto;
  position: relative;
}

.carousel img {
  width: 100%;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}


.mobile-mockup{
    width: 250px!important;
    height: auto;
    position: absolute;
    right: 0px;
    bottom: -82px;
    border: none!important;
}

.mobile-mockup.no-carousel{
    right: -64px;
}

@media (max-width: 767px) {
    .mobile-mockup{
    right: 30px;
    bottom: -40px;

    width: 100px!important;
    }

    .mobile-mockup.no-carousel{
     right: 0px;
    }
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--text-color);
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 6rem;
  border-radius: 50%;
  width: 3rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0.48;
  transition: opacity 0.3s ease;
}

.carousel-prev {
  left: 0.5rem;
}

.carousel-next {
  right: 0.5rem;
}

.carousel-prev:hover,
.carousel-next:hover {
  opacity: 1;
}

.portfolio-item h2 {
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  padding-bottom: 0.25rem;
}

.portfolio-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.icon-inline {
  width: 1rem;
  height: 1rem;
  stroke-width: 2px;
}

/* Contact Info */
#contact {
}

#contact p {
  margin-bottom: 0.5rem;
}

.contact-inner {
  margin-top: 0.5rem;
}

.contact-info {
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-item i {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--link-color);
}

.contact-item a {
  color: var(--link-color);
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--text-color);
  text-decoration: underline;
}

/* ======================
   #UTILITIES
   ====================== */
/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  padding: 1rem;

  font-size: 0.9rem;
  color: var(--text-color);
}

.about-this-page {
  width: 100%;
  margin: 8rem auto 0;
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  background: var(--header-bg-color);
}

.about-this-page summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem;
  outline: none;
  color: var(--link-color);
  list-style: none;
}

.about-this-page summary::-webkit-details-marker {
  display: none;
}

.about-this-page summary:after {
  content: "+";
  float: right;
  transition: transform 0.2s ease;
}

.about-this-page[open] summary:after {
  content: "-";
}

.about-content {
  margin-top: 1rem;
  padding: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.about-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.about-content li {
  margin-bottom: 0.5rem;
  position: relative;
}

.about-content li:before {
  content: "→";
  position: absolute;
  left: -1.2rem;
  color: var(--link-color);
}
