:root {
  --kl-dark-red: #a01a28;
  --kl-bright-red: #e10019;
  --kl-header-maroon: #983832;
  --white: #fff;
  --black: #181820;
  --accent-grey: #f4f4f8;
  --card-shadow: 0 4px 28px rgba(32,10,40,0.13);
}

body {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  background: var(--accent-grey);
  margin:0; color:#222;
}

header {
  background: var(--kl-header-maroon);
  color: var(--white);
  padding-bottom: 0.4rem;
  border-bottom: 3px solid #fff;
}

.kl-header-bg {
  background:
    linear-gradient(rgba(152,68,62,0.000005), rgba(152,68,62,0.000005)),
    url(assets/diamond-upholstery.png), 
    var(--kl-header-maroon) !important;
  background-blend-mode: lighten, multiply, normal;  
  padding: 1.1rem 1.3rem 0.8rem 1.5rem;
  display: flex;
  align-items: center;
}

.kl-header-flex {
  display: flex;
  align-items: center;
}
.logo {
  width: 280px;
  margin-right: 10px;
}
.header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.kl-header-title {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.kl-header-caption {
  font-size: 1.15rem;
  font-family: 'Roboto', 'Montserrat', Arial, sans-serif;
  font-weight: 500;
}
nav {
  display: flex;
  gap: 2.1rem;
  padding: 0.6rem 2rem 0.5rem 2rem;
  font-family: 'Roboto', 'Montserrat', Arial, sans-serif;
  background: #fff;
  border-bottom: 3px solid var(--kl-header-maroon);
}
nav a {
  color: var(--kl-header-maroon);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.14rem;
  transition: color 0.18s;
  letter-spacing: 1px;
  padding: 2px 10px;
  border-radius: 6px;
}
nav a:hover, nav a:focus {
  color: var(--black);
  background: #eee;
}

.hero-slogan {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 1.4px;
  margin-top: 1rem;
  color: var(--kl-dark-red);
}

.section-title {
  font-size:1.33rem;
  font-weight:700;
  text-align:left;
  margin:2rem 0 1rem 2rem;
  color:var(--kl-header-maroon);
  background:var(--white);
  display:inline-block;
  border-radius:8px;
  padding: 5px 36px 5px 10px;
  box-shadow:0 2px 8px #0001;
  border-left: 8px solid var(--kl-dark-red);
  letter-spacing:1px;
}

.project-section {
  padding:2.2rem 0 0.3rem 0;
  background: var(--accent-grey);
  min-height:320px;
}
.projects-grid {
  display:flex;
  flex-wrap:wrap;
  gap:2rem;
  justify-content:center;
  margin-bottom:2.2rem;
}
.project-card {
  background: var(--white);
  border-radius:18px;
  box-shadow: var(--card-shadow);
  min-width: 330px;
  max-width: 440px;
  width: 34vw;
  transition: transform 0.18s, box-shadow .20s, border-color 0.13s, color 0.11s;
  position:relative;
  cursor:pointer;
  border:2.5px solid #eee;
  text-decoration:none;
  color:inherit;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items: stretch;
}
.project-card:focus,
.project-card:hover {
  transform: scale(1.025) translateY(-6px);
  box-shadow: 0 12px 32px rgba(32,32,34,0.13);
  border-color: var(--kl-dark-red);
  color: var(--black);
  z-index:2;
}
.project-media {
  width:100%;
  height:220px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  background:#f8f7f6;
}
.project-media img,
.project-media video,
.project-media iframe {
  width:100%;
  height:100%;
  object-fit:cover;
  border:none;
  display:block;
}
.project-details {
  width:100%;
  padding:1.33rem 1.1rem 1.21rem 1.2rem;
  background: var(--accent-grey);
  display:flex;
  flex-direction:column;
  justify-content:center;

  width: 100%;
  padding: 1.33rem 1.5rem 1.21rem 1.5rem; /* Increase right padding */
  background: var(--accent-grey);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box; /* IMPORTANT - ensures padding is included in width */
}
.project-title {
  font-size:1.25rem;
  font-weight:700;
  letter-spacing:.5px;
  color:var(--kl-header-maroon);
  margin-bottom:6px;
}
.project-meta {
  color: #444;
  font-size:1rem;
  font-weight:500;
  margin-bottom:11px;
}

.project-meta2 {
  color: #6d4c4c;
  font: size 0.5em;
  font-weight:500;
}
.project-desc {
  font-size:0.96rem;
  color: #181820;
  margin-bottom:5px;
}

footer {
  background: var(--black);
  color: #fff;
  position: relative;
  margin-top:2.5rem;
  padding: 0;
  overflow: hidden;
}
.footer-bg {
  position: absolute;
  top:0;
  left:0;
  width:100vw;
  height:170px;
  z-index:0;
  pointer-events:none;
}
.campus-img {
  width:100vw;
  height:170px;
  object-fit:cover;
  opacity:0.18;
  position:absolute;
  left:0;
  top:0;
  z-index:1;
  filter: grayscale(90%);
}
.footer-overlay {
  position:absolute;
  top:0;
  left:0;
  width:100vw;
  height:170px;
  background:#181820b0;
  opacity:0.9;
  z-index:2;
}
.footer-content {
  position: relative;
  z-index:3;
  padding-top:104px;
  text-align:center;
}
.footer-links {
  margin: 1.2rem 0;
}
.footer-links a {
  color: #fff;
  text-decoration:none;
  margin: 0 1rem;
  font-size:1.07rem;
  font-weight:500;
  padding:3px 15px;
  border-radius: 7px;
  background: #e1001938;
  transition: background .2s, color .2s;
}
.footer-links a:hover {
  background:var(--white);
  color:var(--black);
}

#backToTop {
  display: none; position: fixed; bottom: 36px; right: 36px; z-index: 140;
  background: var(--kl-dark-red); color: var(--white);
  border: none; border-radius: 50%; width: 52px; height: 52px; font-size: 2.2rem;
  box-shadow: var(--card-shadow); cursor: pointer; opacity: 0.95; transition: background .2s, opacity .2s;
}
#backToTop:hover { background: var(--black); opacity:1;}

