/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Trebuchet MS', sans-serif;
}

/* Global content container */
.container {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}


h1, h2, h3 {
  font-family: 'Staatliches', sans-serif;
}

body {
  background-color: #f3f4f6; /* soft concrete */
  color: #1c1c1c; /* rich black */
  line-height: 1.6;
  font-family: 'Open Sans', sans-serif;
  transition: background-color 0.4s, color 0.4s;
  padding-top: 80px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header / Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: #2f3e46; /* dark pine */
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.logo-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #cad2c5; /* light lichen tone */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.logo-circle img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a, button {
  color: #cad2c5; /* lichen */
  font-weight: bold;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #52796f; /* moss green */
}

.linkedin-icon svg {
  fill: #cad2c5; /* lichen */
  transition: fill 0.3s;
}

.linkedin-icon svg:hover {
  fill: #52796f;
}

/* Hamburger Icon (Hidden on Desktop) */
.menu-toggle {
  display: none;
  font-size: 2rem;
  color: #cad2c5;
  cursor: pointer;
  z-index: 1001;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background-color: #2f3e46;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 998;
  }

  .nav-links.open {
    right: 0;
  }
}


/* Hero Section */
.hero {
  background-image: url('assets/parallax.jpg');
  background-size: cover;
  background-position: center;
  color: #cad2c5; /* lichen */
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  padding: 6rem 2rem;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.25rem;
  font-style: italic;
}

.hero .btn {
  display: inline-block;
  margin-top: 1rem;
  background-color: #52796f; /* moss green */
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
}

.hero .btn:hover {
  background-color: #2f3e46; /* dark pine */
  transform: translateY(-2px);
}

/* Sections */
.content-section {
  padding: 3rem 2rem;
  background-color: #ffffff;
  margin-bottom: 1rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  transition: background-color 0.4s, color 0.4s;
}

.content-section:nth-child(even) {
  background-color: #e1e5e6; /* lighter concrete */
}

.content-section h2 {
  margin-bottom: 1rem;
  color: #2f3e46; /* dark pine */
}

/* ABOUT SECTION STYLES */
.about-container {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border: 3px solid #52796f; /* moss green */
  flex-shrink: 0;
}

.about-container p {
  flex: 1;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #2f3e46; /* dark pine */
  max-width: 600px;
}

/* Responsive stack on mobile */
@media (max-width: 700px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .about-container p {
    margin-top: 1rem;
    text-align: center;
  }
}

.projects-main {
  padding-right: 1rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-left: 6px solid #b5e48c; /* trail marker style */
  border-radius: 8px;
  padding: 1rem;
  transition: box-shadow 0.3s;
}

.project-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #2f4f4f;
}

.project-card p {
  font-size: 0.9rem;
  color: #444;
}

.project-card a {
  text-decoration: none;
  color: #0a66c2;
  font-weight: 500;
}

.sidebar-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.projects-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Shared wood grain texture URL */
:root {
  --wood-texture: url('https://www.transparenttextures.com/patterns/dark-wood.png');
}

/* Stat card styling */
.stat-card {
  background: linear-gradient(145deg, #4b2e0e, #5c3a14);
  background-image: var(--wood-texture);
  background-repeat: repeat;
  background-size: 500px 500px;
  background-blend-mode: multiply;
  color: #f0e6d2;
  padding: 1.8rem 2.5rem;
  border-radius: 12px;
  border: 5px solid #3d2709;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.15),
    0 12px 25px rgba(0, 0, 0, 0.5);
  font-family: 'Georgia', serif;
  position: relative;
  max-width: 320px;
  margin: 1rem auto;
  text-align: center;
  transition: transform 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-6px) rotate(-1.2deg);
  box-shadow:
    inset 0 4px 10px rgba(255, 255, 255, 0.25),
    0 16px 30px rgba(0, 0, 0, 0.7);
}

