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

html,
body {
  background-color: #0f172a;
  min-height: 100%;
  /* 添加图片优化 */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

body {
  overflow-x: hidden;
}

/* 图片优化 */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
  /* 添加更多优化 */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  will-change: transform;
}

/* 关键图片预加载 */
.critical-image {
  loading: eager;
}

/* 背景图片优化 - 已禁用，使用纯色背景 */
/* 
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    background-size: cover;
  }
}

预加载关键图片
.preload-bg {
  background-image: url("../images/background.jpg");
  background-size: 1px 1px;
  background-repeat: no-repeat;
  position: absolute;
  top: -9999px;
  left: -9999px;
}
*/

::selection {
  background-color: #ffeb55;
  color: black;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 2rem;
}

.portfolio,
.previous-role {
  scroll-margin-top: 100px;
}

.client-experience,
.contact {
  scroll-margin-top: 150px;
}

h1,
h2 {
  font-family: "Libre Baskerville", serif;
}

p,
.nav-links li {
  font-family: "Poppins", sans-serif;
}

/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 1200px;
  margin-inline: auto;
  padding-top: 2rem;
  padding: 2rem 2rem;
}

.logo img {
  width: 3rem;
  margin-left: -0.5rem;
  position: relative;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: translateY(-3px);
}

.logo a {
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.toggle {
  display: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  position: relative;
  top: -8px;
}

.nav-links {
  display: flex;
  list-style: none;
  position: relative;
  gap: 3rem;
}

.nav-links a {
  font-weight: 600;
  color: white;
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background-color: white;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: white;
  text-align: center;
  position: relative;
  overflow: visible;
}

/* Glass Card Styles */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(161, 161, 161, 0.3);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin: 0 auto;
  max-width: 850px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 400px;
  overflow: visible;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}

.role-title {
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.2;
  letter-spacing: 0.1em;
}

.card-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-16%);
}

.main-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1.15;
  margin: 0;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  position: relative;
}

.card-footer .description {
  font-size: 0.9rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.7);
  max-width: 48%;
  margin: 0;
  text-align: left;
  margin-left: auto;
  transform: translateX(8px);
  font-family: 'Montserrat';
}

.developer-label {
  font-size: clamp(2.7rem, 6.5vw, 4rem);
  font-weight: 700;
  color: #000000;
  background: #ffeb56;
  padding: 8px 10px;
  position: absolute;
  bottom: 0;
  left: 0;
  animation: slideInFromLeft 1s ease-out;
}

@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Hero Shapes */
.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.shape {
  position: absolute;
  opacity: 0.7;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
  animation: float 6s ease-in-out infinite;
}

.shape-cube {
  width: 130px;
  height: auto;
  top: 45%;
  left: 10%;
  animation-delay: 0s;
  transform: rotate(15deg);
}

.shape-cylinder {
  width: 130px;
  height: auto;
  top: 63%;
  right: 12%;
  animation-delay: 2s;
  transform: rotate(-10deg);
}

.shape-sphere {
  width: 130px;
  height: auto;
  top: 17%;
  right: 10%;
  animation-delay: 4s;
  transform: rotate(25deg);
}

.shape-bubble1 {
  width: 900px;
  height: auto;
  top: 5%;
  left: -50%;
  animation-delay: 1s;
  transform: rotate(-5deg);
  transition: all 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
  opacity: 0.6;
}

.shape-bubble2 {
  width: 1080px;
  height: auto;
  top: 80%;
  right: -50%;
  animation-delay: 3s;
  transform: rotate(10deg);
  transition: all 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
  opacity: 0.6;
}

.shape-bubble1:hover {
  transform: rotate(-5deg) scale(1.2);
  opacity: 1;
  animation-play-state: paused;
}

.shape-bubble2:hover {
  transform: rotate(10deg) scale(1.15);
  opacity: 1;
  animation-play-state: paused;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(var(--rotation, 0deg));
  }
  50% {
    transform: translateY(-20px) rotate(var(--rotation, 0deg));
  }
}

