* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cormorant Garamond', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 1px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: #000000;
}
::-webkit-scrollbar-thumb {
    background-color: #000000;
    border-radius: 6px;
    border: 1px solid #222222;
    max-height: 12px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #000000;
}

html {
    background-color: black;
    color: #dcdcdc;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url(/files/media/LoneSea.webp) no-repeat center center fixed;
    background-size: cover;
    font-size: 16px;
    animation: fadeIn 2s forwards;
}

/* Main container */
.pagecontents {
    display: flex;
    flex-direction: row;
    width: 1000px;
    height: 90vh;
    background-color: black;
    box-shadow: 0px 0px 100px black;
}

.pagecontents .halfsection {
    padding: 24px 48px;
    overflow-y: scroll;
    text-align: justify;
    opacity: 0;
    animation: fadeIn 1s forwards;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typography */
h1 {
  font-size: 48px;
}
h2 {
  font-size: 32px;
}
h3 {
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
    margin-top: 20px;
}
p {
    font-size: 20px;
    margin-bottom: 20px;
}
a {
    color: white;
}

/* Layout helpers */
.centered-text {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
}
.spacer {
    margin-top: 40px;
}

.profilepicture {
    width: 400px;
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
}

.aboutheader {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: -20px;
}
.aboutheader .halfsection {
    display: flex;
    justify-content: center;
    flex-direction: column;
    overflow-x: hidden;
}
.aboutheader .halfsection:not(:last-child) {
    margin-right: 10px;
}
.aboutheader .halfsection h2 {
    margin-bottom: 20px;
}

/* Dropdowns */
details.dropdown summary {
    list-style: none;
    outline: none;
}
details:not(:first-child) {
    margin-top: 20px;
}
.dropdown-header {
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 0px 10px 0px;
    border-bottom: 1px solid white;
}
.dropdown-header .arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #ffffff;
    transition: transform 0.3s ease;
}
details.dropdown[open] .dropdown-header .arrow {
    transform: rotate(90deg);
}
.dropdown-content {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
    overflow: hidden;
}
details.dropdown[open] .dropdown-content {
    transform: scaleY(1);
}
.dropdown-content a {
    display: block;
    color: #ffffff;
    font-size: 32px;
    margin-top: 10px;
    text-decoration: none;
}
.dropdown-content a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 20px;
}
.footer p {
    font-size: 14px;
    margin: 0;
}

/* Socials */
.sociallinks {
    display: flex;
    justify-content: center;
}
.sociallinks a:not(:last-child) {
    margin-right: 10px;
}
.sociallinks a img {
    width: 45px;
}

/* Row/Column layout */
.row {
    display: flex;
}
.column {
    flex: 50%;
    padding-inline: 20px;
}

/* Gallery section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 250px;
  gap: 12px;
  grid-auto-flow: dense; /* critical for Pinterest-like packing */
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease; /* smooth hover effect */
}

.gallery-item img:hover {
  transform: scale(1.02);
}

/* Wide image spans full width */
.gallery-item.wide {
  grid-column: 1 / -1;
  grid-row: span 2; /* make it taller too */
}

/* Tall images span 2 rows */
.gallery-item.tall {
  grid-row: span 2;
}

/* Normal images default: 1x1 */
.gallery-item.normal {
  grid-row: span 1;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
}

.lightbox .close,
.lightbox .prev,
.lightbox .next {
  position: absolute;
  color: white;
  font-size: 2em;
  cursor: pointer;
  user-select: none;
}

.lightbox .close { top: 20px; right: 40px; }
.lightbox .prev { top: 50%; left: 40px; transform: translateY(-50%); }
.lightbox .next { top: 50%; right: 40px; transform: translateY(-50%); }


/* --- RESPONSIVE FIXES --- */
@media (max-width: 768px) {
  .pagecontents {
    width: 100%;
    height: auto;
    flex-direction: column;
    box-shadow: none;
  }
  .pagecontents .halfsection {
    padding: 16px;
    min-height: auto;
    overflow: visible;
  }
  .aboutheader {
    flex-direction: column;
    align-items: center;
    margin-top: 0;
  }
  .aboutheader .halfsection {
    margin-right: 0;
    text-align: center;
  }
  .profilepicture {
    width: 250px;
    max-width: 100%;
  }
  .sociallinks {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
  }
  .sociallinks a img {
    width: 35px;
  }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
  p  { font-size: 16px; }
  .row {
    flex-direction: column;
  }
  .column {
    padding-inline: 10px;
    margin-bottom: 20px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-rows: 150px;
  }
  .footer p {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }
  p  { font-size: 14px; }
  .profilepicture {
    width: 200px;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 120px;
  }
}

/* Contact section */
.contact-list {
  list-style: none;
  padding: 0;
  max-width: 300px;
  margin: 0 auto; /* center the whole list */
}
.contact-list li {
  display: flex;
  align-items: center;
  justify-content: left;
  margin: 16px 0;
}
.contact-list img {
  width: 28px;
  height: 28px;
  margin-right: 8px;
}
.contact-list a,
.contact-list .contact-email {
  color: #fff;
  font-size: 28px;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}
.contact-email {
  cursor: pointer;
  transition: color 0.3s ease; /* smooth color change */
}
.contact-email:hover {
  color: #ffeb77; /* darker gray on hover */
}
.contact-email.copied {
  color: #6dff72; /* green while showing "Copied!" */
}

/* Social link hover colors */
.contact-list a[href*="twitter.com"]:hover {
  color: #4bbaff; /* Twitter pale blue */
}
.contact-list a[href*="bsky.app"]:hover {
  color: #5783c0; /* Bluesky darker blue */
}
.contact-list a[href*="ko-fi.com"]:hover {
  color: #FF5E5B; /* Ko-fi red */
}
.contact-list a[href*="artstation.com"]:hover {
  color: #9B59B6; /* ArtStation purple */
}

.contact-button {
  text-align: center;
  margin: 40px 0;
}
.contact-button a {
  display: inline-block;
  padding: 14px 40px;
  border: 2px solid #fff;
  background: none;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.contact-button a:hover {
  background-color: #fff;
  color: #000;
  transform: translateY(-2px);
}