:root {
  /* Fonts */
  --primary-color: #005662;
  --secondary-color: #32b485;
  --dark-background: #01262b;
  --secondary-dark: #bd1150;
  --light-background: #fff0f7ff;
  --light-secondary: #f4d1d8;
  --border-color: #ff7aab;
  --card-color: #cff3c7;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --font-body: "Nunito", sans-serif;
  --font-primary: "DM Serif Display", serif;
  --font-secondary: "Roboto Mono", monospace;
  --accent-primary: #ff5f56; /* Added accent color for terminal prompt */

  /* Spacing */
  --section-padding: 6rem 0;
  --container-padding: 0 2rem;
  --border-radius: 12px;
}
/* ===== BASIC RESET & FONTS ===== */
/* Basic reset and font settings */
html {
  scroll-behavior: smooth;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.dm-serif-display-regular {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-style: normal;
}
.dm-serif-display-regular-italic {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  font-style: italic;
}
.roboto-mono {
  font-family: "Roboto Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: #333;
  background-color: var(--light-background);
}

/* ===== CONTAINER ===== */
/* Container for consistent width */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
/* Text styling, headings, paragraphs */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--secondary-dark);
  /*text-align: center;*/
}
p {
  margin-bottom: 1rem;
  color: var(--dark-background); /* Fixed color variable */
}
h1 {
  font-family: var(--font-primary);
  padding-top: 3rem;
  font-size: 2.5rem;
}
h2 {
  font-family: var(--font-primary);
  font-size: 2.5rem;
  margin-top: 2rem;
  text-align: center;
}
.highlight {
  color: var(--primary-color);
}
.href {
  color: var(--primary-color);
}

/* ===== HEADER ===== */
/* Styling for the site header */
header {
  background-color: var(--border-color);
  color: white;
  padding: 2rem 0;
  /*text-align: center;*/
}

header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

header .tagline {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ===== NAVIGATION ===== */
/* Navigation bar styling */
nav {
  background-color: var(--primary-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem; /* Added gap for better spacing on mobile */
}
nav li {
  margin: 0 0.5rem; /* Reduced margin for better mobile fit */
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

nav a.active {
  background-color: var(--primary-color);
}

/* Added mobile navigation styles */
@media (max-width: 768px) {
  nav ul {
    padding: 0 1rem;
  }

  nav li {
    margin: 0.25rem;
  }

  nav a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* ===== PROJECT GRID ===== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: auto 20px;
}
@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
.inner-card-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  align-items: center;
}

/* Added mobile responsive styles for inner card grid */
@media (max-width: 768px) {
  .inner-card-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .project-card img {
    margin: 0 auto;
    max-width: 200px;
  }

  .project-card h2,
  .project-card p {
    text-align: center;
  }

  .project-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
}

.project-card {
  background-color: var(--light-secondary);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 10px;
  border-radius: var(--border-radius);
  border: 5px solid var(--border-color);
  margin: 10px auto;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
}
.project-card img {
  width: 1fr;
  height: auto;
  border-radius: var(--border-radius);
}
.project-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-dark);
  text-align: left;
}
.project-card p {
  text-align: left;
}

/* ===== Blog Grid ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: auto 20px;
}
.blog-card {
  background-color: var(--light-secondary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 10px;
}

/* ===== Blog Page ===== */
.blog-post {
  background-color: var(--light-secondary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 10px;
  border: 4px solid var(--border-color);
  margin: 20px auto;
}
.blog-post h2 {
  font-size: 1.5rem;
  color: var(--secondary-dark);
  text-align: left;
}
.blog-post .post-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.blog-post img {
  width: 50%;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}
.blog-post ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}
.read-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}
.read-more:hover {
  background-color: var(--primary-color);
  color: white;
  transition: background-color 0.5s ease-in-out;
}

/* ===== BUTTONS ===== */
.button {
  display: inline-block;
  padding: 0.5rem;
  margin: 2px 0px;
  background-color: var(--light-secondary);
  color: var(--border-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  border: 4px solid var(--border-color);
  font-family: var(--font-secondary);
}
.button:hover {
  background-color: var(--border-color);
  color: white;
  transition: background-color 0.5s ease-in-out;
}

.button-secondary {
  display: inline-block;
  padding: 0.5rem;
  margin: 2px 0px;
  background-color: var(--light-secondary);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  border: 3px solid var(--secondary-color);
  font-family: var(--font-secondary);
}
.button-secondary:hover {
  background-color: var(--secondary-color);
  color: white;
  transition: background-color 0.5s ease-in-out;
}

.button-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  align-content: center;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 6rem;
}
.button-link:hover {
  transform: translateY(-2px);
  background-color: var(--primary-color);
  color: white;
  transition: background-color 0.5s ease-in-out;
}

/* Added mobile styles for button-link */
@media (max-width: 768px) {
  .button-link {
    margin: 1rem 2rem;
  }

  .container {
    padding: 0 10px;
  }
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}
footer p {
  margin-bottom: 0.5rem;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Hero Section */
.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-color: var(--light-secondary);
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
      rgba(70, 124, 235, 0.1) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(70, 124, 235, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
}

/* Added mobile responsive breakpoint for hero section */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem; /* Added padding adjustment for mobile */
  }

  .hero-text {
    text-align: center;
  }

  /* Added terminal window mobile styles */
  .terminal-window {
    font-size: 0.85rem;
  }

  .terminal-body {
    padding: 1rem;
  }

  .terminal-line {
    word-break: break-all;
  }
}

.hero-title {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Terminal Window */
.terminal-window {
  background: var(--light-background);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  -webkit-border-radius: var(--border-radius);
  -moz-border-radius: var(--border-radius);
  -ms-border-radius: var(--border-radius);
  -o-border-radius: var(--border-radius);
}

.terminal-header {
  background: var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
  display: flex;
  gap: 0.5rem;
}

.terminal-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.btn-close {
  background: #ff5f56;
}
.btn-minimize {
  background: #ffbd2e;
}
.btn-maximize {
  background: #27ca3f;
}

.terminal-title {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.terminal-line {
  margin-bottom: 0.5rem;
}

.prompt {
  color: var(--accent-primary);
  margin-right: 0.5rem;
}

.output {
  color: var(--text-secondary);
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: var(--section-padding);
  scroll-margin-top: 80px; /* Added scroll margin to account for sticky navigation */
}

.about-window {
  background: var(--primary-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin: 2rem auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 1000px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding: 2rem;
  align-items: start;
}

/* Completely restructured mobile about section for proper display */
@media (max-width: 768px) {
  .about {
    padding: 4rem 0 3rem 0;
    scroll-margin-top: 60px;
  }

  .about-window {
    margin: 1rem;
    width: calc(100% - 2rem);
  }

  .about-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }

  .about-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
  }

  .about-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 0.75rem;
  }

  .about-image img {
    width: 100%;
    height: auto;
    display: block;
  }

  .about-languages {
    width: 70%;
    max-width: 150px;
    padding: 0.6rem;
    font-size: 0.95rem;
  }

  .about-content {
    width: 100%;
  }

  .about-textbox {
    margin-bottom: 0.75rem;
    padding: 1rem;
  }

  .about-sections {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .about-sections-text {
    padding: 1rem;
  }
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-image {
  background: var(--light-background);
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.about-languages {
  background: var(--light-background);
  border-radius: 50%;
  padding: 1rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary-dark);
}

.about-textbox {
  background: var(--light-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.about-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-sections-text {
  background: var(--light-background);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: left;
}

.about-sections-text ul {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}

/* ===== MISCELLANEOUS ===== */
.section-line {
  width: 6rem;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}