.shape-cube {
  --rotation: 15deg;
}

.shape-cylinder {
  --rotation: -10deg;
}

.shape-sphere {
  --rotation: 25deg;
}

.shape-bubble1 {
  --rotation: -5deg;
}

.shape-bubble2 {
  --rotation: 10deg;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .shape {
    opacity: 0.5;
  }

  .shape-cube {
    width: 79px;
    height: auto;
    top: 40%;
    left: 8%;
  }

  .shape-cylinder {
    width: 85px;
    height: auto;
    top: 70%;
    right: 10%;
  }

  .shape-sphere {
    width: 85px;
    height: auto;
    top: 20%;
    right: 15%;
  }

  .shape-bubble1 {
    width: 630px;
    height: auto;
    top: 8%;
    left: -60%;
  }

  .shape-bubble2 {
    width: 720px;
    height: auto;
    top: 85%;
    right: -60%;
  }

  /* Glass Card - Mobile optimizations */
  .glass-card {
    padding: 1.8rem 1.2rem;
    margin: 0 0.8rem;
    max-width: calc(100% - 1.6rem);
    min-height: 320px;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  .card-header {
    margin-bottom: 1.2rem;
  }

  .role-title {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
  }

  .main-title {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }

  .card-footer {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  .card-footer .description {
    max-width: 100%;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    transform: translateX(0px);
  }

  .developer-label {
    position: static;
    font-size: clamp(2.025rem, 10.8vw, 3.375rem);
    background: #ffeb56;
    color: #000000;
    padding: 0 10px;
    transform: translateX(0px);
    animation: slideInFromLeft 1s ease-out;
  }
}

.portfolio h2,
.previous-role h2,
.client-experience h2,
.contact h2,
.table-of-content h2 {
  color: white;
  font-size: 2rem;
  text-align: left;
  font-weight: bold;
}

.portfolio p,
.previous-role p,
.client-experience p,
.contact p,
.table-of-content p {
  font-size: 1.2rem;
  color: #8297bd;
  margin: 1rem 0;
  display: block;
}

.table-of-content p {
  color: #d3d3d3;
}

/* Detail page specific styles - override global p width */
.portfolio-detail p {
  width: 100% !important;
  margin: 0 !important;
}

.dashed-line {
  border-top: 1.5px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.portfolio-link,
.portfolio-text h3 {
  text-decoration: none;
}

.portfolio-item {
  pointer-events: auto; /* 确保点击事件没有被禁用 */
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

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

#branding .image-container {
  overflow: hidden;
  flex-shrink: 0;
  height: 300px;
}

#branding .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#branding .portfolio-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#branding .portfolio-item p {
  font-size: 0.95rem;
  color: #ced4da;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  text-align: left;
}

#branding .tag-list {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  padding-top: 0;
  min-height: 25px;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

#branding .branding-link {
  text-decoration: none !important;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
}

#branding .branding-link:hover {
  filter: brightness(1.1);
}

#branding .branding-link:hover .image-container img {
  transform: scale(1.05);
}

#powerpoint-presentations .portfolio-grid {
  grid-template-columns: 1fr;
}

#powerpoint-presentations .powerpoint-link {
  text-decoration: none !important;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
}

#powerpoint-presentations .powerpoint-link:hover {
  filter: brightness(1.1);
}

#powerpoint-presentations .powerpoint-link:hover .image-container img {
  transform: scale(1.05);
}

#social-media .portfolio-grid {
  grid-template-columns: 1fr;
}

#social-media .social-media-link {
  text-decoration: none !important;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
}

#social-media .social-media-link:hover {
  filter: brightness(1.1);
}

#social-media .social-media-link:hover .image-container img {
  transform: scale(1.05);
}

#motion-graphics .portfolio-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* PowerPoint Detail Page Canvas Link */
.canvas-link:hover {
  background-color: #e55a2b !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
}

/* E-commerce section specific styles */
#ecommerce-design .portfolio-grid {
  grid-template-columns: 1fr;
  max-width: 100%;
  gap: 2rem;
}

