/* =======================
   CKsite Common Styles
   ======================= */

/* ---- Color Variables for Theme ---- */
:root {
  --primary-color: #2e86ab;
  --secondary-color: #b0bec5;
  --background-color: #e9eef1;
  --hover-color: #12506b;
  --header-border-color: rgb(6, 37, 51);
  --text-color: #202124;
  --card-bg-color: #ffffff;
  --accent-color: #f4b400;
}

/* ---- CSS Reset and Base Styles ---- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Body Layout and Background ---- */
body {
  background: linear-gradient(to bottom, var(--background-color), #dbe3e7);
  font-family: Arial, sans-serif;
  color: var(--text-color);
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

body::before {
  content: none !important;
}

/* ---- Aurora Background and Overlay Effects ---- */
#aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at 20% 40%, #7fbcffcc 0%, transparent 65%),
    radial-gradient(ellipse at 80% 60%, #b388ffbb 0%, transparent 65%),
    radial-gradient(ellipse at 50% 80%, #00e6b0bb 0%, transparent 70%),
    radial-gradient(ellipse at 60% 30%, #00ffd0aa 0%, transparent 70%),
    radial-gradient(ellipse at 40% 70%, #2e86ab99 0%, transparent 70%);
  animation: auroraMove 12s linear infinite alternate;
  transition: background 0.5s;
  filter: blur(2px) brightness(1.15) saturate(1.3);
}
#aurora-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.32);
}
@keyframes auroraMove {
  0% {
    background-position: 20% 40%, 80% 60%, 50% 80%, 60% 30%, 40% 70%;
  }
  100% {
    background-position: 35% 60%, 65% 40%, 60% 90%, 50% 20%, 30% 80%;
  }
}
@media (max-width: 768px) {
  #aurora-bg {
    background: radial-gradient(
        ellipse at 30% 50%,
        #7fbcff99 0%,
        transparent 65%
      ),
      radial-gradient(ellipse at 70% 60%, #b388ff88 0%, transparent 65%),
      radial-gradient(ellipse at 60% 30%, #00ffd088 0%, transparent 70%);
    animation-duration: 18s;
    filter: blur(2.5px) brightness(1.1) saturate(1.15);
  }
  #aurora-overlay {
    background: rgba(255, 255, 255, 0.38);
  }
}

/* ---- Header and Navigation Bar ---- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: linear-gradient(135deg, #2e86ab, #1f5e78);
  color: white;
  font-family: "Orbitron", sans-serif;
  border-bottom: 2px solid var(--header-border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* ---- Logo Styles ---- */
.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 140px;
}
.logo-img {
  width: 60px;
  height: 60px;
}
.logo-text {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ---- Navigation Menu Styles ---- */
.menu {
  display: flex;
  gap: 15px;
  margin-right: 140px;
}
.menu a {
  text-decoration: none;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  padding: 8px 14px;
  border-radius: 6px;
  border: 2px solid white;
}
.menu a:hover {
  background-color: var(--hover-color);
  transform: scale(1.05);
}

/* ---- Main Content and Section Layout ---- */
.content {
  flex: 1;
  padding: 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}
h1 {
  color: var(--primary-color);
  text-align: center;
}
section {
  margin: 60px auto;
  padding: 20px;
  background-color: var(--card-bg-color);
  border-radius: 8px;
  width: 60vw;
  transition: box-shadow 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 2;
}
section:hover {
  box-shadow: 0 4px 20px rgba(46, 134, 171, 0.5);
  text-shadow: 0 0 10px rgba(46, 134, 171, 0.6);
  transform: translateY(-5px);
}
section h2 {
  color: var(--primary-color);
}
section p {
  color: var(--text-color);
}
section.highlighted {
  box-shadow: 0 4px 20px rgba(46, 134, 171, 0.5);
  text-shadow: 0 0 10px rgba(46, 134, 171, 0.6);
  transform: translateY(-5px);
}

/* ---- About Me Section Background ---- */
#about-me {
  background-image: url('pexels-googledeepmind-18069161.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---- About Me Header Box Styling ---- */
#about-me h2 {
  background: linear-gradient(120deg, #e3f1fa 60%, #f7fafc 100%);
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(46, 134, 171, 0.1);
  padding: 16px 24px;
  border: 1.5px solid #cbe7fa;
  display: inline-block;
  margin: 0 auto 2em auto;
  transition: box-shadow 0.2s;
  position: relative;
  z-index: 10;
  color: #2e86ab !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
}

#about-me h2:hover {
  box-shadow: 0 6px 24px rgba(46, 134, 171, 0.18);
}

/* ---- Footer Styles ---- */
footer {
  padding: 20px;
  background-color: var(--card-bg-color);
  color: var(--primary-color);
  text-align: center;
  font-size: 1rem;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  margin: 20px auto;
  width: 80%;
  position: relative;
  z-index: 2;
}

/* ---- Animated Gradient for Section Headings ---- */
h2 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(270deg, #2e86ab, #b388ff, #12506b, #2e86ab);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #12506b; /* Fallback for unsupported browsers */
  animation: gradient-h2 6s ease-in-out infinite;
  text-align: center;
  margin-bottom: 1em;
}
@keyframes gradient-h2 {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Compact style for social media icon buttons */
.social-icon-btn {
  padding: 4px 6px;
  min-width: unset;
  min-height: unset;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Keep ripple effect working */
  position: relative;
  overflow: hidden;
}

.social-icon-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0;
}

.social-icon-btn:hover {
  background-color: var(--hover-color);
  transform: scale(1.1);
}

.social-icon-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%) skewX(-20deg);
  pointer-events: none;
  z-index: 3;
  animation: shiny-move 2.2s cubic-bezier(0.4, 1, 0.7, 1) infinite;
}

@keyframes shiny-move {
  0% {
    transform: translateX(-100%) skewX(-20deg);
  }
  60% {
    transform: translateX(120%) skewX(-20deg);
  }
  100% {
    transform: translateX(120%) skewX(-20deg);
  }
}

/* ---- Button Styles (except menu) ---- */
.gallery-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.gallery-button:hover {
  background-color: var(--hover-color);
  transform: scale(1.1);
}
.gallery-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%) skewX(-20deg);
  pointer-events: none;
  z-index: 3;
  animation: shiny-move 2.2s cubic-bezier(0.4, 1, 0.7, 1) infinite;
}
@keyframes shiny-move {
  0% {
    transform: translateX(-100%) skewX(-20deg);
  }
  60% {
    transform: translateX(120%) skewX(-20deg);
  }
  100% {
    transform: translateX(120%) skewX(-20deg);
  }
}

