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

:root {
  --primary-color: #3b82f6;
  --text-color: #1f2937;
  --bg-color: #ffffff;
  --secondary-bg: #f9fafb;
  --border-color: #e5e7eb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Header & Navigation */
header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.3s ease;
  line-height: 1.2;
}

.subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.2;
  margin: 0;
}

.logo:hover {
  opacity: 0.8;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-item {
  position: relative;
}

.nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.nav-menu a.active {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
}

.nav-menu > .nav-item > a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
}

/* Dropdown Submenu */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 1000;
  margin-top: 0.5rem;
}

/* Invisible bridge to keep hover active across the gap */
.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
  display: none;
}

.nav-item:hover::after {
  display: block;
}

.nav-item:hover .submenu,
  .nav-item:focus-within .submenu {
  display: block;
}

.submenu li {
  margin: 0;
}

.submenu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-color);
  font-weight: 400;
  font-size: 0.9rem;
  white-space: nowrap;
}

.submenu a:hover {
  background-color: var(--secondary-bg);
  color: var(--primary-color);
}

.submenu a::after {
  display: none;
}

.social-links {
  display: flex;
  align-items: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  text-decoration: none;
}

.social-links a:hover {
  transform: translateY(-2px);;
  text-decoration: none;
}

.social-links i {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.social-links a:hover i {
  color: rgba(255, 255, 255, 1);
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  min-height: calc(100vh - 140px - 80px);
  /* viewport - header - footer */
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
  color: var(--text-color);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  color: var(--text-color);
}

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

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

a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: #1d4ed8;
  text-decoration: none;
  transform: translateY(-2px);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background-color: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-card h2,
.project-card h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.5rem;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1rem 1.5rem;
}

.project-card p {
  color: #6b7280;
  margin-bottom: 0.5rem;
  padding: 0 1.5rem;
}

.project-card p:first-of-type {
  margin-top: 0.5rem;
}

.project-card a {
  padding-bottom: 0;
}

.project-card a:last-of-type {
  padding-bottom: 1rem;
}

.project-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem 0.75rem 1.5rem;
}

/* Contact Info */
.contact-info {
  background-color: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 2rem;
  margin-top: 2rem;
  max-width: 600px;
}

.contact-info h3 {
  margin-top: 0;
}

.contact-info ul {
  list-style: none;
  margin-top: 1rem;
}

.contact-info li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-info li i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

/* Footer */
footer {
  background-color: var(--secondary-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: #6b7280;
  margin-top: 4rem;
}

/* Responsive */
@media (max-width:768px) {
  .nav-container {
    flex-wrap: wrap;
    height: auto;
    padding: 1rem 2rem;
  }
  
  .nav-menu {
    gap: 1rem;
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .social-links a {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .container {
    padding: 2rem 1rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
