:root {
  --primary-color: #6c63ff;
  --primary-light: #8a84ff;
  --secondary-color: #ff5e5e;
  --background-dark: #0a0a0a;
  --background-light: #1e1f22;
  --text-primary: #ffffff;
  --text-secondary: #b9bbbe;
  --text-muted: #727272;
  --gradient-primary: linear-gradient(135deg, var(--primary-color), #9d95ff);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.2);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --transition-fast: 0.3s ease;
  --transition-normal: 0.5s ease;
  --font-main: 'Montserrat', sans-serif;
  --font-code: 'Source Code Pro', monospace;
  --font-heading: 'Fredoka', sans-serif;
  --section-spacing: 3rem;
}

/* ----------- Reset & Base Styles ----------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--background-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  transition: var(--transition-normal);
}

::-webkit-scrollbar {
  width: 0px;
}

::-webkit-scrollbar-track {
  background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
  text-decoration: none;
}

/* ----------- Loading & Transition Effects ----------- */
#covers {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  height: 100%;
  width: 100%;
  z-index: 100;
  pointer-events: none;
}

.cover {
  height: 100%;
  width: 100%;
  position: fixed;
  transition: var(--transition-normal);
}

#cover1 {
  background-color: var(--background-dark);
  z-index: 10;
}

#loading {
  z-index: inherit;
  font-size: 1.5rem;
  font-family: var(--font-code);
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ----------- Background & Layout ----------- */
#bg {
    background-color: rgba(0, 0, 0, 0.6);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    /* Removed fixed attachment for better mobile compatibility */
    height: 100%;
    width: 100%;
    position: fixed;
    transition-duration: 0.8s;
    pointer-events: none;
    z-index: -1;
}

/* Apply background-attachment only on non-iOS devices */
@supports not (-webkit-touch-callout: none) {
    #bg {
        background-attachment: fixed;
    }
}

.container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}

#content-box {
  background-color: rgba(10, 10, 10, 0.8);
  width: min(90%, 1100px);
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow-y: auto;
  max-height: 90vh;
  transition: var(--transition-normal);
  z-index: 1;
  opacity: 0;
  pointer-events: all;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.padding {
  padding: 1.5rem;
}

section {
  margin-bottom: var(--section-spacing);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 3px;
  background: var(--gradient-primary);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
}

/* ----------- Header & Banner ----------- */
#banner {
  width: 100%;
  color: white;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  user-select: none;
  height: 300px;
  transition: var(--transition-normal);
  background-image: url(/img/content/kana.webp);

}

#banner-grad {
  background-image: linear-gradient(to bottom, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.8) 80%, rgba(10, 10, 10, 1) 100%);
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 2rem;
}

/* ----------- Profile Section ----------- */
#profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
  margin-top: -80px;
  position: relative;
  z-index: 2;
}

#profile-image {
  display: block;
  position: relative;
}

#profile-image::after {
    height: 134px;
    width: 134px;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  animation: pulse 2s infinite;
  transition: var(--transition-fast);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#profile-image img {
  height: 140px;
  width: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--background-dark);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: var(--transition-fast);
}

#profile-image img:hover {
  transform: scale(1.05);
}

#profile-name {
  text-align: center;
  margin-top: 1rem;
}

#profile-name h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin: 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#profile-name p {
  font-size: 1.1rem;
  margin: 0.3rem 0 0;
  color: var(--text-secondary);
  font-weight: 500;
}

#profile-description {
  max-width: 800px;
  margin: 2rem auto;
  text-align: left;
}

#profile-description p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.highlight-link {
  position: relative;
  color: var(--secondary-color);
  font-weight: 600;
  transition: var(--transition-fast);
}

.highlight-link:hover {
  color: var(--primary-light);
  text-decoration: none;
}

.highlight-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-light);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.highlight-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ----------- Social Media Section ----------- */
#social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.btn {
  background-color: var(--background-light);
  color: var(--text-primary);
  border: none;
  padding: 0.6rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-fast);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(-1px);
}

#social .logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

/* ----------- Projects/Cards Section ----------- */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 1.5rem;
}

.card {
  background: var(--background-light);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-content {
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.card .sub {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.card .stars {
  color: #ffc107;
}

.card p {
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ----------- Discord Presence ----------- */
.presence {
  background-color: var(--background-light);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  max-width: 400px;
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.header {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}

.avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
  margin-right: 0.8rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--background-light);
}

.online::after {
  background-color: #43b581;
}

.idle::after {
  background-color: #faa61a;
}

.dnd::after {
  background-color: #f04747;
}

.offline::after {
  background-color: #747f8d;
}

.status {
  flex-grow: 1;
  text-align: left;
}

.username {
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  font-size: 0.95rem;
}

.activity {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.activity-section {
  font-size: 0.85rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius-sm);
  padding: 0.8rem;
  display: flex;
  align-items: center;
}

.activity-image {
  position: relative;
  margin-right: 0.8rem;
}

.activity-section .logo {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.activity-section .logo-small {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.activity-text {
  text-align: left;
  flex-grow: 1;
}

.playing {
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  font-size: 0.9rem;
}

.state {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

/* ----------- Skills Section ----------- */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 0 1.5rem;
}

.skill-category {
  flex: 1 1 300px;
  background: var(--background-light);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.skill-category h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--primary-color);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.skill-item:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.skill-item img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 0;
}

/* ----------- Footer ----------- */
footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-heading);
}

/* ----------- Media Queries ----------- */
@media screen and (max-width: 1200px) {
  #content-box {
    width: 95%;
  }
}

@media screen and (max-width: 992px) {
  .section-title {
    font-size: 1.8rem;
  }
  
  #profile-name h1 {
    font-size: 2.2rem;
  }
}

@media screen and (max-width: 768px) {
  #content-box {
    width: 100%;
    max-height: none;
    min-height: 100vh;
    border-radius: 0;
  }
  
  .container {
    padding: 0;
  }
  
  #banner {
    height: 250px;
  }
  
  #profile-name h1 {
    font-size: 2rem;
  }
  
  .card-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .skills-container {
    flex-direction: column;
  }
}

@media screen and (max-width: 576px) {
  .padding {
    padding: 1rem;
  }
  
  #profile-image img {
    height: 120px;
    width: 120px;
  }
  
  #profile-image::after {
    height: 114px;
    width: 114px;
  }

  #profile-name h1 {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .card-container {
    grid-template-columns: 1fr;
  }
  
  #social {
    gap: 0.5rem;
  }
  
  .btn {
    padding: 0.5rem;
  }
  
  #social .logo {
    height: 24px;
    width: 24px;
  }
}
