* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: url('assets/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: white;
    overflow-y: auto;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: -1;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    right: -240px;
    top: 0;
    width: 240px;
    height: 100%;
    background: rgba(0,0,0,0.9);
    padding: 25px;
    transition: 0.3s ease;
    z-index: 1000;
}

.sidebar.open {
    right: 0;
}

.sidebar a {
    display: block;
    padding: 12px 0;
    color: white;
    text-decoration: none;
    font-size: 15px;
}

.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
}

.hamburger span {
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
}

/* CONTENT */
.content {
    max-width: 1200px;
    margin: auto;
    padding: 70px 25px 50px;
}

/* HERO */
.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
}

.hero-sub {
    font-size: 20px;
    margin-top: 8px;
    opacity: 0.9;
}

.cta-buttons {
    margin-top: 25px;
}

.btn {
    padding: 12px 20px;
    margin: 5px;
    border-radius: 28px;
    text-decoration: none;
    color: white;
    font-weight: 500;
}

.whatsapp { background: #25D366; }
.telegram { background: #229ED9; }

/* SECTIONS */
.section {
    background: rgba(0,0,0,0.65);
    padding: 30px;
    border-radius: 18px;
    margin-bottom: 50px;
}

.section h2 {
    margin-bottom: 20px;
    font-size: 28px;
}

.section p {
    line-height: 1.7;
    margin-bottom: 12px;
    opacity: 0.95;
}

/* SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.service-box {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    font-size: 15px;
    transition: 0.3s ease;
}

.service-box i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.service-box:hover {
    background: rgba(255,255,255,0.2);
}

.service-desc {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: 0.4s ease;
    font-size: 14px;
    margin-top: 10px;
}

.service-box:hover .service-desc {
    max-height: 200px;
    opacity: 1;
}

/* IMPACT */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.impact-box {
    background: rgba(255,255,255,0.12);
    padding: 25px;
    border-radius: 18px;
    text-align: center;
}

.impact-box i {
    font-size: 32px;
    margin-bottom: 10px;
}

.impact-box h3 {
    font-size: 32px;
    margin-bottom: 6px;
}

/* CONTACT */
.contact-grid.spacious {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.contact-grid a {
    background: rgba(255,255,255,0.12);
    padding: 18px;
    border-radius: 16px;
    text-decoration: none;
    color: white;
    font-size: 16px;
    text-align: center;
}

/* FOOTER */
footer {
    text-align: center;
    margin-top: 40px;
    opacity: 0.8;
}

.footer-links {
    margin-bottom: 12px;
}

.footer-links a {
    margin: 0 8px;
    color: white;
    text-decoration: none;
    font-size: 14px;
}

/* ANIMATION */
.fade {
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    animation: slideFade 1.2s ease forwards;
}

.hero-sub {
    animation: slideFade 1.8s ease forwards;
    opacity: 0.9;
}

@keyframes slideFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass buttons */
.glass {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.25);
}

/* Tight paragraph spacing */
.tight { margin-bottom: 8px; }
/* LIGHT MODE */
body.light-mode {
  background: #f4f6f8;
  color: #111;
}

body.light-mode::before {
  display: none;
}

body.light-mode .section,
body.light-mode .service-box,
body.light-mode .impact-box,
body.light-mode .contact-grid a {
  background: rgba(0, 0, 0, 0.06);
  color: #111;
}

body.light-mode .sidebar {
  background: #ffffff;
}

body.light-mode .sidebar a {
  color: #111;
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1200;
  background: rgba(255,255,255,0.2);
  border: none;
  padding: 14px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
}
/* ===============================
   PORTFOLIO PAGE STYLES
================================ */
.portfolio-hero {
    text-align: center;
    margin-bottom: 50px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(220,137,232,0.5); /* Brand purple highlight on hover */
}

.portfolio-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 2px solid rgba(255,255,255,0.05);
}

.portfolio-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: #fff;
}

.portfolio-content p {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tech-badge {
    background: linear-gradient(141deg, rgba(220,137,232,0.3) 0%, rgba(144,64,204,0.3) 100%);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(220,137,232,0.4);
}

/* Light mode overrides for portfolio */
body.light-mode .portfolio-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

body.light-mode .portfolio-card:hover {
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
    border-color: rgba(144,64,204,0.4);
}

body.light-mode .portfolio-content h3 { color: #111; }
body.light-mode .portfolio-content p { color: #444; }

body.light-mode .tech-badge {
    background: rgba(144,64,204,0.1);
    color: #9040cc;
    border: 1px solid rgba(144,64,204,0.2);
}
.back-navigation {
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-start; /* Aligns the button to the left */
}

.back-navigation .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Adds space between the arrow icon and the text */
    font-size: 15px;
    padding: 10px 20px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.back-navigation .btn:hover {
    transform: translateX(-4px); /* Subtle slide-left animation on hover */
    background: rgba(255, 255, 255, 0.25);
}

/* Light mode override for the back button */
body.light-mode .back-navigation .btn {
    background: rgba(0, 0, 0, 0.08);
    color: #111;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .back-navigation .btn:hover {
    background: rgba(0, 0, 0, 0.15);
}
/* ===============================
   CLICKABLE CARDS FIX
================================ */
/* Removes default link styling from the new clickable cards */
a.portfolio-card, a.service-box {
    text-decoration: none;
    color: inherit;
    display: block; /* Ensures the whole block is clickable */
}
a.portfolio-card {
    display: flex; /* Restores flexbox for the portfolio cards */
}

/* ===============================
   BUTTON HOVER PREVIEW
================================ */
.preview-wrapper {
    display: inline-block;
    position: relative;
    margin: 5px;
}

.preview-tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: rgba(10, 10, 10, 0.9);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(220,137,232,0.6);
    width: 220px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
    pointer-events: none; /* Prevents the tooltip from blocking mouse clicks */
    z-index: 100;
}

.preview-tooltip img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.tooltip-text {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    margin-bottom: 2px;
    color: #dc89e8;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* The Hover Action */
.preview-wrapper:hover .preview-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Light Mode Overrides for Tooltip */
body.light-mode .preview-tooltip {
    background: #fff;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