/* ---- Ripple Effect for Click Feedback ---- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(46, 134, 171, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
  z-index: 9999;
}
@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ---- Card and Skill List Styles ---- */
.skills-list {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}
.skill-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(46, 134, 171, 0.08);
  padding: 20px;
  min-width: 120px;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}
.hobby-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(46, 134, 171, 0.08);
  padding: 20px;
  min-width: 180px;
  max-width: 250px;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}
.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(46, 134, 171, 0.15);
  object-fit: cover;
  object-position: center;
  position: relative;
  z-index: 2;
}

/* ---- Responsive Layout Adjustments ---- */
@media (max-width: 768px) {
  .logo {
    margin-left: 0;
    justify-content: center;
  }
  .header {
    flex-direction: column;
    align-items: center;
  }
  .menu {
    margin-right: 0;
    justify-content: center;
  }
  .menu a {
    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
  }
  .menu a:hover,
  .menu a:active {
    background-color: var(--hover-color);
    transform: scale(1.05);
  }
  section {
    width: 90%;
    margin: 20px auto;
  }
  .content {
    padding: 10px;
  }
  .skills-list {
    gap: 15px;
  }
}
@media (min-width: 769px) {
  .menu {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 0;
    width: auto;
  }
  .menu a {
    font-size: 1rem;
    text-transform: uppercase;
    padding: 8px 14px;
    width: auto;
    height: auto;
  }
  .menu a::before {
    content: "";
  }
}

