/* style.css */

body {
  font-family: 'JetBrains Mono', monospace;
}

:root {
  --bg: #0f0f14;
  --fg: #f5f5f7;
  --muted: #9ca3af;
  --accent: #7c7cff;
  --section-border-dark: rgba(255,255,255,0.05);
  --section-border-light: rgba(0,0,0,0.09);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
}

h1 span {
  color: var(--accent);
}

p.lead {
  max-width: 600px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

section {
  padding: 5rem 10vw;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.projects, .skills, .education {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-6px);
  background: rgba(124,124,255,0.1);
  box-shadow: 0 8px 20px rgba(124,124,255,0.2);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card a {
  color: var(--accent);
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

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

.socials {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.socials a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.socials a:hover {
  color: white;
}

section {
  padding: 5rem 10vw;
  border-top: 1px solid var(--section-border-dark);
}

body.light section {
  border-top: 1px solid var(--section-border-light);
}

h2 {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

h2::before {
  content: "// ";
  color: var(--accent);
  opacity: 0.6;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 3rem;
}

.card {
  border-radius: 12px;
}

.card:hover h3 {
  color: #90caf9; /* slightly brighter accent for title */
  transition: color 0.3s ease;
}


/* Dark/Light Toggle */
.dark-light-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.checkbox {
  opacity: 0;
  position: absolute;
}

.checkbox-label {
  background-color: #111;
  width: 50px;
  height: 26px;
  border-radius: 50px;
  position: relative;
  padding: 5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fa-moon { color: #f1c40f; }
.fa-sun { color: #f39c12; }

.checkbox-label .ball {
  background-color: #fff;
  width: 22px;
  height: 22px;
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  transition: transform 0.2s linear;
}

.checkbox:checked + .checkbox-label .ball {
  transform: translateX(24px);
}

/* Dark mode body styles */
body.dark {
  background-color: #292c35;
  color: #f5f5f7;
}

.card {
  position: relative;
  overflow: hidden;
}

/* Hide the list by default */
.tech-used {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,15,20,0.95);
  color: #fff;
  padding: 0.5rem 1rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 0.85rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Show the list on hover */
.card:hover .tech-used {
  opacity: 1;
  transform: translateY(0);
}


/* Ensure cards are the reference for absolute positioning */
.education .card {
  position: relative; /* important for overlay to sit inside the card */
  overflow: hidden;   /* optional, prevents overlay from spilling out */
}

/* Date joined overlay */
.date-joined-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,15,20,0.95);
  color: #fff;
  padding: 0.5rem 1rem;
  list-style: none;
  margin: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 0.85rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Reveal on hover */
.education .card:hover .date-joined-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Make Learning Profiles cards taller */
.education .card {
  position: relative; /* ensures overlays are positioned correctly */
  padding-bottom: 3rem; /* add extra space at the bottom for the overlay */
  min-height: 180px;    /* optional: set a minimum height */
}

.card a.proof {
  color: #7c7cff;
}

.card a.course {
  color: #f39c12;
}

/* Small text style */
.small-text {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Label style */
.label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #9e9eda;
}

.card a.project-link {
  color: #7c7cff;
}

.card a.tutorial {
  color: #f39c12;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: #7c7cff; /* IDE accent color */
  border-radius: 50%;
  pointer-events: none; /* cursor doesn’t block clicks */
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease-out, background-color 0.2s ease;
  z-index: 9999;
}

.custom-cursor.hovering {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: #f39c12;
}

body {
  cursor: none; /* hides the default system cursor */
}

a, button {
  cursor: none; /* ensures links and buttons still indicate interactivity */
}

.dark-light-toggler{
  cursor: none;
}

/* Gradient Text Animation */
.gradient-text {
  background: linear-gradient(
    90deg,
    #f39c12 0%,
    #f6b44f 25%,
    #4079ff 50%,
    #6b8dff 75%,
    #f39c12 100%
  );
  background-size: 400% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: gradient-shift 10s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .gradient-text {
    animation: none;
    animation: gradient-shift 14s linear infinite;
  }
}

/* Sticky Section Headers */
h2 {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 1rem 0;
  z-index: 10;
  transition: background 0.3s ease; /* smooth background change */
}

body.dark h2 {
  background: #292c35;
}

h2 {
  transition: none;
}

/* Scroll Snap */
body {
  scroll-snap-type: y mandatory; /* enable vertical scroll snapping */
  overflow-y: scroll;
}
/* Loader overlay like IDE */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f0f14; /* matches IDE dark theme */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  flex-direction: column;
}

/* Loader content */
.loader-content {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.5rem;
}

/* Blinking cursor effect */
.cursor {
  display: inline-block;
  animation: blink 1s step-start infinite;
  color: var(--fg);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Fade out loader */
#loader.fade-out {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Write-on typing effect */
.loader-text {
  display: inline-block;
  overflow: hidden; /* hides text as it types */
  white-space: nowrap;
  border-right: 2px solid var(--fg); /* optional extra cursor effect */
  animation: typing 2s steps(18, end), blink-caret 0.7s step-end infinite;
}

/* Typing keyframes */
@keyframes typing {
  from { width: 0; }
  to { width: 18ch; } /* match number of characters */
}

/* Cursor blink */
@keyframes blink-caret {
  0%, 50%, 100% { border-color: transparent; }
  25%, 75% { border-color: var(--fg); }
}

