/* ========================================
   Mechanical Design Override
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --primary-bg: #2c3e50;
  --primary-text: #e8e8e8;
  --secondary-text: #b0b0b0;
  --accent: #5dade2;
  --accent-light: #3498db;
  --border-color: rgba(255, 255, 255, 0.12);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --grid-gap: 24px;
}

* {
  box-sizing: border-box;
}

html, body {
  background-color: var(--primary-bg) !important;
  color: var(--primary-text) !important;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0 0 16px 0;
  color: #fff;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

p {
  color: var(--secondary-text);
  margin: 0 0 12px 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
  padding-bottom: 2px;
}

a:hover {
  border-bottom-color: var(--accent);
  color: #4A8BDF;
}

/* Header & Nav */
header {
  background: transparent !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 16px 0 !important;
}

.colorlib-logo, .logo {
  color: var(--primary-text) !important;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.logo-img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  background-size: cover !important;
  border: 2px solid var(--accent);
}

nav ul li a {
  color: var(--secondary-text) !important;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: none !important;
}

nav ul li a:hover,
nav ul li.active a {
  color: var(--accent) !important;
  border-bottom: 2px solid var(--accent) !important;
  padding-bottom: 0 !important;
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  background: transparent;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0 0 8px 0;
  color: #fff;
}

.hero-subtitle {
  color: var(--secondary-text);
  font-size: 1.125rem;
  font-weight: 400;
  margin: 8px 0;
}

.hero .ab {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #ffffff;
}

/* About Section */
.about-section {
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
}

.author-img {
  border-radius: 8px;
  border: 2px solid var(--accent);
  background-size: cover !important;
  min-height: 300px;
  box-shadow: 0 10px 40px rgba(0, 82, 204, 0.2);
}

.about-desc h1.bold-text {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: #ffffff;
}

.cv-button, .cv-button h5 {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: white !important;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
  border-bottom: none !important;
  margin-top: 16px;
}

.cv-button:hover, .cv-button h5:hover {
  background: #0047b2;
}

/* Project Cards */
.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0, 82, 204, 0.25);
  transform: translateY(-4px);
}

.project-img {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  display: block;
}

.project-text {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-meta {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-meta span {
  margin-right: 8px;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.project-title a {
  color: var(--primary-text);
}

.project-title a:hover {
  color: var(--accent);
}

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content-centered {
  text-align: center;
}

.footer-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.footer-email a {
  color: var(--accent);
  font-weight: 500;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.footer-social a {
  font-size: 1.25rem;
  color: var(--secondary-text);
  transition: color 0.2s ease;
  border-bottom: none !important;
}

.footer-social a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--secondary-text);
  font-size: 0.875rem;
}

/* Utilities */
.ftco-section {
  padding: 60px 0;
}

.ftco-animate {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .author-img {
    min-height: 200px;
    margin-bottom: 30px;
  }
  
  .project-card {
    margin-bottom: 20px;
  }
}

/* Rotating Gears Animation */
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotate-reverse {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.mechanical-gear {
  position: fixed;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
  color: #4A8BDF;
}

.gear-1 {
  width: 250px;
  height: 250px;
  top: 5%;
  right: 3%;
  animation: rotate-slow 30s linear infinite;
}

.gear-2 {
  width: 180px;
  height: 180px;
  bottom: 10%;
  left: 3%;
  animation: rotate-reverse 25s linear infinite;
}

.gear-3 {
  width: 120px;
  height: 120px;
  top: 45%;
  right: 8%;
  animation: rotate-slow 20s linear infinite;
}

.gear-4 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation: rotate-reverse 35s linear infinite;
}

.gear-5 {
  width: 150px;
  height: 150px;
  bottom: 30%;
  right: 15%;
  animation: rotate-slow 28s linear infinite;
}

.gear-6 {
  width: 80px;
  height: 80px;
  top: 70%;
  left: 20%;
  animation: rotate-reverse 22s linear infinite;
}