/* ==========================================================================
   🌐 Global CSS Variables
   --------------------------------------------------------------------------
   Define branding colors and design constants for easy theme management.
========================================================================== */
:root {
  --primary: #003366;   /* Deep blue - brand identity */
  --accent: #007acc;    /* Lively blue - call-to-action */
  --text: #333;         /* Dark gray for body text */
  --bg: #f9f9f9;        /* Light background for contrast */
}

/* ==========================================================================
   🧹 Base Resets & Global Styles
   --------------------------------------------------------------------------
   Standardizes appearance across browsers and sets base font/behavior.
========================================================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ==========================================================================
   🧢 Header Styling
   --------------------------------------------------------------------------
   Key branding area with circular image and prominent top bar.
========================================================================== */
header {
  background: var(--primary);
  color: white;
  padding: 2rem 1rem 1rem;
  text-align: center;
}

header img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 3px solid white;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   🧭 Navigation Bar
   --------------------------------------------------------------------------
   Clean, hover-animated links for fast navigation.
========================================================================== */
nav {
  margin-top: 1rem;
}

nav a {
  color: white;
  margin: 0 0.8rem;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

/* ==========================================================================
   🧱 Main Layout & Responsive Container
   --------------------------------------------------------------------------
   Flexible layout with adaptive structure for larger screens.
========================================================================== */
main {
  padding: 2rem 1rem;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 900px) {
  .container {
    flex-direction: row;
  }

  aside {
    flex: 1;
    position: sticky;
    top: 1rem;
    align-self: flex-start;
  }

  article {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

/* ==========================================================================
   🧩 Section Containers
   --------------------------------------------------------------------------
   Cards for content areas with animation and hover feedback.
========================================================================== */
section {
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  opacity: 0;
  animation: fadeIn 1s forwards;
  transition: transform 0.3s ease;
}

section:hover {
  transform: scale(1.01);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   ✍️ Typography & Lists
   --------------------------------------------------------------------------
   Styling for headers and list presentation.
========================================================================== */
h1, h2 {
  color: var(--primary);
}

ul {
  padding-left: 1.5rem;
}

/* ==========================================================================
   🔗 Link Styles
   --------------------------------------------------------------------------
   Visually distinct anchor elements for usability.
========================================================================== */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   📂 Projects Section
   --------------------------------------------------------------------------
   Project cards with soft shadow and margin spacing.
========================================================================== */
.project {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  background: #fdfdfd;
}

/* ==========================================================================
   ✉️ Contact Form
   --------------------------------------------------------------------------
   Accessible and responsive form fields with consistent spacing.
========================================================================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.contact-form button {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: var(--accent);
}

/* ==========================================================================
   🗺️ Map Section
   --------------------------------------------------------------------------
   Map container with rounded border and overflow control.
========================================================================== */
.map {
  margin-top: 2rem;
  height: 300px;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

/* ==========================================================================
   ⬆️ Scroll-to-Top Button
   --------------------------------------------------------------------------
   Floating fixed-position button with accessibility improvements.
========================================================================== */
.scroll-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0078d7;
  color: #fff;
  padding: 12px 16px;
  border-radius: 50%;
  text-align: center;
  text-decoration: none;
  font-size: 1.2rem;
  z-index: 999;
  transition: background 0.3s ease;
}

.scroll-link:hover,
.scroll-link:focus {
  background-color: #0053a4;
  outline: 2px dashed #fff;
}

/* ==========================================================================
   🏷️ Project Status Tags
   --------------------------------------------------------------------------
   Visually distinguish ongoing/completed project labels.
========================================================================== */
.project-status,
.project-status-ongoing {
  font-size: 0.875rem;
  font-weight: bold;
  color: #fff;
  background-color: #007bff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
}

.project-status-ongoing {
  background-color: #ffc107;
}

/* ==========================================================================
   ✅ Contact Form Accessibility Enhancements
   --------------------------------------------------------------------------
   Improved spacing and focus feedback for screen readers and keyboard users.
========================================================================== */
.contact-form input,
.contact-form textarea,
.contact-form button {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact-form label {
  font-weight: bold;
  display: block;
  margin-top: 1rem;
}

.contact-form button {
  background-color: #007bff;
  color: #fff;
  cursor: pointer;
  border: none;
}

.contact-form button:hover,
.contact-form button:focus {
  background-color: #0056b3;
  outline: 2px solid #fff;
}

/* ==========================================================================
   🧭 Skip Link for Keyboard Navigation
   --------------------------------------------------------------------------
   Provides screen reader users a way to bypass navigation.
========================================================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -999;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1rem;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  font-weight: bold;
  z-index: 1000;
  display: inline-block;
}

/* ==========================================================================
   🌍 Accessible Embedded Map Styling
========================================================================== */
.map-iframe-secondary {
  width: 100%;
  height: 400px; /* Or any desired height */
  border-radius: 8px;
  overflow: hidden;
}

/* ==========================================================================
   📱 Responsive Design Tweaks
   --------------------------------------------------------------------------
   Optimizes for smaller screen real estate.
========================================================================== */
@media (max-width: 600px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  header img {
    width: 100px;
    height: 100px;
  }
}

/* ==========================================================================
   🧾 Footer
   --------------------------------------------------------------------------
   Simple, clean footer with standard text formatting.
========================================================================== */
footer {
  background: #eee;
  text-align: center;
  padding: 1rem;
  font-size: 0.95rem;
}
