/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  height: 100%;
  background: 
    linear-gradient(
      180deg,
      #071627 0%,
      #081a2f 40%,
      #071627 100%
    );
  background-attachment: fixed;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    top: -150px;
    right: -150px;
    z-index: 0;
}

.hero::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    bottom: -120px;
    left: -120px;
    z-index: 0;
}

/* Ensure text stays above fade */
.hero-content {
  position: relative;
  z-index: 2;
}


.hero h1 {
    font-size: 8rem;      /* Larger, more dominant headline */
    font-weight: 700;
    margin-bottom: 2.75rem;  /* Creates more space below the heading */
}

.hero p {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
    color: #ffffff;  
}

.hero-actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.hero-button {
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.hero-button.primary {
    background-color: #4da3ff;
    color: #081626;
}

.hero-button.primary:hover {
    background-color: #79bbff;
    transform: translateY(-2px);
}

.hero-button.secondary {
    border: 2px solid #4da3ff;
    color: #4da3ff;
}

.hero-button.secondary:hover {
    background-color: #4da3ff;
    color: #081626;
    transform: translateY(-2px);
}

.hero p {
    margin-left: auto;
    margin-right: auto;
}



/* Keep content above shapes */
.hero-content {
    position: relative;
    z-index: 2;
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .shape {
        animation: none;
    }
}


html {
    height: 100%;
    scroll-behavior: smooth;
}

/* Centered editorial section before Projects */
.overview {
  text-align: center;
}

.overview {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.overview.visible {
    opacity: 1;
    transform: translateY(0);
}

.overview h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.overview p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.section {
    position: relative;
}


/* Navigation */
header {
    background-color: #081626;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.logo img {
    height: 24px;        /* Icon-sized */
    width: auto;
    opacity: 0.95;
}


.logo {
    color: #ffffff;
    text-decoration: none;
}

.logo img {
    transition: transform 0.2s ease;
}

.logo:hover img {
    transform: scale(1.05);
}


.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

/* Interactive underline effect */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #4da3ff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active::after {
  width: 100%;
}

/* Sections */
.section {
    max-width: 1200px;
    margin: auto;
    padding: 4rem 1rem;
}


.section h1 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* Cards */
.card {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    box-shadow 0.3s ease;
  transition-delay: 0.1s;

  background-color: #142f4c;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}


.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card button,
.card a {
  align-self: flex-start;   
  width: auto;              
}


.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.35);
}

.card h2 {
  margin-bottom: 0.4rem;
}


/* Buttons */
button {
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: #4da3ff;
    border: none;
    color: #081626;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #79bbff;
    transform: scale(1.05);
}

/* Footer */
footer {
    background: linear-gradient(to top, rgba(0,0,0,0.25), transparent);
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* Global floating glow layer (covers entire site) */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-effects .blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.32;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(80,170,255,0.6),
    rgba(0,0,0,0) 65%
  );
  animation: float 14s ease-in-out infinite;
}

header, main, footer, section, .hero, .page-content, .page-main {
  position: relative;
  z-index: 1;
}


/* Individual variations */
.bg-effects .b1 {
  width: 180px; height: 180px;
  left: 6%; top: 14%;
  filter: blur(20px);
  opacity: 0.36;
  animation-duration: 14s;
}

.bg-effects .b2 {
  width: 320px; height: 320px;
  left: 72%; top: 10%;
  filter: blur(34px);
  opacity: 0.18;
  animation-duration: 22s;
}

.bg-effects .b3 {
  width: 240px; height: 240px;
  left: 18%; top: 48%;
  animation-duration: 18s;
}

.bg-effects .b4 {
  width: 400px; height: 400px;
  left: 65%; top: 46%;
  opacity: 0.18;
  animation-duration: 30s;
}

.bg-effects .b5 {
  width: 220px; height: 220px;
  left: 38%; top: 22%;
  filter: blur(20px);
  opacity: 0.36;
  animation-duration: 15s;
}

.bg-effects .b6 {
  width: 280px; height: 280px;
  left: 8%; top: 72%;
  opacity: 0.2;
  animation-duration: 24s;
}

.bg-effects .b7 {
  width: 360px; height: 360px;
  left: 82%; top: 68%;
  filter: blur(34px);
  opacity: 0.18;
  animation-duration: 34s;
}