#ecommerce-design .portfolio-item {
  display: flex;
  flex-direction: column;
}

#ecommerce-design .image-container {
  overflow: hidden;
  flex-shrink: 0;
  height: 300px;
}

#ecommerce-design .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#ecommerce-design .portfolio-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#ecommerce-design .portfolio-item p {
  font-size: 0.95rem;
  color: #ced4da;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

#ecommerce-design .tag-list {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  padding-top: 0;
  min-height: 25px;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

#ecommerce-design .ecommerce-link {
  text-decoration: none !important;
  color: inherit;
}

#ecommerce-design .ecommerce-link:hover .image-container img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

#ecommerce-design .ecommerce-link:hover,
#ecommerce-design .ecommerce-link:visited,
#ecommerce-design .ecommerce-link:active {
  text-decoration: none !important;
  color: inherit;
}

#ecommerce-design .portfolio-item h3 {
  color: inherit;
  text-decoration: none;
  font-family: 'Montserrat';
  font-weight: 600;
}

#ecommerce-design .portfolio-item h3 a {
  color: inherit;
  text-decoration: none !important;
}

/* Mobile Landing Page hover effects */
#mobile-landing-page a:hover .image-container img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Websites section hover effects */
#portfolio a:hover .image-container img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Social Media Post section styles */
.social-media-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.social-media-category {
  margin-bottom: 3rem;
}

.category-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: white;
}

.polaroid-gallery {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.polaroid-card {
  background-color: #272f40;
  padding: 12px 12px 60px 12px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: rotate(-2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 339px;
  min-width: 302px;
  position: relative;
}

.polaroid-card:nth-child(2) {
  transform: rotate(1deg);
}

.polaroid-card:nth-child(3) {
  transform: rotate(-1deg);
}

.polaroid-card:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.polaroid-image {
  width: 100%;
  height: 422px;
  overflow: hidden;
  background-color: #f8f9fa;
}

.polaroid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.polaroid-text {
  position: absolute;
  bottom: 7px;
  left: 12px;
  right: 12px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-text p {
  font-size: 0.95rem;
  color: #ffffff;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  line-height: 1.2;
}

/* File folder container styling */
.file-folder-container {
  max-width: 900px;
  margin: 2.5rem auto 0;
  position: relative;
}

/* Folder tabs styling */
/* Content container with semi-transparent background and flex layout */
.content-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 2rem;
  gap: 1.6rem;
  min-height: 120px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: white;
}


.content-row {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 1.6rem;
  width: 100%;

  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
}

.content-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.content-row h4 {
  flex: 0 0 120px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  min-width: 180px;
  font-family: "Poppins", sans-serif;
}

.content-row p {
  flex: 1;
  font-size: 1rem;
  line-height: 1.7;
  color: white;
  text-align: left;
  letter-spacing: 0.8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design for content container */
@media (max-width: 768px) {
  .content-container {
    padding: 1.5rem;
    margin-top: 2rem;
  }

  .content-row {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .content-row h4 {
    flex: none;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .content-row p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Fix dashed-line overflow on mobile */
  .dashed-line {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
}

/* Responsive design for polaroid cards and category info */
@media (max-width: 768px) {
  .polaroid-gallery {
    gap: 1.5rem;
  }

  .polaroid-card {
    max-width: 302px;
    min-width: 266px;
    padding: 10px 10px 60px 10px;
    transform: rotate(0deg);
  }

  .polaroid-card:nth-child(2),
  .polaroid-card:nth-child(3) {
    transform: rotate(0deg);
  }

  .polaroid-card:hover {
    transform: scale(1.02);
  }

  .polaroid-image {
    height: 338px;
  }

  .category-info {
    gap: 1rem;
    margin-top: 2rem;
  }

  .info-item {
    flex: 1 1 280px;
    min-width: 280px;
  }
}

.info-section {
  flex: 0 0 300px;
  text-align: left;
}

.info-section h4 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: white;
  font-weight: 600;
  font-family: "Libre Baskerville", serif;
}

.info-section p {
  font-size: 0.95rem;
  color: white;
  line-height: 1.5;
  margin: 0;
  font-family: "Poppins", sans-serif;
  text-align: justify;
}

.portfolio-item {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: white;
  border-radius: 10px;
  overflow: hidden;
  transition: filter 0.3s ease;
}

.portfolio-item:hover {
  filter: brightness(1.1);
}

.image-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Mobile Landing Pages specific image sizing */
#mobile-landing-page .image-container {
  width: 100%;
  height: 300px;
  overflow: hidden;
}

#mobile-landing-page .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
}

#mobile-landing-page .portfolio-grid {
  grid-template-columns: 1fr;
}

/* Brand Design specific styling - wider cards for fewer items */
#branding .portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  #mobile-landing-page .image-container {
    height: 160px;
  }
}

