/* Basic Reset & Variables */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Saira:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --dark-bg: #020617;
  --dark-gray: #090f20;
  --dark-blue: #090f20;
  --light-text: #ccc;
  --secondary-bg: #2a2a2a;
  --accent-blue: #007bff;
  --accent-blue-hover: #0056b3;
  --transition-speed: 0.3s;
  --border-radius: 5px;
  --bg-secondary: #16161D;
  --border-color: #3b3f54;
  --project-heading-color: #007bff;
  --prerequisites-icon-color: #28a745;
  --prerequisites-list-icon-color: #f7df1e;
  --code-bg: #111827;
  --code-border: #2d3748;
  --code-text: #e5e7eb;
  --code-line-number-bg: #1a1a1a;
  --code-line-number-color: #888;
  --sidebar-bg: #2a2a2a;
  --sidebar-border: #444;
  --tag-python: #ffd43b;
  --tag-ml: #00BCD4;
  --tag-ai: #8A2BE2;
  --program: #f57c00;
  --tag-orange: #e34f26;
  --tag-react: #61dafb;
  --tag-webdev: #17a2b8;
  --color-purple: #5e11e3;
  --accent-cyan: #00D9FF;
  --accent-magenta: #FF0080;
  --yellow: #f8c555;
  --pink: #cc99cd;
  --green: #7ec699;
  --orange: #f08d49;
  --blue: #67cdcc;
  --color-red: #dc2626;
  --legend-bg: #222;
  --legend-border: #444;
  --terminal-prompt: #00ccff;
  --terminal-border: #333;
  --terminal-output: #fff;
  
  /* Base font sizes (mobile-first) */
  --font-p: 14px;
  --font-h1: 1.5rem;
  --font-h2: 1.2rem;
  --font-h3: 1.08rem;
  --font-h4: 1.02rem;
  --font-li: 14px;
  --font-a: 14px;
  --font-i: 13.5px;
  --font-table: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

p {
  font-size: var(--font-p);
  font-weight: 500;
  color: #cccccc;
}

li {
  font-size: var(--font-li);
  font-weight: 500;
  color: #cccccc;
}

a {
  font-size: var(--font-a);
}

i, pre {
  font-size: var(--font-i);
}

table {
  font-size: var(--font-table);
  font-weight: 400;
}

h1 {
  font-size: var(--font-h1);
  font-weight: 700;
  color: var(--tag-ai);
}

h2 {
  font-size: var(--font-h2);
  font-weight: 600;
}

h3 {
  font-size: var(--font-h3);
  font-weight: 600;
  color: var(--accent-blue);
}

h4 {
  font-size: var(--font-h4);
  font-weight: 500;
}

hr {
  border: 0;
  height: 1px;
  background-color: #9ca3af;
  margin: 20px 0 10px 0;
}

strong {
  color: #f0f0f0;
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

/* ================================
   NAVBAR
================================ */
.navbar {
  background-color: var(--dark-gray);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid var(--code-border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--light-text);
  width: 100%;
  justify-content: space-between;
  margin-left: 10px;
}

.navbar .logo .logo-text {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.typewriter {
  font-family: "Saira", sans-serif;
  white-space: pre;
  position: relative;
  font-optical-sizing: auto;
  font-weight: 500;
  color: #f0f0f0;
}

.typewriter::after {
  content: "_";
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter::after {
    animation: none;
  }
}

.navbar .logo i {
  margin-right: 8px;
  color: var(--accent-blue);
}

.navbar .nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--dark-blue);
  overflow: hidden;
  max-height: 0;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  transition: max-height 0.3s ease-out;
}

.navbar .nav-links.active {
  max-height: 450px;
  transition: all 0.4s ease;
}

.navbar .nav-links ul {
  list-style: none;
  flex-direction: column;
  margin-top: 0;
  padding: 0;
}

.navbar .nav-links ul li {
  margin: 0;
  text-align: center;
}

.navbar .nav-links ul li a {
  padding: 0 5px;
  width: auto;
  display: inline-block;
  margin: 0 auto;
  text-decoration: none;
  color: var(--light-text);
  transition: color var(--transition-speed) ease;
}

.navbar .nav-links ul li a:last-child {
  margin-bottom: 10px;
}

.navbar .nav-links ul li a:first-child {
  margin-top: 10px;
}

.navbar .nav-links ul li a:hover {
  color: var(--tag-ai);
  background: var(--code-purple);
  border-radius: 5px;
  width: 95%;
}

.menu-toggle {
  display: block;
  margin-right: 5px;
  font-size: 1.4rem;
  cursor: pointer;
  background: var(--dark-gray);
  border: 2px solid var(--dark-bg);
  padding: 5px 0 5px 5px;
  color: var(--light-text);
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed) ease;
}

/* ================================
   MAIN CONTENT LAYOUT
================================ */
.main-content-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  padding: 30px 0;
}