.bg-effects .b8 {
  width: 200px; height: 200px;
  left: 46%; top: 82%;
  animation-duration: 20s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% {
    transform: translate(28px, -36px) scale(1.06) rotate(4deg);
  }
  50% {
    transform: translate(-32px, 24px) scale(0.96) rotate(-3deg);
  }
  75% {
    transform: translate(22px, -18px) scale(1.04) rotate(2deg);
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}


@media (max-width: 768px) {
  .bg-effects .blob {
    opacity: 0.18;
    filter: blur(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-effects .blob {
    animation: none;
  }
}

#home {
    scroll-margin-top: 0px;
}

.section {
    scroll-margin-top: 80px; /* header height + breathing room */
}

#home.hero .hero-content h1 {
    color: rgba(255, 255, 255, 0.96) !important;
}

#home.hero .hero-content {
    opacity: 1 !important;
    filter: none !important;
}


/* Restore white text across the main site */
/* Main typography colors */
body { color: #ffffff; }

.section p,
.card p {
    color: rgba(255, 255, 255, 0.85);
}

.page-main {
  flex: 1; /* makes main content expand to push footer down */
}

.section,
.page-content,
.page-main {
  background: transparent !important;
}

.inner-page .card {
  width: 100%;
  max-width: 900px;   /* adjust if needed */
  margin: 0 auto;
  margin-top: 0;
  margin-bottom: 2rem;
}

/* Inner pages: let .container be the width constraint, not .section */
.inner-page .section {
  max-width: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.inner-page .container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Project Detail Page - Immersive Layout */
.project-detail-container {
    max-width: 1100px; /* Wider than your standard container */
}

.back-link {
    color: #4da3ff;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 2rem;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

.project-detail-content {
    color: white;
    padding-bottom: 5rem;
}

.project-header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem); /* Responsive sizing */
    margin: 0;
    font-weight: 800;
    /* This shadow ensures you can read the white text over the blobs */
    background: linear-gradient(to right, #fff, #4da3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-subtitle {
    font-size: 1.5rem;
    opacity: 0.8;
    margin-bottom: 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Text on left, media on right */
    gap: 4rem;
    align-items: start;
}

.project-text h2 {
    margin: 2rem 0 1rem 0;
    color: #4da3ff;
}

.project-text p, .project-text li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.media-placeholder {
    width: 100%;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.media-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
    .project-header h1 {
        font-size: 2.5rem;
    }
}

/* --- New Project Page Layout Styles --- */

.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    color: #4da3ff;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.content-section p, 
.content-section ul {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.content-section ul {
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.8rem;
}

/* 2-3 Photo Gallery per section */
.section-gallery {
    display: grid;
    /* This creates columns that shrink/grow based on screen size */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Photo Bank Grid (Smaller thumbnails) */
.photo-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(77, 163, 255, 0.3), transparent);
    margin: 4rem 0;
}

/* Ensure placeholders look good in the new grids */
.section-gallery .media-placeholder,
.media-placeholder {
    min-height: 200px;
    margin: 0; 
}

/* Styling for image captions inside the media placeholders */
.media-placeholder p {
    padding: 1rem 1.5rem;  /* 1rem top/bottom, 1.5rem left/right for that nice indent */
    margin: 0;             /* Removes default paragraph margin to keep it neat */
    font-size: 1rem;       /* Adjust if you want the caption slightly smaller */
    text-align: center;
}

/* Photo Bank Grid (Updated to 2 photos per line) */
.photo-bank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* This line forces exactly 2 equal columns */
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Ensure they stack cleanly on mobile phones */
@media (max-width: 768px) {
    .photo-bank-grid {
        grid-template-columns: 1fr; /* Changes to 1 photo per line on smaller screens */
    }
}

/* Image Cluster Layout */
.image-cluster {
    margin: 1.5rem 0 2rem 0; 
}

/* Forces the two bottom images into a neat 2-column grid */
.small-images-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem;
    margin-top: 1.5rem; /* Space between the top image and the bottom row */
}

/* Ensure they stack neatly on top of each other on mobile phones */
@media (max-width: 768px) {
    .small-images-row {
        grid-template-columns: 1fr;
    }
}

/* Constrains tall/portrait images and centers them */
.media-placeholder.img-portrait {
    max-width: 450px;      /* Stops the image from stretching too wide */
    min-height: auto;      /* Overrides the default placeholder height */
    margin: 1.5rem auto;   /* The 'auto' left/right margins center it perfectly */
}

/* Ensures the photo doesn't crop out your notes */
.media-placeholder.img-portrait img {
    object-fit: contain;   
}

/* Container for side-by-side portrait images */
.side-by-side-portraits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;     /* Keeps them from getting too wide together */
    margin: 1.5rem auto;  /* Centers the whole block on the page */
}

