/* THEME VARIABLES */
:root {
  --bg-color: #0b0f1a;
  --text-color: #e5e7eb;
  --card-bg: #020617;
  --muted-text: #9ca3af;
  --accent: #38bdf8;
}

.light-theme {
  --bg-color: #ffffff;
  --text-color: #020617;
  --card-bg: #f1f5f9;
  --muted-text: #475569;
  --accent: #0ea5e9;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s ease, color 0.3s ease;
}

/* NAV */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 80px;
}

.logo {
  font-weight: 700;
  font-size: 20px;
}

.nav a {
  margin-left: 30px;
  text-decoration: none;
  color: var(--muted-text);
}

.nav a:hover {
  color: var(--text-color);
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
}

/* HERO */
.hero {
  padding: 120px 80px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-text h1 {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: fadeUp 1s ease forwards;
}

.hero-text p {
  max-width: 500px;
  color: var(--muted-text);
  margin-bottom: 40px;
  animation: fadeUp 1.2s ease forwards;
}

.hero-buttons {
  animation: fadeUp 1.4s ease forwards;
}

/* HERO IMAGE
   Use background for decoration but show the <img> for reliability on mobile.
   Keep Oceansideportrait.png in same folder as index.html and style.css. */
.hero-image {
  width: 100%;
  max-width: 380px;
  height: 380px;
  border-radius: 24px;
  /* decorative background (optional) */
  background-image: url("./Oceansideportrait.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll; /* avoid fixed on mobile */
  justify-self: end;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  background-color: #0b0f1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure the <img> is visible on all devices */
.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  -webkit-user-drag: none;
  user-select: none;
}

/* BUTTONS */
.btn {
  padding: 14px 26px;
  border-radius: 30px;
  text-decoration: none;
  margin-right: 15px;
  font-weight: 500;
  display: inline-block;
}

.primary {
  background: var(--accent);
  color: #020617;
}

.outline {
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* PROJECTS */
.projects {
  padding: 80px;
}

.projects h2 {
  font-size: 32px;
  margin-bottom: 40px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.card {
  background: var(--card-bg);
  padding: 60px 30px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted-text);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  color: var(--text-color);
}

/* CONTACT */
.contact {
  padding: 100px 80px;
  text-align: center;
}

.contact h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

.contact p {
  color: var(--muted-text);
  margin-bottom: 30px;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 40px;
  color: var(--muted-text);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .nav {
    padding: 20px 30px;
  }

  .nav nav {
    display: none;
  }

  .hero {
    padding: 80px 30px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 34px;
  }

  .hero-image {
    justify-self: center;
    margin-top: 40px;
    max-width: 320px;
    height: 320px;
  }

  .projects,
  .contact {
    padding: 60px 30px;
  }
}