html {
  height: auto;
  overflow-x: hidden;
}


/* ===== GLOBAL VARIABLES ===== */
:root {
    --primary-bg-color: #333;
    --secondary-bg-color: #444;
    --hover-bg-color: #555;
    --primary-color: white;
    --highlight-color: cyan;
    --font-primary: 'Nunito', sans-serif;
}

/* ===== BASE BODY AND FONT ===== */
body {
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    overflow-x: hidden;
    overflow-y: auto;
}


/* ===== HEADER ===== */
.header {
    background-color: var(--primary-bg-color);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-size: 20px;
    width: 100%;
    z-index: 1000;
}

@keyframes glow {
    from { text-shadow: 0 0 5px white; }
    to { text-shadow: 0 0 20px var(--highlight-color); }
}

@keyframes dropdownFade {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== DESKTOP MENU ===== */
.menu {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-bg-color);
    padding: 10px 0;
    list-style: none;
    width: 100%;
    z-index: 1000;
}

.menu a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 6px 12px;
    margin: 5px;
    display: block;
    text-align: center;
    transition: box-shadow 0.3s ease-in-out;
    box-shadow: 0 0 15px var(--highlight-color);
    min-width: 160px;
}

.menu a:hover,
.menu a:focus {
    background-color: var(--hover-bg-color);
    color: var(--highlight-color);
    box-shadow: none;
}

@media (min-width: 769px) {
    .menu a {
        padding: 5px 10px;
        font-size: 90%;
        min-width: 120px;
        box-shadow: none;
    }
    .menu a:hover,
    .menu a:focus {
        box-shadow: 0 0 15px var(--highlight-color);
    }
}

/* ===== PROFILE SECTION ===== */
.container {
    display: flex;
    flex-wrap: nowrap;
    max-width: 1000px;
    margin: auto;
    background: white;
    padding: 40px 20px 20px;
    flex-grow: 1;
    overflow: visible;
}

.profile {
    flex: 1 0 250px;
    padding: 20px;
    margin-top: 30px;
    align-items: center;
    justify-content: center;
}

.profile-glow {
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    text-align: center;
    margin-top: 10px;
}

.profile img {
    width: 90%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 50%;
}

.profile h2, .profile p {
    margin: 10px 0;
}

.content {
  flex: 3 1 750px;
  padding: 20px;
  overflow: auto; /* ✅ fixed */
  text-align: justify;
}


/* ===== BUTTONS ===== */
.download-cv-button {
    padding: 10px 20px;
    background-color: var(--primary-bg-color);
    color: var(--primary-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.download-cv-button:hover {
    background-color: var(--hover-bg-color);
    color: var(--highlight-color);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-bg-color);
    color: var(--primary-color);
    text-align: center;
    padding: 15px 0;
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 14px;
    margin-top: auto;
}

.footer p {
    margin: 0;
}

/* ===== SVG TOGGLE BUTTON ===== */
.svg-toggle {
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 0;
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 1002;
    width: 40px;
    height: 40px;
}

.svg-toggle svg {
    width: 100%;
    height: 100%;
}

.svg-toggle .line {
    fill: none;
    stroke: white;
    stroke-width: 6;
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
                stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1),
                stroke 300ms ease-in-out;
}

.svg-toggle .line1,
.svg-toggle .line3 {
    stroke-dasharray: 60 207;
}

.svg-toggle .line2 {
    stroke-dasharray: 60 60;
}

.svg-toggle.opened .line1,
.svg-toggle.opened .line3 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke: red;
    filter: drop-shadow(0 0 5px red) drop-shadow(0 0 10px red);
}

.svg-toggle.opened .line2 {
    stroke-dasharray: 1 60;
    stroke-dashoffset: -30;
    stroke: transparent;
}

/* ===== THEME TOGGLE ===== */
.modern-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1006;
}

.modern-toggle input {
  display: none;
}