/* Responsive */
@media (max-width:1000px) {
  .project-card { min-width:330px; max-width:96vw; width:46vw;}
  .project-media { height:175px;}
}
@media (max-width:700px) {
  .projects-grid { gap:1.2rem;}
  .project-card { min-width:95vw; width:97vw; }
  .section-title { margin:1.2rem 0 1rem 1.1rem; padding:5px 14px 5px 7px; }
  .footer-content { padding-top:65px; }
  .campus-img, .footer-overlay { height:65px;}
}
@media (max-width:600px) {
  .topbar {padding:1rem;}
  .logo {width:38px;}
  .kl-header-title {font-size:1.1rem;}
  .kl-header-caption {font-size:.83rem;}
  .project-media {height:110px;}
  .footer-content { padding-top:45px;}
  .campus-img, .footer-overlay { height:45px;}
}

nav a {
  position: relative;
  /* the rest of your original link styles */
}

nav a:hover::after, nav a:focus::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -4px;
  height: 4px;
  background: #e10019; /* KL bright red */
  border-radius: 2px;
  transition: all 0.2s;
}

nav a:hover, nav a:focus {
  background: transparent !important;
}

.section-title {
  transition: 
    color 0.25s cubic-bezier(.43,.32,.33,1),
    font-weight 0.2s,
    letter-spacing 0.3s,
    background 0.25s,
    box-shadow 0.25s,
    transform 0.22s;
  position: relative;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  margin-bottom: 2.3em;
}

