:root {
  --red: #D62828;
  --red-dark: #9B1B1B;
  --red-light: #F9E5E5;
  --black: #1A1A1A;
  --white: #FFFFFF;
  --gray: #F5F5F3;
  --gray-mid: #888;
  --spot: #FF6B6B;
  --dot: #2C2C2A;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.7;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--spot); }

.nav-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-social a {
  color: #ccc;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.nav-social a:hover { color: var(--spot); }

.nav-social svg { width: 20px; height: 20px; fill: currentColor; }

/* HERO */
#home {
  background: var(--black);
  color: var(--white);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bug {
  width: 100px;
  margin: 0 auto 1.5rem;
  display: block;
}

#home h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

#home h1 span { color: var(--red); }

.slogan {
  font-size: 1.1rem;
  color: #bbb;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.slogan span { color: var(--spot); }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tag {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ddd;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.85rem;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

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

/* SECTION WRAPPER */
section {
  padding: 4.5rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

section.full-width {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.section-content {
  display: flex;
  flex-direction: column;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  margin-bottom: 0.4rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.divider {
  width: 48px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin-bottom: 2rem;
}

/* ABOUT */
#about {
  background: var(--gray);
}

#about > div {
  max-width: 960px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
}

.more-button {
  display: block;
  margin: 2.5rem auto 0 auto;
}

.about-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
}

.about-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--red-dark);
}

.about-card p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.skill-pill {
  background: var(--red-light);
  color: var(--red-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.skills-list-gray .skill-pill {
  background: var(--gray-mid);
  color: var(--gray);
}

/* PORTFOLIO */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--white);
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* .portfolio-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
} */

.portfolio-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--gray);
}

.portfolio-card-body {
  padding: 1.25rem;
}

.portfolio-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.portfolio-card p {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.tech-strip {
  font-size: 0.75rem;
  color: var(--gray-mid);
  margin-bottom: 0.75rem;
}

.card-link {
  font-size: 0.85rem;
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  margin-right: 1rem;
}

.card-link:hover { text-decoration: underline; }

/* PROJECTS */
#services { background: var(--gray); }

#services > div {
  max-width: 960px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-item {
  background: var(--white);
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: box-shadow 0.2s;
}

.service-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.service-icon {
  width: 40px;
  height: 40px;
  background: var(--red-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.service-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.service-item p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
}

.service-links {
  margin-top: 0.5rem;
}

/* WEB DEV BASICS */
.basics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.basics-card {
  background: var(--white);
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.5rem;
  border-top: 3px solid var(--red);
}

.basics-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.basics-card ul {
  list-style: none;
  font-size: 0.85rem;
  color: #444;
  line-height: 2;
}

.basics-card ul li::before {
  content: "→ ";
  color: var(--red);
  font-weight: 700;
}

.code-example {
  background: var(--black);
  color: #f8f8f2;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.code-example .kw { color: #ff79c6; }
.code-example .str { color: #f1fa8c; }
.code-example .tag { color: #8be9fd; background: none; border: none; padding: 0; color: #8be9fd; border-radius: 0; }
.code-example .prop { color: #50fa7b; }
.code-example .val { color: #bd93f9; }

/* CONTACT */
#contact { background: var(--black); color: var(--white); }

#contact > div {
  max-width: 600px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  text-align: center;
}

#contact .section-label { color: var(--spot); }
#contact h2 { color: var(--white); }

#contact p {
  color: #bbb;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.15s, background 0.2s;
}

.contact-btn:hover { transform: translateY(-2px); }
.contact-btn svg { width: 18px; height: 18px; fill: currentColor; }

.btn-linkedin { background: #0A66C2; color: white; }
.btn-github { background: #fff; color: #1A1A1A; }
.btn-insta { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; }

/* FOOTER */
footer {
  background: #111;
  text-align: center;
  padding: 1.5rem;
  color: #555;
  font-size: 0.82rem;
}

footer span { color: var(--red); }

/* LADYBUG SVG */
.ladybug-svg { display: block; margin: 0 auto; }

/* Mobile nav toggle */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: white;
}

@media (max-width: 700px) {
  .hamburger { display: flex; flex-direction: column; gap: 4px; }
  .hamburger span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 52px; left: 0; right: 0; background: var(--black); padding: 1rem 2rem; gap: 1rem; border-top: 1px solid #333; }
  .nav-links.open { display: flex; }
  nav { position: relative; flex-wrap: wrap; }
}