.portfolio-text {
  padding: 28px 26px 22px 31px;
}

.portfolio-text h3,
.role-item h3 {
  font-size: 1.5rem;
  font-family: 'Montserrat';
  font-weight: 600;
}

.role-item h3 {
  margin-top: 10px;
}

.portfolio-item p {
  font-size: 0.95rem;
  color: #ced4da;
  width: auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  max-height: calc(1.5em * 3);
  text-align: left;
}

.tag-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7.2px;
}

.tag-item {
  background-color: #3b4d62;
  color: #03ffd5;
  padding: 5px 10px;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
  font-family: "Courier Prime", monospace;
}

.tag-item:hover {
  background-color: #1f2a36;
}

.portfolio {
  margin: 8rem 0;
}

.previous-role {
  min-height: 600px;
  margin: 10rem 0;
}

.role-item {
  padding: 1.8rem 2rem 0.9rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  color: white;
  display: flex;
  overflow: hidden;
  transition: filter 0.3s ease;
  justify-content: space-between;
}

.role-item:hover {
  filter: brightness(1.1);
}

.role-item .position {
  color: #3fdf90;
  font-weight: 500;
}

.role-item p {
  margin-top: 5px;
  font-size: 0.95rem;
  color: #ced4da;
  width: 100%;
}

.role-text {
  width: 60%;
}

.role-img img {
  margin-top: -15px;
  max-height: 12rem;
  object-fit: cover;
}

.client-experience {
  min-height: 625px;
}

.company-logo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  list-style: none;
  gap: 2rem;
  margin-top: 6rem;
  justify-items: start;
  align-items: center;
}

.company-logo img {
  height: 2.5rem;
  width: auto;
  max-width: 100%;
  position: relative;
  transition: transform 0.3s ease;
}

.company-logo img:hover {
  transform: translateY(-5px);
}

.contact {
  min-height: 100vh;
  position: relative;
}

.contact p .design-detail {
  color: #5c6a85;
  font-weight: 400;
}

.contact .design-detail {
  position: absolute;
  top: 28rem;
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  font-weight: 300;
}

.contact-link {
  text-decoration: none;
  color: #fff;
  position: relative;
}

.contact-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: white;
}

.contact-link:hover::after {
  content: "";
}

.contact-logo {
  display: flex;
  list-style: none;
  gap: 2rem;
  position: absolute;
  top: 10rem;
}

.contact-logo img {
  width: 2rem;
  transition: filter 0.3s ease;
}

.contact-logo img:hover {
  filter: brightness(1.5);
}

.contact span {
  color: #e5e7eb;
}

/* Project Link Hover Animation */
.project-link {
  color: rgb(255, 255, 255);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: white;
  transition: width 0.3s ease;
}

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

.project-link:hover {
  color: white;
}

