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

/* Remove default focus outlines and only show on keyboard navigation */
* {
  outline: none;
}

*:focus-visible {
  outline: revert;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg: rgba(20, 20, 20, 1);
  --surface-1: #12161b;
  --surface-2: #171c23;
  --line: #252c34;
  --prime-theme: rgb(252 126 32);

  --gofun: #fffffc;
  --hakuji: #f8f8f8;
  --unohana: #f7fcfe;
  --kinariro: #fbfaf5;
  --shironeri: #f3f3f2;
  --soshoku: #eae5e3;
  --shiraumenezu: #e5e4e6;
  --milkywhite: #f3f3f3;
  --murasakisuishiyou: #e7e7eb;
  --shironezu: #dcdddd;

  --font-body: "Quicksand", sans-serif, system-ui;
  --font-h1: "Space Grotesk", sans-serif, system-ui;

  --prime-text-bg: linear-gradient(
    135deg,
    var(--milkywhite) 0%,
    var(--prime-theme) 80%,
    var(--bg) 100%
  );
}

.noscroll {
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--milkywhite);
}

h2 {
  font-family: var(--font-h1);
  font-weight: 200;
}

header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(5px);
  box-shadow: 0px 0px 5px var(--hakuji);
}

header p {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-family: var(--font-h1);
  font-weight: 400;
  padding: 1rem;
  color: transparent;
  background: linear-gradient(
    135deg,
    var(--prime-theme) 0%,
    var(--milkywhite) 50%,
    var(--bg) 100%
  );
  background-clip: text;
  cursor: pointer;
}

/* Logo/home link focus styling */
header a:focus-visible {
  outline: 2px solid var(--prime-theme);
  outline-offset: 4px;
  border-radius: 8px;
}

h1 {
  font-family: var(--font-h1);
  font-weight: 800;
  padding: 1rem;
  color: transparent;
  background: var(--prime-text-bg);
  background-clip: text;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.nav-items {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 1rem;
}
.nav-items li {
  padding: 0.25rem 1rem;
  transition: all 300ms;
  background-color: var(--bg);
  background-clip: text;
  color: var(--gofun);
  font-size: 1.55rem;
}

.nav-items li:hover {
  cursor: pointer;
  background-color: var(--prime-theme);
  background-clip: text;
  color: transparent;
  transition: all 350ms;
}

/* Keyboard navigation focus styles */
.nav-items a:focus-visible {
  outline: 2px solid var(--prime-theme);
  outline-offset: 4px;
  border-radius: 6px;
}

.nav-items li:has(a:focus-visible) {
  background-color: var(--prime-theme);
  background-clip: text;
  color: transparent;
}

/* Fallback for browsers without :has() support */
@supports not (selector(:has(*))) {
  .nav-items a:focus-visible {
    background-color: var(--prime-theme);
    background-clip: text;
    color: transparent;
    border-radius: 6px;
  }
}

/* Mobile menu buttons */
.menu-icon,
.close-icon {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--hakuji);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: block;
  z-index: 11;
}

.menu-icon:hover,
.close-icon:hover {
  background: rgba(252, 126, 32, 0.15);
  color: var(--prime-theme);
  transform: scale(1.05);
}

.menu-icon:focus-visible,
.close-icon:focus-visible {
  outline: 2px solid var(--prime-theme);
  outline-offset: 2px;
}

.menu-icon:active,
.close-icon:active {
  transform: scale(0.95);
}

/* SVG icon styling */
.menu-icon svg,
.close-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Enhanced keyboard focus for menu buttons */
.menu-icon:focus-visible,
.close-icon:focus-visible {
  outline: 3px solid var(--prime-theme);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px var(--bg), 0 0 8px var(--prime-theme);
}

span.hidden {
  display: none;
}

.dropdown {
  position: absolute;
  top: 100%;
  width: 100dvw;
  height: 100dvh;
  background-color: var(--surface-1);
}
.nav-items {
  height: 100%;
}
.dropdown > .nav-items {
  font-size: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 3rem;
  gap: 4rem;
  align-items: center;
}

.hidden {
  display: none;
}

a {
  all: unset;
  text-decoration: none;
  color: inherit;
}

.about-page {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.about-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.5rem;
}

.about-hero {
  text-align: center;
  padding: 4dvh;
  backdrop-filter: blur(3px);
}

.about-hero > p {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--milkywhite);
}

.about-snapshot,
.about-principles,
.about-personal,
.about-connect,
.about-hero {
  border-radius: 15px;
  border: 1px solid transparent;
  backdrop-filter: blur(15px);
  padding: 2rem;
  transition: all 500ms;
}

.about-snapshot:hover,
.about-principles:hover,
.about-personal:hover,
.about-connect:hover,
.about-hero:hover {
  border: 1px solid var(--prime-theme);
  box-shadow:
    0px 0px 20px var(--prime-theme),
    inset 0px 0px 20px var(--prime-theme);
  transition: all 350ms;
}

.about-snapshot > h2,
.about-principles > h2,
.about-personal > h2,
.about-connect > h2,
.about-colophon > h2 {
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: 2px;
  background: var(--prime-text-bg);
  background-clip: text;
  color: transparent;
  margin-bottom: 1.5rem;
}

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

.keypoints li {
  line-height: 1.6;
  color: var(--milkywhite);
}

.keypoints strong {
  color: var(--gofun);
}

.about-personal > p,
.about-connect > p {
  line-height: 1.6;
  color: var(--milkywhite);
  margin-bottom: 1.5rem;
}

.download-resume {
  padding: 0.75rem 2rem;
  background-color: var(--bg);
  color: var(--milkywhite);
  border: 1px solid var(--milkywhite);
  border-radius: 5px;
  transition: all 500ms;
  cursor: pointer;
}

.download-resume:hover {
  box-shadow: 0px 0px 15px var(--soshoku);
  transition: all 300ms;
}

.download-resume:focus-visible {
  outline: 2px solid var(--prime-theme);
  outline-offset: 3px;
  box-shadow: 0px 0px 15px var(--soshoku), 0 0 8px var(--prime-theme);
}

.social-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 5px;
}

.social-info > * * {
  border-radius: 5px;
  transition: all 500ms;
  cursor: pointer;
}
.social-info > * :hover {
  border-radius: 5px;
  box-shadow: 0px 0px 15px var(--soshoku);
  transition: all 300ms;
}

.social-info a:focus-visible {
  outline: 2px solid var(--prime-theme);
  outline-offset: 3px;
  border-radius: 8px;
}

.social-info a:focus-visible svg {
  box-shadow: 0px 0px 15px var(--soshoku);
}

.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  color: var(--shiraumenezu);
  border-top: 1px solid var(--line);
  background-color: var(--surface-1);
}

@media (min-width: 700px) {
  /* Hide mobile menu buttons on desktop */
  .menu-icon,
  .close-icon {
    display: none !important;
  }

  /* Show desktop navigation */
  .nav-bar {
    display: block !important;
  }

  /* Hide mobile dropdown on desktop */
  .dropdown {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .mobile-in-view {
    border: 1px solid var(--prime-theme);
    box-shadow:
      0px 0px 20px var(--prime-theme),
      inset 0px 0px 20px var(--prime-theme);
    transition: all 350ms;
  }
}