/* Sketch effect on active title */
.section-title._active,
.section-title:hover,
.section-title:focus {
  color: #97443E;
  font-weight: bold;
  letter-spacing: 2px;
  transform: scale(1.12) rotate(-2deg);
  background: linear-gradient(90deg, #fff5f7 70%, transparent 100%);
  box-shadow:
    2px 4px 0px 0px #97443E,      /* bottom-right shadow with your custom red */
    -2px -3px 0px 0px #7c332d;    /* top-left deeper shadow */
  border-radius: 14px;
  padding: 0.5em 1em;
  font-family: 'Rock Salt', cursive, 'Montserrat', sans-serif;
  transition:
    color 0.25s, font-weight 0.2s, letter-spacing 0.3s,
    background 0.25s, box-shadow 0.25s, transform 0.22s;
}

/* Animated underline for both scrollspy and hover */
.section-title._active::after,
.section-title:hover::after,
.section-title:focus::after {
  content: '';
  display: block;
  margin: 0 auto;
  width: 58%;
  height: 6px;
  background:
    repeating-linear-gradient(
      -8deg,
      #97443E,
      #97443E 8px,
      transparent 12px,
      #97443E 16px
    );
  border-radius: 10px;
  margin-top: 12px;
  animation: underline-pop 0.38s cubic-bezier(.43,.32,.33,1);
}


section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  text-align: center;
}

.project-card {
  position: relative;
  transition:
    transform 0.23s cubic-bezier(.6,.1,.34,1.5),
    box-shadow 0.22s,
    border 0.17s,
    background 0.26s;
  box-shadow: 0 2px 12px #97443e24;
  border-radius: 20px;
  border: 2px solid #eee;
  background: #fff8f5;
  overflow: hidden;
}

/* Combined Hover Effects */
.project-card:hover,
.project-card:focus {
  transform: scale(1.045) translateY(-10px) rotate(var(--card-rotate, -1.2deg));
  box-shadow: 0 18px 48px rgba(152,68,62, 0.16), 0 2px 12px #97443e24;
  border: 2.7px dashed #97443E;
  border-radius: 22px;
  background: linear-gradient(120deg, #fff8f5 80%, #f4e4e0 100%);
}

/* Animated Shine Overlay */
.project-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 260%;
  height: 160%;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, #fff8ec66 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
}

.project-card:hover::after,
.project-card:focus::after {
  opacity: 1;
  animation: shine 0.9s forwards;
}

.project-card {
  transition:
    transform 0.23s cubic-bezier(.6,.1,.34,1.5),
    box-shadow 0.22s,
    border 0.17s,
    background 0.26s;
  /* Use attribute selector for custom property */
}

.project-card[data-rotate] {
  --card-rotate: attr(data-rotate deg);
}

@keyframes shine {
  from { left: -80%; }
  to   { left: 120%; }
}

/* Read More Button Styles - ADD THIS TO THE END */
.full-text {
  display: none;
}

.read-more-btn {
  background: none;
  border: none;
  color: #97443E;
  font-weight: bold;
  font-family: 'Rock Salt', cursive, 'Montserrat', sans-serif;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 10px; /* Reduced from 8px 16px */
  margin-top: 0.5em;
  font-size: 0.75em; /* Reduced from 0.9em */
  display: inline-block;
  position: relative;
  border-radius: 6px;
  background: linear-gradient(120deg, #fff5f7 70%, transparent 100%);
  border: 2px solid #97443E;
  box-shadow:
    2px 3px 0px 0px #97443E,
    -2px -2px 0px 0px #7c332d;
  transition: all 0.25s cubic-bezier(.43,.32,.33,1);
}

/* Sketchy underline decoration */
.read-more-btn::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 10%;
  right: 10%;
  height: 2px; /* Reduced from 3px */
  background: repeating-linear-gradient(
    -5deg,
    #97443E,
    #97443E 6px,
    transparent 8px,
    #97443E 10px
  );
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.25s;
}

.read-more-btn:hover {
  color: #7c332d;
  transform: rotate(-1deg) scale(1.05);
  box-shadow:
    3px 4px 0px 0px #97443E,
    -3px -3px 0px 0px #7c332d;
  background: linear-gradient(120deg, #fff8fa 60%, #f5e8e5 100%);
}

.read-more-btn:hover::after {
  opacity: 1;
}

.read-more-btn:active {
  transform: rotate(-0.5deg) scale(1.02);
  box-shadow:
    1px 2px 0px 0px #97443E,
    -1px -1px 0px 0px #7c332d;
}

#backToTop {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(160, 26, 40, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(160, 26, 40, 0);
  }
}


