
:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --text-muted: #666666;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-hover-bg: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover-color: rgba(0, 0, 0, 0.2);
  --shadow-color: rgba(0, 0, 0, 0.03);
  --shadow-hover-color: rgba(0, 0, 0, 0.08);
  --footer-bg: rgba(255, 255, 255, 0.9);
  --footer-border: #eaeaea;
  --accent-color: #000000;
  --btn-text-color: #ffffff;
  --caret-color: #000000;
}

[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #ffffff;
  --text-muted: #aaaaaa;
  --card-bg: rgba(30, 30, 30, 0.8);
  --card-hover-bg: #2a2a2a;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover-color: rgba(255, 255, 255, 0.3);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --shadow-hover-color: rgba(0, 0, 0, 0.4);
  --footer-bg: rgba(18, 18, 18, 0.9);
  --footer-border: #333333;
  --accent-color: #ffffff;
  --btn-text-color: #000000;
  --caret-color: #ffffff;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg);
  opacity: 0.7;
}

body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.minimal-card, .social-footer, .go-up-btn, header {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 20px 0;
  border-bottom: 1px solid var(--footer-border);
}

header a {
  font-family: 'Google Sans Code', monospace;
  font-size: 16px;
  color: var(--text-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

header a:hover {
  opacity: 0.6;
  text-decoration: underline;
}

.heading-txt {
  font-family: 'Chelsea Market', cursive;
  font-size: 40px;
  margin-bottom: -80px;
}

.center-part {
  margin-top: 0;
  padding-top: 40px;
  padding-bottom: 120px;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 85vh;
}

.description-txt {
  background-color: transparent;
  margin-top: 10px;
  font-family: 'Google Sans Code', monospace;
  color: var(--text-color);
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.p1-txt, .p2-txt {
  text-align: center;
  margin: 8px 0; 
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 800px;
  margin-top: 40px;
}

.minimal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 260px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.minimal-card:hover {
  background: var(--card-hover-bg);
  border-color: var(--border-hover-color);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px var(--shadow-hover-color);
}

.minimal-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.minimal-card-left i {
  font-size: 24px;
}

.x-logo-icon {
  color: var(--text-color);
}

.insta-gradient {
  background: -webkit-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-title {
  font-family: 'Google Sans Code', monospace;
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  color: var(--text-color);
}

.minimal-card-right {
  display: flex;
  align-items: center;
}

.minimal-card-right i {
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.minimal-card:hover .minimal-card-right i {
  color: var(--text-color);
  transform: translateX(3px) rotate(-45deg);
}

.social-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--footer-bg);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-top: 1px solid var(--footer-border);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.go-up-btn {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background-color: var(--text-color);
  color: var(--btn-text-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 99;
}

.go-up-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.go-up-btn:hover {
  transform: translateY(-5px);
}

.social-footer a {
  color: var(--text-color);
  font-size: 24px;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-footer a:hover {
  color: var(--text-color);
  transform: translateY(-4px);
}

.page-content {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: 'Google Sans Code', monospace;
  line-height: 1.6;
}

.page-content h1, .page-content h2 {
  font-family: 'Chelsea Market', cursive;
  margin-top: 30px;
}

.page-content h1 {
  font-size: 36px;
  border-bottom: 2px solid var(--text-color);
  padding-bottom: 10px;
}

.page-content a {
  color: var(--text-color);
  font-weight: bold;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

@media screen and (max-width: 768px) {
  .heading-txt {
    font-size: 36px;
    margin-bottom: -40px;
  }
  .center-part {
    margin-top: -30px;
    height: auto;
    min-height: 75vh;
    padding: 40px 0;
  }
  .social-footer {
    gap: 20px;
  }
}

@media screen and (max-width: 480px) {
  header {
    gap: 15px;
    padding: 15px 0;
  }
  .heading-txt {
    font-size: 30px;
    margin-bottom: -20px;
  }
  .center-part {
    margin-top: 0;
  }
  .description-txt {
    font-size: 14px;
  }
  .projects-interactive-area {
    flex-direction: column;
    height: auto;
    gap: 15px;
  }
  .slider-container {
    grid-template-columns: 1fr;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s ease;
  }
  .slider-container.show {
    grid-template-rows: 1fr;
  }
  .buttons-line {
    flex-direction: column;
    gap: 10px;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.5s ease;
  }
  .slider-container.show .buttons-line {
    transform: translateY(0);
  }
  .social-footer {
    gap: 15px;
    padding: 20px 0;
    flex-wrap: wrap;
  }
  .social-footer a {
    font-size: 20px;
  }
}

body.site-loading {
  overflow: hidden;
}

body.site-loading header,
body.site-loading .description-txt,
body.site-loading .projects-grid,
body.site-loading .social-footer {
  opacity: 0;
  pointer-events: none;
}

header, .description-txt, .projects-grid, .social-footer {
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}

.heading-txt h1 {
  display: inline-block;
  padding-right: 5px;
}

body.site-loading .heading-txt h1 {
  border-right: 3px solid var(--caret-color);
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--text-color); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid black;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

.loading-overlay p {
  font-family: 'Google Sans Code', monospace;
  font-size: 16px;
  color: var(--text-color);
  margin: 0;
}