/* ==================
RESET + BASE
================== */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
}

/* ==================
CUSTOM FONT
================== */
@font-face {
  font-family: "GenEiNuGothic-EB";
  src: url("../font/GenEiNuGothic-EB.ttf") format("truetype");
}

/* ==================
HEADER
================== */
header {
  background-color: rgba(226, 223, 223, 0.4);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.2);
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 50px;
  padding-left: 25px;
  padding-right: 25px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

header .header #logo {
  width: 75px;
  height: auto;
  display: block;
}

header .header nav > ul {
  display: flex;
  list-style: none;
  font-size: 9px;
  gap: 12px;
  position: absolute;
  right: 0;
  top: 30px;
  padding-right: 75px;
}

header .header nav > ul a img {
  width: 70px;
  transition: transform 0.4s ease;
}

header .header nav > ul a img:hover {
  transform: scale(1.1);
  cursor: pointer;
}

/* ==================
HAMBURGER (USED AS WHITE X ON MENU)
================== */
.ham-menu {
  width: 30px;
  height: 25px;
  margin: 0;
  padding: 0;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  z-index: 1200;
  -webkit-tap-highlight-color: transparent;
}

.ham-menu span {
  height: 2px;
  width: 100%;
  background-color: #000;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: 0.3s ease;
}

.ham-menu span:nth-child(1) { top: 25%; }
.ham-menu span:nth-child(2) { top: 70%; }

.ham-menu.active span:nth-child(1) {
  top: 45%;
  transform: translateX(-50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2) {
  top: 45%;
  transform: translateX(-50%) rotate(-45deg);
}

/* ==================
MENU OPEN BEHAVIOR (ONLY X BLEEDS THROUGH)
================== */
body.menu-open { overflow: hidden; }

body.menu-open .ham-menu span { background-color: #fff; }

body.menu-open .ham-menu{
  position: fixed;
  top: 14px;
  right: 25px;
  z-index: 1200;
  pointer-events: auto;
}

body.menu-open header{
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  pointer-events: none;
}

body.menu-open .logo-link,
body.menu-open header .header nav > ul{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==================
FULLSCREEN MENU
================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
}

.menu-overlay.is-open { display: block; }

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.menu-panel {
  position: relative;
  height: 100%;
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  padding: 90px 20px 30px;
}

.menu-list {
  list-style: none;
  padding: 8px 0 12px;
  margin: 0;

  width: min(520px, 92vw);
  text-align: center;

  display: flex;
  flex-direction: column;
  gap: 10px;

  max-height: calc(100vh - 140px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.menu-list::-webkit-scrollbar{
  width: 0;
  height: 0;
  display: none;
}

.menu-list a,
.submenu-toggle {
  display: block;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.menu-list a:hover,
.submenu-toggle:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.14);
  cursor: pointer;
}

.submenu-toggle {
  border: 1px solid rgba(255,255,255,0.14);
}

.submenu-toggle:focus-visible,
.menu-list a:focus-visible {
  outline: 3px solid rgba(255,255,255,0.6);
  outline-offset: 3px;
}

.has-submenu .chev {
  margin-left: 10px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.has-submenu.open .chev { transform: rotate(180deg); }

.submenu {
  list-style: none;
  padding: 10px 0 0;
  margin: 0;
  display: none;
  gap: 8px;
}

.has-submenu.open .submenu { display: grid; }

.submenu a {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
}

/* ==================
PAGE CONTENT
================== */
.h1 {
  margin-top: 2vw;
  margin-left: 5vw;
  border-bottom: 1px solid #000;
  border-bottom-width: thin;
  width: 40%;
  min-width: 300px;
  margin-bottom: 50px;
}

.h1 h1 { font-weight: 700; }

.programming_projects {
  width: min(900px, 92vw);
  margin: 0 auto;
  display: grid;
  gap: clamp(14px, 2vw, 18px);
  padding-bottom: 24px;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(10px, 2vw, 14px);
}

.project-btn {
  display: block;
  text-align: center;
  text-decoration: none;

  border: 2px solid #000;
  background: #000;
  color: #fff;
  font-weight: 700;

  font-size: clamp(16px, 2.2vw, 22px);
  padding: clamp(12px, 1.2vw, 16px) clamp(14px, 2vw, 18px);

  border-radius: 14px;
  line-height: 1;
  letter-spacing: 0.02em;

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, background-color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-btn:hover {
  background: #2c2c2c;
  border-color: #2c2c2c;
  transform: translateY(-1px);
}

.project-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.project-btn:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.35);
  outline-offset: 3px;
}

.github-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.github-link img {
  width: clamp(34px, 6vw, 48px);
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.github-link img:hover {
  transform: scale(1.08);
}

@media (max-width: 520px) {
  .project-row { grid-template-columns: 1fr; }

  .github-link {
    justify-content: flex-start;
    padding-left: 8px;
  }
}

/* ==================
FOOTER
================== */
.mini-footer {
  margin-top: auto;
  padding-top: 14px;
  padding-bottom: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.mini-footer .footer-nav,
.mini-footer .footer-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.mini-footer .footer-nav {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.mini-footer .footer-subnav {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

.mini-footer a {
  color: #000;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

@media (max-width: 900px) {
  .mini-footer .footer-nav { font-size: 12px; }
  .mini-footer .footer-subnav { font-size: 10.5px; }
}