/* ---- Section Backgrounds for Readability ---- */
section,
#welcome-box {
  background-color: rgba(255, 255, 255, 0.92);
  z-index: 2;
}
#welcome-box {
  margin: 60px auto;
  padding: 20px;
  border-radius: 8px;
  width: 80vw;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.92);
  z-index: 2;
}
@media (min-width: 769px) {
  #welcome-box {
    width: 50vw;
  }
}
@media (max-width: 768px) {
  section,
  #welcome-box {
    width: 90%;
    margin: 20px auto;
  }
}

/* ---- News Section Styles ---- */
#news-section {
  margin: 40px auto;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  width: 60vw;
  box-shadow: 0 4px 18px rgba(46, 134, 171, 0.1);
  text-align: center;
  position: relative;
  z-index: 2;
}
.news-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
}
.news-arrow {
  background: var(--primary-color, #2e86ab);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(46, 134, 171, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.news-arrow:hover {
  background: var(--hover-color, #12506b);
  transform: scale(1.08);
}
.news-content {
  min-width: 220px;
  max-width: 420px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.news-link-card {
  background: #f7fafc;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(46, 134, 171, 0.13);
  padding: 0 0 18px 0;
  margin: 0 auto;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.news-link-card:hover {
  box-shadow: 0 8px 32px rgba(46, 134, 171, 0.18);
  transform: translateY(-2px) scale(1.03);
}
.news-thumb {
  width: 100%;
  max-width: 380px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  background: #e9eef1;
  margin-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  z-index: 2;
}
.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color, #2e86ab);
  margin: 8px 0 0 0;
  text-align: center;
  padding: 0 10px;
  position: relative;
  z-index: 2;
}
@media (max-width: 768px) {
  #news-section {
    width: 95vw;
    padding: 12px 4px;
  }
  .news-content {
    min-width: 0;
    max-width: 98vw;
  }
  .news-link-card {
    max-width: 98vw;
  }
  .news-thumb {
    max-width: 98vw;
    height: 140px;
  }
  .news-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
}

/* ---- Menu Glow Effect for Home Button ---- */
.menu a[href="#welcome-box"] {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.6);
  animation: glow 1.5s infinite alternate;
}
@keyframes glow {
  from {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(255, 255, 255, 0.6);
  }
  to {
    box-shadow: 0 0 20px rgba(255, 255, 255, 1),
      0 0 30px rgba(255, 255, 255, 0.8);
  }
}

/* ---- Profile Card Styles ---- */
.profile-card {
  background: linear-gradient(145deg, #60496e8c 0%, #71c4ff44 100%);
  border-radius: 30px;
  box-shadow: 0 4px 24px rgba(46, 134, 171, 0.13);
  padding: 24px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 340px;
  margin-bottom: 24px;
  transition: transform 0.18s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.18s;
  will-change: transform;
  perspective: 600px;
}
.profile-card:active {
  box-shadow: 0 2px 8px rgba(46, 134, 171, 0.18);
}
.profile-card-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2e86ab;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(46, 134, 171, 0.13);
}
.profile-card-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2e86ab;
  text-align: center;
}
.profile-card-title {
  font-size: 1rem;
  color: #444;
  margin-bottom: 6px;
  text-align: center;
}
.profile-card-meta {
  font-size: 0.97rem;
  color: #2e86ab;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}
.profile-card-status {
  color: #2e86ab;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  text-align: center;
  width: 100%;
  justify-content: center;
  background: rgba(46, 134, 171, 0.07);
  border-radius: 10px;
  padding: 7px 10px 7px 10px;
  font-size: 0.98rem;
  line-height: 1.4;
}
.profile-card-status svg {
  margin-right: 0;
  flex-shrink: 0;
}
.profile-card-contact-btn {
  background: #2e86ab;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s, transform 0.2s;
}
.profile-card-contact-btn:hover,
.profile-card-contact-btn:focus {
  background: #12506b;
  outline: none;
}

/* ---- About Me and Future Plans Blurb Styles ---- */
.about-me-blurb {
  background: linear-gradient(120deg, #e3f1fa 60%, #f7fafc 100%);
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(46, 134, 171, 0.1);
  padding: 28px 32px;
  font-size: 1.18rem;
  color: #234;
  max-width: 500px;
  margin: 0;
  align-self: center;
  line-height: 1.7;
  font-weight: 500;
  text-align: center;
  transition: box-shadow 0.2s;
  border: 1.5px solid #cbe7fa;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-me-blurb b {
  color: #2e86ab;
  font-weight: 700;
}
.about-me-blurb hr {
  margin: 28px 0 18px 0;
  border: none;
  border-top: 1.5px solid #cbe7fa;
}
.about-me-blurb .future-plans-title {
  font-size: 1.07em;
  font-weight: 700;
  color: #2e86ab;
  margin-bottom: 6px;
  display: block;
}
.about-me-blurb .future-plans-text {
  font-size: 1.07em;
  display: block;
}
.about-me-blurb:hover {
  box-shadow: 0 6px 24px rgba(46, 134, 171, 0.18);
}
@media (max-width: 900px) {
  #about-me > div {
    flex-direction: column;
    gap: 18px;
  }
  .profile-card {
    margin-bottom: 0;
  }
  .profile-card-avatar {
    width: 90px;
    height: 90px;
  }
  .about-me-blurb {
    max-width: 98vw;
    padding: 18px 4vw;
  }
}
@media (max-width: 600px) {
  .profile-card {
    max-width: 98vw;
    padding: 18px 6vw 16px 6vw;
  }
  .profile-card-avatar {
    width: 70px;
    height: 70px;
  }
  .profile-card-name {
    font-size: 1.1rem;
  }
  .profile-card-title {
    font-size: 0.95rem;
  }
  .profile-card-status {
    font-size: 0.95rem;
    padding: 6px 6px 6px 6px;
  }
  .about-me-blurb {
    font-size: 1.04rem;
    padding: 12px 2vw;
  }
}

/* --- SHINY METAL EFFECT FOR PROFILE CARD --- */
.profile-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
  box-shadow: 0 8px 32px rgba(30, 40, 60, 0.18), 0 1.5px 6px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s, transform 0.2s;
  --shine-x: 50%;
  --shine-y: 50%;
}
.profile-card::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--shine-x, 50%) var(--shine-y, 50%),
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.25) 35%,
    rgba(255, 255, 255, 0.1) 60%,
    transparent 100%
  );
  opacity: 0.95;
  transition: background 0.2s;
  z-index: 2;
  mix-blend-mode: lighten;
}
.profile-card:active::before {
  opacity: 0.8;
}
.profile-card .profile-card-avatar,
.profile-card .profile-card-name,
.profile-card .profile-card-title,
.profile-card .profile-card-meta,
.profile-card .profile-card-contact-btn {
  position: relative;
  z-index: 3;
}

