/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #2c3e50;
  --color-accent: #3498db;
  --color-text: #333;
  --color-light: #f8f9fa;
  --color-border: #e0e0e0;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary);
}

img {
  max-width: 100%;
  height: auto;
}

/* Header & Navigation */
header {
  background: var(--color-primary);
  color: #fff;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

header .header-content {
  display: flex;
  flex-direction: column;
}

header .logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

header .tagline {
  font-size: 0.85rem;
  color: #ccc;
  font-style: italic;
  margin-top: 0.2rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: #fff;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

nav a:hover,
nav a.active {
  color: #fff;
  border-bottom-color: var(--color-accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main Content */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

/* Home Page 3-Column Grid */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 2rem;
}

.profile-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.profile-photo {
  width: 180px;
  height: auto;
  border-radius: 4px;
}

.service-block {
  margin-bottom: 2rem;
}

.service-block h2 {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.3rem;
  display: inline-block;
}

.service-block p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

/* About Page Layout */
.about-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
}

.about-photo .profile-photo {
  width: 180px;
  border-radius: 4px;
}

.about-text p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

@media (max-width: 600px) {
  .about-layout {
    flex-direction: column;
  }

  .about-photo .profile-photo {
    width: 140px;
  }
}

/* Page Title (for About & Contact) */
.page-title {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

.content-section {
  margin-bottom: 2rem;
  line-height: 1.8;
}

.content-section h2 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Form Status Messages */
.form-status {
  margin-top: 1rem;
  padding: 0;
  font-weight: 500;
}

.form-status.success {
  color: #27ae60;
}

.form-status.error {
  color: #e74c3c;
}

/* Contact Info */
.contact-info {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--color-light);
  border-radius: 6px;
  border-left: 4px solid var(--color-accent);
}

.contact-info h2 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background: #2980b9;
  color: #fff;
  transform: translateY(-1px);
}

/* Hero (for 404 page) */
.hero {
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Footer */
footer {
  background: var(--color-primary);
  color: #ccc;
  text-align: center;
  padding: 1.5rem 2rem;
  margin-top: auto;
}

footer p {
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary);
    padding: 1rem 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }

  nav ul.open {
    display: flex;
  }

  nav li {
    padding: 0.5rem 0;
  }

  main {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 140px;
  }

  header .logo {
    font-size: 1.2rem;
  }
}