.stat-card::before,
.stat-card::after {
  content: '';
  position: absolute;
  top: 12px;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at center, #3b2a0a 45%, #130d03 90%);
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.stat-card::before {
  left: 12px;
}

.stat-card::after {
  right: 12px;
}

.stat-card h3 {
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  color: #f0e6d2;
  text-shadow: 1.5px 1.5px 4px rgba(0, 0, 0, 0.6);
}

.stat-card img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  background: #fffaf0;
  padding: 0.35rem;
  border: 1px solid #a8926e;
}

.github-badge {
  text-align: center;
  margin-top: 1rem;
}

.github-badge img {
  height: 30px;
}

/* Responsive stacking */
@media (max-width: 768px) {
  .sidebar-layout {
    grid-template-columns: 1fr;
  }

  .projects-sidebar {
    order: 2;
  }

  .projects-main {
    order: 1;
  }
}

/* Blog Section Styling */
.blog-section {
  padding: 3rem 2rem;
  background-color: #ffffff;
  margin-bottom: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.blog-card {
  background-color: #fdfcfb;
  border: 1px solid #ddd;
  border-left: 6px solid #a3b18a;
  border-radius: 8px;
  padding: 1.25rem;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.blog-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #2f3e46;
}

.blog-card p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 0.75rem;
}

.blog-card a {
  color: #0a66c2;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
}

.blog-card a:hover {
  text-decoration: underline;
}

/* Dark Mode for Blog Cards */
body.dark .blog-section {
  background-color: #2f3e46;
}

body.dark .blog-card {
  background-color: #3a4a43;
  border-color: #6b8f71;
}

body.dark .blog-card h3,
body.dark .blog-card p,
body.dark .blog-card a {
  color: #cad2c5;
}


/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #aaa;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #f9f7f3;
  color: #1c1c1c;
}

.contact-form button {
  background-color: #52796f; /* moss green */
  color: white;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
}

.contact-form button:hover {
  background-color: #2f3e46; /* dark pine */
  transform: translateY(-2px);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #2f3e46; /* dark pine */
  color: #cad2c5; /* lichen */
  font-size: 0.9rem;
}

.social-icons {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-icons svg {
  fill: #ffffff;
  transition: fill 0.3s;
}

.social-icons a:hover svg {
  fill: #b5e48c;
}

/* Animations */
.fade-in {
  animation: fadeIn 1s ease-in both;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: #cad2c5;
  font-size: 1rem;
  cursor: pointer;
  text-transform: uppercase;
  padding: 0.5rem;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: 0.4s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #52796f; /* moss green */
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Scroll to top button */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(145deg, #4b2e0e, #5c3a14);
  background-image: var(--wood-texture);
  background-repeat: repeat;
  background-blend-mode: multiply;
  background-size: 200px 200px;
  color: #f0e6d2;
  border: 3px solid #3d2709;
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.15),
    0 6px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  font-family: 'Georgia', serif;
  user-select: none;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

#scrollTopBtn:hover {
  background: linear-gradient(145deg, #5c3a14, #4b2e0e);
  box-shadow:
    inset 0 4px 10px rgba(255, 255, 255, 0.25),
    0 8px 16px rgba(0, 0, 0, 0.7);
}

/* Dark Mode Styles */
body.dark {
  background-color: #1c1c1c; /* rich black */
  color: #cad2c5; /* lichen */
}

body.dark header,
body.dark footer {
  background-color: #52796f; /* moss green */
}

body.dark .content-section {
  background-color: #2f3e46; /* dark pine */
  color: #cad2c5; /* lichen */  
}

body.dark .content-section h2 {
  color: #cad2c5;
}

body.dark .about-container p {
  color: #cad2c5;
}

body.dark .contact-form input,
body.dark .contact-form textarea {
  background-color: #3a4a43;
  color: #cad2c5;
  border-color: #4e6b5c;
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #2f3e46;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 0.6s ease;
}

.loader-content {
  text-align: center;
  color: #cad2c5;
  font-family: 'Montserrat', sans-serif;
}

.loader-content svg {
  width: 80px;
  margin-bottom: 1rem;
  animation: bounce 1.5s infinite;
  color: #a3b18a;
  fill: currentColor;
}

.loader-content p {
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #a3b18a;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#loader.hidden {
  opacity: 0;
  pointer-events: none;
}