/* --- CK Logo Watermark Layer --- */
.profile-card-watermarks {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.55;
  mix-blend-mode: lighten;
}
.profile-card-watermarks .ck-logo-watermark {
  position: absolute;
  width: 90px;
  height: 90px;
  opacity: 0.98;
  background: url("https://raw.githubusercontent.com/ckfnr/gallery/refs/heads/main/cksite_logo_transparent.png")
      center/contain no-repeat,
    linear-gradient(
      120deg,
      #fff 10%,
      #e0e0e0 40%,
      #b0b0b0 60%,
      #fff 80%,
      #e0e0e0 100%
    );
  background-blend-mode: lighten;
  background-size: 90px 90px, 200% 200%;
  -webkit-mask-image: url("https://raw.githubusercontent.com/ckfnr/gallery/refs/heads/main/cksite_logo_transparent.png");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("https://raw.githubusercontent.com/ckfnr/gallery/refs/heads/main/cksite_logo_transparent.png");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  filter: blur(0.1px) drop-shadow(0 0 8px #fff8);
  transition: background-position 0.2s, opacity 0.2s;
  pointer-events: none;
}
@media (max-width: 900px) {
  .profile-card-watermarks .ck-logo-watermark {
    width: 60px;
    height: 60px;
    background-size: 60px 60px, 200% 200%;
  }
}
@media (max-width: 600px) {
  .profile-card-watermarks .ck-logo-watermark {
    width: 38px;
    height: 38px;
    background-size: 38px 38px, 200% 200%;
  }
  .profile-card {
    min-width: 0;
    width: 95vw;
    max-width: 99vw;
    margin: 0 auto;
  }
  .about-me-blurb {
    max-width: 98vw;
    font-size: 1em;
  }
}
