/* 
   Design System variables
   White, Blue, Red (Primary), Black (Text)
*/
:root {
  --primary-color: #E63946; /* Red */
  --secondary-color: #1D3557; /* Dark Blue */
  --accent-color: #457B9D; /* Light Blue */
  --bg-color: #FFFFFF; /* White */
  --surface-color: #F1FAEE; /* Off-white for cards/sections */
  --text-dark: #1A1A1A; /* Black text */
  --text-light: #FFFFFF; /* White text on dark bg */
  --text-muted: #666666;
  
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; position: relative; padding-bottom: 0.5rem; }
h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 60px;
  background-color: var(--primary-color);
  border-radius: 2px;
}
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 4px 6px rgba(230, 57, 70, 0.2);
}

.btn-primary:hover {
  background-color: #d62828;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(230, 57, 70, 0.3);
  color: var(--text-light);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* Header and Navbar */
.navbar {
  background-color: var(--bg-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

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

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary-color);
  letter-spacing: -0.5px;
}

.brand span {
  color: var(--primary-color);
}

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

.nav-link {
  font-weight: 600;
  color: var(--secondary-color);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--secondary-color);
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--secondary-color);
  left: 0;
  transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Mobile Menu Active State */
.menu-toggle.active .hamburger { background-color: transparent; }
.menu-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle.active .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 4rem 0 0 0;
  margin-top: 4rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h3 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer h3 span {
  color: var(--primary-color);
}

.footer h4 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-links ul li,
.footer-social ul li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  background-color: rgba(0, 0, 0, 0.2);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-bg {
  background-color: var(--surface-color);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  display: inline-block;
}

.section-header h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-header p {
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--bg-color) 100%);
}

.hero-content {
  max-width: 650px;
  z-index: 1;
  position: relative;
}

.hero-subtitle {
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

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

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

.hero-shape {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  height: 80%;
  background: var(--accent-color);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.1;
  z-index: 0;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-card {
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-top: 4px solid transparent;
  display: flex;
  flex-direction: column;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--primary-color);
}

.skill-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(69, 123, 157, 0.1);
  color: var(--accent-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.skill-card:hover .skill-icon {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.skill-list {
  margin-top: 1rem;
  flex-grow: 1;
}

.skill-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.skill-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-img {
  width: 100%;
  height: 200px;
  background-color: var(--secondary-color);
  position: relative;
}

/* Pattern for project image placeholder */
.project-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--bg-color) 10%, transparent 10%);
  background-size: 10px 10px;
  opacity: 0.1;
}

.project-content {
  padding: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  background-color: rgba(69, 123, 157, 0.1);
  color: var(--accent-color);
  border-radius: 20px;
}

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--surface-color);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.contact-details h4 {
  margin-bottom: 0.25rem;
}

.contact-details p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.contact-form {
  background-color: var(--bg-color);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Media Queries for Mobile-First/Responsiveness */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 70px; /* Adjust based on navbar height */
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-color);
    flex-direction: column;
    padding: 2rem;
    transition: 0.4s ease;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-list {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 1.5rem;
  }
  
  .nav-link {
    font-size: 1.25rem;
    display: block;
  }
  
  .hero {
    text-align: center;
    padding-top: 4rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-shape {
    display: none;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
}
