@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --font-body: 'Roboto', sans-serif;
  --font-heading: 'Inter', sans-serif;
  
  --bg-body: #ffffff;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --text-color: #333333;
  --text-muted: #777777;
  --border-color: #eeeeee;
  --hover-bg: #f4f4f4;
}

html {
  font-size: 16px;
  background-color: var(--bg-body);
}

body {
  margin: 0;
  flex-direction: column;
  min-height: 100dvh;
  display: flex;
  background-color: var(--bg-body);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  --bg-body: #121212;
  --bg-header: #1e1e1e;
  --bg-card: #1e1e1e;
  --text-color: #e0e0e0;
  --text-muted: #a0a0a0;
  --border-color: #333333;
  --hover-bg: #333333;
}

header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-heading);
  margin: 0;
}

main {
  flex-grow: 1; /* push footer to the bottom */
  font-family: var(--font-body);
}

#theme-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

#theme-toggle:hover {
  background-color: var(--hover-bg);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* change line */
  margin: 0 auto;
  padding: 0 1rem;
  max-width: 1160px;

  & ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
  }
}

.nav-clickable {
  display: inline-block;
  font-size: 1.2rem;
  color: var(--text-muted);
  padding: 0.8rem 1rem;
  margin: 0 0.25rem;
  border-radius: .5rem;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
}

.nav-clickable:hover {
  background-color: var(--hover-bg);
  cursor: pointer;
  transform: translateY(-2px) scale(1.05);
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none; /* remove underline */
  padding: 0.8rem 2rem;
}

.nav-active {
  color: blue;
}

.home-container {
  display: flex;
  flex-direction: column;
  margin: 1rem auto;
  padding: 0 1rem;
  max-width: 1160px;
}

.home-left {
  padding: 1rem;
  text-align: center;
}

.home-left > img {
  border-radius: 50%;
  height: 150px;
  width: 150px;
  object-fit: cover;
  object-position: center;
}

.home-left a {
  text-decoration: none;
  font-weight: 500;
  color: var(--font-body);
  display: inline-block;
  padding: 0.5rem;
  
  &:hover {
    cursor: pointer;
    text-decoration: underline;
  }
}

.home-right {
  flex-grow: 1;
}

.projects-container {
  display: flex;
  flex-direction: column;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 1160px;
}

.projects-container h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.projects-container h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.project-card {
  border: 1px solid var(--border-color);
  border-radius: .5px;
  padding: 0 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  transition: box-shadow 0.2s ease-out, transform 0.2s ease-out;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

footer {
  border-top: 1px solid var(--border-color);
  text-align: center;
  padding: .6rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ipad */
@media (min-width: 768px) {
  nav {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 1rem;
  }

  .home-container {
    flex-direction: row;
    margin: 2rem auto;
  }

  .home-left {
    flex-basis: 250px;
    flex-shrink: 0;
    padding: 2rem 2rem;
    text-align: left;
  }

  .home-left a {
    display: block;
    padding: 0.6rem 0 0 0;
  }
}

/* laptop */
@media (min-width: 1024px) {
  .home-left {
    flex-basis: 300px;
  }
}