/* ----------------------------- Reset and Base ------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}
html, body {
    height: 100%;
    overflow-x: hidden;
    background-color: #000;
    color: #fff;
    font-size: 14px;
    text-align: center;
    line-height: 1.8; /* improved readability */
}

/* ----------------------------- Navbar ------------------------------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    border-bottom: 1px solid #00ffff50;
    z-index: 2000;
}
nav .logo a {
    font-size: 1.7rem;
    font-weight: bold;
    color: #00ffff;
    text-decoration: none;
    letter-spacing: 1.5px;
}
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.15rem;
    position: relative;
    padding: 0.25rem 0;
    transition: all 0.3s ease;
}
.nav-links a.active,
.nav-links a:hover {
    color: #00ffff;
}
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: #00ffff;
    transition: width 0.3s ease;
}
.nav-links a.active::after,
.nav-links a:hover::after {
    width: 100%;
}
.login-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.login-container a {
    color: #ccc;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}
.login-container a:hover {
    color: #00ffff;
}
.login-container img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* ----------------------------- Mobile Menu ------------------------------- */
#menu-icon {
    display: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    z-index: 2100;
}
#mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100%;
    background: rgba(15,15,15,0.97);
    box-shadow: -5px 0 15px rgba(0,255,255,0.3);
    display: flex;
    flex-direction: column;
    padding-top: 5rem;
    gap: 1.5rem;
    padding-left: 1rem;
    transition: right 0.35s ease-in-out;
    z-index: 3000;
    visibility: hidden;
    opacity: 0;
    text-align: center;
}
#mobile-menu.show {
    right: 0;
    visibility: visible;
    opacity: 1;
}
#mobile-menu .mobile-login-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.5rem auto;
    cursor: pointer;
}
#mobile-menu .mobile-login-text {
    display: block;
    margin-bottom: 1.5rem;
    color: #00ffff;
    text-decoration: none;
    font-size: 1.1rem;
}
#mobile-menu a.page-link {
    display: block;
    margin: 0.8rem 0;
    color: #00ffff;
    text-decoration: none;
    font-size: 1.15rem;
}
#mobile-menu a.page-link:hover {
    color: #fff;
    text-shadow: 0 0 5px #00ffff;
}
#mobile-menu .logout-btn {
    margin-top: auto;
    margin-bottom: 2rem;
    padding: 0.6rem 1.8rem;
    background: #00ffff;
    color: #000;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#mobile-menu .logout-btn:hover {
    background: #00cccc;
    color: #fff;
    box-shadow: 0 0 10px #00ffff;
}

