/* Modern Minimalistic Theme  
   Inspired by Brittany Chiang / Mees Verberne  
   Author: AI makeover 2025  
*/
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;700&display=swap');

:root {
  --bg: #0D0D0D; /* Deep black */
  --navy-light: #1C1C1C; /* Lighter charcoal for cards */
  --text: #EAEAEA; /* Off-white text */
  --sub: #A0A0A0; /* Grey for subtitles */
  --accent: #FF4136; /* Vibrant red */
}

*{box-sizing:border-box;padding:0;margin:0}
html{scroll-behavior:smooth}
body{
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height:1.6;
}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent);filter:brightness(1.2)}

/* ===== NAV ===== */
#sidebar{
  position:fixed;top:0;left:0;height:100vh;width:220px;background:var(--bg);padding:2rem 1rem;display:flex;flex-direction:column;justify-content:space-between;z-index:1000;
}
#sidebar nav ul{list-style:none;margin-top:2rem;}
#sidebar nav li{margin-bottom:1.2rem}
#sidebar nav a{color:var(--sub);font-size:14px;position:relative;padding-left:28px;letter-spacing:.08em;transition:all .2s}
#sidebar nav a::before{content:attr(data-number);position:absolute;left:0;color:var(--accent)}
#sidebar nav a:hover{color:var(--accent);}

#sidebar .logo{font-family:'Space Grotesk',sans-serif;font-size:24px; font-weight:700;color:var(--accent); text-align: center;}
#sidebar .social{display:flex;gap:16px;margin-top:2rem}
#sidebar .social a{color:var(--sub)}
#sidebar .social a:hover{color:var(--accent)}

#sidebar .profile-pic-bg {
  width: 100%;
  height: 38%;
  border-radius: 50%;
  border: 4px solid var(--accent);
  margin: 2.5rem auto 1.5rem;
  background-image: url(../images/me.jpeg);
  background-size: 212%;
  background-position: center 25%;
  background-repeat: no-repeat;
}

/* ===== MAIN ===== */
main{padding:0 4rem;max-width:900px;margin:0 auto;}
section{padding:3rem 0;}

/* Hero */
#hero {
  position: relative;
  height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: #fff;
  text-align: left;
  padding: 0 4rem;
}

.hero-logo {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 300px; /* Adjust size as needed */
  height: auto;
  opacity: 0.8;
  z-index: 2; /* Puts the logo on top of the overlay */
}

#hero .overlay {
  position: absolute;
  top: 0;
  inset: 0;
  background: rgba(10,25,47,.5);
  backdrop-filter: blur(4px);
  z-index: 1;
}

#hero .content{position:relative;z-index:2;}
#hero::before{display:none;} /* Disable old overlay */
#hero h1{font-family:'Space Grotesk',sans-serif;font-size:clamp(40px,8vw,80px);font-weight:700;margin-bottom:8px;color:var(--text)}
#hero h1 span{color:var(--accent)}

/* Hero subtitle styling */
.hero-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 3vw, 32px);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  background: linear-gradient(45deg, var(--accent), #ff6b54);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 65, 54, 0.3);
  animation: titleGlow 2s ease-in-out infinite alternate;
}

.hero-subtitle::before {
  content: '◦';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.8em;
  opacity: 0.7;
  animation: pulse 2s ease-in-out infinite;
}

.hero-subtitle::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #ff6b54, transparent);
  border-radius: 2px;
  animation: slideIn 1.2s ease-out 0.5s both;
  box-shadow: 0 0 8px rgba(255, 65, 54, 0.4);
}

/* Hero quote styling */
.hero-quote {
  font-family: 'Inter', sans-serif;
  font-size: clamp(16px, 2.5vw, 20px);
  font-style: italic;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 32px;
  position: relative;
  background: linear-gradient(135deg, rgba(255, 65, 54, 0.08), rgba(255, 65, 54, 0.02));
  padding: 24px 32px 24px 56px;
  border-radius: 12px;
  line-height: 1.8;
  border: 1px solid rgba(255, 65, 54, 0.15);
  box-shadow: 0 8px 32px rgba(255, 65, 54, 0.1);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: all 0.3s ease;
}

