:root {
  --bg-dark: oklch(0.975 0 247);
  --bg: oklch(0.95 0 0);
  --bg-light: oklch(1 0 0);
  --text: oklch(0.05 0 0);
  --text-secondary: oklch(0.4 0.035 264);
  --text-muted: oklch(0.3 0 0);
  --border: oklch(0.9 0 260);
  --buttons: oklch(0.6 0.2 254);
  --bg-icons: oklch(0.9 0.03 256);
  --placeholder: oklch(0.7 0 263);
  --nav-height: 64px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 3rem;
  --transition: all 0.3s ease;
}

:root[data-theme="dark"] {
  --bg-dark: oklch(0.1, 0, 0);
  --bg: oklch(0.05, 0, 0);
  --bg-light: oklch(0.1, 0, 0);
  --text: oklch(0.95, 0, 0);
  --text-muted: oklch(0.7, 0, 0);
  --border: oklch(0.3, 0, 0);
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: "SoDo Sans SemiBold";
  src: url("../assets/fonts/SoDo\ Sans\ SemiBold.ttf");
}

html,
body {
  font-family: "SoDo Sans SemiBold", sans-serif;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  padding-top: var(--nav-height);
  background-color: var(--bg-dark);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
}

nav {
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px var(--border);
  color: var(--text-muted);
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  padding: 0 var(--space-md);
  text-decoration: none;
  box-sizing: border-box;
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

nav img {
  height: 25px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

nav ul {
  margin: 0;
  padding: 0;
  padding-left: 1rem;
  gap: 1rem;
  display: flex;
  list-style: none;
  align-items: center;
}

ul > li {
  display: inline-flex;
}

nav a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 0.75rem;
  transition: var(--transition);
  border-radius: 8px;
}

nav a:hover {
  color: var(--buttons);
}

#hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}

#hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-muted);
  transition: var(--transition);
  display: block;
}

main {
  gap: 1rem;
  padding: var(--space-lg);
  background-color: var(--bg-dark);
  display: flex;
  align-items: center;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

main h1 {
  color: var(--text);
  margin: 0 0 1rem 0;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
}

main section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1rem;
  padding: 1rem;
  border-radius: 24px;
  color: var(--text-muted);
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  width: 100%;
}

.main-section {
  flex-direction: column;
}

main p {
  line-height: 1.6;
  margin: 0.5rem 0;
}

main a {
  color: var(--buttons);
  text-decoration: none;
  transition: var(--transition);
}

main a:hover {
  text-decoration: underline;
}

/* CONTACT */

.contact-form {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 0.625rem;
  margin-left: var(--space-md);
  padding: var(--space-md);
  flex: 1;
  min-width: 280px;
}

.contact-form-labels {
  font-size: small;
  margin-top: 0.75rem;
  font-weight: bold;
  color: var(--text-muted);
  font-family: "SoDo Sans SemiBold", sans-serif;
}

.contact-form-textbox {
  overflow: hidden;
  overflow-wrap: break-word;
  font-size: small;
  text-align: left;
  resize: none;
  flex-basis: 20px;
  width: 100%;
  max-width: 400px;
  min-height: 35px;
  border-radius: 8px;
  padding: 0.5rem;
  font-family: "SoDo Sans SemiBold", sans-serif;
  border: 1px solid var(--border);
  background-color: var(--bg-dark);
  color: var(--text-secondary);
}

.contact-form-textbox::placeholder {
  color: var(--placeholder);
}

.contact-form-textbox:nth-last-child(2) {
  flex-basis: 150px;
  flex-grow: 1;
  min-height: 150px;
}

.contact-form-button {
  text-align: center;
  flex-basis: 50px;
  width: 100%;
  max-width: 400px;
  background-color: var(--buttons);
  border-radius: 8px;
  border: none;
  font-weight: bold;
  color: var(--bg-light);
  cursor: pointer;
  padding: 0.75rem;
  transition: var(--transition);
  margin-top: 1rem;
}

.contact-form-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  font-family: "SoDo Sans SemiBold", sans-serif;
  padding: 1.5rem;
  flex: 1;
  min-width: 250px;
}

