/* 1. Global Reset & Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --border-color: #334155;
  --primary-color: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

/* 2. Navigation Header */
header.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
}

header.header nav {
  display: flex;
  gap: 1.5rem;
}

header.header nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

header.header nav a:hover {
  color: var(--primary-color);
}

/* 3. Hero Section */
.hero {
  text-align: center;
  padding: 6rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--text-main);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #0f172a;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* 4. Sections & Grid Layouts */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
  padding-left: 0.75rem;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.skill-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  transition: border-color 0.2s ease;
}

.skill-card:hover {
  border-color: var(--primary-color);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 1.75rem;
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
}

.project-card h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 5. Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 3rem;
}

/* Contact Form Styling */
.contact-form {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--primary-color);
}

#modalTitle {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

#modalDesc {
  color: var(--text-muted);
  line-height: 1.6;
}