.hero-quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(255, 65, 54, 0.15);
  border-color: rgba(255, 65, 54, 0.25);
}

/* Large opening quote mark */
.hero-quote::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 64px;
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  opacity: 0.6;
  line-height: 1;
  transform: translateY(-8px);
}

/* Closing quote mark */
.hero-quote::after {
  content: '"';
  position: absolute;
  bottom: -8px;
  right: 16px;
  font-size: 32px;
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  opacity: 0.4;
  line-height: 1;
}

#hero p{max-width:600px;color:var(--sub)}
.button-primary{display:inline-block;border:1px solid var(--accent);padding:12px 20px;margin-top:40px;border-radius:4px;color:var(--accent);transition:background .2s}
.button-primary:hover{background:rgba(100,255,218,.1)}

/* Sections headings */
.section-title{font-family:'Space Grotesk',sans-serif;font-size:28px;margin-bottom:30px;color:var(--text)}
.section-title::before{content:"/";color:var(--accent);margin-right:10px}

/* Experience / lists */
.card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  background: var(--navy-light);
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  transition: background-color 0.2s ease-in-out;
}
.card.expandable {
  cursor: pointer;
}
.card.expandable:hover {
  background: #2a2a2a; /* Slightly lighter charcoal on hover */
}

.card-content h3 {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.card-content p {
  color: var(--sub);
  font-size: 0.9rem;
  line-height: 1.5;
}
.card-date-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.card-icon {
  color: var(--accent);
  transition: transform 0.3s ease-in-out;
}
.card.active .card-icon {
  transform: rotate(45deg);
}

.card-details {
  display: none;
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 65, 54, 0.1); /* Red border top */
  color: var(--sub);
  font-size: 0.9rem;
}
.card.active .card-details {
  display: block;
}

/* Certificates & assignments grid */
.grid{display:grid;gap:15px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));}
.grid-item{position:relative;cursor:pointer;overflow:hidden;border-radius:6px}
.grid-item img{width:100%;height:180px;object-fit:cover;transition:transform .4s}
.grid-item:hover img{transform:scale(1.1)}

/* Updated overlay styling to match photography section */
.grid-item .overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(transparent, rgba(0,0,0,0.8));
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:20px;
  opacity:0;
  transition:opacity .3s;
}

.grid-item:hover .overlay{opacity:1}

/* Overlay text styling */
.grid-item .overlay h3 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'Space Grotesk', sans-serif;
}

.grid-item .overlay p {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Photography Gallery - Full Width */
#photography {
  width: 80vw;
  margin-left: calc(-40vw + 50%);
  padding: 3rem 2rem 3rem 8rem;
  background: var(--bg);
}

/* Center the photography section title */
#photography .section-title {
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
}

.photo-intro {
  color: var(--sub);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-align: center;
  font-style: italic;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
  margin-bottom: 2rem;
  grid-auto-flow: dense;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background: var(--navy-light);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-item.wide {
  grid-column: span 2;
}

.photo-item.tall {
  grid-row: span 2;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.4s ease;
  filter: brightness(0.9) contrast(1.1);
}

/* Better handling for portrait photos */
.photo-item.portrait {
  grid-row: span 2;
  min-height: 460px;
}

.photo-item.portrait img {
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
}

/* Tall items for landscape photos that need more height */
.photo-item.tall {
  grid-row: span 2;
}

.photo-item:hover img {
  transform: scale(1.08);
  filter: brightness(1) contrast(1.2);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 24px 20px 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
  transform: translateY(0);
}

.photo-overlay h3 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'Space Grotesk', sans-serif;
}