@media (max-width: 1024px) {
  .company-logo {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }

  .company-logo img {
    height: 2rem;
  }

  .portfolio p,
  .previous-role p,
  .client-experience p,
  .contact p {
    width: 80%;
    font-size: 0.95rem;
  }

  /* Glass Card - Tablet optimizations */
  .glass-card {
    padding: 2.5rem 2rem;
    margin: 0 1.5rem;
    max-width: calc(100% - 3rem);
    min-height: 400px;
    border-radius: 16px;
  }

  .card-header {
    margin-bottom: 1.8rem;
  }

  .main-title {
    font-size: clamp(2.8rem, 8vw, 5rem);
    line-height: 1.1;
  }

  .role-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .card-footer {
    gap: 1.2rem;
  }

  /* removed per request */
}

@media (max-width: 768px) {
  .navbar {
    margin: 0;
    max-width: 100%;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .navbar ul {
    display: none;
    flex-direction: column;
    background-color: #0f172a;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    text-align: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
  }

  .nav-links li {
    margin: 1rem 0;
  }

  .nav-links a {
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 0;
  }

  .toggle {
    display: block;
  }

  .nav-links.show {
    display: flex;
  }

  .role-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .role-text {
    width: 100%;
    margin-bottom: 0.4rem;
  }

  .role-img img {
    height: auto;
    width: 100%;
    margin-top: 0;
    object-fit: contain;
  }

  .company-logo img {
    height: 1.5rem;
  }

  .portfolio p,
  .previous-role p,
  .client-experience p,
  .contact p {
    width: 100%;
    font-size: 0.95rem;
  }

  /* Branding responsive styles */
  #branding .portfolio-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 1.5rem;
  }

  /* Motion Graphics - Single column on mobile */
  #motion-graphics .portfolio-grid {
    grid-template-columns: 1fr;
  }

  #branding .image-container {
    height: 160px;
  }

  /* E-commerce responsive styles */
  #ecommerce-design .portfolio-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 1.5rem;
  }

  #ecommerce-design .image-container {
    height: 160px;
  }

  /* Social Media Post responsive styles */
  .social-media-grid {
    gap: 1.5rem;
  }

  .social-media-item {
    padding: 2rem;
  }

  .category-title {
    font-size: 1.8rem;
  }

  .mockup-images {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .mockup-image {
    max-width: 280px;
    min-width: 200px;
  }

  .info-sections {
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .portfolio-text h3,
  .role-item h3 {
    font-size: 1.2rem;
    font-family: 'Montserrat';
    font-weight: 600;
  }

  .portfolio-item p{
    font-size: 0.85rem;
  }

  .portfolio-text {
    padding: 22px 20px 18px 24px;
  }

  .tag-item {
    font-size: 0.7rem;
  }

  .company-logo {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.8rem;
  }

  .contact-logo img {
    width: 1.8rem;
  }

  .role-item h3 {
    margin: 12px 0;
  }

  #branding .portfolio-item p{
    font-size: 0.8rem;
  }

  #ecommerce-design .portfolio-item p {
    font-size: 0.8rem;
  }

  .portfolio h2, .previous-role h2, .client-experience h2, .contact h2, .table-of-content h2{
    font-size: 1.5rem;
  }

  .company-logo img {
    height: 1.5rem;
  }

  .portfolio p,
  .previous-role p,
  .client-experience p,
  .contact p {
    width: 100%;
    font-size: 0.85rem;
  }

  /* Glass Card - Small mobile optimizations */
  .glass-card {
    padding: 1.5rem 1rem;
    margin: 0 0.5rem;
    max-width: calc(100% - 1rem);
    min-height: 280px;
    border-radius: 10px;
  }

  .card-header {
    margin-bottom: 1rem;
  }

  .role-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .main-title {
    font-size: clamp(1.8rem, 14vw, 2.5rem);
    line-height: 1.1;
  }

  .card-footer {
    align-items: center;
    margin-top: 0rem;
  }

  .card-footer .description {
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    transform: none;
  }

  /* Accordion mobile optimizations */
  p.accordion-description {
    font-size: 0.9rem;
  }

  .accordion-separator {
    margin: 0;
  }

  /* Motion Graphics - Single column on mobile */
  #motion-graphics .portfolio-grid {
    grid-template-columns: 1fr;
  }

  /* Portfolio Grid - Single column on small mobile */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .content-row {
    margin-bottom: 1rem;
  }

  .social-media-detail .content-row p {
    font-size: 0.85rem;
  }

  .content-container {
    gap: 0;
  }
}

