/* ==========================
   General Reset & Body
========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px; /* Base font size for desktops */
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: white;
    background-image: url("../images/welcome.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    background-attachment: fixed;  /* keeps it in place */
}

/* ==========================
   Navigation
========================== */
nav {
    display: flex;
    justify-content: space-between; /* logo left, links right */
    align-items: center;
    padding: 20px 40px;
    background-color: rgba(0,0,0,0.6);
}
.nav-left img.nav-logo {
    height: 32px;
    width: auto;
    display: block;
}
.nav-right a {
    color: white;
    text-decoration: none;
    margin-left: 25px;
    font-weight: bold;
    font-size: 1.1rem;
}
.nav-right a:hover {
    text-decoration: underline;
}

/* ==========================
   Main Content
========================== */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0px;
}

/* Layout per page */
body.home main {
    justify-content: center;
    align-items: center;
}
body.projects main,
body.project-detail main {
    justify-content: flex-start;
    align-items: center;
}

/* ==========================
   Footer
========================== */
footer {
    text-align: center;
    padding: 15px 0;
    background-color: rgba(0,0,0,0.6);
    font-size: 1rem;
}

/* ==========================
   Ellipse Welcome Page
========================== */
.ellipse-container {
    display: flex;
    justify-content: center;
    width: 100%;
}
.ellipse {
    position: relative;
    margin: auto;
    width: 70%;
    max-width: 700px;
    aspect-ratio: 2 / 1;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 0;
}
.ellipse::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    border-radius: 50%;
    z-index: -1;
}
h1, p {
    margin: 0;
    position: relative;
    z-index: 1;
    text-align: center;
}
h1 { font-size: 2.2rem; }
p { font-size: 1.3rem; }

/* ==========================
   Project Cards
========================== */
.projects-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    padding: 30px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.projects-container a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    max-width: 600px;
}
.project-card {
    width: 100%;
    text-align: center;
    background-color: rgba(0,0,0,0.6);
    padding: 30px;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0,0,0,0.6); }
.project-card img { width: 100%; border-radius: 10px; }
.project-card video { width: 100%; height: auto; border-radius: 10px; display: block; }
.project-card h3 { margin-top: 15px; font-size: 1.4rem; }
.project-card p { margin-top: 10px; font-size: 1.1rem; }

/* ==========================
   Two-column layout in cards
========================== */
.card-columns {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap; /* stack on small screens */
}
.card-column { flex: 1 1 45%; }
.card-column h2 { font-size: 1.4rem; margin-bottom: 10px; text-align: left; }
.card-column ul {
  list-style-type: disc;
  list-style-position: outside;
  margin: 0;
  padding-left: 1.2em; /* spacing from card edge */
  font-size: 1.1rem;
  text-align: left;
}

/* ==========================
   Simple Responsive Gallery
========================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1000px;
}
.gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* ==========================
   Frosted background overlay
========================== */
body.projects::before,
body.project-detail::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.35); /* semi-opaque white */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
    pointer-events: none;
}
body.projects nav,
body.projects main,
body.projects footer,
body.project-detail nav,
body.project-detail main,
body.project-detail footer {
    position: relative;
    z-index: 1;
}

/* ==========================
   Lightbox
========================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}









.lightbox-img-wrapper img {
  max-width: 90vw;    /* always fit to viewport width */
  max-height: 90vh;   /* always fit to viewport height */
  width: auto;
  height: auto;
  object-fit: contain; /* keep aspect ratio, no cropping */
  border-radius: 8px;
  display: block;
}

/* ==========================
   Scroll-to-top button
========================== */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 15px;
  z-index: 10001;
  font-size: 18px;
  font-weight: bold;
  background-color: rgba(0,0,0,0.2);
  color: #ccc;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: opacity 0.3s, background-color 0.3s;
  line-height: 1.1;
  text-align: center;
}
#scrollTopBtn:hover {
  background-color: rgba(0,0,0,0.4);
  color: #fff;
}

/* ==========================
   Responsive Design
========================== */
@media (max-width: 1024px) {
    html { font-size: 16px; }
    .ellipse { width: 80%; max-width: 400px; }
    h1 { font-size: 2rem; }
    p { font-size: 1.1rem; }
}
@media (max-width: 600px) {
    html { font-size: 14px; }
    nav { text-align: center; padding: 15px; }
    .nav-right a {
        display: inline-block;
        margin: 5px 12px;
        font-size: 1rem;
    }
    .ellipse { width: 90%; max-width: 300px; }
    h1 { font-size: 1.6rem; }
    p { font-size: 1rem; }
    .project-card { padding: 20px; }
    .project-card h3 { font-size: 1.2rem; }
    .project-card p { font-size: 1rem; }
}

/* ==========================
   Modern Scrollbar
========================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.3) rgba(0,0,0,0.3); }

/* ==========================
   Lightbox Overlay
========================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.lightbox-img-wrapper {
  max-width: 90vw;   /* bound to viewport width */
  max-height: 90vh;  /* bound to viewport height */
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: center center;
  overflow: hidden; /* prevent overflowing image */
}

.lightbox-img-wrapper img {
  width: 95%;
  height: 95%;
  object-fit: contain; /* always fits inside wrapper */
  border-radius: 8px;
  display: block;
}

/* ==========================
   Lightbox Controls Overlay
========================== */
#lightbox-controls {
  position: absolute; /* JS will size and place it */
  inset: 0;
  pointer-events: none; 
  z-index: 10001;
  display: none;
}

#lightbox-controls span {
  pointer-events: auto;
  color: #666;
  cursor: pointer;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 40px;
  font-weight: bold;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  padding: 5px;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  color: #999;
}

/* ==========================
   Content Links (underlined + inline, no extra breaks)
   ========================== */
main p a,
main li a,
main .card-column a {
  text-decoration: underline !important;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  display: inline !important;
  white-space: normal !important;
  vertical-align: baseline;
}

/* Exclude project card wrapper links */
.projects-container > a {
  text-decoration: none !important;
}