.photo-overlay p {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Responsive adjustments for photography */
@media (max-width: 960px) {
  #photography {
    padding: 2rem 1rem;
  }
}

/* Hide hero logo on screens smaller than 1400px */
@media (max-width: 1400px) {
  .hero-logo {
    display: none;
  }
}

@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 12px;
  }
  
  .photo-item.large,
  .photo-item.wide {
    grid-column: span 1;
  }
  
  .photo-item.large {
    grid-row: span 1;
  }
  
  #photography {
    padding: 2rem 0.5rem;
  }
  
  /* Better text wrapping for hero title on mobile */
  #hero h1 {
    line-height: 1.2;
  }
  
  #hero h1 .name-hover-trigger {
    display: block;
    margin-top: 0.5rem;
  }
  
  /* Mobile card layout - stack content vertically */
  .card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .card-date-wrapper {
    align-self: flex-start;
    margin-top: 0.5rem;
  }
  
  .card-content {
    width: 100%;
  }
}

/* Enhanced Modal/Lightbox */
#overlay{
  display:none;
  align-items:center;
  justify-content:center;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.9);
  z-index:1500;
  backdrop-filter: blur(5px);
}

#overlay.active{display:flex;}
body.modal-open{overflow:hidden;}

#overlay .modal{
  max-width: 90vw;
  max-height: 90vh;
  border:none;
  padding:0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fullscreen modal for PDFs */
#overlay .modal.fullscreen {
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
}

#overlay iframe{width:100%;height:100%;}

/* Photo lightbox styling */
#overlay .photo-modal {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

#overlay .close{
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1600;
}

#overlay .close:hover {
  background: var(--accent);
  transform: scale(1.1);
}

/* Navigation arrows */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  font-size: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1600;
}

.nav-arrow:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.nav-arrow.prev {
  left: 20px;
}

.nav-arrow.next {
  right: 20px;
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-arrow:disabled:hover {
  background: rgba(0,0,0,0.7);
  transform: translateY(-50%);
}

/* Sidebar Responsive */
@media(max-width:960px){#sidebar{display:none;}}

/* New content wrapper */
.content-wrapper{margin-left:220px;}

/* Responsive */
@media(max-width:960px){.content-wrapper{margin-left:0;}main{padding:0 1.5rem;}}

/* About photo circle */
/* .about-photo{...} */

/* Remove old class */
/* .about-photo{...} */

#sidebar nav {
  margin-top: 3rem;
}

/* Added animation for hero name */
.name-animated {
  display: inline-block;
  opacity: 0;
  transform: translateY(-50px) scale(0.8);
  color: var(--accent);
}

.name-animated.fall-in {
  animation: fall-in-bounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fall-in-bounce {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(10px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideIn {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 80px;
    opacity: 1;
  }
}

@keyframes titleGlow {
  0% {
    text-shadow: 0 0 20px rgba(255, 65, 54, 0.2);
  }
  100% {
    text-shadow: 0 0 30px rgba(255, 65, 54, 0.4), 0 0 40px rgba(255, 65, 54, 0.1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.7;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
  }
}

/* Failed assignment styling */
.grid-item-failed {
  position: relative;
  filter: grayscale(100%) brightness(0.6);
  opacity: 0.7;
}

.grid-item-failed:hover {
  cursor: default;
}

.grid-item-failed:hover img {
  transform: none !important;
}

.grid-item-failed .overlay {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(139, 0, 0, 0.9));
  z-index: 15;
}

.grid-item-failed .overlay p {
  color: #ffcccc;
}

.failure-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  color: #ff0000;
  z-index: 10;
  text-shadow: 
    2px 2px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    0 0 20px rgba(255, 0, 0, 0.8);
  font-weight: bold;
  pointer-events: none;
  animation: failurePulse 2s ease-in-out infinite;
}

@keyframes failurePulse {
  0%, 100% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}