/* Project Card Base */
.project-card {
  opacity: 0;
  position: relative;
  transition: 
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(.16,1,.3,1),
    box-shadow 0.25s;
}

/* Initial state - before visible */
.project-card:not(.visible) {
  transform: translateY(50px) scale(0.95);
}

/* After visible - reset to neutral */
.project-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Hover effect - LIFT + TILT + BORDER */
.project-card.visible:hover,
.project-card.visible:focus {
  transform: translateY(-8px) rotate(-1deg) scale(1.02);
  box-shadow: 
    0 12px 32px rgba(151,68,62, 0.18),
    0 0 0 2px #97443E;
  z-index: 2;
}

/* Stagger delays */
.project-card:nth-child(1) { transition-delay: 0.1s; }
.project-card:nth-child(2) { transition-delay: 0.2s; }
.project-card:nth-child(3) { transition-delay: 0.3s; }
.project-card:nth-child(4) { transition-delay: 0.4s; }
.project-card:nth-child(5) { transition-delay: 0.5s; }
.project-card:nth-child(6) { transition-delay: 0.6s; }

/* Reset transition delay on hover for instant response */
.project-card:hover {
  transition-delay: 0s !important;
}


.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(151,68,62,0.5), transparent);
  pointer-events: none;
  mix-blend-mode: multiply;
  animation: fade-out 0.8s ease-out forwards;
  z-index: 9999;
}

@keyframes fade-out {
  to {
    opacity: 0;
    transform: scale(2);
  }
}

.project-card:nth-child(1):hover { border-color: #e74c3c; }
.project-card:nth-child(2):hover { border-color: #3498db; }
.project-card:nth-child(3):hover { border-color: #2ecc71; }
.project-card:nth-child(4):hover { border-color: #f39c12; }
.project-card:nth-child(5):hover { border-color: #9b59b6; }
.project-card:nth-child(6):hover { border-color: #1abc9c; }




.section-doodle {
  width: 200px;
  height: 50px;
  margin: 2rem auto;
  display: block;
  opacity: 0;
  transition: opacity 0.5s;
}

.section-doodle.visible {
  opacity: 1;
}

.doodle-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-doodle.visible .doodle-path {
  stroke-dashoffset: 0;
}


.kl-header-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 300px at var(--x) var(--y), rgba(255,255,255,0.1), transparent 50%);
  pointer-events: none;
}

.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: #97443E;
  border-radius: 50%;
  bottom: -10px;
  animation: float-up linear forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes float-up {
  to {
    transform: translateY(-100vh);
    opacity: 0;
  }
}

.project-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.project-card .project-media {
  transform: translateZ(30px);
}

.project-card .project-details {
  transform: translateZ(20px);
}



#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--accent-grey);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.3s;
}

#theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
}

body.dark-mode {
  /* Background colors */
  --accent-grey: #1a1d23;
  --kl-header-maroon: #2d1f1f;
  
  /* Primary colors - lighter for visibility */
  --kl-dark-red: #ff6b6b;
  --kl-bright-red: #ff4757;
  
  /* Text colors - high contrast */
  color: #e8e8e8;
  background: #1a1d23;
}

/* Dark mode specific overrides */
body.dark-mode header {
  background: #2d1f1f;
  border-bottom-color: #3d2f2f;
}

body.dark-mode .kl-header-bg {
  background: 
    linear-gradient(rgba(45,31,31,0.95), rgba(45,31,31,0.95)),
    url(Assets/diamond-upholstery.png),
    #2d1f1f !important;
}

body.dark-mode .kl-header-title,
body.dark-mode .kl-header-subtitle,
body.dark-mode nav a {
  color: #e8e8e8;
}

body.dark-mode nav a:hover {
  color: #ff6b6b;
}

/* Project cards in dark mode */
body.dark-mode .project-card {
  background: #242830;
  border-color: #3d4350;
}

body.dark-mode .project-details {
  background: #1f2229;
  color: #e8e8e8;
}

body.dark-mode .project-title {
  color: #ff6b6b;
}

body.dark-mode .project-collab {
  color: #b8b8b8;
}

/* Section titles */
body.dark-mode .section-title {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.05);
  border-color: rgba(255, 107, 107, 0.2);
}

body.dark-mode .section-title._active {
  color: #ff4757;
  border-color: #ff4757;
}

/* Read more button */
body.dark-mode .read-more-btn {
  color: #ff6b6b;
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.05);
}