html {
  scroll-behavior: smooth;
}

/* Table of Content Styles */
.table-of-content {
  scroll-margin-top: 100px;
  margin-bottom: 8rem 0;
}

.table-of-content h2 {
  margin-bottom: 1.5rem;
  text-align: left;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  font-family: "Libre Baskerville", serif;
}

/* PowerPoint Detail Page Styles */
.powerpoint-detail .portfolio {
  margin-top: 8rem;
}

.powerpoint-detail .portfolio-title {
  text-align: center;
  margin-bottom: 3rem;
}

.powerpoint-detail .portfolio-title h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.powerpoint-detail .content-container {
  margin-bottom: 3rem;
}

.powerpoint-detail .dashed-line {
  margin-bottom: 1.5rem;
}

.powerpoint-detail .powerpoint-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.powerpoint-detail .powerpoint-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-in-out;
}

.powerpoint-detail .powerpoint-link:hover::after {
  transform: scaleX(1);
}

.powerpoint-detail .preview-title {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.powerpoint-detail .preview-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.powerpoint-detail .preview-caption {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-style: italic;
}

.powerpoint-detail .tags-section {
  text-align: left;
  margin-top: -5rem;
  margin-bottom: 3rem;
}

.powerpoint-detail .tag-list {
  justify-content: flex-start;
}

.powerpoint-detail .go-back-container {
  text-align: center;
  margin-bottom: 8rem;
}

.powerpoint-detail .go-back-btn {
  display: inline-block;
  background-color: white;
  color: #2c3e50;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.powerpoint-detail .go-back-btn:hover {
  background-color: #2c3e50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Accordion styles moved to accordion.css */

/* Mobile Landing Page Detail Styles */
.mobile-landing-detail .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.mobile-landing-detail .portfolio-section {
  margin-top: 8rem;
}

.mobile-landing-detail .title-section {
  text-align: center;
  margin-bottom: 3rem;
}

.mobile-landing-detail .title {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.mobile-landing-detail .content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.mobile-landing-detail .content-grid {
  display: grid;
  gap: 3rem;
}

.mobile-landing-detail .image-section {
  margin-bottom: 3rem;
}

.mobile-landing-detail .image-section img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mobile-landing-detail .tags-section {
  text-align: left;
}

/* Remove spacing between tags within mobile-landing-detail context */
.mobile-landing-detail .tags-section .tag-list {
  gap: 7.2px;
}

.mobile-landing-detail .tag-list {
  justify-content: flex-start;
}

.mobile-landing-detail .project-link-section {
  text-align: center;
  margin-top: 2rem;
}

.mobile-landing-detail .project-link {
  display: inline-block;
  background-color: #3b4d62;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mobile-landing-detail .go-back-section {
  text-align: center;
  margin-top: 3rem;
}

.mobile-landing-detail .go-back-btn {
  display: inline-block;
  background-color: white;
  color: #2c3e50;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-landing-detail .go-back-btn:hover {
  background-color: #2c3e50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Social Media Detail Page Styles */
.social-media-detail .portfolio {
  margin-top: 8rem;
}

.social-media-detail .page-title {
  text-align: center;
  margin-bottom: 1rem;
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
}

.social-media-detail .social-media-projects {
  display: flex;
  max-width: 1200px;
  margin: 3rem auto;
  flex-direction: column;
  gap: 3rem;
}

.social-media-detail .project-title {
  color: white;
  margin-bottom: 2rem;
  font-size: 2.2rem;
  text-align: center;
}

.social-media-detail .images-section-title {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.social-media-detail .project-image {
  text-align: center;
}

.social-media-detail .project-image img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.social-media-detail .go-back-container {
  text-align: center;
  margin-top: 3rem;
}

.social-media-detail .go-back-btn {
  display: inline-block;
  background-color: white;
  color: #2c3e50;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.social-media-detail .go-back-btn:hover {
  background-color: #2c3e50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Social Media Detail Page Content Styles */

.social-media-detail .content-row {
  display: flex !important;
  gap: 1rem !important;
  align-items: flex-start !important;
  width: 100% !important;
  position: relative !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-sizing: border-box !important;
  padding-bottom: 1.6rem !important;
}

.social-media-detail .content-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.social-media-detail .content-row h4 {
  flex: 0 0 200px !important;
  margin: 0 !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: white !important;
  font-family: "Montserrat", sans-serif !important;
  line-height: 1.4 !important;
  min-width: auto !important;
}

.social-media-detail .content-row p {
  flex: 1 !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: #ced4da !important;
  text-align: left !important;
  letter-spacing: 0.5px !important;
  margin: 0 !important;
}

/* Mobile responsive for social media detail */
@media (max-width: 768px) {
  .social-media-detail .content-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .social-media-detail .content-row h4 {
    flex: none !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .social-media-detail .content-row p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
}

/* Branding Detail Styles */
.branding-detail .portfolio {
  margin-top: 8rem;
}

.branding-detail .page-title {
  text-align: center;
  margin-bottom: 3rem;
}

.branding-detail .page-title h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}


.branding-detail .content-container {
  margin-bottom: 3rem;
}

.branding-detail .image-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.branding-detail .tag-list-container {
  text-align: left;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.branding-detail .tag-list {
  justify-content: flex-start;
}

.branding-detail .project-link-container {
  text-align: center;
  margin-bottom: 3rem;
}

.branding-detail .project-link {
  display: inline-block;
  background-color: #3b4d62;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.branding-detail .go-back-container {
  text-align: center;
  margin-top: 3rem;
}

.branding-detail .go-back-btn {
  display: inline-block;
  background-color: white;
  color: #2c3e50;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.branding-detail .go-back-btn:hover {
  background-color: #2c3e50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* E-commerce Detail Styles */
.ecommerce-detail .portfolio {
  margin-top: 8rem;
}

.ecommerce-detail .page-title {
  text-align: center;
  margin-bottom: 3rem;
}

.ecommerce-detail .page-title h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.ecommerce-detail .content-container {
  margin-bottom: 3rem;
}

.ecommerce-detail .content-row {
  display: flex !important;
  gap: 1rem !important;
  align-items: flex-start !important;
  width: 100% !important;
  position: relative !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-sizing: border-box !important;
}

.ecommerce-detail .content-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}


.ecommerce-detail .image-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ecommerce-detail .tag-list-container {
  text-align: left;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.ecommerce-detail .tag-list {
  justify-content: flex-start;
}

.ecommerce-detail .project-link-container {
  text-align: center;
  margin-bottom: 3rem;
}

.ecommerce-detail .project-link {
  display: inline-block;
  background-color: #3b4d62;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.ecommerce-detail .project-link:hover {
  background-color: #2c3e50;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ecommerce-detail .go-back-container {
  text-align: center;
  margin: -5rem 0 8rem;
}

.ecommerce-detail .go-back-btn {
  display: inline-block;
  background-color: white;
  color: #2c3e50;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Unified go-back button state updates */
.branding-detail .go-back-btn:hover,
.powerpoint-detail .go-back-btn:hover,
.mobile-landing-detail .go-back-btn:hover,
.ecommerce-detail .go-back-btn:hover {
  background-color: #2c3e50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ecommerce-detail .project-link-inline {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  border-bottom: none;
  transition: all 0.3s ease;
}

.ecommerce-detail .project-link-inline:hover {
  border-bottom: 1px solid #ffffff;
  text-decoration: none;
}

/* Mobile responsive styles for ecommerce-detail */
@media (max-width: 768px) {
  .ecommerce-detail .content-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  .ecommerce-detail .content-row h4 {
    flex: none !important;
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .ecommerce-detail .content-row p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
}

