/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --muted: #888;
  --accent: #6c63ff;
  --accent-hover: #857dff;
  --radius: 12px;
  --max-width: 900px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ===== NAV ===== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  position: sticky;
  top: 0;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

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

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.tagline {
  color: var(--muted);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ===== SECTIONS ===== */
section {
  padding: 6rem 2rem;
}

section:nth-child(even) {
  background: var(--surface);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

#about p {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 1rem;
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.card-link:hover {
  color: var(--accent-hover);
}

/* ===== CONTACT FORM ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
  margin-top: 1rem;
}

input, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  nav ul {
    gap: 1rem;
  }

  .hero-content {
    padding: 3rem 1.5rem;
  }

  section {
    padding: 4rem 1.5rem;
  }
}