.modern-toggle .track {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  box-sizing: border-box;
  background:
    linear-gradient(to right, #1e1e1e, #1e1e1e) padding-box,
    linear-gradient(to right, #ff7e5f, #feb47b) border-box;
  border: 2px solid transparent;
  overflow: hidden;
  transition: background 0.4s ease;
}

.modern-toggle .icon {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  transition: transform 0.4s ease;
  z-index: 2;
}

/* === Slide the icon on toggle === */
.modern-toggle input:checked + .track .icon {
  transform: translateX(22px);
}

/* === Icon shapes per theme === */
body.light-theme .icon::before {
  content: '☀️';
  filter: drop-shadow(0 0 4px #facc15);
}

body.dark-theme .icon::before {
  content: '';
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 4px white, 0 0 8px white;
  overflow: hidden;
}

body.dark-theme .icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 5px;
  width: 16px;
  height: 16px;
  background: black;
  border-radius: 50%;
}



	/* === DARK MODE === */
	.modern-toggle input:checked + .track {
	  background:
		linear-gradient(to right, #1e1e1e, #1e1e1e) padding-box,
		linear-gradient(to right, #00c6ff, #0072ff) border-box;
	}


	.modern-toggle input:checked + .track .thumb {
	  transform: translateX(22px);     /* ✅ smaller distance */
	  background: linear-gradient(to right, #00c6ff, #0072ff);
	}

	/* Fade effect */
	.modern-toggle input:not(:checked) + .track .moon {
	  opacity: 0.3;
	}
	.modern-toggle input:checked + .track .sun {
	  opacity: 0.3;
	}


/* ===== DARK THEME ===== */
body.dark-theme {
    background-color: #1e1e1e;
    color: #f5f5f5;
}

body.dark-theme .header,
body.dark-theme .menu,
body.dark-theme .footer {
    background-color: #1e1e1e;
    color: white;
}

body.dark-theme .menu a {
    color: white;
    box-shadow: 0 0 15px var(--highlight-color);
}

body.dark-theme .menu a:hover {
    background-color: #333;
    color: var(--highlight-color);
}

body.dark-theme .container {
    background: #2a2a2a;
}

body.dark-theme .profile-glow {
  background-color: #2a2a2a;
  box-shadow:
    0 0 25px rgba(0, 255, 255, 0.15),
    0 0 50px rgba(0, 255, 255, 0.1),
    inset 0 0 6px rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 3px solid rgba(0, 255, 255, 0.1);
  transition: box-shadow 0.4s ease, background-color 0.3s ease, border 0.3s ease;
}



body.dark-theme .profile,
body.dark-theme .content {
    color: white;
}

body.dark-theme .content a {
    color: var(--highlight-color);
}

body.dark-theme .download-cv-button {
    background-color: #333;
    color: white;
    box-shadow: 0 0 10px var(--highlight-color), 0 0 20px var(--highlight-color); /* ✅ glowing */
    transition: box-shadow 0.3s ease;
}

body.dark-theme .download-cv-button:hover {
    background-color: #444;
    color: var(--highlight-color);
    box-shadow: 0 0 15px var(--highlight-color), 0 0 30px var(--highlight-color); /* ✅ stronger glow */
}


body.dark-theme .svg-toggle .line {
    stroke: white;
}

body.dark-theme .svg-toggle.opened .line1,
body.dark-theme .svg-toggle.opened .line3 {
    stroke: red;
    filter: drop-shadow(0 0 5px red) drop-shadow(0 0 10px red);
}

body.dark-theme.invert-header .header {
    background-color: white;
    color: black;
}

body.dark-theme.invert-header .svg-toggle .line {
    stroke: black;
}

body.dark-theme.invert-header .svg-toggle.opened .line1,
body.dark-theme.invert-header .svg-toggle.opened .line3 {
    stroke: red;
    filter: drop-shadow(0 0 5px red) drop-shadow(0 0 10px red);
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: auto;
        min-width: 160px;
        background-color: var(--secondary-bg-color);
        z-index: 1001;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
    }

	.menu.active {
		display: flex;
		position: fixed;
		top: 60px; /* below fixed header */
		left: 0;
		right: 0;
		width: 100%;
		z-index: 1001;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		padding-top: 20px;
		gap: 16px;
		height: calc(100vh - 60px); /* ✅ full height below header */
		overflow: auto;
	}



    .menu a {
        opacity: 0;
        transform: translateY(-20px);
		font-weight: bold; /* ✅ Only bold in mobile view */
        animation: dropdownFade 0.4s ease forwards;
    }

    .menu.active a:nth-child(1) { animation-delay: 0.1s; }
    .menu.active a:nth-child(2) { animation-delay: 0.2s; }
    .menu.active a:nth-child(3) { animation-delay: 0.3s; }
    .menu.active a:nth-child(4) { animation-delay: 0.4s; }
    .menu.active a:nth-child(5) { animation-delay: 0.5s; }
    .menu.active a:nth-child(6) { animation-delay: 0.6s; }
    .menu.active a:nth-child(7) { animation-delay: 0.7s; }

    .container {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 80px;
	  }

	  .profile {
		flex: 1 1 100%;
		align-self: center;
	  }

	  .content {
		flex: 1 1 100%;
		padding: 20px 12px 80px 12px;  /* ✅ equal side padding and bottom spacing */
		box-sizing: border-box;
		overflow: visible;            /* ✅ No inner scroll */
	  }

	


  /* Light theme: fix invisible text */
  body.light-theme .menu.active a {
    color: black;
  }

  body.light-theme .menu.active a:hover {
    background-color: #ddd;
    color: var(--highlight-color);
  }
}

.content {
  flex: 3 1 750px;
  padding: 20px;
  text-align: justify;
}



@media (min-width: 769px) {
  .svg-toggle {
    display: none;
  }
}
body {
  overflow-y: auto;
  overflow-x: hidden;
}



@keyframes auroraOverlay {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes snowFall {
  0% { background-position: 0 0; }
  100% { background-position: 0 1000px; }
}

@media (max-width: 768px) {
  /* DARK THEME: Aurora Background (Responsive) */
	body.dark-theme .menu.active {
		background-image: url('https://assets.onecompiler.app/43b7adb5p/43cpmthmv/aurora.jpg');
		background-size: cover;
		background-repeat: no-repeat;
		background-position: center;
		position: fixed;
		top: 60px;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1001;
		overflow: hidden;
		isolation: isolate; /* ✅ Key line: creates a new stacking context */
	}


	body.dark-theme .menu.active::before {
		content: "";
		position: absolute;
		top: 0; left: 0; right: 0; bottom: 0;
		background: linear-gradient(-45deg, red, lime, blue, purple);
		background-size: 400% 400%;
		animation: auroraOverlay 4s ease-in-out infinite;
		z-index: 0;
		pointer-events: none;
		mix-blend-mode: screen;
		opacity: 0.6; /* Increased to test visibility */
	}




  /* LIGHT THEME: Snow Hill Background (Responsive) */
  body.light-theme .menu.active {
    background-image: url('https://assets.onecompiler.app/43b7adb5p/43cpmthmv/snowhill.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    overflow: hidden;
  }

  body.light-theme .menu.active::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(white 2px, transparent 2px); /* ✅ Twice larger dots */
    background-size: 24px 24px; /* ✅ Also double the spacing */
    animation: snowFall 45s linear infinite; /* ✅ Slower fall */
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}


  /* Ensure links stay on top */
	.menu a {
		position: relative;
		z-index: 2;
		padding: 10px 16px;
		border-radius: 8px;
		backdrop-filter: blur(4px);
		transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
	}

}

