/* =============================
   VARIABLES FOR LIGHT/DARK MODE
   ============================= */
:root {
  --bg: #0b0b0f;
  --card-bg: #15151f;
  --header-bg: #121218;
  --btn-bg: #1e1e2a;
  --btn-primary: #5865f2;
  --text-color: #fff;
  --text-muted: #aaa;
  --border-color: #5865f2;
  --tag-bg: #232334;
  --project-bg: #22223a;
  --project-hover: #5865f2;
}

body.light {
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --header-bg: #ffffff;
  --btn-bg: #e2e8f0;
  --btn-primary: #2563eb;
  --text-color: #111;
  --text-muted: #555;
  --border-color: #2563eb;
  --tag-bg: #e0e0e0;
  --project-bg: #f0f0f0;
  --project-hover: #2563eb;
}

/* =============================
   GLOBAL STYLES
   ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  padding: 40px 15px;
  transition: 0.3s ease;
}

/* =============================
   MAIN PAGE RECTANGLE
   ============================= */
.page-container {
  width: 100%;
  max-width: 1200px;  
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* =============================
   HEADER
   ============================= */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--header-bg);
  padding: 25px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar-rect {
  width: 160px;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.avatar-rect {
  width: 160px;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.avatar-rect img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* Stack images using z-index */
.img1 {
  z-index: 2; /* visible initially */
}

.img2 {
  z-index: 1; /* hidden under img1 */
}




.location {
  color: var(--text-muted);
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 10px;
}

button {
  background: var(--btn-bg);
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--text-color);
  cursor: pointer;
  transition: 0.3s;
}

button.primary {
  background: var(--btn-primary);
}

/* =============================
   GRID
   ============================= */
.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
}

/* =============================
   CARDS
   ============================= */
.card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 0 20px rgba(0,0,0,.6);
  transition: 0.3s;
}

.card h2 {
  margin-bottom: 15px;
}

.card p {
  opacity: 0.8;
  margin-bottom: 15px;
}

/* =============================
   TIMELINE
   ============================= */
.timeline {
  list-style: none;
}

.timeline li {
  padding: 10px 0;
  border-left: 2px solid var(--border-color);
  padding-left: 15px;
  margin-left: 10px;
  margin-bottom: 10px;
}

/* =============================
   TAGS
   ============================= */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tags span {
  background: var(--tag-bg);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
}

/* =============================
   PROJECTS
   ============================= */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.project {
  background: var(--project-bg);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

.project:hover {
  background: var(--project-hover);
}

/* THEME SWITCH */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Slider container */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

/* Slider background */
.slider {
  position: absolute;
  inset: 0;
  background-color: #334155;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s;
}

/* Circle (toggle knob) */
.slider:before {
  content: "🌙"; /* default icon */
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: 0.3s;
  z-index: 2;
}

/* Move circle to right and change icon */
input:checked + .slider:before {
  transform: translateX(30px);
  content: "☀️";
}

/* Optional: change track color when checked */
input:checked + .slider {
  background-color: #38bdf8;
}


/* =============================
   RESPONSIVE
   ============================= */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .header {
    flex-direction: column;
    gap: 20px;
  }
}