.contact-aside h3 {
  font-size: medium;
  color: var(--text);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.contact-aside h3:first-child {
  margin-top: 0;
}

.contact-aside p {
  font-size: smaller;
  color: var(--text-secondary);
  margin: 0;
  margin-bottom: 1rem;
}

.contact-aside a {
  display: inline-block;
  margin-top: 0.5rem;
  transition: var(--transition);
}

.contact-aside img {
  height: 25px;
  width: auto;
}

/* WPL */

.wpl-hourglass {
  background-color: var(--bg-icons);
  border-radius: 48px;
  padding: 0.5rem;
  margin-top: 1rem;
  width: 60px;
  height: auto;
}

/* ABOUT ME */

.aboutme {
  display: flex;
  justify-content: center;
  align-items: center;
}

.aboutme-article {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.aboutme-cv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background-color: var(--buttons);
  border-radius: 8px;
  font-weight: bold;
  color: var(--bg-light);
  text-decoration: none;
  transition: var(--transition);
  margin: 1rem 0;
}

.aboutme-cv:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* PROJECTS */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 16px;
  background-color: var(--bg-light);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  color: var(--text);
  margin: 0;
}

.project-card p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.project-card a {
  color: var(--buttons);
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
}

.project-card a:hover {
  text-decoration: underline;
}

footer {
  margin-top: auto;
  position: relative;
  bottom: 0;
  left: 0;
  right: 0;
  align-items: center;
  background: var(--bg-dark);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: 0 -1px 4px var(--border);
  box-sizing: border-box;
  padding: 0 1rem;
  text-align: center;
}

#current-page {
  color: var(--bg-light);
  background-color: var(--buttons);
  border-radius: 8px;
}

#home-link {
  text-decoration: none;
}

/* MEDIA QUERIES - TABLET (768px) */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
    --space-lg: 2rem;
  }

  nav {
    height: var(--nav-height);
  }

  nav ul {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 1rem 0;
    gap: 0;
    z-index: 999;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    margin-left: 1rem;
    width: 100%;
  }

  nav ul li a {
    display: block;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }

  #hamburger {
    display: flex;
  }

  main {
    padding: 1.5rem;
  }

  main h1 {
    font-size: clamp(1.25rem, 4vw, 2rem);
  }

  main section {
    flex-direction: column;
    padding: 1rem;
  }

  .contact-form {
    margin-left: 0;
    width: 100%;
  }

  .contact-form-textbox,
  .contact-form-button {
    max-width: 100%;
  }

  .contact-aside {
    width: 100%;
    min-width: 100%;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  footer {
    position: relative;
  }
}

/* MEDIA QUERIES - MOBILE (480px) */
@media (max-width: 480px) {
  :root {
    --nav-height: 56px;
    --space-lg: 1.5rem;
    --space-md: 0.75rem;
  }

  body {
    padding-top: var(--nav-height);
  }

  nav {
    padding: 0 var(--space-md);
  }

  nav img {
    height: 20px;
  }

  nav li {
    margin-left: 1rem;
  }

  #hamburger span {
    width: 20px;
    height: 2px;
  }

  main {
    padding: 1rem;
    gap: 0.75rem;
  }

  main h1 {
    font-size: 1.25rem;
    margin: 0.5rem 0;
  }

  main section {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  main p {
    font-size: 0.95rem;
  }

  .contact-form {
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .contact-form-labels {
    font-size: 0.8rem;
    margin-top: 0.5rem;
  }

  .contact-form-textbox {
    font-size: 0.9rem;
    padding: 0.4rem;
  }

  .contact-form-textbox:nth-last-child(2) {
    min-height: 120px;
  }

  .contact-form-button {
    font-size: 0.9rem;
    padding: 0.6rem;
    margin-top: 0.75rem;
  }

  .contact-aside {
    padding: 0.75rem;
  }

  .contact-aside h3 {
    font-size: 0.95rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
  }

  .contact-aside p {
    font-size: 0.85rem;
  }

  .contact-aside img {
    height: 30px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-card {
    padding: 1rem;
  }

  .project-card h3 {
    font-size: 1rem;
  }

  .project-card p {
    font-size: 0.9rem;
  }

  .aboutme-cv {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .wpl-hourglass {
    width: 50px;
  }

  footer {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* MEDIA QUERIES - LARGE SCREENS (1024px+) */
@media (min-width: 1024px) {
  main section {
    flex-direction: row;
  }

  .contact-form {
    margin-left: var(--space-md);
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}