.left-column, .right-column {
  padding: 0 10px;
}

.right-column img {
  width: 100%;
  height: 100%;
}

/* ================================
   SECTIONS
================================ */
.project-details-section,
.prerequisites-section,
.table-of-contents-section,
.implementation-section,
.about-website,
.related-topics,
.related-tags,
.conclusion-section,
.experience-section {
  background-color: var(--dark-gray);
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  border: 1px solid var(--color-purple);
}

.project-details-section h1 {
  margin-bottom: 15px;
  text-align: center;
  position: relative;
  padding-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 1), 2px 2px 4px rgba(0, 0, 0, 0.8), 3px 3px 6px rgba(0, 0, 0, 0.6);
}

.project-details-section h1::after,
.prerequisites-section h2::after,
.table-of-contents-section h2::after,
.implementation-section h2::after,
.conclusion-section h2::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 0.2px;
  background-color: var(--color-purple);
  left: 0;
  bottom: 0;
  border-radius: 2px;
}


.project-details-section .image-placeholder {
    width: 100%;
    padding-bottom: 56.25%;
    position: relative;
    margin: 15px 0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.project-details-section .image-placeholder img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    padding: 10px 0;
    transition: transform 0.3s ease;
}

.project-details-section .image-placeholder:hover {
    border: 1px solid var(--tag-ai);
}

.project-details-section .image-placeholder img:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.prerequisites-section h2,
.table-of-contents-section h2,
.implementation-section h2,
.conclusion-section h2 {
  color: #28a745;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  position: relative;
  gap: 0.5rem;
  padding-bottom: 10px;
  text-align: left;
}

.prerequisites-section h2 i,
.table-of-contents-section h2 i,
.implementation-section h2 i {
  color: var(--prerequisites-icon-color);
  margin-right: 0;
}

.table-of-contents-section h2 i {
  color: var(--accent-blue);
}

.prerequisites-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prerequisites-section ul li {
  color: #e5e7eb;
  margin-bottom: 0.4rem;
  gap: 0.75rem;
  position: relative;
  bottom: 1px;
  display: flex;
  align-items: center;
}

.prerequisites-section ul li i {
  flex-shrink: 0;
}

.prerequisites-section ul li .fa-code {
  color: darkviolet;
}

.prerequisites-section ul li .fa-python {
  color: var(--accent-blue);
}

.prerequisites-section ul li .fa-image {
  color: #D50B8B;
}

.table-of-contents-section ol {
  list-style: decimal;
  padding-left: 20px;
}

.table-of-contents-section ol li {
  color: #ccc;
  margin-bottom: 8px;
}

.table-of-contents-section ol li a {
  text-decoration: none;
  color: var(--light-text);
  transition: color 0.3s ease;
}

.table-of-contents-section ol li a:hover {
  color: var(--tag-ai);
}

.implementation-code-section {
  display: flex;
  flex-direction: column;
}

.list ol, .list ul {
  padding-left: 0.5rem;
}

.implementation-section .list a,
.implementation-section .link {
  color: #3396D3;
  text-decoration: dotted underline;
  text-underline-offset: 5px;
  transition: color 0.3s ease;
}

.implementation-section .list a:hover,
.implementation-section .link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.implementation-section h4 {
  font-weight: 600;
  color: #DC143C;
  margin-top: 5px;
}

.implementation-section .sub {
  margin-bottom: 5px;
  margin-top: 10px;
}

