:root {
  /* Colors */
  --bg-primary: #063647; /* Navy blue */
  --bg-secondary: #052D3D; /* Darker navy */
  --bg-light: #FFFDEE; /* Off-white / light sand */
  --text-main: #dfdfdf; /* Light text for dark backgrounds */
  --text-dark: #1a1a1a; /* Dark text for light backgrounds */
  --text-muted: #666666; /* Muted text */
  --accent: #8E8358; /* Gold/Brown accent */
  --accent-hover: #a99e74;
  --link-color: #0b35be;
  --link-hover: #4f95ff;

  /* Typography */
  --font-base: 'Inter', sans-serif;
  
  /* Spacing & Layout */
  --container-max-width: 1200px;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Container */
.container {
  width: 90%;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

/* --- Header & Navbar --- */
.header {
  background-color: var(--bg-secondary);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

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

.social-links a {
  color: var(--text-main);
  font-size: 1.25rem;
  margin-right: 1rem;
}

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

.navbar {
  display: none; /* Hidden on mobile by default */
  width: 100%;
  margin-top: 1rem;
}

.navbar.is-active {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-link {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link:hover {
  color: var(--accent);
}

/* Hamburger Menu */
.menu-toggle {
  display: block;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  margin: 5px 0;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero-section {
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: var(--spacing-lg) 0;
  border-bottom: 4px solid var(--accent);
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
}

.hero-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-primary);
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--bg-primary);
}

.subtitle {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.contact-info {
  margin-bottom: 2rem;
  font-weight: 600;
}

.contact-info a {
  color: var(--link-color);
}

.contact-info a:hover {
  color: var(--link-hover);
}

.hero-links h3 {
  margin-bottom: 0.5rem;
  color: var(--bg-primary);
}

.hero-links ul li {
  margin-bottom: 0.5rem;
}

.hero-links ul li a {
  color: var(--link-color);
  font-weight: 600;
}

.hero-links ul li a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* --- About Section --- */
.about-section {
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: var(--spacing-lg) 0;
}

.about-article h2, .about-article h3 {
  color: var(--bg-primary);
  margin-bottom: 1rem;
}

.about-article h3 {
  margin-top: 2rem;
}

.about-article p {
  margin-bottom: 1rem;
  text-align: justify;
}

.about-article a {
  color: var(--link-color);
  font-weight: 600;
}

.about-article a:hover {
  color: var(--link-hover);
}

/* --- Projects Section --- */
.projects-section {
  padding: var(--spacing-lg) 0;
  background-color: var(--bg-secondary);
}

.projects-section h2 {
  text-align: center;
  margin-bottom: var(--spacing-md);
  font-size: 2rem;
  color: var(--text-main);
}

/* CSS Grid for Projects */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

/* Project Card */
.project-card {
  background-color: var(--bg-primary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.project-image-wrapper {
  height: 250px;
  overflow: hidden;
  background-color: #fff; /* to blend images with white backgrounds */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image-wrapper img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

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

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

.project-desc {
  font-size: 0.95rem;
  color: #b0b0b0;
  text-align: justify;
}

/* --- Footer --- */
.footer {
  background-color: var(--bg-secondary);
  padding: var(--spacing-md) 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- Media Queries (Desktop) --- */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
  
  .navbar {
    display: block;
    width: auto;
    margin-top: 0;
  }
  
  .nav-list {
    flex-direction: row;
    gap: 2rem;
  }
  
  .hero-container {
    flex-direction: row;
    text-align: left;
  }
  
  .hero-image {
    flex: 0 0 300px;
  }
  
  .hero-image img {
    width: 300px;
    height: 300px;
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