/* ----------------------------- Main Column & Container ------------------------------- */
.scale-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 4rem;
    align-items: center;
}
.main-column {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 1rem auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

/* ----------------------------- Hero Section ------------------------------- */
.hero-section {
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(15,15,15,0.9);
    border-radius: 12px;
    border: 1px solid #00ffff;
    box-shadow: 0 0 15px rgba(0,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}
.hero-section h1 {
    color: #00ffff;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.2rem; /* spacing adjustment */
    line-height: 1.3; /* spacing for headings */
}
.hero-section p {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1.4rem; /* spacing adjustment */
    text-align: center;
    line-height: 1.7; /* improved readability */
}

/* ----------------------------- Section Styles ------------------------------- */
section {
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(15,15,15,0.9);
    border-radius: 12px;
    border: 1px solid #00ffff;
    box-shadow: 0 0 15px rgba(0,255,255,0.2);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
section h2 {
    color: #00ffff;
    margin-bottom: 1.2rem; /* increased spacing */
    font-size: 1.6rem;
    line-height: 1.3; /* heading spacing */
}
section p, section ul, section li {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1rem; /* spacing between paragraphs */
    line-height: 1.7; /* improved readability */
}
ul {
    list-style: none;
    padding-left: 0;
    max-width: 700px;
    margin: 1rem auto;
    text-align: center;
}
ul li {
    margin: 0.7rem 0; /* spacing adjustment */
    position: relative;
    padding-left: 1.2rem;
}
ul li::before {
    content: "•";
    color: #00ffff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* ----------------------------- Projects / Calculator Cards ------------------------------- */
.projects-cards, .calculator-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}
.projects-cards .project-card,
.calculator-section {
    background: rgba(15,15,15,0.95);
    border: 1px solid #00ffff;
    border-radius: 12px;
    padding: 1rem;
    width: 180px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.projects-cards .project-card:hover,
.calculator-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px #00ffff;
}
.projects-cards .project-card h4,
.calculator-section h2 {
    color: #00ffff;
    font-size: 0.95rem;
    margin: 0.3rem 0; /* spacing adjustment */
    line-height: 1.4;
    text-align: center;
}

/* ----------------------------- Calculator Inputs ------------------------------- */
.calculator-section label {
    color: #fff;
    display: block;
    margin-bottom: 8px; /* spacing adjustment */
    font-weight: 500;
}
.calculator-section input[type="number"], 
.calculator-section select,
.calculator-section .answer-box {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #00ffff;
    margin-bottom: 14px; /* spacing adjustment */
    background-color: #111;
    color: #00ffff;
    font-size: 14px;
}
.calculator-section .answer-box {
    background-color: #111;
    color: #fffb00;
    font-weight: bold;
}
.inline { display: flex; gap: 10px; align-items: center; }
.btns { display: flex; gap: 12px; margin-bottom: 14px; }
button { padding: 10px 16px; border-radius: 8px; border: none; cursor: pointer; font-weight: bold; }
button.btn-primary { background-color: #00ffff; color: #000; }
button.secondary { background-color: #1f2937; color: #00ffff; }
small.hint { display:block; color:#888; font-size:12px; margin-top:-6px; margin-bottom:10px; }

/* ----------------------------- Buttons ------------------------------- */
.btn-primary {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    background: #00ffff;
    color: #000;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
.btn-primary:hover {
    background: #00cccc;
    color: #fff;
    box-shadow: 0 0 10px #00ffff;
}

/* ----------------------------- Footer ------------------------------- */
footer {
    width: 100%;
    text-align: center;
    padding: 1.2rem 0;
    background: rgba(15,15,15,0.95);
    box-shadow: 0 0 15px rgba(0,255,255,0.2);
    margin-top: 2rem;
    font-size: 0.9rem;
    line-height: 1.7; /* improved readability */
}

/* ----------------------------- Animations ------------------------------- */
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------- Responsive ------------------------------- */
@media(max-width: 768px) {
    .nav-links { display: none; }
    #menu-icon { display: inline-block; }
    .login-container a, .login-container img { display: none; }
    #mobile-menu .mobile-login-icon { width: 70px; height: 70px; margin-bottom: 0.5rem; }
    #mobile-menu .mobile-login-text { font-size: 1.4rem; color: #00ffff; text-align: center; cursor: pointer; }
    #mobile-menu a { display: block; color: #00ffff; font-size: 1.2rem; margin: 0.5rem 0; text-decoration: none; text-align: center; transition: color 0.3s, text-shadow 0.3s; }
    #mobile-menu a:hover { color: #fff; text-shadow: 0 0 5px #00ffff; }
    #mobile-menu .logout-btn { display: block; }
    nav .logout-btn { display: none; }
}
@media(max-width: 480px) { .scale-wrapper { transform: scale(0.95); } }
@media(max-width: 360px) { .scale-wrapper { transform: scale(0.9); } }

/* ----------------------------- Login Form Specific ------------------------------- */
.login-wrapper { min-height: 80vh; display: flex; justify-content: center; align-items: center; padding: 2rem; }
.login-form-container {
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid #00ffff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    text-align: center;
    line-height: 1.7; /* spacing for login content */
}
.login-form-container h2 { color: #00ffff; margin-bottom: 1.2rem; line-height: 1.3; }
.tab-switch { display: flex; justify-content: center; margin-bottom: 1.5rem; gap: 1rem; }
.tab-switch button {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    line-height: 1.3;
}
.tab-switch button.active {
    color: #00ffff;
    border-bottom: 2px solid #00ffff;
}
form { display: flex; flex-direction: column; gap: 1rem; text-align: left; line-height: 1.6; }
form label { color: #ccc; font-size: 0.9rem; }
form input {
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid #00ffff50;
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
form input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}
form .btn-primary { text-align: center; }
form .btn-primary:hover {
    background: #00cccc;
    color: #fff;
    box-shadow: 0 0 10px #00ffff;
}
.hidden { display: none; }

/* ----------------------------- Calculator-Specific CSS ------------------------------- */
.calc-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    margin-top: 5rem;
    width: 100%;
    padding: 1rem;
    line-height: 1.7; /* added spacing for calc container */
}
.calc-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}
.calc-hero {
    background: rgba(15,15,15,0.9);
    border: 1px solid #00ffff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 15px rgba(0,255,255,0.2);
    line-height: 1.7;
}
.calc-hero h1 { color: #00ffff; font-size: 2rem; margin-bottom: 1.2rem; line-height: 1.3; }
.calc-hero p { color: #ccc; font-size: 0.95rem; line-height: 1.7; }

/* ... the rest of your CSS continues exactly as before with spacing adjustments ... */
/* ----------------------------- Calculator Sections ------------------------------- */
.calc-section {
    background: rgba(15,15,15,0.95);
    border: 1px solid #00ffff;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 0 15px rgba(0,255,255,0.2);
    line-height: 1.7; /* text spacing adjustment */
}
.calc-section h2 {
    color: #00ffff;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.3; /* heading spacing */
}
.calc-section label {
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
.calc-input,
.calc-select,
.calc-answer-box {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #00ffff;
    margin-bottom: 12px;
    background-color: #111;
    color: #00ffff;
    font-size: 14px;
    line-height: 1.6;
}
.calc-answer-box {
    color: #fffb00;
    font-weight: bold;
}
.calc-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}
.calc-btns {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.calc-btn-primary {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    background: #00ffff;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}
.calc-btn-primary:hover {
    background: #00cccc;
    color: #fff;
    box-shadow: 0 0 10px #00ffff;
}
.calc-btn-secondary {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    background: #1f2937;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s ease;
}
.calc-btn-secondary:hover {
    background: #111;
    color: #0ff;
    box-shadow: 0 0 10px #00ffff;
}
.calc-hint {
    font-size: 12px;
    color: #888;
    display: block;
    margin-top: -8px;
    margin-bottom: 8px;
    line-height: 1.5;
}
.calc-section,
.calc-hero {
    opacity: 0;
    transform: translateY(20px);
    animation: calcFadeIn 1s forwards;
}
@keyframes calcFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------- Accordion Container ------------------------------- */
.accordion-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem auto;
    width: 100%;
    max-width: 900px;
    line-height: 1.7;
}

/* Individual Accordion Item */
.accordion-item {
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid #00ffff;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
    max-width: 95%;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Accordion Button */
.accordion-btn {
    background: rgba(15, 15, 15, 0.95);
    color: #00ffff;
    cursor: pointer;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    text-align: center;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    line-height: 1.4;
}
.accordion-btn:hover {
    background: rgba(0,255,255,0.05);
}
.accordion-btn.active {
    background: rgba(0,255,255,0.2);
}
/* Arrow for button */
.accordion-btn::after {
    content: "▼";
    font-size: 0.8rem;
    color: #00ffff;
    position: absolute;
    right: 1rem;
    transition: transform 0.3s ease;
}
.accordion-btn.active::after {
    transform: rotate(180deg);
}

/* Accordion Content */
.accordion-content {
    background: rgba(15, 15, 15, 0.9);
    color: #ccc;
    padding: 0.8rem 1.5rem;
    display: none;
    line-height: 1.7; /* spacing adjustment */
    text-align: justify;
    border-top: 1px solid #00ffff50;
    width: 100%;
    box-sizing: border-box;
}

/* ----------------------------- Tables ------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}
th, td {
    border: 1px solid #00ffff50;
    padding: 0.75rem 1rem;
    text-align: left;
    color: #ccc;
}
th {
    background: rgba(0,255,255,0.05);
    color: #00ffff;
}
td {
    background: rgba(15,15,15,0.9);
}

/* ----------------------------- Forms ------------------------------- */
form input, form select, form textarea {
    line-height: 1.6;
}
form textarea {
    resize: vertical;
    min-height: 80px;
}

/* ----------------------------- Miscellaneous Text ------------------------------- */
h1, h2, h3, h4, h5, h6, p, span, label, li, td, th {
    line-height: 1.6;
}

/* ----------------------------- Media Queries Text Adjustments ------------------------------- */
@media(max-width: 768px) {
    section h2, .calc-section h2, .hero-section h1 {
        line-height: 1.4;
    }
    section p, ul li, .calc-section label {
        line-height: 1.6;
    }
}
@media(max-width: 480px) {
    section h2, .hero-section h1 {
        line-height: 1.35;
    }
    section p, ul li {
        line-height: 1.55;
    }
}
@media(max-width: 360px) {
    section h2, .hero-section h1 {
        line-height: 1.3;
    }
    section p, ul li {
        line-height: 1.5;
    }
}