.implementation-section strong.subtitle {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.implementation-section .list ul {
  list-style: none;
}

.project-details-section .list ul {
  list-style-type: disc;
}

.project-details-section .list ul li::before {
  content: "";
}

.implementation-section ul li, ol li {
  margin-bottom: 3px;
  color: #ccc;
  position: relative;
}

.implementation-section .bottom ul li {
  margin-bottom: 0;
}

.nested-list ol li::before {
  content: "";
}

.list ul li::before {
  font-family: "Font Awesome 6 Free";
  content: "#";
  margin-right: 10px;
  color: var(--tag-ai);
  font-weight: 600;
}

.nested-list ol li::marker {
  color: #00ccff;
}

.nested-list ul li::marker {
  color: #00ccff;
  list-style-type: disc;
}

.nested-list {
  padding-left: 60px;
}

/* ================================
   CODE BLOCKS & SYNTAX
================================ */
.code-terminal-container {
  background-color: var(--code-bg);
  border-radius: 5px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  width: 100%;
  border: 1px solid var(--accent-blue-hover);
  margin-top: 10px;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-title, .explanation .section h3 {
  color: var(--accent-blue);
}

.language-label {
  font-weight: 600;
  color: #9ca3af;
  font-size: 0.8rem;
}

.copy-button {
  background-color: var(--tag-orange);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
  font-size: 0.8rem;
}

.copy-button:hover {
  background-color: var(--program);
  transform: translateY(-1px);
}

.copy-button:active {
  transform: translateY(0);
}

span.yellow { color: yellow; }
span.pink { color: var(--pink); }
span.green { color: green; }
span.red { color: red; }
span.blue { color: lightskyblue; }

i.fab.fa-python {
  color: #3776AB;
}

i.fab.fa-python:hover {
  color: #FFD43B;
}

pre {
  border-radius: 10px;
  color: var(--color-green);
  font-family: "Fira Code", "Ubuntu Mono", "DejaVu Sans Mono", "Consolas", "Courier New", monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transform: translateZ(0);
  backface-visibility: hidden;
  margin-bottom: 10px;
  overflow: auto;
  margin-top: 5px;
  cursor: pointer;
  font-size: 0.85rem;
  padding-left: 10px;
  font-weight: 400;
}

pre.bg-color {
  border-radius: 5px;
  background-color: var(--dark-bg);
  color: var(--terminal-prompt);
  border: 1px solid var(--terminal-border);
  margin: 10px 0;
  overflow-x: auto;
}

code span {
  color: #23e5bb;
  font-weight: 350;
}

.code-block, .explanation pre {
  background-color: #131c2e;
  color: #e5e7eb;
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'monospace';
  line-height: 1.5;
  border: 1px solid var(--code-border);
  font-size: 0.87rem;
  font-weight: 500;
  margin: 10px 0 10px 0;
}

.code-block.display {
  background-color: var(--dark-bg);
}

.code-block pre.line-numbers,
.explanation pre.line-numbers {
  counter-reset: line-counter;
  white-space: pre;
  position: relative;
}

:not(pre)>code.inline[class*="language-"] {
  background: transparent;
}

li pre.code {
  background-color: transparent;
  border: none;
}

.explanation pre.code {
  background-color: transparent;
  padding: 5px 0;
  margin-top: 0;
}

.code-block p {
  padding: 5px 0 5px 20px;
  color: #f0f0f0;
  border-bottom: 1px solid var(--code-border);
  width: 100%;
  background: var(--dark-gray);
}

.code-block pre.line-numbers code .line,
.explanation pre.line-numbers code .line {
  position: relative;
  display: block;
  line-height: 1.5;
}

.code-block pre.line-numbers code .line::before,
.explanation pre.line-numbers code .line::before {
  content: counter(line-counter);
  counter-increment: line-counter;
  position: absolute;
  left: -40px;
  top: 0;
  width: 35px;
  text-align: right;
  color: var(--code-line-number-bg);
  padding-right: 8px;
  border-right: 1px solid var(--code-border);
  background-color: #1a1a1a;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
}

.code {
  background-color: #131c2e;
  padding: 3px 5px;
  border-radius: 5px;
}

.code-main {
  background-color: #131c2e;
  padding: 3px 5px;
  border-radius: 5px;
  color: var(--tag-python);
}

.copy-feedback {
  margin-top: 8px;
  color: var(--light-text);
  display: none;
}

.copy-feedback.show {
  display: block;
}

div.output {
  border: 1px solid var(--code-border);
  margin: 5px 0 10px 0;
  border-radius: 5px;
  overflow-x: auto;
}

.output .output-text {
  border-top: 1px solid var(--code-border);
  background-color: #131c2e;
  padding: 7px 15px;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

div.output .output-heading {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  margin-left: 15px;
}

.explanation {
  margin-top: 20px;
  margin-bottom: 10px;
}

/* ================================
   FILE TREE
================================ */
.file-tree {
  padding: 20px;
  border-radius: 5px;
  border: 1px solid #0056b3;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  overflow-x: auto;
  position: relative;
  margin-bottom: 20px;
  margin-top: 10px;
}

.file-tree p {
  padding: 0;
  margin: 0;
}

.indent-1 { margin-left: 20px; }
.indent-2 { margin-left: 40px; }
.indent-3 { margin-left: 60px; }

.folder-name { color: #8aff8a; }
.file-name { color: #61dafb; }
.tree-connector { color: #5c6370; }

.download-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  background: linear-gradient(60deg, #4CAF50, #007bff);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 0.6rem;
}

.file-tree button {
  position: absolute;
  right: 10px;
  top: 5px;
}

.download-all-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
}

.download-all-btn:active {
  transform: translateY(-1px);
}

.explanation .section img {
  width: 100%;
  height: 100%;
  background-image: transparent;
}

.explanation pre {
  background-color: #131c2e;
  padding: 5px 0;
  margin-top: 5px;
  margin-bottom: 5px;
}

.explanation ul {
  padding: 0 1.5rem;
}

.explanation h4 {
  margin-bottom: 5px;
  padding: 3px;
}

.explanation.html p span { color: var(--tag-orange); }
.explanation.css p span { color: var(--accent-blue); }
.explanation.js p span { color: var(--tag-python); }

/* ================================
   TABLES
================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 10px 0;
  background-color: #1f2a3e;
}

th, td {
  border: 1px solid #3a3a6a;
  padding: 10px;
  text-align: left;
}

th {
  background-color: #3a3a6a;
  color: #e0e0e0;
}

/* ================================
   CONCLUSION & ACTIONS
================================ */
.conclusion-section p a {
  color: var(--accent-blue);
  transition: color 0.3s ease;
}

.conclusion-section p a:hover {
  color: var(--tag-orange);
}

.source-code {
  background: linear-gradient(to right, #ff416c, #42279d);
  color: white;
}

.source-code:hover {
  background: linear-gradient(to right, #963a4f, #4a368b);
  transform: translateY(-2px);
}

/* ================================
   NEXT SECTION
================================ */
.next {
  border: 1px solid var(--tag-ai);
  padding-top: 10px;
  border-left: 5px solid var(--tag-ai);
  border-radius: 5px;
  background-color: rgba(0, 102, 255, 0.05);
  position: relative;
  margin-bottom: 20px;
  padding-left: 15px;
}

.next .header h3 {
  color: var(--tag-ai);
  margin: 0;
}

.next .header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.next .header p {
  background-color: var(--tag-ai);
  padding-left: 10px;
  padding-right: 40px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  margin-left: 20px;
}

.next .content {
  padding-bottom: 40px;
}

.next .content .next-button {
  position: absolute;
  right: 30px;
  bottom: 10px;
  color: #DC143C;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.next .content .next-button::after {
  content: '➜';
  margin-left: 6px;
  display: inline-block;
  transition: transform 0.3s ease, margin-left 0.3s ease;
}

.next .content .next-button:hover {
  color: #ff0033;
}

.next .content .next-button:hover::after {
  transform: translateX(2px);
  margin-left: 8px;
}

/* ================================
   SIDEBAR (RIGHT COLUMN)
================================ */
.about-website h3,
.ad-block h3,
.related-tags h3 {
  color: var(--tag-orange);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
  text-align: center;
}

.about-website h3::after,
.ad-block h3::after,
.related-tags h3::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  background-color: var(--terminal-output);
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  border-radius: 2px;
}

.about-website p {
  color: #ccc;
  text-align: left;
  padding: 10px 0;
}

/* ================================
   AD PLACEMENT STYLES
================================ */

/* In-Content Ad Blocks */
.ad-banner-in-content {
  border: 2px dashed var(--legend-border);
  width: 100%;
  height: 150px;
  background-color: var(--dark-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  border-radius: 5px;
  position: relative;
}

/* Sidebar Ad Blocks */
.ad-block {
  border: 2px dashed var(--legend-border);
  width: 100%;
  background-color: var(--dark-gray);
  margin-bottom: 30px;
  border-radius: 5px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ad-block.large {
  height: 300px;
  min-height: 300px;
}

.ad-block.medium {
  height: 250px;
  min-height: 250px;
}

.ad-block.small {
  height: 100px;
  min-height: 100px;
}

/* Sticky Ad Blocks */
.ad-block.sticky {
  position: sticky;
  top: 80px;
  z-index: 100;
}

/* Header/Top Ad Block */
.ad-block.header-ad {
  height: 90px;
  margin: 10px 0;
}

/* Footer Ad Block */
.ad-block.footer-ad {
  height: 100px;
  margin: 20px 0 10px 0;
}

/* Floating/Overlay Ad */
.ad-block.floating-ad {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 728px;
  height: 90px;
  z-index: 999;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
}

.ad-block.floating-ad .close-ad {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--color-red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Between Content Ad */
.ad-block.between-content {
  height: 200px;
  margin: 30px 0;
}

/* Ad Container for Google AdSense/Other Networks */
.ad-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.ad-block img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Ad Label */
.ad-block::before {
  content: "Advertisement";
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive Ad Containers */
.ad-responsive {
  width: 100%;
  height: auto;
  min-height: 100px;
}

/* Hide ads on very small screens if needed */
@media (max-width: 320px) {
  .ad-block.large,
  .ad-block.medium {
    display: none;
  }
}

/* ================================
   RELATED TOPICS & TAGS
================================ */
.related-topics ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.related-topics ul li {
  border-bottom: 1px solid var(--legend-border);
  padding: 10px 0;
}

.related-topics ul li:last-child {
  border-bottom: none;
}

.related-topics .content li {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  gap: 10px;
}

.related-topics li a {
  color: var(--light-text);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 5px 0;
  text-align: left;
}

.related-topics li:last-child {
  margin-bottom: 0;
}

.related-topics li i {
  background: rgba(94, 48, 174, 0.509);
  border-radius: 6px;
  padding: 10px;
  transition: all 0.5s ease;
}

.related-topics li:hover {
  padding-left: 8px;
}

.related-topics li:hover i {
  background: var(--tag-ai);
  color: whitesmoke;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.button-container {
  margin-top: 35px;
  display: flex;
  justify-content: center;
}

.btn-cyber {
  position: relative;
  background: transparent;
  border: none;
  padding: 12px 30px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
}

.btn-bg {
  position: absolute;
  inset: 0;
  background: #7c3aed;
  transform: translate(-6px, -6px);
  border-radius: 4px;
  z-index: 1;
  transition: transform 0.2s ease;
}

.btn-border {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  z-index: 2;
}

.btn-text {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-topics .button-container .btn-cyber a {
  color: whitesmoke;
  text-decoration: none;
}

.btn-cyber:hover .btn-bg {
  transform: translate(0, 0);
}

.blink {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% { opacity: 0; }
}

.related-tags .tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.related-tags .tag {
  color: var(--light-text);
  padding: 8px 15px;
  font-weight: 400;
  transition: background-color var(--transition-speed) ease, transform 0.1s ease;
  cursor: pointer;
  border: none;
}

.related-tags ol {
  padding-left: 20px;
}

.related-tags a {
  text-decoration: none;
}

.related-tags a:hover .tag {
  color: var(--color-purple);
}

/* ================================
   CONCLUSION & RAINBOW TEXT
================================ */
.conclusion-section {
  text-align: left;
  margin-top: 15px;
}

.conclusion-section .last {
  margin-top: 10px;
}

.rainbow-text {
  font-weight: bold;
  background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowShift 3s ease-in-out infinite;
  text-shadow: 10px 10px 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes rainbowShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  justify-content: center;
  flex-wrap: wrap;
  flex-direction: row;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px;
  border-radius: 5px;
  font-weight: 400;
  font-size: var(--p);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50%;
  max-width: 200px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.download-btn {
  background: linear-gradient(60deg, #4CAF50, #007bff);
  color: white;
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
}

.download-btn:active {
  transform: translateY(-1px);
}

.github-btn {
  background: linear-gradient(to right, #ff416c, #42279d);
  color: white;
}

.github-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 65, 108, 0.4);
}

.key {
  background-color: var(--dark-bg);
  padding: 20px;
  border-radius: 5px;
  margin-top: 20px;
  border: 1px solid var(--code-border);
}

.key h3 {
  color: var(--tag-orange);
  position: relative;
  padding-bottom: 8px;
}

.key ul {
  list-style: none;
  padding: 0;
}

.key ul li {
  color: #e5e7eb;
  position: relative;
  padding-left: 10px;
}

.key ul li::marker {
  content: '\2022';
  color: var(--prerequisites-icon-color);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  font-size: 1.3rem;
}

/* ================================
   ANIMATED BORDERS
================================ */
@property --glow-deg {
  syntax: "<angle>";
  inherits: true;
  initial-value: -90deg;
}

@property --clr-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #4285f4;
}

@property --clr-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #ea4335;
}

@property --clr-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #fbbc05;
}

@property --clr-4 {
  syntax: "<color>";
  inherits: true;
  initial-value: #34a853;
}

.about-website.moving-border {
  --gradient-glow: var(--clr-1), var(--clr-2), var(--clr-3), var(--clr-4), var(--clr-1);
  position: relative;
  padding: 20px;
  background: #1f1f1f;
  border: 3px solid transparent;
  border-radius: 5px;
  background: linear-gradient(#1f1f1f 0 0) padding-box, conic-gradient(from var(--glow-deg), var(--gradient-glow)) border-box;
  font-size: 16px;
  font-weight: 500;
  color: #e8eaed;
  cursor: pointer;
  isolation: isolate;
  transition: all 0.3s ease;
  animation: breathe-glow 3s ease-in-out infinite;
}

.project-card {
  --gradient-glow: var(--clr-1), var(--clr-2), var(--clr-3), var(--clr-4), var(--clr-1);
  position: relative;
  padding: 20px;
  background: #1f1f1f;
  border: 3px solid transparent;
  border-radius: 5px;
  background: linear-gradient(#181818 0 0) padding-box, conic-gradient(from var(--glow-deg), var(--gradient-glow)) border-box;
  font-size: 16px;
  font-weight: 500;
  color: #e8eaed;
  cursor: pointer;
  isolation: isolate;
  transition: all 0.3s ease;
  animation: rotate-border 2s linear infinite;
}

@keyframes rotate-border {
  0% { --glow-deg: 0deg; }
  100% { --glow-deg: 360deg; }
}

@keyframes breathe-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  }
}

.moving-border {
  position: relative;
  cursor: pointer;
  padding: 20px;
  background: #1f1f1f;
  border-radius: 28px;
  border: 3px solid var(--prerequisites-icon-color);
  transition: all 0.3s ease;
}

.moving-border.suggest {
  border: 3px solid var(--accent-blue-hover);
}

.moving-border.error {
  border: 3px solid red;
}

.about-website.moving-border:hover {
  transform: translateY(-2px);
  --glow-intensity: 0.3;
}

.moving-border {
  margin-bottom: 30px;
}

.moving-border:hover {
  transform: scale(1.1);
}

/* ================================
   OTHER PROJECTS
================================ */
.other-work-section {
  text-align: center;
  border: 1px solid var(--tag-ai);
  padding: 10px 20px;
  border-radius: 5px;
  background: var(--dark-gray);
  margin-bottom: 20px;
  margin-top: 20px;
}

.other-work-section h2 {
  border: 2px solid var(--tag-ai);
  background: #892be257;
  padding: 5px;
  color: var(--light-text);
  margin-bottom: 1rem;
  text-align: center;
  border-radius: 5px;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin: 20px 0;
}

.project-card p {
  font-weight: 400;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  display: block;
  border: 2px solid var(--accent-blue);
  border-radius: 5px;
}

.project-card-content {
  text-align: left;
}

.project-card h4 {
  color: whitesmoke;
  margin-bottom: 10px;
}

.project-card h4:hover {
  color: var(--tag-ai);
}

.project-card h3 {
  color: #9929EA;
  margin-bottom: 10px;
}

.project-card p {
  color: #bbb;
  line-height: 1.5;
  margin-bottom: 15px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.project-tag {
  background-color: var(--accent-blue);
  color: #111827;
  padding: 1px 10px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
}

.view-project-button {
  display: inline-block;
  background-color: var(--tag-orange);
  color: whitesmoke;
  padding: 2px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: margin-right 0.3s ease;
  cursor: pointer;
  margin-top: auto;
}

.view-project-button span {
  font-size: 1.1rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.view-project-button:hover span {
  transform: translateX(5px);
}

/* ================================
   WALLPAPER & COLOR PALETTE
================================ */
.wallpaper, .color-palette {
  border: 1px solid var(--color-purple);
  padding: 10px;
  margin-bottom: 30px;
  border-radius: 5px;
}

.wallpaper h3,
.color-palette h3,
.related-topics h3 {
  color: var(--terminal-output);
  text-align: center;
  background: var(--color-purple);
}

.wallpaper p,
.color-palette p,
.related-topics p {
  color: #ccc;
  text-align: center;
  margin-bottom: 15px;
  margin-top: 10px;
}

.related-topics p {
  text-decoration-color: var(--tag-ai);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 800px;
  margin: 0 auto;
  margin-bottom: 20px;
}

.image-card img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.image-card img:hover {
  transform: scale(1.02);
  border: 1px solid var(--color-purple);
}

.button {
  text-align: center;
  margin-bottom: 10px;
  margin-top: 30px;
}

.button .wallpaper-button,
.button .color-button,
.button .related-button {
  border: 2px dashed var(--color-purple);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  font-size: 0.8rem;
}

.button .wallpaper-button:hover,
.button .color-button:hover,
.button .related-button:hover {
  background-color: var(--color-purple);
}

.palette-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.palette-card {
  background: var(--bg-secondary);
  border: 1px solid var(--sidebar-bg);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.palette-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  border-radius: 20px;
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.palette-card:hover::before {
  opacity: 0.5;
}

.palette-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.color-wave {
  height: 180px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.wave-bar {
  flex: 1;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.color-wave.colors-4 .wave-bar:nth-child(1),
.color-wave.colors-4 .wave-bar:nth-child(4) {
  transform: translateY(-10px);
}

.color-wave.colors-4 .wave-bar:nth-child(2),
.color-wave.colors-4 .wave-bar:nth-child(3) {
  transform: translateY(-35px);
}

.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(1),
.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(4) {
  transform: translateY(-20px);
}

.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(2),
.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(3) {
  transform: translateY(-45px);
}

.color-wave.colors-5 .wave-bar:nth-child(1),
.color-wave.colors-5 .wave-bar:nth-child(5) {
  transform: translateY(0);
}

.color-wave.colors-5 .wave-bar:nth-child(2),
.color-wave.colors-5 .wave-bar:nth-child(4) {
  transform: translateY(-20px);
}

.color-wave.colors-5 .wave-bar:nth-child(3) {
  transform: translateY(-40px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(1),
.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(5) {
  transform: translateY(-10px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(2),
.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(4) {
  transform: translateY(-30px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(3) {
  transform: translateY(-50px);
}

.wave-bar::after {
  content: attr(data-color);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: rgba(0, 0, 0, 0.9);
  padding: 5px 9px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.wave-bar:hover::after {
  opacity: 1;
}

.card-info {
  padding: 24px;
  color: var(--terminal-output);
}

.card-title {
  font-size: var(--font-p);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.card-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  padding: 4px 12px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 6px;
  font-size: 10px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-btn {
  flex: 1;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: var(--font-i);
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}

.card-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

/* ================================
   SCROLL TO TOP BUTTON
================================ */
#scrollUpBtn {
  position: fixed;
  bottom: 65px;
  right: 20px;
  background: none;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
  z-index: 999;
  display: none;
  cursor: pointer;
}

.progress-circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  shape-rendering: geometricPrecision;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.progress-circle .bg {
  fill: #000000;
  stroke: #eee;
  stroke-width: 1;
}

.progress-circle .progress {
  fill: none;
  stroke: var(--color-purple);
  stroke-width: 1;
  stroke-dasharray: 100, 100;
  stroke-linecap: round;
  transition: stroke-dasharray 0.25s ease-out;
}

svg {
  image-rendering: optimizeQuality;
  text-rendering: geometricPrecision;
}

.arrow-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  font-family: Arial, Helvetica, sans-serif;
  color: #e5e7eb;
  pointer-events: none;
  cursor: pointer;
}

/* ================================
   FOOTER
================================ */
.footer {
  position: relative;
  width: 100%;
  background: var(--dark-bg);
  min-height: 100px;
  padding: 20px 50px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue) 50%, transparent 50%);
  background-size: 20px 2px;
  animation: slidingBorder 1s linear infinite;
}

@keyframes slidingBorder {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

.menu {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  list-style: none;
}

.menu-link {
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  transition: 0.5s;
  text-decoration: none;
  opacity: 0.75;
}

.menu-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer p {
  color: #ffffff;
  margin: 15px 0 10px 0;
}

/* ================================
   RESPONSIVE BREAKPOINTS
================================ */

/* 480px - Large Mobile */
@media (min-width: 480px) {
  .container {
    max-width: 480px;
  }
  
  :root {
    --font-p: 14.5px;
    --font-h1: 1.55rem;
    --font-h2: 1.24rem;
    --font-h3: 1.12rem;
    --font-h4: 1.04rem;
    --font-li: 14.5px;
    --font-a: 14.5px;
    --font-i: 14px;
    --font-table: 14.5px;
  }
  
  .navbar .logo {
    font-size: 1.15rem;
  }
  
  .ad-block.large {
    height: 320px;
  }
  
  .ad-banner-in-content {
    height: 160px;
  }
}

/* 768px - Tablet (MOST IMPORTANT) */
@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
  
  :root {
    --font-p: 15px;
    --font-h1: 1.6rem;
    --font-h2: 1.28rem;
    --font-h3: 1.15rem;
    --font-h4: 1.05rem;
    --font-li: 15px;
    --font-a: 15px;
    --font-i: 14px;
    --font-table: 15px;
  }
  
  .logo img {
    width: 27px;
    height: 27px;
  }
  
  .main-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px 20px;
  }
  
  .left-column {
    padding: 0;
  }
  
  .right-column {
    padding: 0;
  }
  
  .copy-button {
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
  }
  
  .language-label {
    font-size: 0.9rem;
  }
  
  .ad-block.large {
    height: 400px;
  }
  
  .ad-block.medium {
    height: 280px;
  }
  
  .ad-banner-in-content {
    height: 180px;
  }
  
  .action-button {
    padding: 15px 30px;
    font-size: 1.1rem;
  }
  
  .project-tag {
    font-size: 0.8rem;
  }
  
  .view-project-button {
    font-size: 0.9rem;
  }
  
  .button .wallpaper-button,
  .button .color-button,
  .button .related-button {
    font-size: 0.85rem;
  }
  
  .project-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
  }
  
  .project-card img {
    min-height: 260px;
    margin-bottom: 0;
  }
  
  #scrollUpBtn {
    width: 45px;
    height: 45px;
    bottom: 65px;
    right: 24px;
  }
  
  .arrow-overlay {
    font-size: 1.4rem;
  }
}

/* 992px - Medium Desktop */
@media (min-width: 992px) {
  .container {
    max-width: 992px;
  }
  
  :root {
    --font-p: 16px;
    --font-h1: 1.7rem;
    --font-h2: 1.36rem;
    --font-h3: 1.22rem;
    --font-h4: 1.08rem;
    --font-li: 16px;
    --font-a: 15.5px;
    --font-i: 14.5px;
    --font-table: 15.5px;
  }
  
  code {
    font-size: 14.5px;
  }
  
  .copy-button {
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
  }
  
  .language-label {
    font-size: 0.95rem;
  }
  
  .about-website p,
  .related-topics li a,
  .related-tags .tag,
  .project-card p {
    flex-wrap: wrap;
  }
  
  .ad-block.large {
    height: 400px;
  }
  
  .action-button {
    padding: 15px 30px;
    font-size: 1.15rem;
  }
  
  .project-tag {
    font-size: 0.85rem;
  }
  
  .view-project-button {
    font-size: 1rem;
  }
  
  .button .wallpaper-button,
  .button .color-button,
  .button .related-button {
    font-size: 0.9rem;
  }
  
  #scrollUpBtn {
    width: 45px;
    height: 45px;
    bottom: 65px;
    right: 24px;
  }
  
  .arrow-overlay {
    font-size: 1.45rem;
  }
}

/* 1024px - Desktop (MOST IMPORTANT) */
@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
  
  :root {
    --font-p: 17px;
    --font-h1: 1.8rem;
    --font-h2: 1.45rem;
    --font-h3: 1.28rem;
    --font-h4: 1.1rem;
    --font-li: 17px;
    --font-a: 16px;
    --font-i: 15px;
    --font-table: 16px;
  }
  
  code {
    font-size: 15px;
  }
  
  .logo img {
    width: 29px;
    height: 29px;
  }

  .navbar .logo {
    font-size: 1.2rem;
    width: auto;
    justify-content: flex-start;
 }


  .navbar .container {
    display: flex;
    align-items: center;
  }
  
  .navbar .nav-links {
    position: static;
    max-height: none;
    flex-direction: row;
    margin-right: 10px;
  }
  
  .navbar .nav-links ul {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
    margin-left: auto;
  }
  
  .navbar .nav-links ul li a {
    padding: 0;
    width: auto;
  }
  
  .navbar .nav-links ul li a:hover {
    background-color: transparent;
    width: auto;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .main-content-wrapper {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 2px;
    padding: 40px 20px;
  }
  
  .left-column {
    padding-right: 20px;
  }
  
  .right-column {
    padding: 0;
  }
  
  .copy-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
  
  .code-block,
  .explanation pre {
    font-size: 1rem;
  }
  
  .about-website p,
  .related-topics li a,
  .related-tags .tag,
  .key ul li {
    flex-wrap: wrap;
  }
  
  .action-button {
    max-width: 200px;
  }
  
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .button .wallpaper-button,
  .button .color-button,
  .button .related-button {
    font-size: 0.95rem;
  }
  
  .project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    border-radius: 5px;
    max-width: 400px;
    transition: transform 0.3s ease;
  }
  
  .project-card img {
    min-height: 0;
    max-height: 260px;
    margin-bottom: 0;
  }
  
  /* Ad placement adjustments for desktop */
  .ad-block.sticky {
    top: 90px;
  }
  
  .ad-block.large {
    height: 600px;
  }
  
  .ad-banner-in-content {
    height: 200px;
  }
  
  #scrollUpBtn {
    width: 50px;
    height: 50px;
    bottom: 65px;
    right: 28px;
  }
  
  .arrow-overlay {
    font-size: 1.5rem;
  }
  
  .menu {
    flex-direction: row;
  }
}

/* 1280px - Large Desktop */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
  
  :root {
    --font-p: 17.5px;
    --font-h1: 1.82rem;
    --font-h2: 1.52rem;
    --font-h3: 1.32rem;
    --font-h4: 1.15rem;
    --font-li: 18px;
    --font-a: 16.5px;
    --font-i: 15.5px;
    --font-table: 16.5px;
  }
  
  code {
    font-size: 15.5px;
  }
  
  .project-details-section h1 {
    font-size: 1.7rem;
  }
  
  .button .wallpaper-button,
  .button .color-button,
  .button .related-button {
    font-size: 1rem;
  }
  
  .project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 20px 0;
  }
  
  .project-card {
    max-height: 600px;
  }
  
  .logo img {
    width: 32px;
    height: 32px;
  }
  
  .ad-block.large {
    height: 600px;
  }
  
  #scrollUpBtn {
    width: 53px;
    height: 53px;
    bottom: 75px;
    right: 32px;
  }
}

/* 1440px - Extra Large Desktop */
@media (min-width: 1440px) {
  .container {
    max-width: 1440px;
  }
  
  :root {
    --font-p: 18px;
    --font-h1: 1.875rem;
    --font-h2: 1.55rem;
    --font-h3: 1.39rem;
    --font-h4: 1.2rem;
    --font-li: 18.5px;
    --font-a: 17px;
    --font-i: 16px;
    --font-table: 17px;
  }
  
  code {
    font-size: 16px;
  }
  
  .logo img {
    width: 34px;
    height: 34px;
  }
  
  .main-content-wrapper {
    grid-template-columns: 68% 32%;
    gap: 30px;
    padding: 50px 30px;
  }
  
  .ad-block.large {
    height: 600px;
  }
  
  .ad-block.sticky {
    top: 100px;
  }
  
  #scrollUpBtn {
    width: 55px;
    height: 55px;
    bottom: 80px;
    right: 35px;
  }
  
  .arrow-overlay {
    font-size: 1.6rem;
  }
}