/* Ensure they stack cleanly on mobile phones */
@media (max-width: 768px) {
    .side-by-side-portraits {
        grid-template-columns: 1fr;
        max-width: 450px; /* Keeps the single stacked image constrained */
    }
}

/* Adds breathing room below standalone, full-width images */
.media-placeholder:not(.img-float-left):not(.img-float-right) {
    margin-bottom: 2rem;
}

/* Ensure the card can anchor absolute positioned elements */
.card {
    position: relative; 
}

/* Base styles for the status tags */
.status-tag {
    position: absolute;
    top: 1.5rem;          /* Matches the card's padding */
    right: 1.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;  /* Creates a nice pill shape */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Green for Completed */
.status-tag.completed {
    background-color: #28a745; 
    color: #ffffff;
}

/* Yellow for In Progress */
.status-tag.in-progress {
    background-color: #ffc107;
    color: #081626;       /* Dark text for better contrast on yellow */
}

/* Mobile adjustment to ensure tags don't overlap long titles */
@media (max-width: 768px) {
    .status-tag {
        position: static; /* Removes it from the top right */
        display: inline-block;
        align-self: flex-start;
        margin-bottom: 0.5rem;
    }
}

/* --- CV Page Layout Styles --- */
.cv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Overrides default card spacing inside the grid */
.cv-grid .card {
    margin-top: 0; 
}

/* Mini tags for dates/schools */
.cv-item-title {
    display: inline-block;
    background-color: #4da3ff;
    color: #081626;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Styled lists for the CV points */
.cv-list {
    padding-left: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.cv-list li {
    margin-bottom: 0.5rem;
}

/* --- Learning Page Styles --- */
.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Ensure the cards in this grid stretch to equal heights */
.learning-grid .card {
    margin-top: 0;
    justify-content: space-between; 
    padding: 0; 
    overflow: hidden; 
    opacity: 1;               /* NEW: Forces the card to be visible */
    transform: translateY(0); /* NEW: Stops the card from floating down */
}


/* Container for the text inside the zero-padding card */
.learning-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Image styling at the top of the card */
.learning-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid rgba(77, 163, 255, 0.2);
    transition: transform 0.4s ease;
}

/* Nice zoom effect when hovering over the card */
.learning-grid .card:hover .learning-image {
    transform: scale(1.05);
}

/* Category tags for the learning cards */
.learning-tag {
    display: inline-block;
    background-color: rgba(77, 163, 255, 0.15);
    color: #4da3ff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    align-self: flex-start;
}

/* Section dividers specifically for the learning page */
.learning-section-title {
    margin-top: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

/* =========================================
   MOBILE RESPONSIVENESS FIXES
   ========================================= */
@media (max-width: 768px) {
    /* 1. Fix the massive Welcome text */
    .hero h1 {
        font-size: 3.5rem;
        margin-bottom: 1.5rem;
    }

    /* 2. Stack the hero buttons neatly */
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        padding: 0 2rem;
    }

    /* 3. Center and wrap the navigation menu */
    .navbar {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        gap: 0.8rem;
    }

    /* 4. Fix grids from pushing off the edge of the screen */
    .learning-grid {
        grid-template-columns: 1fr; /* Forces 1 card per row */
    }
    
    .cv-grid {
        grid-template-columns: 1fr; /* Forces 1 card per row */
    }

    /* 5. Make the side-by-side project images stack */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* 6. Reduce overall section padding */
    .section {
        padding: 3rem 1rem;
    }

    /* 7. Ensure font sizes on inner pages scale down */
    .overview h1, .section h1 {
        font-size: 2rem;
    }
}