/* theme-toggle var */
:root {
  --transition-speed: 0.35s ease;
  --nav_radius: 30px;
  --radius:40px;
  --textarea_radius: 20px;
  --overall_radius: 24px;


  /* Light Theme */
  --color-bg: #f9fafb;
  --color-text: #1a1a1a;
  --color-accent: #4f46e5;
  --color-card: #ffffff;
  --color-border: #e5e7eb;
  --color-muted: #6b7280;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}
/* Dark Theme */
[data-theme="dark"] {
  --color-bg: #0f0f10;
  --color-text: #f3f4f6;
  --color-accent: #8b5cf6;
  --color-card: #1c1c1f;
  --color-border: #2f2f33;
  --color-muted: #a1a1aa;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Poppins", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  font-family: system-ui, sans-serif;

}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header/nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.4rem;
  position: sticky;
  top: 0;

  /* 🆕 Theme-aware background & styling */
  background-color: var(--nav-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--nav_radius);
  box-shadow: var(--shadow);
  margin: 1rem auto;
  max-width: 1100px;

  z-index: 100;
  backdrop-filter: blur(10px);
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

header h1 {
  font-size: 1.8rem;
  color: var(--color-accent);
  letter-spacing: -0.5px;
  font-weight: 700;
  
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  position: relative;
  transition: color var(--transition-speed);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-speed);
}

nav a:hover {
  color: var(--color-accent);
}
nav a:hover::after {
  width: 100%;
}

/* Make underline stay for active link */
nav a.active::after {
  width: 100%;
}

nav a:hover::after {
  width: 100%;
}

/* Toggle theme section, may change later */
.theme-toggle {
  border: 1px solid var(--color-border);
  background: var(--color-card);
  border-radius: 40%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition-speed);
}

.theme-toggle:hover {
  border-color: var(--color-accent);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: var(--color-text);
  transition: fill var(--transition-speed);
}

/* Main hero section */
#about {
  height: 80vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
}
#about img {
  position: absolute;
  max-width: 100%;  /* ensure image doesn't exceed container width */
  height: auto;     /* maintain aspect ratio */
  width: auto;      /* allow image to scale down */
  padding: 0 1rem;  /* add some padding on smaller screens */
  z-index: -1;    /* place image behind text */
  opacity: 0.6;   /* make the image faint */
  user-select: none;
}

#about h2 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

#about p {
  max-width: 650px;
  color: var(--color-muted);
  font-size: 1.2rem;
}

/* Projects section */
#projects {
  padding: 6rem 0;
}

#projects h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-accent);
  text-align: center;
}

.project {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.project h3 {
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}

/* Contacts section */
#contact {
  padding: 6rem 0;
}

#contact h2 {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 2rem;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 550px;
  margin: 0 auto;
}

label {
  font-weight: 500;
  color: var(--color-text);
}

input,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  max-height: 200%;
  padding: 0.9rem;
  border-radius: var(--textarea_radius);
  border: 1px solid var(--color-border);
  background-color: var(--color-card);
  color: var(--color-text);
  font-size: 1rem;
  outline: none;
  transition: border var(--transition-speed), box-shadow var(--transition-speed);
}

#message {
  min-height: 100px;
  max-height: 300px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

button {
  align-self: flex-end;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.9rem 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-speed), transform var(--transition-speed);
}

button:hover {
  background-color: #4338ca;
  transform: translateY(-2px);
}


footer {
  text-align: center;
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

#ArrowUp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: auto;
  height: auto;
}
#ArrowUp { display: none; }
#ArrowUp.visible { display: block; }

/* Dashboard section */
#dashboard {
  padding: 4rem 0;
  text-align: center;
}

#dashboard h2 {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 2rem;
}

/* Tracker layout */
.trackers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.tracker-card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.tracker-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.tracker-card h3 {
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tracker-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 0.2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .theme-toggle {
  margin-left: 0rem;
}
  nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
  }
  #about img {
    position: absolute;  /* change to relative on small screens */
    margin: 2rem auto;  /* center the image */
    display: block;     /* proper block display */
  }
  
  #about {
    height: auto;       /* allow section to grow with content */
    padding: 4rem 1rem; /* add vertical padding */
  }
}


header.sticky {
  border-radius: 0 0 var(--nav_radius) var(--nav_radius); /* only bottom corners */
  transition: border-radius var(--transition-speed), background-color var(--transition-speed);
}

/* Hero animations */
#about h2,
#about p,
#about .hero-button {
  opacity: 0;
  transform: translateY(20px);
  animation-fill-mode: forwards;
  animation-duration: 0.8s;
  animation-timing-function: ease-out;
}

#about h2 {
  animation-delay: 0.3s;
}

#about p {
  animation-delay: 0.6s;
}

#about .hero-button {
  animation-delay: 0.9s;
}

/* Fade-in and slide-up */
@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animate on page load */
#about h2 {
  animation-name: fadeSlideUp;
}

#about p {
  animation-name: fadeSlideUp;
}

#about .hero-button {
  animation-name: fadeSlideUp;
  display: inline-block;
  margin-top: 2rem;
  padding: 0.9rem 2rem;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-speed), background-color var(--transition-speed);
}

#about .hero-button:hover {
  transform: translateY(-3px) scale(1.05);
  background-color: #4338ca;
}