body.dark-mode .read-more-btn:hover {
  color: #ff4757;
  background: rgba(255, 107, 107, 0.15);
}

/* Back to top button */
body.dark-mode #backToTop {
  background: #ff6b6b;
  color: #1a1d23;
}

body.dark-mode #backToTop:hover {
  background: #ff4757;
}

/* Forms and inputs */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background: #242830;
  color: #e8e8e8;
  border-color: #3d4350;
}

/* Links */
body.dark-mode a {
  color: #ff6b6b;
}

body.dark-mode a:hover {
  color: #ff4757;
}

/* Hero slogan */
body.dark-mode .hero-slogan {
  color: #e8e8e8;
}

/* Card shadows */
body.dark-mode .project-card {
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.4);
}

body.dark-mode .project-card:hover {
  box-shadow: 0 12px 32px rgba(255, 107, 107, 0.15);
}

/* Project collaborator names - higher contrast */
body.dark-mode .project-collab {
  color: #c5c5c5 !important; /* Much brighter */
}

/* Project descriptions */
body.dark-mode .project-desc,
body.dark-mode .project-desc p {
  color: #d0d0d0 !important;
}

/* Project card titles - bright and readable */
body.dark-mode .project-title {
  color: #ff8080 !important; /* Coral red, easier to read */
}

/* Nav links - brighter */
body.dark-mode nav a {
  color: #f0f0f0 !important;
}

body.dark-mode nav a:hover {
  color: #ff8080 !important;
}

/* Hero slogan - brighter */
body.dark-mode .hero-slogan {
  color: #f5f5f5 !important;
}

/* Section breadcrumb/subtitle text */
body.dark-mode .kl-header-subtitle {
  color: #d0d0d0 !important;
}

/* Any remaining paragraph text */
body.dark-mode p {
  color: #d0d0d0 !important;
}

/* Make sure all headings are bright */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5 {
  color: #f0f0f0 !important;
}

/* Card info text (dates, etc) */
body.dark-mode .project-info,
body.dark-mode .project-meta {
  color: #c0c0c0 !important;
}

/* Navigation links - MUCH brighter and visible */
body.dark-mode nav a {
  color: #f5f5f5 !important; /* Almost white */
  font-weight: 500;
}

body.dark-mode nav a:hover {
  color: #ff8080 !important;
  text-shadow: 0 0 8px rgba(255, 128, 128, 0.4);
}

/* If you have active/current page indicator */
body.dark-mode nav a.active,
body.dark-mode nav a:active {
  color: #ff8080 !important;
}

/* Navigation container background (if needed) */
body.dark-mode nav {
  background: #2d1f1f !important;
  border-bottom: 2px solid #3d2f2f;
}

/* Pulse/throb animation for theme toggle */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(151, 68, 62, 0.3);
  background: var(--accent-grey);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.3s;
  animation: theme-pulse 2.5s ease-in-out infinite;
}

/* Pulse animation - same as back to top */
@keyframes theme-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(151, 68, 62, 0.6);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(151, 68, 62, 0);
  }
}

/* Stop pulsing on hover */
#theme-toggle:hover {
  animation: none;
  transform: rotate(20deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(151, 68, 62, 0.3);
}

/* Dark mode version - pulse with different color */
body.dark-mode #theme-toggle {
  border-color: rgba(255, 107, 107, 0.4);
  background: #242830;
  animation: theme-pulse-dark 2.5s ease-in-out infinite;
}

@keyframes theme-pulse-dark {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }
}

body.dark-mode #theme-toggle:hover {
  animation: none;
  transform: rotate(20deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}



















/*
  Copyright © 2025 Adhiraj Bhagawati. All rights reserved.
*/
